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