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