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