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