Telematics SDK - API Reference
v1.63.4
|
Data Structures | |
class | telux::platform::ITimeListener |
Listener class for getting time information. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe. More... | |
class | telux::platform::ITimeManager |
ITimeManager provides interface to retrieve time information. More... | |
Typedefs | |
using | telux::platform::TimeTypeMask = std::bitset< MAX_SUPPORTED_TIME_TYPES > |
Enumerations | |
enum | telux::platform::SupportedTimeType { telux::platform::GNSS_UTC_TIME = 0, telux::platform::CV2X_UTC_TIME = 1, telux::platform::MAX_SUPPORTED_TIME_TYPES } |
This section contains APIs related to time management to register and deregister a listener for time reports.
class telux::platform::ITimeListener |
Listener class for getting time information. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe.
Public Member Functions | |
virtual void | onGnssUtcTimeUpdate (const uint64_t utcInMs) |
virtual void | onCv2xUtcTimeUpdate (const uint64_t utcInMs) |
virtual | ~ITimeListener () |
|
virtual |
Destructor of ITimeListener
|
virtual |
This function is called every 100 milliseconds after registering a listener by invoking ITimeManager::registerListener. The utc reported via this API is derived from location fix, utc value zero means there is no valid utc derived from location fix.
On platforms with Access control enabled, the client needs to have TELUX_LOC_DATA permission for this API to be invoked.
[out] | utcInMs | - Milliseconds since Jan 1, 1970. |
|
virtual |
This function is called every second after registering a listener by invoking ITimeManager::registerListener. In order for this API to be invoked, the vehicle needs to be in an area of no GNSS coverage and select a roadside unit as the synchronization reference, and a client (like an ITS stack) needs to have injected a coarse UTC time using telux::cv2x::ICv2xRadioManager::injectCoarseUtcTime().
[out] | utcInMs | - Milliseconds since Jan 1, 1970. 0 if no time available via SLSS (Sidelink Synchronisation Signal). |
class telux::platform::ITimeManager |
ITimeManager provides interface to retrieve time information.
Public Member Functions | |
virtual telux::common::ServiceStatus | getServiceStatus ()=0 |
virtual telux::common::Status | registerListener (std::weak_ptr< ITimeListener > listener, TimeTypeMask mask)=0 |
virtual telux::common::Status | deregisterListener (std::weak_ptr< ITimeListener > listener, TimeTypeMask mask)=0 |
virtual | ~ITimeManager () |
|
virtual |
Destructor of ITimeManager
|
pure virtual |
This status indicates whether the object is in a usable state.
|
pure virtual |
Registers the listener for time updates. This will result in frequent notifications and will result in wakeups when system is suspended. If wakeups are not desired then deregister should be called.
[in] | listener | - pointer to implemented listener. |
[in] | mask | - mask to indicate which times the client is interested in registering for. |
|
pure virtual |
Deregisters the previously registered listener for time updates.
[in] | listener | - pointer to registered listener that needs to be removed. |
[in] | mask | - mask to indicate which times the client has registering for. |
using telux::platform::TimeTypeMask = typedef std::bitset<MAX_SUPPORTED_TIME_TYPES> |
Bit mask that denotes which of the time types defined in SupportedTimeType are supported.