Telematics SDK - Interface Specification  v1.38.19

Modules

 C APIs
 
 CPP APIs
 

Data Structures

class  telux::cv2x::ICv2xConfigListener
 Listeners for ICv2xConfig must implement this interface. More...
 
class  telux::cv2x::ICv2xConfig
 Cv2xConfig provide operations to update or request cv2x configuration. More...
 
class  telux::cv2x::ICv2xTxRxSocket
 

Detailed Description

This section contains APIs related to Cellular-V2X operation. The SDK has C and C++ APIs. The C APIs are legacy and are being maintained for backwards compatibility purposes. These APIs are mostly wrappers over the C++ APIs. New features and functionality will be added to C++ APIs. For anyone writing new Cv2x software, it is recommended to use the C++ APIs.


Data Structure Documentation

class telux::cv2x::ICv2xConfigListener

Listeners for ICv2xConfig must implement this interface.

Public Member Functions

virtual void onConfigChanged (const ConfigEventInfo &info)
 
virtual ~ICv2xConfigListener ()
 

Constructor & Destructor Documentation

virtual telux::cv2x::ICv2xConfigListener::~ICv2xConfigListener ( )
virtual

Destructor for ICv2xConfigListener

Member Function Documentation

virtual void telux::cv2x::ICv2xConfigListener::onConfigChanged ( const ConfigEventInfo info)
virtual

Called when CV2X configuration has changed in the below scenarios:

  1. The specified configuration source has expired.
  2. The active configuration source has changed to the specified configuration source type due to the expiration of the configuration source being used.
  3. The specified configuration source has been updated.
Parameters
[in]info- Information of CV2X configuration event.
class telux::cv2x::ICv2xConfig

Cv2xConfig provide operations to update or request cv2x configuration.

Public Member Functions

virtual ~ICv2xConfig ()
 
virtual bool isReady ()=0
 
virtual std::future< bool > onReady ()=0
 
virtual telux::common::Status updateConfiguration (const std::string &configFilePath, telux::common::ResponseCallback cb)=0
 
virtual telux::common::Status retrieveConfiguration (const std::string &configFilePath, telux::common::ResponseCallback cb)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< ICv2xConfigListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< ICv2xConfigListener > listener)=0
 

Constructor & Destructor Documentation

virtual telux::cv2x::ICv2xConfig::~ICv2xConfig ( )
virtual

Member Function Documentation

virtual bool telux::cv2x::ICv2xConfig::isReady ( )
pure virtual

Checks if the Cv2x Config Manager is ready.

Returns
True if Cv2x Config is ready for service, otherwise returns false.
virtual std::future<bool> telux::cv2x::ICv2xConfig::onReady ( )
pure virtual

Wait for Cv2x Config to be ready.

Returns
A future that caller can wait on to be notified when Cv2x Radio Manager is ready.
virtual telux::common::Status telux::cv2x::ICv2xConfig::updateConfiguration ( const std::string &  configFilePath,
telux::common::ResponseCallback  cb 
)
pure virtual

Updates CV2X configuration. Requires CV2X TX/RX radio status be Inactive. If CV2X radio status is Active or Suspended, call ICv2xRadioManager::stopCv2x before trying to update configuration. The functionality of V2X configuration expiration is supported by adding an expiration leaf to the V2X configuration file passed in. When the active configuration expires, the system fallbacks to a lower priority V2X configuration ConfigSourceType if existed. If the V2X stauts is active, it changes to suspended when the active V2X configuration expires and then changes to active after the system fallbacks to a lower priority V2X configuration or changes to inactive if no V2X configuration is available.

Parameters
[in]configFilePath- Path to config file. This is the fully qualified file path including the name of the file.
[in]cb- Callback that is invoked when the send is complete. This may be null.
virtual telux::common::Status telux::cv2x::ICv2xConfig::retrieveConfiguration ( const std::string &  configFilePath,
telux::common::ResponseCallback  cb 
)
pure virtual

Retrieve active CV2X configuration. The calling application should have write access to the path specified by . And if the v2x configuration retrieval request succeed, the file specified by will be created and filled with the configuration contents. Otherwise, no file will be created.

Parameters
[in]configFilePath- Path to config file. This is the fully qualified file path including the name of the file.
[in]cb- Callback that is invoked when the configuration retrival is complete. This may be null.
virtual telux::common::Status telux::cv2x::ICv2xConfig::registerListener ( std::weak_ptr< ICv2xConfigListener listener)
pure virtual

Registers a listener for this ICv2xConfig.

Parameters
[in]listener- Listener that implements ICv2xConfigListener interface.
virtual telux::common::Status telux::cv2x::ICv2xConfig::deregisterListener ( std::weak_ptr< ICv2xConfigListener listener)
pure virtual

Deregisters a listener for this ICv2xConfig.

Parameters
[in]listener- Previously registered ICv2xConfigListener that is to be deregistered.
class telux::cv2x::ICv2xTxRxSocket

This is class encapsulates a Cv2xRadio socket for both Tx and Rx. It contains the socket through which client applications can send and receive data. This class is referenced in Cv2xRadio::createCv2xTcpSocket and Cv2xRadio::closeCv2xTcpSocket.

Public Member Functions

virtual uint32_t getId () const =0
 
virtual uint32_t getServiceId () const =0
 
virtual int getSocket () const =0
 
virtual struct sockaddr_in6 getSocketAddr () const =0
 
virtual uint16_t getPortNum () const =0
 
virtual ~ICv2xTxRxSocket ()
 

Constructor & Destructor Documentation

virtual telux::cv2x::ICv2xTxRxSocket::~ICv2xTxRxSocket ( )
virtual

Member Function Documentation

virtual uint32_t telux::cv2x::ICv2xTxRxSocket::getId ( ) const
pure virtual

Accessor for Cv2xRadio socket ID. The socket ID should be unique within a process but will not be unique between processes.

Returns
Cv2xRadio socket ID
virtual uint32_t telux::cv2x::ICv2xTxRxSocket::getServiceId ( ) const
pure virtual

Accessor for service ID

Returns
The Service ID bound to the socket.
virtual int telux::cv2x::ICv2xTxRxSocket::getSocket ( ) const
pure virtual

Accessor for the socket file descriptor

Returns
The socket fd.
virtual struct sockaddr_in6 telux::cv2x::ICv2xTxRxSocket::getSocketAddr ( ) const
pure virtual

Accessor for the socket address description

Returns
The socket address
virtual uint16_t telux::cv2x::ICv2xTxRxSocket::getPortNum ( ) const
pure virtual

Accessor for the local port number bound to the socket

Returns
The local port number