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