00001 """autogenerated by genpy from photo/CaptureRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class CaptureRequest(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "photo/CaptureRequest"
00011 _has_header = False
00012 _full_text = """
00013 """
00014 __slots__ = []
00015 _slot_types = []
00016
00017 def __init__(self, *args, **kwds):
00018 """
00019 Constructor. Any message fields that are implicitly/explicitly
00020 set to None will be assigned a default value. The recommend
00021 use is keyword arguments as this is more robust to future message
00022 changes. You cannot mix in-order arguments and keyword arguments.
00023
00024 The available fields are:
00025
00026
00027 :param args: complete set of field values, in .msg order
00028 :param kwds: use keyword arguments corresponding to message field names
00029 to set specific fields.
00030 """
00031 if args or kwds:
00032 super(CaptureRequest, self).__init__(*args, **kwds)
00033
00034 def _get_types(self):
00035 """
00036 internal API method
00037 """
00038 return self._slot_types
00039
00040 def serialize(self, buff):
00041 """
00042 serialize message into buffer
00043 :param buff: buffer, ``StringIO``
00044 """
00045 try:
00046 pass
00047 except struct.error as se: self._check_types(se)
00048 except TypeError as te: self._check_types(te)
00049
00050 def deserialize(self, str):
00051 """
00052 unpack serialized message in str into this message instance
00053 :param str: byte array of serialized message, ``str``
00054 """
00055 try:
00056 end = 0
00057 return self
00058 except struct.error as e:
00059 raise genpy.DeserializationError(e)
00060
00061
00062 def serialize_numpy(self, buff, numpy):
00063 """
00064 serialize message with numpy array types into buffer
00065 :param buff: buffer, ``StringIO``
00066 :param numpy: numpy python module
00067 """
00068 try:
00069 pass
00070 except struct.error as se: self._check_types(se)
00071 except TypeError as te: self._check_types(te)
00072
00073 def deserialize_numpy(self, str, numpy):
00074 """
00075 unpack serialized message in str into this message instance using numpy for array types
00076 :param str: byte array of serialized message, ``str``
00077 :param numpy: numpy python module
00078 """
00079 try:
00080 end = 0
00081 return self
00082 except struct.error as e:
00083 raise genpy.DeserializationError(e)
00084
00085 _struct_I = genpy.struct_I
00086 """autogenerated by genpy from photo/CaptureResponse.msg. Do not edit."""
00087 import sys
00088 python3 = True if sys.hexversion > 0x03000000 else False
00089 import genpy
00090 import struct
00091
00092 import std_msgs.msg
00093 import sensor_msgs.msg
00094
00095 class CaptureResponse(genpy.Message):
00096 _md5sum = "b13d2865c5af2a64e6e30ab1b56e1dd5"
00097 _type = "photo/CaptureResponse"
00098 _has_header = False
00099 _full_text = """sensor_msgs/Image image
00100
00101
00102 ================================================================================
00103 MSG: sensor_msgs/Image
00104 # This message contains an uncompressed image
00105 # (0, 0) is at top-left corner of image
00106 #
00107
00108 Header header # Header timestamp should be acquisition time of image
00109 # Header frame_id should be optical frame of camera
00110 # origin of frame should be optical center of cameara
00111 # +x should point to the right in the image
00112 # +y should point down in the image
00113 # +z should point into to plane of the image
00114 # If the frame_id here and the frame_id of the CameraInfo
00115 # message associated with the image conflict
00116 # the behavior is undefined
00117
00118 uint32 height # image height, that is, number of rows
00119 uint32 width # image width, that is, number of columns
00120
00121 # The legal values for encoding are in file src/image_encodings.cpp
00122 # If you want to standardize a new string format, join
00123 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00124
00125 string encoding # Encoding of pixels -- channel meaning, ordering, size
00126 # taken from the list of strings in src/image_encodings.cpp
00127
00128 uint8 is_bigendian # is this data bigendian?
00129 uint32 step # Full row length in bytes
00130 uint8[] data # actual matrix data, size is (step * rows)
00131
00132 ================================================================================
00133 MSG: std_msgs/Header
00134 # Standard metadata for higher-level stamped data types.
00135 # This is generally used to communicate timestamped data
00136 # in a particular coordinate frame.
00137 #
00138 # sequence ID: consecutively increasing ID
00139 uint32 seq
00140 #Two-integer timestamp that is expressed as:
00141 # * stamp.secs: seconds (stamp_secs) since epoch
00142 # * stamp.nsecs: nanoseconds since stamp_secs
00143 # time-handling sugar is provided by the client library
00144 time stamp
00145 #Frame this data is associated with
00146 # 0: no frame
00147 # 1: global frame
00148 string frame_id
00149
00150 """
00151 __slots__ = ['image']
00152 _slot_types = ['sensor_msgs/Image']
00153
00154 def __init__(self, *args, **kwds):
00155 """
00156 Constructor. Any message fields that are implicitly/explicitly
00157 set to None will be assigned a default value. The recommend
00158 use is keyword arguments as this is more robust to future message
00159 changes. You cannot mix in-order arguments and keyword arguments.
00160
00161 The available fields are:
00162 image
00163
00164 :param args: complete set of field values, in .msg order
00165 :param kwds: use keyword arguments corresponding to message field names
00166 to set specific fields.
00167 """
00168 if args or kwds:
00169 super(CaptureResponse, self).__init__(*args, **kwds)
00170
00171 if self.image is None:
00172 self.image = sensor_msgs.msg.Image()
00173 else:
00174 self.image = sensor_msgs.msg.Image()
00175
00176 def _get_types(self):
00177 """
00178 internal API method
00179 """
00180 return self._slot_types
00181
00182 def serialize(self, buff):
00183 """
00184 serialize message into buffer
00185 :param buff: buffer, ``StringIO``
00186 """
00187 try:
00188 _x = self
00189 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00190 _x = self.image.header.frame_id
00191 length = len(_x)
00192 if python3 or type(_x) == unicode:
00193 _x = _x.encode('utf-8')
00194 length = len(_x)
00195 buff.write(struct.pack('<I%ss'%length, length, _x))
00196 _x = self
00197 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00198 _x = self.image.encoding
00199 length = len(_x)
00200 if python3 or type(_x) == unicode:
00201 _x = _x.encode('utf-8')
00202 length = len(_x)
00203 buff.write(struct.pack('<I%ss'%length, length, _x))
00204 _x = self
00205 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00206 _x = self.image.data
00207 length = len(_x)
00208
00209 if type(_x) in [list, tuple]:
00210 buff.write(struct.pack('<I%sB'%length, length, *_x))
00211 else:
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 except struct.error as se: self._check_types(se)
00214 except TypeError as te: self._check_types(te)
00215
00216 def deserialize(self, str):
00217 """
00218 unpack serialized message in str into this message instance
00219 :param str: byte array of serialized message, ``str``
00220 """
00221 try:
00222 if self.image is None:
00223 self.image = sensor_msgs.msg.Image()
00224 end = 0
00225 _x = self
00226 start = end
00227 end += 12
00228 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 start = end
00233 end += length
00234 if python3:
00235 self.image.header.frame_id = str[start:end].decode('utf-8')
00236 else:
00237 self.image.header.frame_id = str[start:end]
00238 _x = self
00239 start = end
00240 end += 8
00241 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00242 start = end
00243 end += 4
00244 (length,) = _struct_I.unpack(str[start:end])
00245 start = end
00246 end += length
00247 if python3:
00248 self.image.encoding = str[start:end].decode('utf-8')
00249 else:
00250 self.image.encoding = str[start:end]
00251 _x = self
00252 start = end
00253 end += 5
00254 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00255 start = end
00256 end += 4
00257 (length,) = _struct_I.unpack(str[start:end])
00258 start = end
00259 end += length
00260 if python3:
00261 self.image.data = str[start:end].decode('utf-8')
00262 else:
00263 self.image.data = str[start:end]
00264 return self
00265 except struct.error as e:
00266 raise genpy.DeserializationError(e)
00267
00268
00269 def serialize_numpy(self, buff, numpy):
00270 """
00271 serialize message with numpy array types into buffer
00272 :param buff: buffer, ``StringIO``
00273 :param numpy: numpy python module
00274 """
00275 try:
00276 _x = self
00277 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00278 _x = self.image.header.frame_id
00279 length = len(_x)
00280 if python3 or type(_x) == unicode:
00281 _x = _x.encode('utf-8')
00282 length = len(_x)
00283 buff.write(struct.pack('<I%ss'%length, length, _x))
00284 _x = self
00285 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00286 _x = self.image.encoding
00287 length = len(_x)
00288 if python3 or type(_x) == unicode:
00289 _x = _x.encode('utf-8')
00290 length = len(_x)
00291 buff.write(struct.pack('<I%ss'%length, length, _x))
00292 _x = self
00293 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00294 _x = self.image.data
00295 length = len(_x)
00296
00297 if type(_x) in [list, tuple]:
00298 buff.write(struct.pack('<I%sB'%length, length, *_x))
00299 else:
00300 buff.write(struct.pack('<I%ss'%length, length, _x))
00301 except struct.error as se: self._check_types(se)
00302 except TypeError as te: self._check_types(te)
00303
00304 def deserialize_numpy(self, str, numpy):
00305 """
00306 unpack serialized message in str into this message instance using numpy for array types
00307 :param str: byte array of serialized message, ``str``
00308 :param numpy: numpy python module
00309 """
00310 try:
00311 if self.image is None:
00312 self.image = sensor_msgs.msg.Image()
00313 end = 0
00314 _x = self
00315 start = end
00316 end += 12
00317 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00318 start = end
00319 end += 4
00320 (length,) = _struct_I.unpack(str[start:end])
00321 start = end
00322 end += length
00323 if python3:
00324 self.image.header.frame_id = str[start:end].decode('utf-8')
00325 else:
00326 self.image.header.frame_id = str[start:end]
00327 _x = self
00328 start = end
00329 end += 8
00330 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00331 start = end
00332 end += 4
00333 (length,) = _struct_I.unpack(str[start:end])
00334 start = end
00335 end += length
00336 if python3:
00337 self.image.encoding = str[start:end].decode('utf-8')
00338 else:
00339 self.image.encoding = str[start:end]
00340 _x = self
00341 start = end
00342 end += 5
00343 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00344 start = end
00345 end += 4
00346 (length,) = _struct_I.unpack(str[start:end])
00347 start = end
00348 end += length
00349 if python3:
00350 self.image.data = str[start:end].decode('utf-8')
00351 else:
00352 self.image.data = str[start:end]
00353 return self
00354 except struct.error as e:
00355 raise genpy.DeserializationError(e)
00356
00357 _struct_I = genpy.struct_I
00358 _struct_3I = struct.Struct("<3I")
00359 _struct_2I = struct.Struct("<2I")
00360 _struct_BI = struct.Struct("<BI")
00361 class Capture(object):
00362 _type = 'photo/Capture'
00363 _md5sum = 'b13d2865c5af2a64e6e30ab1b56e1dd5'
00364 _request_class = CaptureRequest
00365 _response_class = CaptureResponse