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.alreadyRegisteredObserverupon adding the same observer more than once.Declaration
Swift
func registerVehicleUpdateObserver(_ observer: AnyVehicleUpdateObserver) throwsParameters
observerThe 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.alreadyRegisteredObserverupon adding the same observer more than once.Declaration
Swift
func registerVehicleUpdateObserver(_ observer: AnyVehicleUpdateObserver, options: [VehicleUpdateOption]) throwsParameters
observerThe observer to be registered.
parametersSpecify 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
observerThe registered observer.
VehicleProvider Protocol Reference