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