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