pilot_drive.services.vehicle package
Submodules
pilot_drive.services.vehicle.constants module
Constants for the vehicle service
pilot_drive.services.vehicle.exceptions module
Exceptions of the Vehicle service
- exception pilot_drive.services.vehicle.exceptions.FailedObdConnectionException
Bases:
ExceptionException raised when an invalid connection is detected, either from an invalid port string, or a Python OBD connection failure.
- exception pilot_drive.services.vehicle.exceptions.InvalidQueryException
Bases:
ExceptionException raised when an query field is detected as specified in the QUERIED_FIELDS constants.py.
pilot_drive.services.vehicle.vehicle module
The module that manages the connected vehicle
- class pilot_drive.services.vehicle.vehicle.Vehicle(master_event_queue: MasterEventQueue, service_type: EventType, logger: MasterLogger, settings: Settings)
Bases:
AbstractServiceThe vehicle service that interfaces with the connected vehicle
- property is_connected
Check if the OBD adapter is connected via python-OBD’s status() method.
- Returns:
a boolean of True if connected, False if not.
- main()
runs servce main loop and logic
- property obd_port
The serial port of the OBD/ELM327 reader
- property queried_fields
Get all intended fields to query from settings
- refresh()
Add any stored events back to the event queue, as this will be called in a client refresh.
Module contents
The module that manages the connected vehicle