00001 """autogenerated by genpy from vrep_common/simRosCreateDummyRequest.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 simRosCreateDummyRequest(genpy.Message):
00009 _md5sum = "8b8d31e0e18b916960ddd10248b87e65"
00010 _type = "vrep_common/simRosCreateDummyRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 float32 size
00017 int8[] colors
00018
00019 """
00020 __slots__ = ['size','colors']
00021 _slot_types = ['float32','int8[]']
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 size,colors
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(simRosCreateDummyRequest, self).__init__(*args, **kwds)
00039
00040 if self.size is None:
00041 self.size = 0.
00042 if self.colors is None:
00043 self.colors = []
00044 else:
00045 self.size = 0.
00046 self.colors = []
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_f.pack(self.size))
00061 length = len(self.colors)
00062 buff.write(_struct_I.pack(length))
00063 pattern = '<%sb'%length
00064 buff.write(struct.pack(pattern, *self.colors))
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.size,) = _struct_f.unpack(str[start:end])
00078 start = end
00079 end += 4
00080 (length,) = _struct_I.unpack(str[start:end])
00081 pattern = '<%sb'%length
00082 start = end
00083 end += struct.calcsize(pattern)
00084 self.colors = 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_f.pack(self.size))
00098 length = len(self.colors)
00099 buff.write(_struct_I.pack(length))
00100 pattern = '<%sb'%length
00101 buff.write(self.colors.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.size,) = _struct_f.unpack(str[start:end])
00116 start = end
00117 end += 4
00118 (length,) = _struct_I.unpack(str[start:end])
00119 pattern = '<%sb'%length
00120 start = end
00121 end += struct.calcsize(pattern)
00122 self.colors = numpy.frombuffer(str[start:end], dtype=numpy.int8, 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_f = struct.Struct("<f")
00129 """autogenerated by genpy from vrep_common/simRosCreateDummyResponse.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 simRosCreateDummyResponse(genpy.Message):
00137 _md5sum = "fce6fe642297751ba64c68708ffe9e6f"
00138 _type = "vrep_common/simRosCreateDummyResponse"
00139 _has_header = False
00140 _full_text = """int32 dummyHandle
00141
00142
00143
00144 """
00145 __slots__ = ['dummyHandle']
00146 _slot_types = ['int32']
00147
00148 def __init__(self, *args, **kwds):
00149 """
00150 Constructor. Any message fields that are implicitly/explicitly
00151 set to None will be assigned a default value. The recommend
00152 use is keyword arguments as this is more robust to future message
00153 changes. You cannot mix in-order arguments and keyword arguments.
00154
00155 The available fields are:
00156 dummyHandle
00157
00158 :param args: complete set of field values, in .msg order
00159 :param kwds: use keyword arguments corresponding to message field names
00160 to set specific fields.
00161 """
00162 if args or kwds:
00163 super(simRosCreateDummyResponse, self).__init__(*args, **kwds)
00164
00165 if self.dummyHandle is None:
00166 self.dummyHandle = 0
00167 else:
00168 self.dummyHandle = 0
00169
00170 def _get_types(self):
00171 """
00172 internal API method
00173 """
00174 return self._slot_types
00175
00176 def serialize(self, buff):
00177 """
00178 serialize message into buffer
00179 :param buff: buffer, ``StringIO``
00180 """
00181 try:
00182 buff.write(_struct_i.pack(self.dummyHandle))
00183 except struct.error as se: self._check_types(se)
00184 except TypeError as te: self._check_types(te)
00185
00186 def deserialize(self, str):
00187 """
00188 unpack serialized message in str into this message instance
00189 :param str: byte array of serialized message, ``str``
00190 """
00191 try:
00192 end = 0
00193 start = end
00194 end += 4
00195 (self.dummyHandle,) = _struct_i.unpack(str[start:end])
00196 return self
00197 except struct.error as e:
00198 raise genpy.DeserializationError(e)
00199
00200
00201 def serialize_numpy(self, buff, numpy):
00202 """
00203 serialize message with numpy array types into buffer
00204 :param buff: buffer, ``StringIO``
00205 :param numpy: numpy python module
00206 """
00207 try:
00208 buff.write(_struct_i.pack(self.dummyHandle))
00209 except struct.error as se: self._check_types(se)
00210 except TypeError as te: self._check_types(te)
00211
00212 def deserialize_numpy(self, str, numpy):
00213 """
00214 unpack serialized message in str into this message instance using numpy for array types
00215 :param str: byte array of serialized message, ``str``
00216 :param numpy: numpy python module
00217 """
00218 try:
00219 end = 0
00220 start = end
00221 end += 4
00222 (self.dummyHandle,) = _struct_i.unpack(str[start:end])
00223 return self
00224 except struct.error as e:
00225 raise genpy.DeserializationError(e)
00226
00227 _struct_I = genpy.struct_I
00228 _struct_i = struct.Struct("<i")
00229 class simRosCreateDummy(object):
00230 _type = 'vrep_common/simRosCreateDummy'
00231 _md5sum = 'ca160749088e63e26f75d439232c561a'
00232 _request_class = simRosCreateDummyRequest
00233 _response_class = simRosCreateDummyResponse