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


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