00001 """autogenerated by genpy from concert_msgs/ConcertClient.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import appmanager_msgs.msg
00008 import genpy
00009
00010 class ConcertClient(genpy.Message):
00011 _md5sum = "39c6065c65d300f6c193a61ede194d03"
00012 _type = "concert_msgs/ConcertClient"
00013 _has_header = False
00014 _full_text = """#
00015 # Describes a concert client - used only on the concert side
00016 #
00017 # Unique name (comes from the gateway systems unique naming system)
00018 string name
00019
00020 # The platform id triple (refer to concert_clients/PlatformInfo.msg for string values)
00021 string platform
00022 string system
00023 string robot
00024
00025 # Current status of the concert client (refer to concert_msgs/ConcertClient.msg for mode strings)
00026 string client_status
00027 string app_status
00028
00029 # Depracate this
00030 string status
00031
00032 # Statistics
00033 time last_connection_timestamp
00034
00035 appmanager_msgs/AppDescription[] apps
00036
00037 ================================================================================
00038 MSG: appmanager_msgs/AppDescription
00039 string name
00040 string display
00041 string description
00042 string platform
00043 string status
00044
00045 """
00046 __slots__ = ['name','platform','system','robot','client_status','app_status','status','last_connection_timestamp','apps']
00047 _slot_types = ['string','string','string','string','string','string','string','time','appmanager_msgs/AppDescription[]']
00048
00049 def __init__(self, *args, **kwds):
00050 """
00051 Constructor. Any message fields that are implicitly/explicitly
00052 set to None will be assigned a default value. The recommend
00053 use is keyword arguments as this is more robust to future message
00054 changes. You cannot mix in-order arguments and keyword arguments.
00055
00056 The available fields are:
00057 name,platform,system,robot,client_status,app_status,status,last_connection_timestamp,apps
00058
00059 :param args: complete set of field values, in .msg order
00060 :param kwds: use keyword arguments corresponding to message field names
00061 to set specific fields.
00062 """
00063 if args or kwds:
00064 super(ConcertClient, self).__init__(*args, **kwds)
00065
00066 if self.name is None:
00067 self.name = ''
00068 if self.platform is None:
00069 self.platform = ''
00070 if self.system is None:
00071 self.system = ''
00072 if self.robot is None:
00073 self.robot = ''
00074 if self.client_status is None:
00075 self.client_status = ''
00076 if self.app_status is None:
00077 self.app_status = ''
00078 if self.status is None:
00079 self.status = ''
00080 if self.last_connection_timestamp is None:
00081 self.last_connection_timestamp = genpy.Time()
00082 if self.apps is None:
00083 self.apps = []
00084 else:
00085 self.name = ''
00086 self.platform = ''
00087 self.system = ''
00088 self.robot = ''
00089 self.client_status = ''
00090 self.app_status = ''
00091 self.status = ''
00092 self.last_connection_timestamp = genpy.Time()
00093 self.apps = []
00094
00095 def _get_types(self):
00096 """
00097 internal API method
00098 """
00099 return self._slot_types
00100
00101 def serialize(self, buff):
00102 """
00103 serialize message into buffer
00104 :param buff: buffer, ``StringIO``
00105 """
00106 try:
00107 _x = self.name
00108 length = len(_x)
00109 if python3 or type(_x) == unicode:
00110 _x = _x.encode('utf-8')
00111 length = len(_x)
00112 buff.write(struct.pack('<I%ss'%length, length, _x))
00113 _x = self.platform
00114 length = len(_x)
00115 if python3 or type(_x) == unicode:
00116 _x = _x.encode('utf-8')
00117 length = len(_x)
00118 buff.write(struct.pack('<I%ss'%length, length, _x))
00119 _x = self.system
00120 length = len(_x)
00121 if python3 or type(_x) == unicode:
00122 _x = _x.encode('utf-8')
00123 length = len(_x)
00124 buff.write(struct.pack('<I%ss'%length, length, _x))
00125 _x = self.robot
00126 length = len(_x)
00127 if python3 or type(_x) == unicode:
00128 _x = _x.encode('utf-8')
00129 length = len(_x)
00130 buff.write(struct.pack('<I%ss'%length, length, _x))
00131 _x = self.client_status
00132 length = len(_x)
00133 if python3 or type(_x) == unicode:
00134 _x = _x.encode('utf-8')
00135 length = len(_x)
00136 buff.write(struct.pack('<I%ss'%length, length, _x))
00137 _x = self.app_status
00138 length = len(_x)
00139 if python3 or type(_x) == unicode:
00140 _x = _x.encode('utf-8')
00141 length = len(_x)
00142 buff.write(struct.pack('<I%ss'%length, length, _x))
00143 _x = self.status
00144 length = len(_x)
00145 if python3 or type(_x) == unicode:
00146 _x = _x.encode('utf-8')
00147 length = len(_x)
00148 buff.write(struct.pack('<I%ss'%length, length, _x))
00149 _x = self
00150 buff.write(_struct_2I.pack(_x.last_connection_timestamp.secs, _x.last_connection_timestamp.nsecs))
00151 length = len(self.apps)
00152 buff.write(_struct_I.pack(length))
00153 for val1 in self.apps:
00154 _x = val1.name
00155 length = len(_x)
00156 if python3 or type(_x) == unicode:
00157 _x = _x.encode('utf-8')
00158 length = len(_x)
00159 buff.write(struct.pack('<I%ss'%length, length, _x))
00160 _x = val1.display
00161 length = len(_x)
00162 if python3 or type(_x) == unicode:
00163 _x = _x.encode('utf-8')
00164 length = len(_x)
00165 buff.write(struct.pack('<I%ss'%length, length, _x))
00166 _x = val1.description
00167 length = len(_x)
00168 if python3 or type(_x) == unicode:
00169 _x = _x.encode('utf-8')
00170 length = len(_x)
00171 buff.write(struct.pack('<I%ss'%length, length, _x))
00172 _x = val1.platform
00173 length = len(_x)
00174 if python3 or type(_x) == unicode:
00175 _x = _x.encode('utf-8')
00176 length = len(_x)
00177 buff.write(struct.pack('<I%ss'%length, length, _x))
00178 _x = val1.status
00179 length = len(_x)
00180 if python3 or type(_x) == unicode:
00181 _x = _x.encode('utf-8')
00182 length = len(_x)
00183 buff.write(struct.pack('<I%ss'%length, length, _x))
00184 except struct.error as se: self._check_types(se)
00185 except TypeError as te: self._check_types(te)
00186
00187 def deserialize(self, str):
00188 """
00189 unpack serialized message in str into this message instance
00190 :param str: byte array of serialized message, ``str``
00191 """
00192 try:
00193 if self.last_connection_timestamp is None:
00194 self.last_connection_timestamp = genpy.Time()
00195 if self.apps is None:
00196 self.apps = None
00197 end = 0
00198 start = end
00199 end += 4
00200 (length,) = _struct_I.unpack(str[start:end])
00201 start = end
00202 end += length
00203 if python3:
00204 self.name = str[start:end].decode('utf-8')
00205 else:
00206 self.name = str[start:end]
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.platform = str[start:end].decode('utf-8')
00214 else:
00215 self.platform = 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.system = str[start:end].decode('utf-8')
00223 else:
00224 self.system = str[start:end]
00225 start = end
00226 end += 4
00227 (length,) = _struct_I.unpack(str[start:end])
00228 start = end
00229 end += length
00230 if python3:
00231 self.robot = str[start:end].decode('utf-8')
00232 else:
00233 self.robot = str[start:end]
00234 start = end
00235 end += 4
00236 (length,) = _struct_I.unpack(str[start:end])
00237 start = end
00238 end += length
00239 if python3:
00240 self.client_status = str[start:end].decode('utf-8')
00241 else:
00242 self.client_status = str[start:end]
00243 start = end
00244 end += 4
00245 (length,) = _struct_I.unpack(str[start:end])
00246 start = end
00247 end += length
00248 if python3:
00249 self.app_status = str[start:end].decode('utf-8')
00250 else:
00251 self.app_status = str[start:end]
00252 start = end
00253 end += 4
00254 (length,) = _struct_I.unpack(str[start:end])
00255 start = end
00256 end += length
00257 if python3:
00258 self.status = str[start:end].decode('utf-8')
00259 else:
00260 self.status = str[start:end]
00261 _x = self
00262 start = end
00263 end += 8
00264 (_x.last_connection_timestamp.secs, _x.last_connection_timestamp.nsecs,) = _struct_2I.unpack(str[start:end])
00265 start = end
00266 end += 4
00267 (length,) = _struct_I.unpack(str[start:end])
00268 self.apps = []
00269 for i in range(0, length):
00270 val1 = appmanager_msgs.msg.AppDescription()
00271 start = end
00272 end += 4
00273 (length,) = _struct_I.unpack(str[start:end])
00274 start = end
00275 end += length
00276 if python3:
00277 val1.name = str[start:end].decode('utf-8')
00278 else:
00279 val1.name = str[start:end]
00280 start = end
00281 end += 4
00282 (length,) = _struct_I.unpack(str[start:end])
00283 start = end
00284 end += length
00285 if python3:
00286 val1.display = str[start:end].decode('utf-8')
00287 else:
00288 val1.display = str[start:end]
00289 start = end
00290 end += 4
00291 (length,) = _struct_I.unpack(str[start:end])
00292 start = end
00293 end += length
00294 if python3:
00295 val1.description = str[start:end].decode('utf-8')
00296 else:
00297 val1.description = str[start:end]
00298 start = end
00299 end += 4
00300 (length,) = _struct_I.unpack(str[start:end])
00301 start = end
00302 end += length
00303 if python3:
00304 val1.platform = str[start:end].decode('utf-8')
00305 else:
00306 val1.platform = str[start:end]
00307 start = end
00308 end += 4
00309 (length,) = _struct_I.unpack(str[start:end])
00310 start = end
00311 end += length
00312 if python3:
00313 val1.status = str[start:end].decode('utf-8')
00314 else:
00315 val1.status = str[start:end]
00316 self.apps.append(val1)
00317 self.last_connection_timestamp.canon()
00318 return self
00319 except struct.error as e:
00320 raise genpy.DeserializationError(e)
00321
00322
00323 def serialize_numpy(self, buff, numpy):
00324 """
00325 serialize message with numpy array types into buffer
00326 :param buff: buffer, ``StringIO``
00327 :param numpy: numpy python module
00328 """
00329 try:
00330 _x = self.name
00331 length = len(_x)
00332 if python3 or type(_x) == unicode:
00333 _x = _x.encode('utf-8')
00334 length = len(_x)
00335 buff.write(struct.pack('<I%ss'%length, length, _x))
00336 _x = self.platform
00337 length = len(_x)
00338 if python3 or type(_x) == unicode:
00339 _x = _x.encode('utf-8')
00340 length = len(_x)
00341 buff.write(struct.pack('<I%ss'%length, length, _x))
00342 _x = self.system
00343 length = len(_x)
00344 if python3 or type(_x) == unicode:
00345 _x = _x.encode('utf-8')
00346 length = len(_x)
00347 buff.write(struct.pack('<I%ss'%length, length, _x))
00348 _x = self.robot
00349 length = len(_x)
00350 if python3 or type(_x) == unicode:
00351 _x = _x.encode('utf-8')
00352 length = len(_x)
00353 buff.write(struct.pack('<I%ss'%length, length, _x))
00354 _x = self.client_status
00355 length = len(_x)
00356 if python3 or type(_x) == unicode:
00357 _x = _x.encode('utf-8')
00358 length = len(_x)
00359 buff.write(struct.pack('<I%ss'%length, length, _x))
00360 _x = self.app_status
00361 length = len(_x)
00362 if python3 or type(_x) == unicode:
00363 _x = _x.encode('utf-8')
00364 length = len(_x)
00365 buff.write(struct.pack('<I%ss'%length, length, _x))
00366 _x = self.status
00367 length = len(_x)
00368 if python3 or type(_x) == unicode:
00369 _x = _x.encode('utf-8')
00370 length = len(_x)
00371 buff.write(struct.pack('<I%ss'%length, length, _x))
00372 _x = self
00373 buff.write(_struct_2I.pack(_x.last_connection_timestamp.secs, _x.last_connection_timestamp.nsecs))
00374 length = len(self.apps)
00375 buff.write(_struct_I.pack(length))
00376 for val1 in self.apps:
00377 _x = val1.name
00378 length = len(_x)
00379 if python3 or type(_x) == unicode:
00380 _x = _x.encode('utf-8')
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 _x = val1.display
00384 length = len(_x)
00385 if python3 or type(_x) == unicode:
00386 _x = _x.encode('utf-8')
00387 length = len(_x)
00388 buff.write(struct.pack('<I%ss'%length, length, _x))
00389 _x = val1.description
00390 length = len(_x)
00391 if python3 or type(_x) == unicode:
00392 _x = _x.encode('utf-8')
00393 length = len(_x)
00394 buff.write(struct.pack('<I%ss'%length, length, _x))
00395 _x = val1.platform
00396 length = len(_x)
00397 if python3 or type(_x) == unicode:
00398 _x = _x.encode('utf-8')
00399 length = len(_x)
00400 buff.write(struct.pack('<I%ss'%length, length, _x))
00401 _x = val1.status
00402 length = len(_x)
00403 if python3 or type(_x) == unicode:
00404 _x = _x.encode('utf-8')
00405 length = len(_x)
00406 buff.write(struct.pack('<I%ss'%length, length, _x))
00407 except struct.error as se: self._check_types(se)
00408 except TypeError as te: self._check_types(te)
00409
00410 def deserialize_numpy(self, str, numpy):
00411 """
00412 unpack serialized message in str into this message instance using numpy for array types
00413 :param str: byte array of serialized message, ``str``
00414 :param numpy: numpy python module
00415 """
00416 try:
00417 if self.last_connection_timestamp is None:
00418 self.last_connection_timestamp = genpy.Time()
00419 if self.apps is None:
00420 self.apps = None
00421 end = 0
00422 start = end
00423 end += 4
00424 (length,) = _struct_I.unpack(str[start:end])
00425 start = end
00426 end += length
00427 if python3:
00428 self.name = str[start:end].decode('utf-8')
00429 else:
00430 self.name = str[start:end]
00431 start = end
00432 end += 4
00433 (length,) = _struct_I.unpack(str[start:end])
00434 start = end
00435 end += length
00436 if python3:
00437 self.platform = str[start:end].decode('utf-8')
00438 else:
00439 self.platform = str[start:end]
00440 start = end
00441 end += 4
00442 (length,) = _struct_I.unpack(str[start:end])
00443 start = end
00444 end += length
00445 if python3:
00446 self.system = str[start:end].decode('utf-8')
00447 else:
00448 self.system = str[start:end]
00449 start = end
00450 end += 4
00451 (length,) = _struct_I.unpack(str[start:end])
00452 start = end
00453 end += length
00454 if python3:
00455 self.robot = str[start:end].decode('utf-8')
00456 else:
00457 self.robot = str[start:end]
00458 start = end
00459 end += 4
00460 (length,) = _struct_I.unpack(str[start:end])
00461 start = end
00462 end += length
00463 if python3:
00464 self.client_status = str[start:end].decode('utf-8')
00465 else:
00466 self.client_status = str[start:end]
00467 start = end
00468 end += 4
00469 (length,) = _struct_I.unpack(str[start:end])
00470 start = end
00471 end += length
00472 if python3:
00473 self.app_status = str[start:end].decode('utf-8')
00474 else:
00475 self.app_status = str[start:end]
00476 start = end
00477 end += 4
00478 (length,) = _struct_I.unpack(str[start:end])
00479 start = end
00480 end += length
00481 if python3:
00482 self.status = str[start:end].decode('utf-8')
00483 else:
00484 self.status = str[start:end]
00485 _x = self
00486 start = end
00487 end += 8
00488 (_x.last_connection_timestamp.secs, _x.last_connection_timestamp.nsecs,) = _struct_2I.unpack(str[start:end])
00489 start = end
00490 end += 4
00491 (length,) = _struct_I.unpack(str[start:end])
00492 self.apps = []
00493 for i in range(0, length):
00494 val1 = appmanager_msgs.msg.AppDescription()
00495 start = end
00496 end += 4
00497 (length,) = _struct_I.unpack(str[start:end])
00498 start = end
00499 end += length
00500 if python3:
00501 val1.name = str[start:end].decode('utf-8')
00502 else:
00503 val1.name = str[start:end]
00504 start = end
00505 end += 4
00506 (length,) = _struct_I.unpack(str[start:end])
00507 start = end
00508 end += length
00509 if python3:
00510 val1.display = str[start:end].decode('utf-8')
00511 else:
00512 val1.display = str[start:end]
00513 start = end
00514 end += 4
00515 (length,) = _struct_I.unpack(str[start:end])
00516 start = end
00517 end += length
00518 if python3:
00519 val1.description = str[start:end].decode('utf-8')
00520 else:
00521 val1.description = str[start:end]
00522 start = end
00523 end += 4
00524 (length,) = _struct_I.unpack(str[start:end])
00525 start = end
00526 end += length
00527 if python3:
00528 val1.platform = str[start:end].decode('utf-8')
00529 else:
00530 val1.platform = str[start:end]
00531 start = end
00532 end += 4
00533 (length,) = _struct_I.unpack(str[start:end])
00534 start = end
00535 end += length
00536 if python3:
00537 val1.status = str[start:end].decode('utf-8')
00538 else:
00539 val1.status = str[start:end]
00540 self.apps.append(val1)
00541 self.last_connection_timestamp.canon()
00542 return self
00543 except struct.error as e:
00544 raise genpy.DeserializationError(e)
00545
00546 _struct_I = genpy.struct_I
00547 _struct_2I = struct.Struct("<2I")