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


corobot_srvs
Author(s): Morgan Cormier/mcormier@coroware.com
autogenerated on Tue Jan 7 2014 11:38:11