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