00001 """autogenerated by genmsg_py from GetPolledImageRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006 import sensor_msgs.msg
00007
00008 class GetPolledImageRequest(roslib.message.Message):
00009 _md5sum = "c77ed43e530fd48e9e7a2a93845e154c"
00010 _type = "polled_camera/GetPolledImageRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 string response_namespace
00017
00018
00019
00020
00021 duration timeout
00022
00023
00024 uint32 binning_x
00025 uint32 binning_y
00026
00027
00028 sensor_msgs/RegionOfInterest roi
00029
00030 ================================================================================
00031 MSG: sensor_msgs/RegionOfInterest
00032 # This message is used to specify a region of interest within an image.
00033 #
00034 # When used to specify the ROI setting of the camera when the image was
00035 # taken, the height and width fields should either match the height and
00036 # width fields for the associated image; or height = width = 0
00037 # indicates that the full resolution image was captured.
00038
00039 uint32 x_offset # Leftmost pixel of the ROI
00040 # (0 if the ROI includes the left edge of the image)
00041 uint32 y_offset # Topmost pixel of the ROI
00042 # (0 if the ROI includes the top edge of the image)
00043 uint32 height # Height of ROI
00044 uint32 width # Width of ROI
00045
00046 # True if a distinct rectified ROI should be calculated from the "raw"
00047 # ROI in this message. Typically this should be False if the full image
00048 # is captured (ROI not used), and True if a subwindow is captured (ROI
00049 # used).
00050 bool do_rectify
00051
00052 """
00053 __slots__ = ['response_namespace','timeout','binning_x','binning_y','roi']
00054 _slot_types = ['string','duration','uint32','uint32','sensor_msgs/RegionOfInterest']
00055
00056 def __init__(self, *args, **kwds):
00057 """
00058 Constructor. Any message fields that are implicitly/explicitly
00059 set to None will be assigned a default value. The recommend
00060 use is keyword arguments as this is more robust to future message
00061 changes. You cannot mix in-order arguments and keyword arguments.
00062
00063 The available fields are:
00064 response_namespace,timeout,binning_x,binning_y,roi
00065
00066 @param args: complete set of field values, in .msg order
00067 @param kwds: use keyword arguments corresponding to message field names
00068 to set specific fields.
00069 """
00070 if args or kwds:
00071 super(GetPolledImageRequest, self).__init__(*args, **kwds)
00072
00073 if self.response_namespace is None:
00074 self.response_namespace = ''
00075 if self.timeout is None:
00076 self.timeout = roslib.rostime.Duration()
00077 if self.binning_x is None:
00078 self.binning_x = 0
00079 if self.binning_y is None:
00080 self.binning_y = 0
00081 if self.roi is None:
00082 self.roi = sensor_msgs.msg.RegionOfInterest()
00083 else:
00084 self.response_namespace = ''
00085 self.timeout = roslib.rostime.Duration()
00086 self.binning_x = 0
00087 self.binning_y = 0
00088 self.roi = sensor_msgs.msg.RegionOfInterest()
00089
00090 def _get_types(self):
00091 """
00092 internal API method
00093 """
00094 return self._slot_types
00095
00096 def serialize(self, buff):
00097 """
00098 serialize message into buffer
00099 @param buff: buffer
00100 @type buff: StringIO
00101 """
00102 try:
00103 _x = self.response_namespace
00104 length = len(_x)
00105 buff.write(struct.pack('<I%ss'%length, length, _x))
00106 _x = self
00107 buff.write(_struct_2i6IB.pack(_x.timeout.secs, _x.timeout.nsecs, _x.binning_x, _x.binning_y, _x.roi.x_offset, _x.roi.y_offset, _x.roi.height, _x.roi.width, _x.roi.do_rectify))
00108 except struct.error, se: self._check_types(se)
00109 except TypeError, te: self._check_types(te)
00110
00111 def deserialize(self, str):
00112 """
00113 unpack serialized message in str into this message instance
00114 @param str: byte array of serialized message
00115 @type str: str
00116 """
00117 try:
00118 if self.timeout is None:
00119 self.timeout = roslib.rostime.Duration()
00120 if self.roi is None:
00121 self.roi = sensor_msgs.msg.RegionOfInterest()
00122 end = 0
00123 start = end
00124 end += 4
00125 (length,) = _struct_I.unpack(str[start:end])
00126 start = end
00127 end += length
00128 self.response_namespace = str[start:end]
00129 _x = self
00130 start = end
00131 end += 33
00132 (_x.timeout.secs, _x.timeout.nsecs, _x.binning_x, _x.binning_y, _x.roi.x_offset, _x.roi.y_offset, _x.roi.height, _x.roi.width, _x.roi.do_rectify,) = _struct_2i6IB.unpack(str[start:end])
00133 self.roi.do_rectify = bool(self.roi.do_rectify)
00134 self.timeout.canon()
00135 return self
00136 except struct.error, e:
00137 raise roslib.message.DeserializationError(e)
00138
00139
00140 def serialize_numpy(self, buff, numpy):
00141 """
00142 serialize message with numpy array types into buffer
00143 @param buff: buffer
00144 @type buff: StringIO
00145 @param numpy: numpy python module
00146 @type numpy module
00147 """
00148 try:
00149 _x = self.response_namespace
00150 length = len(_x)
00151 buff.write(struct.pack('<I%ss'%length, length, _x))
00152 _x = self
00153 buff.write(_struct_2i6IB.pack(_x.timeout.secs, _x.timeout.nsecs, _x.binning_x, _x.binning_y, _x.roi.x_offset, _x.roi.y_offset, _x.roi.height, _x.roi.width, _x.roi.do_rectify))
00154 except struct.error, se: self._check_types(se)
00155 except TypeError, te: self._check_types(te)
00156
00157 def deserialize_numpy(self, str, numpy):
00158 """
00159 unpack serialized message in str into this message instance using numpy for array types
00160 @param str: byte array of serialized message
00161 @type str: str
00162 @param numpy: numpy python module
00163 @type numpy: module
00164 """
00165 try:
00166 if self.timeout is None:
00167 self.timeout = roslib.rostime.Duration()
00168 if self.roi is None:
00169 self.roi = sensor_msgs.msg.RegionOfInterest()
00170 end = 0
00171 start = end
00172 end += 4
00173 (length,) = _struct_I.unpack(str[start:end])
00174 start = end
00175 end += length
00176 self.response_namespace = str[start:end]
00177 _x = self
00178 start = end
00179 end += 33
00180 (_x.timeout.secs, _x.timeout.nsecs, _x.binning_x, _x.binning_y, _x.roi.x_offset, _x.roi.y_offset, _x.roi.height, _x.roi.width, _x.roi.do_rectify,) = _struct_2i6IB.unpack(str[start:end])
00181 self.roi.do_rectify = bool(self.roi.do_rectify)
00182 self.timeout.canon()
00183 return self
00184 except struct.error, e:
00185 raise roslib.message.DeserializationError(e)
00186
00187 _struct_I = roslib.message.struct_I
00188 _struct_2i6IB = struct.Struct("<2i6IB")
00189 """autogenerated by genmsg_py from GetPolledImageResponse.msg. Do not edit."""
00190 import roslib.message
00191 import struct
00192
00193 import roslib.rostime
00194
00195 class GetPolledImageResponse(roslib.message.Message):
00196 _md5sum = "dbf1f851bc511800e6129ccd5a3542ab"
00197 _type = "polled_camera/GetPolledImageResponse"
00198 _has_header = False
00199 _full_text = """bool success
00200 string status_message
00201 time stamp
00202
00203
00204
00205 """
00206 __slots__ = ['success','status_message','stamp']
00207 _slot_types = ['bool','string','time']
00208
00209 def __init__(self, *args, **kwds):
00210 """
00211 Constructor. Any message fields that are implicitly/explicitly
00212 set to None will be assigned a default value. The recommend
00213 use is keyword arguments as this is more robust to future message
00214 changes. You cannot mix in-order arguments and keyword arguments.
00215
00216 The available fields are:
00217 success,status_message,stamp
00218
00219 @param args: complete set of field values, in .msg order
00220 @param kwds: use keyword arguments corresponding to message field names
00221 to set specific fields.
00222 """
00223 if args or kwds:
00224 super(GetPolledImageResponse, self).__init__(*args, **kwds)
00225
00226 if self.success is None:
00227 self.success = False
00228 if self.status_message is None:
00229 self.status_message = ''
00230 if self.stamp is None:
00231 self.stamp = roslib.rostime.Time()
00232 else:
00233 self.success = False
00234 self.status_message = ''
00235 self.stamp = roslib.rostime.Time()
00236
00237 def _get_types(self):
00238 """
00239 internal API method
00240 """
00241 return self._slot_types
00242
00243 def serialize(self, buff):
00244 """
00245 serialize message into buffer
00246 @param buff: buffer
00247 @type buff: StringIO
00248 """
00249 try:
00250 buff.write(_struct_B.pack(self.success))
00251 _x = self.status_message
00252 length = len(_x)
00253 buff.write(struct.pack('<I%ss'%length, length, _x))
00254 _x = self
00255 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00256 except struct.error, se: self._check_types(se)
00257 except TypeError, te: self._check_types(te)
00258
00259 def deserialize(self, str):
00260 """
00261 unpack serialized message in str into this message instance
00262 @param str: byte array of serialized message
00263 @type str: str
00264 """
00265 try:
00266 if self.stamp is None:
00267 self.stamp = roslib.rostime.Time()
00268 end = 0
00269 start = end
00270 end += 1
00271 (self.success,) = _struct_B.unpack(str[start:end])
00272 self.success = bool(self.success)
00273 start = end
00274 end += 4
00275 (length,) = _struct_I.unpack(str[start:end])
00276 start = end
00277 end += length
00278 self.status_message = str[start:end]
00279 _x = self
00280 start = end
00281 end += 8
00282 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00283 self.stamp.canon()
00284 return self
00285 except struct.error, e:
00286 raise roslib.message.DeserializationError(e)
00287
00288
00289 def serialize_numpy(self, buff, numpy):
00290 """
00291 serialize message with numpy array types into buffer
00292 @param buff: buffer
00293 @type buff: StringIO
00294 @param numpy: numpy python module
00295 @type numpy module
00296 """
00297 try:
00298 buff.write(_struct_B.pack(self.success))
00299 _x = self.status_message
00300 length = len(_x)
00301 buff.write(struct.pack('<I%ss'%length, length, _x))
00302 _x = self
00303 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00304 except struct.error, se: self._check_types(se)
00305 except TypeError, te: self._check_types(te)
00306
00307 def deserialize_numpy(self, str, numpy):
00308 """
00309 unpack serialized message in str into this message instance using numpy for array types
00310 @param str: byte array of serialized message
00311 @type str: str
00312 @param numpy: numpy python module
00313 @type numpy: module
00314 """
00315 try:
00316 if self.stamp is None:
00317 self.stamp = roslib.rostime.Time()
00318 end = 0
00319 start = end
00320 end += 1
00321 (self.success,) = _struct_B.unpack(str[start:end])
00322 self.success = bool(self.success)
00323 start = end
00324 end += 4
00325 (length,) = _struct_I.unpack(str[start:end])
00326 start = end
00327 end += length
00328 self.status_message = str[start:end]
00329 _x = self
00330 start = end
00331 end += 8
00332 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00333 self.stamp.canon()
00334 return self
00335 except struct.error, e:
00336 raise roslib.message.DeserializationError(e)
00337
00338 _struct_I = roslib.message.struct_I
00339 _struct_B = struct.Struct("<B")
00340 _struct_2I = struct.Struct("<2I")
00341 class GetPolledImage(roslib.message.ServiceDefinition):
00342 _type = 'polled_camera/GetPolledImage'
00343 _md5sum = '1f3fb0d09d6e1c72d4a7eeb9822d9030'
00344 _request_class = GetPolledImageRequest
00345 _response_class = GetPolledImageResponse