VehicleProvider
public protocol VehicleProvider
Responsible for control, access and notification of the vehicle state.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Snapshot of the current vehicle state. It is expected to be called from any queue.
Declaration
Swift
var vehicleSnapshot: Vehicle { get }
-
Registers vehicle update observer for all vehicle parameter updates. It is expected to be called on the main queue.
Throws
Throws:VehicleError.alreadyRegisteredObserver
upon adding the same observer more than once.Declaration
Swift
func registerVehicleUpdateObserver(_ observer: AnyVehicleUpdateObserver) throws
Parameters
observer
The observer to be registered.
-
Registers vehicle update observer for specific vehicle parameter updates. It is expected to be called on the main queue.
Throws
Throws:VehicleError.alreadyRegisteredObserver
upon adding the same observer more than once.Declaration
Swift
func registerVehicleUpdateObserver(_ observer: AnyVehicleUpdateObserver, options: [VehicleUpdateOption]) throws
Parameters
observer
The observer to be registered.
parameters
Specify which parameters should trigger observer notifications.
-
Removes previously registered observer. It is expected to be called on the main queue.
Declaration
Swift
func unregisterVehicleUpdateObserver(_ observer: AnyVehicleUpdateObserver)
Parameters
observer
The registered observer.