00001 """autogenerated by genpy from vrep_common/simRosSetArrayParameterRequest.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 simRosSetArrayParameterRequest(genpy.Message):
00009 _md5sum = "5d2ff3aea97ae3d86be296a72ec9a583"
00010 _type = "vrep_common/simRosSetArrayParameterRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 int32 parameter
00017 float32[] parameterValues
00018
00019 """
00020 __slots__ = ['parameter','parameterValues']
00021 _slot_types = ['int32','float32[]']
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 parameter,parameterValues
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(simRosSetArrayParameterRequest, self).__init__(*args, **kwds)
00039
00040 if self.parameter is None:
00041 self.parameter = 0
00042 if self.parameterValues is None:
00043 self.parameterValues = []
00044 else:
00045 self.parameter = 0
00046 self.parameterValues = []
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.parameter))
00061 length = len(self.parameterValues)
00062 buff.write(_struct_I.pack(length))
00063 pattern = '<%sf'%length
00064 buff.write(struct.pack(pattern, *self.parameterValues))
00065 except struct.error as se: self._check_types(se)
00066 except TypeError as te: self._check_types(te)
00067
00068 def deserialize(self, str):
00069 """
00070 unpack serialized message in str into this message instance
00071 :param str: byte array of serialized message, ``str``
00072 """
00073 try:
00074 end = 0
00075 start = end
00076 end += 4
00077 (self.parameter,) = _struct_i.unpack(str[start:end])
00078 start = end
00079 end += 4
00080 (length,) = _struct_I.unpack(str[start:end])
00081 pattern = '<%sf'%length
00082 start = end
00083 end += struct.calcsize(pattern)
00084 self.parameterValues = struct.unpack(pattern, str[start:end])
00085 return self
00086 except struct.error as e:
00087 raise genpy.DeserializationError(e)
00088
00089
00090 def serialize_numpy(self, buff, numpy):
00091 """
00092 serialize message with numpy array types into buffer
00093 :param buff: buffer, ``StringIO``
00094 :param numpy: numpy python module
00095 """
00096 try:
00097 buff.write(_struct_i.pack(self.parameter))
00098 length = len(self.parameterValues)
00099 buff.write(_struct_I.pack(length))
00100 pattern = '<%sf'%length
00101 buff.write(self.parameterValues.tostring())
00102 except struct.error as se: self._check_types(se)
00103 except TypeError as te: self._check_types(te)
00104
00105 def deserialize_numpy(self, str, numpy):
00106 """
00107 unpack serialized message in str into this message instance using numpy for array types
00108 :param str: byte array of serialized message, ``str``
00109 :param numpy: numpy python module
00110 """
00111 try:
00112 end = 0
00113 start = end
00114 end += 4
00115 (self.parameter,) = _struct_i.unpack(str[start:end])
00116 start = end
00117 end += 4
00118 (length,) = _struct_I.unpack(str[start:end])
00119 pattern = '<%sf'%length
00120 start = end
00121 end += struct.calcsize(pattern)
00122 self.parameterValues = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00123 return self
00124 except struct.error as e:
00125 raise genpy.DeserializationError(e)
00126
00127 _struct_I = genpy.struct_I
00128 _struct_i = struct.Struct("<i")
00129 """autogenerated by genpy from vrep_common/simRosSetArrayParameterResponse.msg. Do not edit."""
00130 import sys
00131 python3 = True if sys.hexversion > 0x03000000 else False
00132 import genpy
00133 import struct
00134
00135
00136 class simRosSetArrayParameterResponse(genpy.Message):
00137 _md5sum = "034a8e20d6a306665e3a5b340fab3f09"
00138 _type = "vrep_common/simRosSetArrayParameterResponse"
00139 _has_header = False
00140 _full_text = """int32 result
00141
00142
00143 """
00144 __slots__ = ['result']
00145 _slot_types = ['int32']
00146
00147 def __init__(self, *args, **kwds):
00148 """
00149 Constructor. Any message fields that are implicitly/explicitly
00150 set to None will be assigned a default value. The recommend
00151 use is keyword arguments as this is more robust to future message
00152 changes. You cannot mix in-order arguments and keyword arguments.
00153
00154 The available fields are:
00155 result
00156
00157 :param args: complete set of field values, in .msg order
00158 :param kwds: use keyword arguments corresponding to message field names
00159 to set specific fields.
00160 """
00161 if args or kwds:
00162 super(simRosSetArrayParameterResponse, self).__init__(*args, **kwds)
00163
00164 if self.result is None:
00165 self.result = 0
00166 else:
00167 self.result = 0
00168
00169 def _get_types(self):
00170 """
00171 internal API method
00172 """
00173 return self._slot_types
00174
00175 def serialize(self, buff):
00176 """
00177 serialize message into buffer
00178 :param buff: buffer, ``StringIO``
00179 """
00180 try:
00181 buff.write(_struct_i.pack(self.result))
00182 except struct.error as se: self._check_types(se)
00183 except TypeError as te: self._check_types(te)
00184
00185 def deserialize(self, str):
00186 """
00187 unpack serialized message in str into this message instance
00188 :param str: byte array of serialized message, ``str``
00189 """
00190 try:
00191 end = 0
00192 start = end
00193 end += 4
00194 (self.result,) = _struct_i.unpack(str[start:end])
00195 return self
00196 except struct.error as e:
00197 raise genpy.DeserializationError(e)
00198
00199
00200 def serialize_numpy(self, buff, numpy):
00201 """
00202 serialize message with numpy array types into buffer
00203 :param buff: buffer, ``StringIO``
00204 :param numpy: numpy python module
00205 """
00206 try:
00207 buff.write(_struct_i.pack(self.result))
00208 except struct.error as se: self._check_types(se)
00209 except TypeError as te: self._check_types(te)
00210
00211 def deserialize_numpy(self, str, numpy):
00212 """
00213 unpack serialized message in str into this message instance using numpy for array types
00214 :param str: byte array of serialized message, ``str``
00215 :param numpy: numpy python module
00216 """
00217 try:
00218 end = 0
00219 start = end
00220 end += 4
00221 (self.result,) = _struct_i.unpack(str[start:end])
00222 return self
00223 except struct.error as e:
00224 raise genpy.DeserializationError(e)
00225
00226 _struct_I = genpy.struct_I
00227 _struct_i = struct.Struct("<i")
00228 class simRosSetArrayParameter(object):
00229 _type = 'vrep_common/simRosSetArrayParameter'
00230 _md5sum = '4d1073567d098840261016d80dc91684'
00231 _request_class = simRosSetArrayParameterRequest
00232 _response_class = simRosSetArrayParameterResponse