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


srs_assisted_arm_navigation_msgs
Author(s): Zdenek Materna
autogenerated on Mon Oct 6 2014 08:09:35