Telematics SDK - API Reference  v1.61.0

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 }
 

Detailed Description

This section contains APIs related to time management to register and deregister a listener for time reports.


Data Structure Documentation

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 ()
 

Constructor & Destructor Documentation

virtual telux::platform::ITimeListener::~ITimeListener ( )
virtual

Destructor of ITimeListener

Member Function Documentation

virtual void telux::platform::ITimeListener::onGnssUtcTimeUpdate ( const uint64_t  utcInMs)
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.

Parameters
[out]utcInMs- Milliseconds since Jan 1, 1970.
virtual void telux::platform::ITimeListener::onCv2xUtcTimeUpdate ( const uint64_t  utcInMs)
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().

Parameters
[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 ()
 

Constructor & Destructor Documentation

virtual telux::platform::ITimeManager::~ITimeManager ( )
virtual

Destructor of ITimeManager

Member Function Documentation

virtual telux::common::ServiceStatus telux::platform::ITimeManager::getServiceStatus ( )
pure virtual

This status indicates whether the object is in a usable state.

Returns
telux::common::ServiceStatus indicating the current status of the device info service.
virtual telux::common::Status telux::platform::ITimeManager::registerListener ( std::weak_ptr< ITimeListener listener,
TimeTypeMask  mask 
)
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.

Parameters
[in]listener- pointer to implemented listener.
[in]mask- mask to indicate which times the client is interested in registering for.
Returns
status of the registration request.
virtual telux::common::Status telux::platform::ITimeManager::deregisterListener ( std::weak_ptr< ITimeListener listener,
TimeTypeMask  mask 
)
pure virtual

Deregisters the previously registered listener for time updates.

Parameters
[in]listener- pointer to registered listener that needs to be removed.
[in]mask- mask to indicate which times the client has registering for.
Returns
status of the deregistration request.

Typedef Documentation

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.

Enumeration Type Documentation

Defines supported utc report types.

Enumerator
GNSS_UTC_TIME 

GNSS UTC time derived from location fix.

CV2X_UTC_TIME 

UTC time derived from injected UTC when the vehicle has selected a roadside unit as the synchronization reference for V2X communication.

MAX_SUPPORTED_TIME_TYPES