Telematics SDK - Interface Specification
v1.42.0
|
Data Structures | |
class | telux::cv2x::Cv2xFactory |
Cv2xFactory is the factory that creates the Cv2x Radio. More... | |
class | telux::cv2x::ICv2xRadio |
class | telux::cv2x::ICv2xRadioListener |
Listeners for Cv2xRadio must implement this interface. More... | |
class | telux::cv2x::ICv2xRadioManager |
Cv2xRadioManager manages instances of Cv2xRadio. More... | |
class | telux::cv2x::ICv2xRxSubscription |
class | telux::cv2x::ICv2xThrottleManagerListener |
Listener class for getting filter rate update notification. More... | |
class | telux::cv2x::ICv2xThrottleManager |
ThrottleManager provides throttle manager client interface. More... | |
class | telux::cv2x::ICv2xTxFlow |
Typedefs | |
using | telux::cv2x::setVerificationLoadCallback = std::function< void(telux::common::ErrorCode error)> |
This section contains C++ APIs related to Cellular-V2X operation.
class telux::cv2x::Cv2xFactory |
Cv2xFactory is the factory that creates the Cv2x Radio.
Public Member Functions | |
std::shared_ptr < ICv2xRadioManager > | getCv2xRadioManager (telux::common::InitResponseCb cb=nullptr) |
std::shared_ptr< ICv2xConfig > | getCv2xConfig (telux::common::InitResponseCb cb=nullptr) |
std::shared_ptr < ICv2xThrottleManager > | getCv2xThrottleManager () |
Static Public Member Functions | |
static Cv2xFactory & | getInstance () |
|
static |
Get Cv2xFactory instance
std::shared_ptr<ICv2xRadioManager> telux::cv2x::Cv2xFactory::getCv2xRadioManager | ( | telux::common::InitResponseCb | cb = nullptr | ) |
Get Cv2xRadioManager instance.
[in] | cb | - Optional callback to get Cv2xRadioManager initialization status |
std::shared_ptr<ICv2xConfig> telux::cv2x::Cv2xFactory::getCv2xConfig | ( | telux::common::InitResponseCb | cb = nullptr | ) |
Get Cv2xConfig instance.
[in] | cb | - Optional callback to get Cv2xConfig initialization status |
std::shared_ptr<ICv2xThrottleManager> telux::cv2x::Cv2xFactory::getCv2xThrottleManager | ( | ) |
Get Cv2xThrottleManager instance.
class telux::cv2x::ICv2xRadio |
This is class encapsulates a Cv2xRadio interface.
Returned from getCv2xRadio in Cv2xFactory
Public Member Functions | |
virtual Cv2xRadioCapabilities | getCapabilities () const =0 |
virtual bool | isReady () const =0 |
virtual bool | isInitialized () const =0 |
virtual std::future < telux::common::Status > | onReady ()=0 |
virtual telux::common::Status | registerListener (std::weak_ptr< ICv2xRadioListener > listener)=0 |
virtual telux::common::Status | deregisterListener (std::weak_ptr< ICv2xRadioListener > listener)=0 |
virtual telux::common::Status | createRxSubscription (TrafficIpType ipType, uint16_t port, CreateRxSubscriptionCallback cb, std::shared_ptr< std::vector< uint32_t >> idList=nullptr)=0 |
virtual telux::common::Status | createTxSpsFlow (TrafficIpType ipType, uint32_t serviceId, const SpsFlowInfo &spsInfo, uint16_t spsSrcPort, bool eventSrcPortValid, uint16_t eventSrcPort, CreateTxSpsFlowCallback cb)=0 |
virtual telux::common::Status | createTxEventFlow (TrafficIpType ipType, uint32_t serviceId, uint16_t eventSrcPort, CreateTxEventFlowCallback cb)=0 |
virtual telux::common::Status | createTxEventFlow (TrafficIpType ipType, uint32_t serviceId, const EventFlowInfo &flowInfo, uint16_t eventSrcPort, CreateTxEventFlowCallback cb)=0 |
virtual telux::common::Status | closeRxSubscription (std::shared_ptr< ICv2xRxSubscription > rxSub, CloseRxSubscriptionCallback cb)=0 |
virtual telux::common::Status | closeTxFlow (std::shared_ptr< ICv2xTxFlow > txFlow, CloseTxFlowCallback cb)=0 |
virtual telux::common::Status | changeSpsFlowInfo (std::shared_ptr< ICv2xTxFlow > txFlow, const SpsFlowInfo &spsInfo, ChangeSpsFlowInfoCallback cb)=0 |
virtual telux::common::Status | requestSpsFlowInfo (std::shared_ptr< ICv2xTxFlow > txFlow, RequestSpsFlowInfoCallback cb)=0 |
virtual telux::common::Status | changeEventFlowInfo (std::shared_ptr< ICv2xTxFlow > txFlow, const EventFlowInfo &flowInfo, ChangeEventFlowInfoCallback cb)=0 |
virtual telux::common::Status | requestCapabilities (RequestCapabilitiesCallback cb)=0 |
virtual telux::common::Status | requestDataSessionSettings (RequestDataSessionSettingsCallback cb)=0 |
virtual telux::common::Status | updateSrcL2Info (UpdateSrcL2InfoCallback cb)=0 |
virtual telux::common::Status | updateTrustedUEList (const TrustedUEInfoList &infoList, UpdateTrustedUEListCallback cb)=0 |
virtual | ~ICv2xRadio () |
virtual std::string | getIfaceNameFromIpType (TrafficIpType ipType)=0 |
virtual telux::common::Status | createCv2xTcpSocket (const EventFlowInfo &eventInfo, const SocketInfo &sockInfo, CreateTcpSocketCallback cb)=0 |
virtual telux::common::Status | closeCv2xTcpSocket (std::shared_ptr< ICv2xTxRxSocket > sock, CloseTcpSocketCallback cb)=0 |
|
virtual |
Destructor for ICv2xRadio
|
pure virtual |
Get the capabilities of this Cv2xRadio.
|
pure virtual |
Returns true if the radio interface was successfully initialized.
|
pure virtual |
Returns true if the radio interface has completed initialization.
|
pure virtual |
Returns a future that indicated if the radio interface is ready or if radio failed to initialize.
|
pure virtual |
Registers a listener for this Cv2xRadio.
[in] | listener | - Listener that implements Cv2xRadioListener interface. |
|
pure virtual |
Deregisters a listener from this Cv2xRadio.
[in] | listener | - Previously registered Cv2xRadioListener that is to be deregistered. |
|
pure virtual |
Creates and initializes a new Rx subscription which will be returned in the user-supplied callback.
[in] | ipType | - IP traffic type (IP or NON-IP) |
[in] | port | - Rx port number |
[in] | cb | - Callback function that is invoked when socket creation is complete. |
[in] | idList | - Service ID list to subscribe, optional parameter using nullptr by default. Subscribe wildcard if this parameter is set to nullptr. |
|
pure virtual |
Creates a Tx SPS flow with the specified IP type, serviceId, and other parameters specified in reservation. Additionally, an option event flow will be created with the same IP type and serviceId. A Tx socket will be created and initialized for the SPS flow. A Tx socket will be created and initialized for the event flow if the optional event flow is specified.
[in] | ipType | - IP traffic type (IP or NON-IP) |
[in] | serviceId | - ID used for transmissions that will be mapped to an L2 destination address. Variable length 4-byte PSID or ITS_AID, or another service ID. |
[in] | spsInfo | - SPS reservation parameters. |
[in] | spsPort | - Requested source port number for the bandwidth reserved SPS transmissions. |
[in] | eventSrcPortValid | - True if an optional event flow is desired. If this field is left false, the event flow will not be created. |
[in] | eventSrcPort | - Requested source port number for the optional event flow. |
[in] | cb | - Callback function that is invoked when socket creation is complete. This must not be null. |
|
pure virtual |
Creates an event flow. An associated Tx socket will be created and initialized.
[in] | ipType | - IP traffic type (IP or NON-IP) |
[in] | serviceId | - ID used for transmissions that will be mapped to an L2 destination address. Variable length 4-byte PSID or ITS_AID, or another service ID. |
[in] | eventSrcPort | - Local port number to which the socket is bound. Used for transmissions of this ID. |
[in] | cb | - Callback function that is invoked when socket creation is complete. This must not be null. |
|
pure virtual |
Creates an event flow. An associated Tx socket will be created and initialized.
[in] | ipType | - IP traffic type (IP or NON-IP) |
[in] | serviceId | - ID used for transmissions that will be mapped to an L2 destination address. Variable length 4-byte PSID or ITS_AID, or another service ID. |
[in] | flowInfo | - Flow configuration parameters |
[in] | eventSrcPort | - Local port number to which the socket is bound. Used for transmissions of this ID. |
[in] | cb | - Callback function that is invoked when socket creation is complete. This must not be null. |
|
pure virtual |
Closes the RxSubscription and frees resources (such as the Rx socket) associated with it.
[in] | rxSub | - RxSubscription to close |
[in] | cb | - Callback that is invoked when socket close is complete. This may be null. |
|
pure virtual |
Closes the TxFlow and frees resources associated with it (such as reserved SPS bandwidth contracts and sockets). This function works on both SPS and event flows.
[in] | txFlow | - Tx (SPS or event) flow to close. |
[in] | cb | - Callback that is invoked when Tx flow close is complete. This may be null. |
|
pure virtual |
Request to change TX SPS Flow reservation parameters.
[in] | txFlow | - Tx SPS flow |
[in] | spsInfo | - Desired SPS reservation parameters |
[in] | cb | - Callback that is invoked upon reservation change. This may be null. |
|
pure virtual |
Request SPS flow info.
[in] | sock | - Tx SPS flow |
[in] | cb | - Callback that will be invoked and returns the SPS info. Must not be null. |
|
pure virtual |
Request to change TX Event Flow reservation parameters.
[in] | txFlow | - Tx Event flow |
[in] | flowInfo | - Desired Event flow parameters |
[in] | cb | - Callback that is invoked upon parameter change. This may be null. |
|
pure virtual |
Request modem Cv2x capability information.
[in] | cb | - Callback that will be invoked and returns the capability info. Must not be null. |
|
pure virtual |
Request data session settings currently in use.
[in] | cb | - Callback that will be invoked and returns the data session settings. Must not be null. |
|
pure virtual |
Requests modem to change L2 info.
[in] | cb | - Callback that will be invoked and returns status. Must not be null. |
|
pure virtual |
Send request to modem to update the list of malicious UE source IDs and trusted UE source IDs with corresponding confidence information.
[in] | infoList | - Trusted and malicious UE information list |
[in] | cb | - Callback that will be invoked and returns status. Must not be null. |
|
pure virtual |
Get interface name based on ipType.
ipType | - IP traffic type (IP or NON-IP) |
|
pure virtual |
Creates a CV2X TCP socket with specified event flow information and TCP socket information. The TCP socket will be created and bound to the IPv6 address of local IP interface with specifed source port. Additionally, this API also registers a Tx event flow and subscribes Rx with specified service ID. If the created socket is expected to work as TCP client mode, the caller must connect the created socket to a destination using connect() and then use the socket for send() and recv() on successful connection. If the created socket is expected to work as TCP server mode, the caller must mark this socket as a listening socket using listen() and accept connections received from this listening socket using accept(), and then use the accepted sockets returned from accept() for send() or recv().
[in] | eventInfo | - Information for the Event flow. |
[in] | sockInfo | - Information for the TCP socket. |
[in] | cb | - Callback function that is invoked when socket creation is complete. This must not be null. |
|
pure virtual |
Closes the CV2X TCP socket and frees resources associated with it (such as registered event Tx flow and subscribed Rx service ID and created TCP socket).
[in] | sock | - CV2X TCP socket to close. |
[in] | cb | - Callback that is invoked when CV2X TCP socket close is complete. This may be null. |
class telux::cv2x::ICv2xRadioListener |
Listeners for Cv2xRadio must implement this interface.
Public Member Functions | |
virtual void | onStatusChanged (Cv2xStatus status) |
virtual void | onStatusChanged (Cv2xStatusEx status) |
virtual void | onL2AddrChanged (uint32_t newL2Address) |
virtual void | onSpsOffsetChanged (int spsId, MacDetails details) |
virtual void | onSpsSchedulingChanged (const SpsSchedulingInfo &schedulingInfo) |
virtual void | onCapabilitiesChanged (const Cv2xRadioCapabilities &capabilities) |
virtual | ~ICv2xRadioListener () |
|
virtual |
Destructor for ICv2xRadioListener
|
virtual |
Called when the status of the CV2X radio has changed.
[in] | status | - CV2X radio status. |
|
virtual |
Called when the status of the CV2X radio has changed.
[in] | status | - CV2X radio status. |
|
virtual |
Called when the L2 Address has changed.
[in] | newL2Address | - The new L2 address. |
|
virtual |
Called when SPS offset has changed.
[in] | spsId | - SPS Id of the SPS flow |
[in] | details | - new SPS MAC PHY details. |
|
virtual |
Called when SPS scheduling has changed.
[in] | schedulingInfo | - SPS scheduling information . |
|
virtual |
Called when Cv2x radio capabilities have changed.
[in] | capabilities | - Capabilities of the CV2X radio . |
class telux::cv2x::ICv2xRadioManager |
Cv2xRadioManager manages instances of Cv2xRadio.
|
virtual |
|
pure virtual |
Checks if the Cv2x Radio Manager is ready.
|
pure virtual |
Wait for Cv2x Radio Manager to be ready.
|
pure virtual |
This status indicates whether the Cv2xRadioManager is in a usable state.
|
pure virtual |
Get Cv2xRadio instance
[in] | category | - Specifies the category of the client application. This field is currently unused. |
|
pure virtual |
Put modem into CV2X mode.
[in] | cb | - Callback that is invoked when Cv2x mode is started |
|
pure virtual |
Take modem outo of CV2X mode
[in] | cb | - Callback that is invoked when Cv2x mode is stopped |
|
pure virtual |
request CV2X status from modem
[in] | cb | - Callback that is invoked when Cv2x status is retrieved |
|
pure virtual |
request CV2X status from modem
[in] | cb | - Callback that is invoked when Cv2x status is retrieved |
|
pure virtual |
Registers a listener for this manager.
[in] | listener | - Listener that implements Cv2xListener interface. |
|
pure virtual |
Deregisters a Cv2xListener for this manager.
[in] | listener | - Previously registered CvListener that is to be deregistered. |
|
pure virtual |
Updates CV2X configuration. Requires CV2X TX/RX radio status be Inactive. If CV2X radio status is Active or Suspended, call stopCv2x before updateConfiguration.
[in] | configFilePath | - Path to config file. |
[in] | cb | - Callback that is invoked when the send is complete. This may be null. |
|
pure virtual |
Set RF peak cv2x transmit power. This affects the power for all existing flows and for any flow created int the future
[in] | txPower | - Desired global Cv2x peak tx power in dbm |
[in] | cb | - Callback that is invoked when Cv2x peak tx power is set |
|
pure virtual |
Request to install remote UE src L2 filters. This affects receiving of the UEs' packets in specified period with specified PPPP
[in] | filterList | - remote UE src L2 Id, filter duration and PPPP list, max size 50 |
[in] | cb | - Callback that is invoked when the request is sent |
|
pure virtual |
Remove the previously installed filters matching src L2 address list. Hence forth this would allow reception of packets from specified UE's
[in] | l2IdList | - remote UE src L2 Id list, max size 50 |
[in] | cb | - Callback that is invoked when the request is sent |
class telux::cv2x::ICv2xRxSubscription |
This class encapsulates a Cv2xRadio Rx Subscription. It contains the Rx socket associated with the subscription from which client applications can read data. This class is referenced in Cv2xRadio::createRxSubscription and Cv2xRadio::closeRxSubscription.
Public Member Functions | |
virtual uint32_t | getSubscriptionId () const =0 |
virtual TrafficIpType | getIpType () const =0 |
virtual int | getSock () const =0 |
virtual struct sockaddr_in6 | getSockAddr () const =0 |
virtual uint16_t | getPortNum () const =0 |
virtual std::shared_ptr < std::vector< uint32_t > > | getServiceIDList () const =0 |
virtual void | setServiceIDList (const std::shared_ptr< std::vector< uint32_t >> idList)=0 |
virtual | ~ICv2xRxSubscription () |
|
virtual |
|
pure virtual |
Accessor for Rx subscription ID
|
pure virtual |
Accessor for IP traffic type
|
pure virtual |
Accessor for the socket file descriptor
|
pure virtual |
Accessor for the socket address description
|
pure virtual |
Accessor for the subscriptions's port number
|
pure virtual |
Get subscriptions's service ID list
|
pure virtual |
Set subscriptions's service ID list
[in] | idList | - the subscriptions's service ID list |
class telux::cv2x::ICv2xThrottleManagerListener |
Listener class for getting filter rate update notification.
Public Member Functions | |
virtual void | onFilterRateAdjustment (int rate) |
virtual void | onServiceStatusChange (telux::common::ServiceStatus status) |
virtual | ~ICv2xThrottleManagerListener () |
|
virtual |
Destructor of ICv2xThrottleManagerListener
|
virtual |
This API is invoked to advise the client to adjust the incoming message filtering rate by rate
messages/second. If the rate
is positive, it indicates the client to filter rate
more messages/second If the rate
is negative, it indicates the client to filter rate
less messages/second
[in] | rate | the reported filter rate adjustment value. |
|
virtual |
This API is invoked when the service status changes for example when a subsytem restart (SSR) occurs
[in] | status | - ServiceStatus |
class telux::cv2x::ICv2xThrottleManager |
ThrottleManager provides throttle manager client interface.
ThrottleManager provides APIs that allows applications to specify the incoming verification load on the system. This is used to make decisions on how to optimally use the resources available in the system. The API also provides feedback to clients on the suggested filtering that needs to be done when the incoming message verification rate exceeds the instantaneous system capacity.
Public Member Functions | |
virtual telux::common::ServiceStatus | getServiceStatus ()=0 |
virtual std::future< bool > | onSubsystemReady ()=0 |
virtual telux::common::Status | registerListener (std::weak_ptr< ICv2xThrottleManagerListener > listener)=0 |
virtual telux::common::Status | deregisterListener (std::weak_ptr< ICv2xThrottleManagerListener > listener)=0 |
virtual telux::common::Status | setVerificationLoad (int load, setVerificationLoadCallback cb)=0 |
virtual | ~ICv2xThrottleManager () |
|
virtual |
|
pure virtual |
This status indicates whether the object is in a usable state.
|
pure virtual |
Wait for Cv2x throttle manager client to be ready.
|
pure virtual |
Registers a listener to receive the updated filer rate adjustment data.
[in] | listner | - Listener that implement ICv2xThrottleManagerListener interface. |
|
pure virtual |
Deregister a ICv2xThrottleManagerListener.
[in] | listener | - Previously registered Cv2xThrottleManagerListener that is deregistered. |
|
pure virtual |
Set current measured/average verification load.
[in] | load | - current measured verification load(verification/second). |
class telux::cv2x::ICv2xTxFlow |
This is class encapsulates a Cv2xRadio Tx flows. It contains the Tx socket associated with the flow through which client applications can send data. This class is referenced in Cv2xRadio::createTxSpsFlow, Cv2xRadio::createTxEventFlow, and Cv2xRadio::closeTxFlow
Public Member Functions | |
virtual uint32_t | getFlowId () const =0 |
virtual TrafficIpType | getIpType () const =0 |
virtual uint32_t | getServiceId () const =0 |
virtual int | getSock () const =0 |
virtual struct sockaddr_in6 | getSockAddr () const =0 |
virtual uint16_t | getPortNum () const =0 |
virtual | ~ICv2xTxFlow () |
|
virtual |
|
pure virtual |
Accessor for flow ID. The flow ID should be unique within a process but will not be unique between processes.
|
pure virtual |
Accessor for IP traffic type
|
pure virtual |
Accessor for service ID
|
pure virtual |
Accessor for the socket file descriptor
|
pure virtual |
Accessor for the socket address description
|
pure virtual |
Accessor for the flow's source port number
using telux::cv2x::setVerificationLoadCallback = typedef std::function<void (telux::common::ErrorCode error)> |
This function is called as a response to setVerificationLoad
[in] | error | - SUCCESS if verification load was set successfully
|