TomTomSDKVehicle
TomTomSDKVehicle
The Vehicle module facilitates the creation and management of vehicle instances within navigation applications. This module provides comprehensive functionalities for controlling, accessing, and notifying users about the state of vehicles, enhancing the overall navigation experience.
Functionalities
- VehicleProviderFactory creates instances of VehicleProvider, to manage the vehicle’s state and properties.
- VehicleUpdateObserver allows observers to receive update notifications to the vehicle’s state. Developers can register to receive updates using the addObserver(_:) method and can unregister using the removeObserver(_:) method.
- CombustionEngineProperty represents attributes of the combustion engine, enabling updates to the vehicle’s combustion engine state through the updateVehicleProperties(_:) method.
- ElectricEngineProperty represents attributes of the electric engine, allowing updates to the vehicle’s electric engine state similarly.
- VehicleProperty defines various properties associated with the vehicle, facilitating updates to the vehicle’s overall state via the updateVehicleProperties(_:) method.
- DefaultVehicleProvider provides a thread-safe implementation of the VehicleProvider interface, ensuring safe access and updates to vehicle properties while allowing for subscription to property changes.
API Overview
The following declarations are provided by module TomTomSDKVehicle.
-
An observer that receives
Vehicle
state updates.To start receiving vehicle state updates, become an observer using
See moreTomTomSDKVehicle/VehicleProvider/addObserver(_:)
. To stop receiving vehicle state updates, remove the previously added observer usingTomTomSDKVehicle/VehicleProvider/removeObserver(_:)
.Declaration
Swift
public protocol VehicleUpdateObserver : Observer
-
Combustion engine property attributes. Each
CombustionEngineProperty
represents one property of theCombustionEngine
model, and shares itsPropertyID
.Used for updating vehicle’s combustion engine state via
See moreupdateVehicleProperties(_:)
.Declaration
Swift
public enum CombustionEngineProperty
-
Electric engine property attributes. Each
ElectricEngineProperty
represents one property of theElectricEngine
model, and shares itsPropertyID
.Used for updating vehicle’s electric engine state via
See moreupdateVehicleProperties(_:)
.Declaration
Swift
public enum ElectricEngineProperty
-
Vehicle property attributes. Each
VehicleProperty
represents one property of theVehicle
model, and shares itsPropertyID
.Used for updating vehicle state via
See moreupdateVehicleProperties(_:)
.Declaration
Swift
public enum VehicleProperty
-
Responsible for control, access and notification of the vehicle state.
See moreDeclaration
Swift
public protocol VehicleProvider : AnyObject
-
Responsible for creating instances of
See moreVehicleProvider
to control, access and notify of the vehicle state.Declaration
Swift
public enum VehicleProviderFactory