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