_alubsc_status_msg.py
Go to the documentation of this file.
00001 """autogenerated by genpy from portrait_robot_msgs/alubsc_status_msgRequest.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 alubsc_status_msgRequest(genpy.Message):
00009   _md5sum = "4ae18db17f2815d568eda2d0b585e652"
00010   _type = "portrait_robot_msgs/alubsc_status_msgRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 int8 ID
00017 
00018 string message
00019 
00020 """
00021   __slots__ = ['ID','message']
00022   _slot_types = ['int8','string']
00023 
00024   def __init__(self, *args, **kwds):
00025     """
00026     Constructor. Any message fields that are implicitly/explicitly
00027     set to None will be assigned a default value. The recommend
00028     use is keyword arguments as this is more robust to future message
00029     changes.  You cannot mix in-order arguments and keyword arguments.
00030 
00031     The available fields are:
00032        ID,message
00033 
00034     :param args: complete set of field values, in .msg order
00035     :param kwds: use keyword arguments corresponding to message field names
00036     to set specific fields.
00037     """
00038     if args or kwds:
00039       super(alubsc_status_msgRequest, self).__init__(*args, **kwds)
00040       #message fields cannot be None, assign default values for those that are
00041       if self.ID is None:
00042         self.ID = 0
00043       if self.message is None:
00044         self.message = ''
00045     else:
00046       self.ID = 0
00047       self.message = ''
00048 
00049   def _get_types(self):
00050     """
00051     internal API method
00052     """
00053     return self._slot_types
00054 
00055   def serialize(self, buff):
00056     """
00057     serialize message into buffer
00058     :param buff: buffer, ``StringIO``
00059     """
00060     try:
00061       buff.write(_struct_b.pack(self.ID))
00062       _x = self.message
00063       length = len(_x)
00064       if python3 or type(_x) == unicode:
00065         _x = _x.encode('utf-8')
00066         length = len(_x)
00067       buff.write(struct.pack('<I%ss'%length, length, _x))
00068     except struct.error as se: self._check_types(se)
00069     except TypeError as te: self._check_types(te)
00070 
00071   def deserialize(self, str):
00072     """
00073     unpack serialized message in str into this message instance
00074     :param str: byte array of serialized message, ``str``
00075     """
00076     try:
00077       end = 0
00078       start = end
00079       end += 1
00080       (self.ID,) = _struct_b.unpack(str[start:end])
00081       start = end
00082       end += 4
00083       (length,) = _struct_I.unpack(str[start:end])
00084       start = end
00085       end += length
00086       if python3:
00087         self.message = str[start:end].decode('utf-8')
00088       else:
00089         self.message = str[start:end]
00090       return self
00091     except struct.error as e:
00092       raise genpy.DeserializationError(e) #most likely buffer underfill
00093 
00094 
00095   def serialize_numpy(self, buff, numpy):
00096     """
00097     serialize message with numpy array types into buffer
00098     :param buff: buffer, ``StringIO``
00099     :param numpy: numpy python module
00100     """
00101     try:
00102       buff.write(_struct_b.pack(self.ID))
00103       _x = self.message
00104       length = len(_x)
00105       if python3 or type(_x) == unicode:
00106         _x = _x.encode('utf-8')
00107         length = len(_x)
00108       buff.write(struct.pack('<I%ss'%length, length, _x))
00109     except struct.error as se: self._check_types(se)
00110     except TypeError as te: self._check_types(te)
00111 
00112   def deserialize_numpy(self, str, numpy):
00113     """
00114     unpack serialized message in str into this message instance using numpy for array types
00115     :param str: byte array of serialized message, ``str``
00116     :param numpy: numpy python module
00117     """
00118     try:
00119       end = 0
00120       start = end
00121       end += 1
00122       (self.ID,) = _struct_b.unpack(str[start:end])
00123       start = end
00124       end += 4
00125       (length,) = _struct_I.unpack(str[start:end])
00126       start = end
00127       end += length
00128       if python3:
00129         self.message = str[start:end].decode('utf-8')
00130       else:
00131         self.message = str[start:end]
00132       return self
00133     except struct.error as e:
00134       raise genpy.DeserializationError(e) #most likely buffer underfill
00135 
00136 _struct_I = genpy.struct_I
00137 _struct_b = struct.Struct("<b")
00138 """autogenerated by genpy from portrait_robot_msgs/alubsc_status_msgResponse.msg. Do not edit."""
00139 import sys
00140 python3 = True if sys.hexversion > 0x03000000 else False
00141 import genpy
00142 import struct
00143 
00144 
00145 class alubsc_status_msgResponse(genpy.Message):
00146   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00147   _type = "portrait_robot_msgs/alubsc_status_msgResponse"
00148   _has_header = False #flag to mark the presence of a Header object
00149   _full_text = """
00150 
00151 """
00152   __slots__ = []
00153   _slot_types = []
00154 
00155   def __init__(self, *args, **kwds):
00156     """
00157     Constructor. Any message fields that are implicitly/explicitly
00158     set to None will be assigned a default value. The recommend
00159     use is keyword arguments as this is more robust to future message
00160     changes.  You cannot mix in-order arguments and keyword arguments.
00161 
00162     The available fields are:
00163        
00164 
00165     :param args: complete set of field values, in .msg order
00166     :param kwds: use keyword arguments corresponding to message field names
00167     to set specific fields.
00168     """
00169     if args or kwds:
00170       super(alubsc_status_msgResponse, self).__init__(*args, **kwds)
00171 
00172   def _get_types(self):
00173     """
00174     internal API method
00175     """
00176     return self._slot_types
00177 
00178   def serialize(self, buff):
00179     """
00180     serialize message into buffer
00181     :param buff: buffer, ``StringIO``
00182     """
00183     try:
00184       pass
00185     except struct.error as se: self._check_types(se)
00186     except TypeError as te: self._check_types(te)
00187 
00188   def deserialize(self, str):
00189     """
00190     unpack serialized message in str into this message instance
00191     :param str: byte array of serialized message, ``str``
00192     """
00193     try:
00194       end = 0
00195       return self
00196     except struct.error as e:
00197       raise genpy.DeserializationError(e) #most likely buffer underfill
00198 
00199 
00200   def serialize_numpy(self, buff, numpy):
00201     """
00202     serialize message with numpy array types into buffer
00203     :param buff: buffer, ``StringIO``
00204     :param numpy: numpy python module
00205     """
00206     try:
00207       pass
00208     except struct.error as se: self._check_types(se)
00209     except TypeError as te: self._check_types(te)
00210 
00211   def deserialize_numpy(self, str, numpy):
00212     """
00213     unpack serialized message in str into this message instance using numpy for array types
00214     :param str: byte array of serialized message, ``str``
00215     :param numpy: numpy python module
00216     """
00217     try:
00218       end = 0
00219       return self
00220     except struct.error as e:
00221       raise genpy.DeserializationError(e) #most likely buffer underfill
00222 
00223 _struct_I = genpy.struct_I
00224 class alubsc_status_msg(object):
00225   _type          = 'portrait_robot_msgs/alubsc_status_msg'
00226   _md5sum = '4ae18db17f2815d568eda2d0b585e652'
00227   _request_class  = alubsc_status_msgRequest
00228   _response_class = alubsc_status_msgResponse
 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