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


portrait_robot_msgs
Author(s): Julian Schmid
autogenerated on Wed Dec 26 2012 15:58:53