pilot_drive.master_queue package
Submodules
pilot_drive.master_queue.master_event_queue module
Module used to track and display
- class pilot_drive.master_queue.master_event_queue.EventType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnumEnum used by services to add an event to the master queue
- BLUETOOTH = 'bluetooth'
- MEDIA = 'media'
- PHONE = 'phone'
- SETTINGS = 'settings'
- SYSTEM = 'system'
- UPDATER = 'updater'
- VEHICLE = 'vehicle'
- WEB = 'web'
- class pilot_drive.master_queue.master_event_queue.MasterEventQueue(logging: MasterLogger)
Bases:
object- The class that manages the master event queue. Services are passed the created MasterEventQueue
object from the main loop, and use the push_event() method to add events to the queue. The main loop will use the is_new_event() and pop_event() methods to handle new events.
- get() Dict | None
Remove and return an item from the queue
- Returns:
event dict object of {“type”: <type>, <type>: <event_json>}, or None if the queue is empty.
- property is_new_event: bool
Check if there is a new event on the event queue
- Returns:
boolean if there is a new event or not