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