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


srs_assisted_arm_navigation_msgs
Author(s): Zdenek Materna
autogenerated on Sun Jan 5 2014 11:52:58