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