Changeset 898:55da787ce6e1 for src/mlx/rpc.py
- Timestamp:
- 03/16/18 08:58:18 (6 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/rpc.py
r895 r898 381 381 #--------------------------------------------------------------------------------------- 382 382 383 class AircraftTypeInfo(RPCObject): 384 """Information about an aircraft type.""" 385 # The instructions for the construction 386 _instructions = { 387 "dow" : int, 388 "dowCockpit" : int, 389 "dowCabin" : int, 390 } 391 392 def __init__(self, value): 393 """Construct the booked flight object from the given RPC result 394 value.""" 395 super(AircraftTypeInfo, self).__init__(value, 396 AircraftTypeInfo._instructions) 397 self.aircraftType = const.icao2Type[value["typeCode"]] 398 399 #--------------------------------------------------------------------------------------- 400 383 401 class Registration(object): 384 402 """Data for registration.""" … … 507 525 return None 508 526 527 def getTypes(self): 528 """Get the data of the aircraft types supported by us.""" 529 value = self._performCall(lambda sessionID: 530 self._server.getTypes(sessionID)) 531 532 return [AircraftTypeInfo(t) for t in value] 533 509 534 def getFlights(self): 510 535 """Get the flights available for performing."""
Note:
See TracChangeset
for help on using the changeset viewer.