00001 """autogenerated by genpy from vrep_common/simRosAuxiliaryConsoleOpenRequest.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 simRosAuxiliaryConsoleOpenRequest(genpy.Message):
00009 _md5sum = "b11b7ee0194549fd289229f6b0fe6c7a"
00010 _type = "vrep_common/simRosAuxiliaryConsoleOpenRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 string title
00017 int32 maxLines
00018 int32 mode
00019 int32[] position
00020 int32[] size
00021 float32[] textColor
00022 float32[] backgroundColor
00023
00024 """
00025 __slots__ = ['title','maxLines','mode','position','size','textColor','backgroundColor']
00026 _slot_types = ['string','int32','int32','int32[]','int32[]','float32[]','float32[]']
00027
00028 def __init__(self, *args, **kwds):
00029 """
00030 Constructor. Any message fields that are implicitly/explicitly
00031 set to None will be assigned a default value. The recommend
00032 use is keyword arguments as this is more robust to future message
00033 changes. You cannot mix in-order arguments and keyword arguments.
00034
00035 The available fields are:
00036 title,maxLines,mode,position,size,textColor,backgroundColor
00037
00038 :param args: complete set of field values, in .msg order
00039 :param kwds: use keyword arguments corresponding to message field names
00040 to set specific fields.
00041 """
00042 if args or kwds:
00043 super(simRosAuxiliaryConsoleOpenRequest, self).__init__(*args, **kwds)
00044
00045 if self.title is None:
00046 self.title = ''
00047 if self.maxLines is None:
00048 self.maxLines = 0
00049 if self.mode is None:
00050 self.mode = 0
00051 if self.position is None:
00052 self.position = []
00053 if self.size is None:
00054 self.size = []
00055 if self.textColor is None:
00056 self.textColor = []
00057 if self.backgroundColor is None:
00058 self.backgroundColor = []
00059 else:
00060 self.title = ''
00061 self.maxLines = 0
00062 self.mode = 0
00063 self.position = []
00064 self.size = []
00065 self.textColor = []
00066 self.backgroundColor = []
00067
00068 def _get_types(self):
00069 """
00070 internal API method
00071 """
00072 return self._slot_types
00073
00074 def serialize(self, buff):
00075 """
00076 serialize message into buffer
00077 :param buff: buffer, ``StringIO``
00078 """
00079 try:
00080 _x = self.title
00081 length = len(_x)
00082 if python3 or type(_x) == unicode:
00083 _x = _x.encode('utf-8')
00084 length = len(_x)
00085 buff.write(struct.pack('<I%ss'%length, length, _x))
00086 _x = self
00087 buff.write(_struct_2i.pack(_x.maxLines, _x.mode))
00088 length = len(self.position)
00089 buff.write(_struct_I.pack(length))
00090 pattern = '<%si'%length
00091 buff.write(struct.pack(pattern, *self.position))
00092 length = len(self.size)
00093 buff.write(_struct_I.pack(length))
00094 pattern = '<%si'%length
00095 buff.write(struct.pack(pattern, *self.size))
00096 length = len(self.textColor)
00097 buff.write(_struct_I.pack(length))
00098 pattern = '<%sf'%length
00099 buff.write(struct.pack(pattern, *self.textColor))
00100 length = len(self.backgroundColor)
00101 buff.write(_struct_I.pack(length))
00102 pattern = '<%sf'%length
00103 buff.write(struct.pack(pattern, *self.backgroundColor))
00104 except struct.error as se: self._check_types(se)
00105 except TypeError as te: self._check_types(te)
00106
00107 def deserialize(self, str):
00108 """
00109 unpack serialized message in str into this message instance
00110 :param str: byte array of serialized message, ``str``
00111 """
00112 try:
00113 end = 0
00114 start = end
00115 end += 4
00116 (length,) = _struct_I.unpack(str[start:end])
00117 start = end
00118 end += length
00119 if python3:
00120 self.title = str[start:end].decode('utf-8')
00121 else:
00122 self.title = str[start:end]
00123 _x = self
00124 start = end
00125 end += 8
00126 (_x.maxLines, _x.mode,) = _struct_2i.unpack(str[start:end])
00127 start = end
00128 end += 4
00129 (length,) = _struct_I.unpack(str[start:end])
00130 pattern = '<%si'%length
00131 start = end
00132 end += struct.calcsize(pattern)
00133 self.position = struct.unpack(pattern, str[start:end])
00134 start = end
00135 end += 4
00136 (length,) = _struct_I.unpack(str[start:end])
00137 pattern = '<%si'%length
00138 start = end
00139 end += struct.calcsize(pattern)
00140 self.size = struct.unpack(pattern, str[start:end])
00141 start = end
00142 end += 4
00143 (length,) = _struct_I.unpack(str[start:end])
00144 pattern = '<%sf'%length
00145 start = end
00146 end += struct.calcsize(pattern)
00147 self.textColor = struct.unpack(pattern, str[start:end])
00148 start = end
00149 end += 4
00150 (length,) = _struct_I.unpack(str[start:end])
00151 pattern = '<%sf'%length
00152 start = end
00153 end += struct.calcsize(pattern)
00154 self.backgroundColor = struct.unpack(pattern, str[start:end])
00155 return self
00156 except struct.error as e:
00157 raise genpy.DeserializationError(e)
00158
00159
00160 def serialize_numpy(self, buff, numpy):
00161 """
00162 serialize message with numpy array types into buffer
00163 :param buff: buffer, ``StringIO``
00164 :param numpy: numpy python module
00165 """
00166 try:
00167 _x = self.title
00168 length = len(_x)
00169 if python3 or type(_x) == unicode:
00170 _x = _x.encode('utf-8')
00171 length = len(_x)
00172 buff.write(struct.pack('<I%ss'%length, length, _x))
00173 _x = self
00174 buff.write(_struct_2i.pack(_x.maxLines, _x.mode))
00175 length = len(self.position)
00176 buff.write(_struct_I.pack(length))
00177 pattern = '<%si'%length
00178 buff.write(self.position.tostring())
00179 length = len(self.size)
00180 buff.write(_struct_I.pack(length))
00181 pattern = '<%si'%length
00182 buff.write(self.size.tostring())
00183 length = len(self.textColor)
00184 buff.write(_struct_I.pack(length))
00185 pattern = '<%sf'%length
00186 buff.write(self.textColor.tostring())
00187 length = len(self.backgroundColor)
00188 buff.write(_struct_I.pack(length))
00189 pattern = '<%sf'%length
00190 buff.write(self.backgroundColor.tostring())
00191 except struct.error as se: self._check_types(se)
00192 except TypeError as te: self._check_types(te)
00193
00194 def deserialize_numpy(self, str, numpy):
00195 """
00196 unpack serialized message in str into this message instance using numpy for array types
00197 :param str: byte array of serialized message, ``str``
00198 :param numpy: numpy python module
00199 """
00200 try:
00201 end = 0
00202 start = end
00203 end += 4
00204 (length,) = _struct_I.unpack(str[start:end])
00205 start = end
00206 end += length
00207 if python3:
00208 self.title = str[start:end].decode('utf-8')
00209 else:
00210 self.title = str[start:end]
00211 _x = self
00212 start = end
00213 end += 8
00214 (_x.maxLines, _x.mode,) = _struct_2i.unpack(str[start:end])
00215 start = end
00216 end += 4
00217 (length,) = _struct_I.unpack(str[start:end])
00218 pattern = '<%si'%length
00219 start = end
00220 end += struct.calcsize(pattern)
00221 self.position = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00222 start = end
00223 end += 4
00224 (length,) = _struct_I.unpack(str[start:end])
00225 pattern = '<%si'%length
00226 start = end
00227 end += struct.calcsize(pattern)
00228 self.size = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 pattern = '<%sf'%length
00233 start = end
00234 end += struct.calcsize(pattern)
00235 self.textColor = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00236 start = end
00237 end += 4
00238 (length,) = _struct_I.unpack(str[start:end])
00239 pattern = '<%sf'%length
00240 start = end
00241 end += struct.calcsize(pattern)
00242 self.backgroundColor = numpy.frombuffer(str[start:end], dtype=numpy.float32, 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_2i = struct.Struct("<2i")
00249 """autogenerated by genpy from vrep_common/simRosAuxiliaryConsoleOpenResponse.msg. Do not edit."""
00250 import sys
00251 python3 = True if sys.hexversion > 0x03000000 else False
00252 import genpy
00253 import struct
00254
00255
00256 class simRosAuxiliaryConsoleOpenResponse(genpy.Message):
00257 _md5sum = "0712f8f971970cd49793e7755140f018"
00258 _type = "vrep_common/simRosAuxiliaryConsoleOpenResponse"
00259 _has_header = False
00260 _full_text = """int32 consoleHandle
00261
00262
00263
00264 """
00265 __slots__ = ['consoleHandle']
00266 _slot_types = ['int32']
00267
00268 def __init__(self, *args, **kwds):
00269 """
00270 Constructor. Any message fields that are implicitly/explicitly
00271 set to None will be assigned a default value. The recommend
00272 use is keyword arguments as this is more robust to future message
00273 changes. You cannot mix in-order arguments and keyword arguments.
00274
00275 The available fields are:
00276 consoleHandle
00277
00278 :param args: complete set of field values, in .msg order
00279 :param kwds: use keyword arguments corresponding to message field names
00280 to set specific fields.
00281 """
00282 if args or kwds:
00283 super(simRosAuxiliaryConsoleOpenResponse, self).__init__(*args, **kwds)
00284
00285 if self.consoleHandle is None:
00286 self.consoleHandle = 0
00287 else:
00288 self.consoleHandle = 0
00289
00290 def _get_types(self):
00291 """
00292 internal API method
00293 """
00294 return self._slot_types
00295
00296 def serialize(self, buff):
00297 """
00298 serialize message into buffer
00299 :param buff: buffer, ``StringIO``
00300 """
00301 try:
00302 buff.write(_struct_i.pack(self.consoleHandle))
00303 except struct.error as se: self._check_types(se)
00304 except TypeError as te: self._check_types(te)
00305
00306 def deserialize(self, str):
00307 """
00308 unpack serialized message in str into this message instance
00309 :param str: byte array of serialized message, ``str``
00310 """
00311 try:
00312 end = 0
00313 start = end
00314 end += 4
00315 (self.consoleHandle,) = _struct_i.unpack(str[start:end])
00316 return self
00317 except struct.error as e:
00318 raise genpy.DeserializationError(e)
00319
00320
00321 def serialize_numpy(self, buff, numpy):
00322 """
00323 serialize message with numpy array types into buffer
00324 :param buff: buffer, ``StringIO``
00325 :param numpy: numpy python module
00326 """
00327 try:
00328 buff.write(_struct_i.pack(self.consoleHandle))
00329 except struct.error as se: self._check_types(se)
00330 except TypeError as te: self._check_types(te)
00331
00332 def deserialize_numpy(self, str, numpy):
00333 """
00334 unpack serialized message in str into this message instance using numpy for array types
00335 :param str: byte array of serialized message, ``str``
00336 :param numpy: numpy python module
00337 """
00338 try:
00339 end = 0
00340 start = end
00341 end += 4
00342 (self.consoleHandle,) = _struct_i.unpack(str[start:end])
00343 return self
00344 except struct.error as e:
00345 raise genpy.DeserializationError(e)
00346
00347 _struct_I = genpy.struct_I
00348 _struct_i = struct.Struct("<i")
00349 class simRosAuxiliaryConsoleOpen(object):
00350 _type = 'vrep_common/simRosAuxiliaryConsoleOpen'
00351 _md5sum = 'f861a9b4fa1cfe42d343017f3c8914a5'
00352 _request_class = simRosAuxiliaryConsoleOpenRequest
00353 _response_class = simRosAuxiliaryConsoleOpenResponse