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