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


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