Telematics SDK - API Reference
v1.51.0
|
Data Structures | |
struct | v2x_status_info_t |
struct | v2x_radio_status_t |
struct | v2x_pool_status_t |
struct | v2x_radio_status_ex_t |
struct | trusted_ue_info_t |
struct | tx_pool_id_info_t |
struct | v2x_iface_capabilities_t |
struct | v2x_tx_bandwidth_reservation_t |
struct | v2x_chan_meas_params_t |
struct | v2x_chan_measurements_t |
struct | v2x_radio_calls_t |
struct | v2x_sps_mac_details_t |
struct | v2x_per_sps_reservation_calls_t |
struct | v2x_tx_flow_info_t |
struct | v2x_sock_info_t |
struct | v2x_sid_list_t |
struct | v2x_tx_sps_flow_info_t |
struct | socket_info_t |
struct | src_l2_filter_info_t |
struct | v2x_rf_tx_info_t |
struct | v2x_tx_status_report_t |
Macros | |
#define | V2X_RADIO_HANDLE_BAD (-1) |
#define | V2X_MAX_RADIO_SESSIONS (10) |
#define | V2X_RX_WILDCARD_PORTNUM (9000) |
#define | MAX_POOL_IDS_LIST_LEN (20) |
#define | MAX_MALICIOUS_IDS_LIST_LEN (50) |
#define | MAX_TRUSTED_IDS_LIST_LEN (50) |
#define | MAX_SUBSCRIBE_SIDS_LIST_LEN (10) |
#define | MAX_FILTER_IDS_LIST_LEN (50) |
#define | V2X_MAX_ANTENNAS_SUPPORTED (2) |
#define | V2X_MAX_TX_POOL_NUM (2) |
#define | V2X_MAX_RX_POOL_NUM (4) |
Typedefs | |
typedef int | v2x_radio_handle_t |
typedef traffic_ip_type_t | traffic_ip_type |
typedef struct src_l2_filter_info_t | src_l2_filter_info |
typedef void(* | v2x_tx_status_report_listener) (const v2x_tx_status_report_t info) |
typedef void(* | v2x_ext_radio_status_listener) (const v2x_radio_status_ex_t *status) |
This section contains C Radio APIs related to Cellular-V2X operation. Applications need to have "radio" Linux group permissions to be able to operate successfully with underlying services. For any new CV2x development, it is recommended to use the C++ telux::cv2x::* APIs.
Abstraction of the radio driver parameters for a V2X broadcast socket interface, including 3GPP CV2X QoS bandwidth contracts.
struct v2x_status_info_t |
Encapsulates CV2X Tx/Rx status and cause of failure.
Data Fields | ||
---|---|---|
v2x_radio_status_type_t | status |
Tx/Rx status |
v2x_radio_cause_type_t | cause |
Cause of failure |
struct v2x_radio_status_t |
Encapsulates status of CV2X radio.
Data Fields | ||
---|---|---|
v2x_status_info_t | tx_status |
TX status |
v2x_status_info_t | rx_status |
RX status |
struct v2x_pool_status_t |
Encapsulates status for single TX/RX pool.
Data Fields | ||
---|---|---|
uint8_t | pool_id |
pool ID |
v2x_status_info_t | status |
Tx/Rx pool status |
struct v2x_radio_status_ex_t |
V2X overall radio status and per pool status.
Data Fields | ||
---|---|---|
v2x_radio_status_t | status |
CV2X overall TX/RX status |
uint8_t | tx_pool_size |
Number of Tx pools in array of pool_status. |
v2x_pool_status_t | tx_pool_status[V2X_MAX_TX_POOL_NUM] |
CV2X Tx pool status. |
uint8_t | rx_pool_size |
Number of Rx pools in array of pool_status. |
v2x_pool_status_t | rx_pool_status[V2X_MAX_RX_POOL_NUM] |
CV2X Rx pool status. |
struct trusted_ue_info_t |
Contains time confidence, position confidence, and propagation delay for a trusted UE.
struct tx_pool_id_info_t |
Contains minimum and maximum EARFCNs for a Tx pool ID. Multiple Tx Pools allow the same radio and overall frequency range to be shared for multiple types of traffic like V2V and V2X. Each pool ID and frequency range corresponds to a certain type of traffic. Both edge guard bands are not included in the EARFCN range reported. The calculation for the full bandwidth includes both edge guard bands is: bandwidth(MHz) = (max_freq-min_freq)/9. This struct is used in v2x_iface_capabilities_t.
Data Fields | ||
---|---|---|
uint8_t | pool_id |
ID of the Tx pool. |
uint16_t | min_freq |
Minimum EARFCN of this pool. |
uint16_t | max_freq |
Maximum EARFCN of this pool. |
struct v2x_iface_capabilities_t |
Contains information on the capabilities of a Radio interface.
Data Fields | ||
---|---|---|
int | link_ip_MTU_bytes |
Maximum data payload length (in bytes) of a packet supported by the IP Radio interface. |
int | link_non_ip_MTU_bytes |
Maximum data payload length (in bytes) of a packet supported by the non-IP Radio interface. |
v2x_concurrency_sel_t | max_supported_concurrency |
Indicates whether this interface supports concurrent WWAN with V2X (PC5). |
uint16_t | non_ip_tx_payload_offset_bytes |
Byte offset in a non-IP Tx packet before the actual payload begins. In 3GPP CV2X, the first byte after the offset is the 1-byte V2X Family ID. This offset is to the left for a per-packet Tx header that includes Tx information that might be inserted in front of the packet payload (in subsequent releases). An example of Tx information is MAC/Phy parameters (power, rate, retransmissions policy, and so on). Currently, this value is expected to be 0. But it is reserved to support possible per-packet Tx/Rx headers that might be added in future releases of this API. |
uint16_t | non_ip_rx_payload_offset_bytes |
Byte offset in a non-IP Rx packet before the actual payload begins. Initially, this value is zero. But it allows for later insertion of per-packet Rx information (sometimes called metadata) to be added to the front of the data payload. An example of Rx information is MAC/Phy measurements (receive signal strength, timestamps, and so on). The V2X Family ID is considered as part of the payload in the 3GPP CV2X. Higher layers (applications that are clients to this API) must remove or advance past that 1 byte to get to the more familiar actual WSMP/Geonetworking payload. |
uint16_t | int_min_periodicity_multiplier_ms |
Lowest number of milliseconds requested for a bandwidth. This value is also the basis for all possible bandwidth reservation periods. For example, if this multiplier=100 ms, applications can only reserve bandwidths of 100 ms, 200 ms, up to 1000 ms. |
uint16_t | int_maximum_periodicity_ms |
Least frequent bandwidth periodicity that is supported. Above this value, use event-driven periodic messages of a period larger than this value. |
unsigned | supports_10ms_periodicity: 1 |
Indicates whether n*10 ms periodicities are supported. Supported values:
|
unsigned | supports_20ms_periodicity: 1 |
Indicates whether an n*20 ms bandwidth reservation is supported. Supported values:
|
unsigned | supports_50ms_periodicity: 1 |
Indicates whether 50 ms periodicity is supported. Supported values:
|
unsigned | supports_100ms_periodicity: 1 |
Indicates whether the basic minimum periodicity of 100 ms is supported. Supported values:
|
unsigned | max_quantity_of_auto_retrans: 4 |
Maximum number automatic retransmissions. Supported values:0 through 15 |
unsigned | size_of_layer2_mac_address: 4 |
Size of the L2 MAC address. Different Radio Access Technologies have different-sized L2 MAC addresses: 802.11 has 6 bytes, whereas 3GPP PC5 has only 3 bytes. Because a randomized MAC address comes from an HSM with good pseudo random entropy, higher layers must know how many bytes of the MAC address to generate. |
uint16_t | v2x_number_of_priority_levels |
Number of different priority levels supported. For example, 8 is the current 3GPP standard (where a lower number means a higher priority). |
uint16_t | highest_priority_value |
Least urgent priority number supported by this radio. Higher numbers are lower priority, so if the full range is supported, this value is V2X_PRIO_BACKGROUND. |
uint16_t | lowest_priority_value |
Highest priority value (most urgent traffic). Lower numbers are higher priority, so if the highest level supported this value is V2X_PRIO_MOST_URGENT. |
uint16_t | max_qty_SPS_flows |
Maximum number of supported SPS reservations. |
uint16_t | max_qty_non_SPS_flows |
Maximum number of supported event flows (non-SPS ports). |
int32_t | max_tx_pwr |
Maximum supported transmission power in dBm. |
int32_t | min_tx_pwr |
Minimum supported transmission power in dBm. |
uint32_t | tx_pool_ids_supported_len |
Length of the tx_pool_ids_supported array. |
tx_pool_id_info_t | tx_pool_ids_supported[MAX_POOL_IDS_LIST_LEN] |
Array of Tx pool IDs and their associated minimum and maximum frequencies. |
struct v2x_tx_bandwidth_reservation_t |
Used when requesting a QoS bandwidth contract, which is implemented in PC5 3GPP V2-X radio as a Semi Persistent Flow (SPS).
The underlying radio providing the interface might support periodicities of various granularity in 100 ms integer multiples (such as 200 ms, 300 ms, and 400 ms).
The reservation is also used internally as a handle.
Data Fields | ||
---|---|---|
int | v2xid |
Variable length 4-byte PSID or ITS_AID, or another application ID. |
v2x_priority_et | priority |
Specifies one of the 3GPP levels of priority for the traffic that is pre-reserved on the SPS flow. Use v2x_radio_query_parameters() to get the exact number of supported priority levels. |
int | period_interval_ms |
Bandwidth-reserved periodicity interval in milliseconds. There are limits on which intervals the underlying radio supports. Use the capabilities query method to discover the int_min_periodicity_multiplier_ms and int_maximum_periodicity_ms supported intervals. |
int | tx_reservation_size_bytes |
Number of Tx bandwidth bytes that are sent every periodicity interval. |
struct v2x_chan_meas_params_t |
Contains the measurement parameters for configuring the MAC/Phy radio channel measurements (such as CBR utilization).
The radio chip contains requests on radio measurement parameters that API clients can use to specify the following:
struct v2x_chan_measurements_t |
Periodically returned by the radio with all measurements about the radio channel, such as the amount of noise and bandwidth saturation (channel_busy_percentage, or CBR).
struct v2x_radio_calls_t |
Contains callback functions used in a v2x_radio_init() and v2x_radio_init_v2 call.
The radio interface uses these callback functions for events such as completion of initialization, a Layer-02 MAC address change, or a status event (loss of sufficient GPS time precision to transmit).
These callbacks are related to a specific radio interface, and its MAC/Phy parameters, such as transmit power, bandwidth utilization, and changes in radio status.
Data Fields | |
void(* | v2x_radio_init_complete )(v2x_status_enum_type status, void *context) |
void(* | v2x_radio_status_listener )(v2x_event_t event, void *context) |
void(* | v2x_radio_chan_meas_listener )(v2x_chan_measurements_t *measurements, void *context) |
void(* | v2x_radio_l2_addr_changed_listener )(int new_l2_address, void *context) |
void(* | v2x_radio_macphy_change_complete_cb )(void *context) |
void(* | v2x_radio_capabilities_listener )(v2x_iface_capabilities_t *caps, void *context) |
void(* | v2x_service_status_listener )(v2x_service_status_t status, void *context) |
void(* v2x_radio_calls_t::v2x_radio_init_complete) (v2x_status_enum_type status, void *context) |
Callback that indicates initialization is complete.
[in] | status | Updated current radio status that indicates whether transmit and receive are ready. |
[in] | context | Pointer to the context that was supplied during initial registration. |
void(* v2x_radio_calls_t::v2x_radio_status_listener) (v2x_event_t event, void *context) |
Callback made when the status in the radio changes. For example, in response to a fault when there is a loss of GPS timing accuracy.
[in] | event | Delivery of the event that just occurred, such losing the ability to transmit. |
[in] | context | Pointer to the context of the caller who originally registered for this callback. |
void(* v2x_radio_calls_t::v2x_radio_chan_meas_listener) (v2x_chan_measurements_t *measurements, void *context) |
Callback made from lower layers when periodic radio measurements are prepared.
[in] | measurements | Pointer to the periodic measurements. |
[in] | context | Pointer to the context of the caller who originally registered for this callback. |
void(* v2x_radio_calls_t::v2x_radio_l2_addr_changed_listener) (int new_l2_address, void *context) |
Callback made by the platform SDK when the MAC address (L2 SRC address) changes.
[in] | new_l2_address | New L2 source address as an integer (because the L2 address is 3 bytes). |
[in] | context | Pointer to the context of the caller who originally registered for this callback. |
void(* v2x_radio_calls_t::v2x_radio_macphy_change_complete_cb) (void *context) |
Callback made to indicate that the requested radio MAC/Phy change (such as channel/frequency and power) has completed.
[in] | context | Pointer to the context of the caller who originally registered for this callback. |
void(* v2x_radio_calls_t::v2x_radio_capabilities_listener) (v2x_iface_capabilities_t *caps, void *context) |
Callback made when V2X capabilities change.
[in] | caps | Pointer to the capabilities of this interface. |
[in] | context | Pointer to the context of the caller who originally registered for this callback. |
void(* v2x_radio_calls_t::v2x_service_status_listener) (v2x_service_status_t status, void *context) |
Callback made when the service status changes.
[in] | status | Service status. |
[in] | context | Pointer to the context of the caller who originally registered for this callback. |
struct v2x_sps_mac_details_t |
Contains MAC information that is reported from the actual MAC SPS in the radio. The offsets can periodically change on any given transmission report.
struct v2x_per_sps_reservation_calls_t |
Callback functions used in v2x_radio_tx_sps_sock_create_and_bind() calls.
Data Fields | |
void(* | v2x_radio_l2_reservation_change_complete_cb )(void *context, v2x_sps_mac_details_t *details) |
void(* | v2x_radio_sps_offset_changed )(void *context, v2x_sps_mac_details_t *details) |
void(* v2x_per_sps_reservation_calls_t::v2x_radio_l2_reservation_change_complete_cb) (void *context, v2x_sps_mac_details_t *details) |
Callback made upon completion of a reservation change that a v2x_radio_tx_reservation_change() call initiated for a MAC/Phy contention.
The current SPS offset and reservation parameter are passed in the details structure returned by the pointer details.
[in] | context | Pointer to the application context. |
[in] | details | Pointer to the MAC information. |
void(* v2x_per_sps_reservation_calls_t::v2x_radio_sps_offset_changed) (void *context, v2x_sps_mac_details_t *details) |
Callback periodically made when the MAC SPS timeslot changes. The new reservation offset is in the details structure returned by pointer details.
[in] | measurements | Pointer to the channel measurements. |
[in] | context | Pointer to the context. |
struct v2x_tx_flow_info_t |
Advanced parameters that can be specified for Tx SPS and event-driven flows.
Data Fields | ||
---|---|---|
v2x_auto_retransmit_policy_t | retransmit_policy |
V2X retransmit policy. |
uint8_t | default_tx_power_valid |
Indicates whether the default Tx power is specified. Supported values:
|
int32_t | default_tx_power |
Default power used for transmission. |
uint8_t | mcs_index_valid |
Indicates whether the MCS index is specified. Supported values:
|
uint8_t | mcs_index |
MCS index number |
uint8_t | tx_pool_id_valid |
Indicates whether the Tx pool ID is valid. Supported values:
|
uint8_t | tx_pool_id |
ID of the Tx pool. |
uint8_t | is_unicast_valid |
Indicates whether is_unicast is specified. Supported values:
|
uint8_t | is_unicast |
Non zero if requested flow is unicast. Note: Unicast flows ignore subscribed Service Ids |
struct v2x_sock_info_t |
struct v2x_sid_list_t |
Parameters to identify a service ID list.
Data Fields | ||
---|---|---|
int | length |
number of services IDs included in the array of sid. |
uint32_t | sid[MAX_SUBSCRIBE_SIDS_LIST_LEN] |
array of service IDs. |
struct v2x_tx_sps_flow_info_t |
Advanced parameters that can be specified for Tx SPS flows.
Data Fields | ||
---|---|---|
v2x_tx_bandwidth_reservation_t | reservation |
Transmit reservation information. |
v2x_tx_flow_info_t | flow_info |
Transmit resource information about the SPS Tx flow. |
struct socket_info_t |
struct src_l2_filter_info_t |
Contains remote UE source L2 ID that expecting to filter.
struct v2x_rf_tx_info_t |
Tx status per Tx chain and Tx power per Tx antenna for a specific transport block.
Data Fields | ||
---|---|---|
rf_status_t | status |
Fault detection status for a specific Tx chain. |
int32_t | power |
The target Tx power after MPR/AMPR reduction for a specific Tx antenna in dBm*10 format. Invalid value is -700, it means the corresponding antenna is not being used for the transmission of this transport block. |
struct v2x_tx_status_report_t |
Information on Tx status of a V2X transport block that is reported from low layer.
Data Fields | ||
---|---|---|
v2x_rf_tx_info_t | rf_info[V2X_MAX_ANTENNAS_SUPPORTED] |
Tx status per Tx chain and Tx power per Tx antenna. |
uint8_t | num_rb |
Number of resource blocks used for the transport block. |
uint8_t | start_rb |
Start resource block index used for the transport block. |
uint8_t | mcs |
Modulation and coding scheme used for the transport block that is defined in 3GPP TS 36.213. |
uint8_t | seg_num |
Total number of segments of a V2X packet. |
v2x_segment_type_t | seg_type |
Segment type of the transport block. |
v2x_tx_type_t | tx_type |
Indication of new Tx or re-Tx of the transport block. |
uint16_t | ota_timing |
OTA timing in format of system frame number*10 + subframe number. |
uint16_t | port |
Port number that can be used to link the report to a specific Tx flow which has the same source port number. |
#define V2X_RADIO_HANDLE_BAD (-1) |
Invalid handle returned by v2x_radio_init() and v2x_radio_init_v2() upon an error.
#define V2X_MAX_RADIO_SESSIONS (10) |
Limit on the number of simultaneous RmNet Radio interfaces this library can have open at once.
Typically, there are only a few actual radios. On the same radio however, one interface can be for IP traffic, and another interface can be for non-IP traffic.
#define V2X_RX_WILDCARD_PORTNUM (9000) |
Wildcard value for a port number. When the wildcard is used, all V2X received traffic is routed.
#define MAX_POOL_IDS_LIST_LEN (20) |
Maximum length of the pool ID list that is returned in v2x_iface_capabilities_t.
#define MAX_MALICIOUS_IDS_LIST_LEN (50) |
Maximum length of the malicious ID list that can be passed in v2x_radio_update_trusted_ue_list().
#define MAX_TRUSTED_IDS_LIST_LEN (50) |
Maximum length of the trusted ID list that can be passed in v2x_radio_update_trusted_ue_list().
#define MAX_SUBSCRIBE_SIDS_LIST_LEN (10) |
Maximum length for the subscribed service ID list that can be passed in v2x_radio_rx_sock_create_and_bind_v2().
#define MAX_FILTER_IDS_LIST_LEN (50) |
Maximum length for the L2 ID list that can be passed in v2x_set_l2_filters() and v2x_cancel_l2_filters.
#define V2X_MAX_ANTENNAS_SUPPORTED (2) |
Maximum number of antennas that is supported. Used in v2x_tx_status_report_t
#define V2X_MAX_TX_POOL_NUM (2) |
Maximum number of V2X Tx pools that is supported. Used in v2x_radio_status_ex_t
#define V2X_MAX_RX_POOL_NUM (4) |
Maximum number of V2X Rx pools that is supported. Used in v2x_radio_status_ex_t
typedef int v2x_radio_handle_t |
Radio data handle to the interface.
typedef traffic_ip_type_t traffic_ip_type |
typedef struct src_l2_filter_info_t src_l2_filter_info |
Contains remote UE source L2 ID that expecting to filter.
typedef void(* v2x_tx_status_report_listener) (const v2x_tx_status_report_t info) |
Callback made when a CV2X transport block is transmitted in low layer if a listener has been registered by calling v2x_register_tx_status_report_listener.
[in] | info | V2X Tx status report information. |
typedef void(* v2x_ext_radio_status_listener) (const v2x_radio_status_ex_t *status) |
Callback made when CV2X Tx/Rx status is changed and a listener has been registered by calling v2x_register_ext_radio_status_listener.
[out] | status | Pointer to V2X overall Tx/Rx status and per pool status. |
Describes whether the radio chip modem should attempt or support concurrent 3GPP CV2X operation with a WWAN 4G/5G data call.
Some chips are only capable of operating on CV2X. In this case:
Enumerator | |
---|---|
V2X_WWAN_NONCONCURRENT |
No simultaneous WWAN + CV2X on this interface. |
V2X_WWAN_CONCURRENT |
Interface allows requests for concurrent support of WWAN + CV2X connections. |
enum v2x_event_t |
Event indications sent asynchronously from the radio via callbacks that indicate the state of the radio. The state can change in response to the loss of timing precision or a geofencing change.
enum v2x_priority_et |
enum v2x_service_status_t |
Defines possible values for CV2X radio RX/TX status.
Enumerator | |
---|---|
V2X_RADIO_STATUS_INACTIVE |
RX/TX is inactive |
V2X_RADIO_STATUS_ACTIVE |
RX/TX is active |
V2X_RADIO_STATUS_SUSPENDED |
RX/TX is suspended |
V2X_RADIO_STATUS_UNKNOWN |
RX/TX status unknown |
Defines possible values for cause of CV2X radio failure. The cause code is only associated with cv2x suspend/inactive status, if cv2x is active, the cause code has no meaning. Used in v2x_status_info_t
enum traffic_ip_type_t |
enum rf_status_t |
enum v2x_segment_type_t |
Defines possible values for the segment type of a transport block.
enum v2x_tx_type_t |
uint16_t v2x_convert_priority_to_traffic_class | ( | v2x_priority_et | priority | ) |
Converts a traffic priority to one of the 255 IPv6 traffic class bytes that are used in the data plane to indicate per-packet priority on non-SPS (event driven) data ports.
[in] | priority | Packet priority that is to be converted to an IPv6 traffic class. This priority is between the lowest and highest priority values returned in v2x_iface_capabilities_t. |
v2x_priority_et v2x_convert_traffic_class_to_priority | ( | uint16_t | traffic_class | ) |
Maps an IPv6 traffic class to a V2X priority value.
[in] | traffic_class | IPv6 traffic classification that came in a packet from the radio. |
v2x_api_ver_t v2x_radio_api_version | ( | ) |
Method used to query the platform SDK for its version number, build information, and build date.
v2x_status_enum_type v2x_radio_query_parameters | ( | const char * | iface_name, |
v2x_iface_capabilities_t * | caps | ||
) |
Gets the capabilities of a specific Radio interface attached to the system.
[in] | iface_name | Pointer to the Radio interface name. The Radio interface is one of the following:
|
[out] | caps | Pointer to the v2x_iface_capabilities_t structure, which contains the capabilities of this specific interface. |
v2x_status_enum_type v2x_radio_deinit | ( | v2x_radio_handle_t | handle | ) |
De-initializes a specific Radio interface.
[in] | handle | Handle to the Radio that was initialized. |
int v2x_radio_rx_sock_create_and_bind | ( | v2x_radio_handle_t | handle, |
int * | sock, | ||
struct sockaddr_in6 * | rx_sockaddr | ||
) |
Opens a new V2X radio receive socket, and initializes the given sockaddr buffer. The socket is also bound as an AF_INET6 UDP type socket.
[in] | handle | Identifies the initialized Radio interface. |
[out] | sock | Pointer to the socket that, on success, returns the socket descriptor. The caller must release this socket with v2x_radio_sock_close(). |
[out] | rx_sockaddr | Pointer to the IPv6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind. |
int v2x_radio_rx_sock_create_and_bind_v2 | ( | v2x_radio_handle_t | handle, |
int | id_ist_len, | ||
uint32_t * | id_list, | ||
int * | sock, | ||
struct sockaddr_in6 * | rx_sockaddr | ||
) |
Opens a new V2X radio receive socket with specific service IDs for subscription, and initializes the given sockaddr buffer. The socket is also bound as an AF_INET6 UDP type socket.
[in] | handle | Identifies the initialized Radio interface. |
[in] | id_ist_len | Identifies the length of service ID list. |
[in] | id_list | Pointer to the service ID list for subscription, subscribe wildcard if input nullptr. |
[out] | sock | Pointer to the socket that, on success, returns the socket descriptor. The caller must release this socket with v2x_radio_sock_close(). |
[out] | rx_sockaddr | Pointer to the IPv6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind. |
int v2x_radio_rx_sock_create_and_bind_v3 | ( | v2x_radio_handle_t | handle, |
uint16_t | port_num, | ||
int | id_ist_len, | ||
uint32_t * | id_list, | ||
int * | sock, | ||
struct sockaddr_in6 * | rx_sockaddr | ||
) |
Opens a new V2X radio receive socket with specific service IDs for subscription and specifc port number for the receive path, and initializes the given sockaddr buffer. The socket is also bound as an AF_INET6 UDP type socket.
This v2x_radio_rx_sock_create_and_bind_v3() method differs from v2x_radio_rx_sock_create_and_bind_v2() in that you can use the port_num parameter to specify the port number for the receive path.
[in] | handle | Identifies the initialized Radio interface. |
[in] | port_num | Identifies the port number for the receive path. |
[in] | id_ist_len | Identifies the length of service ID list. |
[in] | id_list | Pointer to the service ID list for subscription, subscribe wildcard if input nullptr. |
[out] | sock | Pointer to the socket that, on success, returns the socket descriptor. The caller must release this socket with v2x_radio_sock_close(). |
[out] | rx_sockaddr | Pointer to the IPv6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind. |
int v2x_radio_enable_rx_meta_data | ( | v2x_radio_handle_t | handle, |
bool | enable, | ||
int | id_list_len, | ||
uint32_t * | id_list | ||
) |
Enable or disable the meta data report for the packets corresponding to the service IDs.
If enabled, the meta data report would be generated in addition to the actual OTA payload packet, and it comes from the same data interface as the OTA packet itself, it consist of RF RSSI (received signal strength indicator) status, 32-bit SCI Format 1 (3GPP TS 36.213, section 14.1), packet delay estimation, L2 destination ID, and the resource blocks used for the packet's transmission: subframe, subchannel index.
[in] | handle | Identifies the initialized Radio interface. |
[in] | enable | enable or disable the meta data |
[in] | id_list_len | number of the service IDs provided in the id_list |
[in] | id_list | Pointer to the Rx service ID list |
int v2x_radio_sock_create_and_bind | ( | v2x_radio_handle_t | handle, |
v2x_tx_sps_flow_info_t * | tx_flow_info, | ||
v2x_per_sps_reservation_calls_t * | calls, | ||
int | tx_sps_portnum, | ||
int | tx_event_portnum, | ||
int | rx_portnum, | ||
v2x_sid_list_t * | rx_id_list, | ||
v2x_sock_info_t * | tx_sps_sock, | ||
v2x_sock_info_t * | tx_event_sock, | ||
v2x_sock_info_t * | rx_sock | ||
) |
Creates Tx SPS socket, Tx Event socket and Rx socket with specified parameters. The socket is also bound as an AF_INET6 UDP type socket.
This v2x_radio_sock_create_and_bind() method is the combination of function v2x_radio_tx_sps_sock_create_and_bind_v2()/v2x_radio_tx_event_sock_create_and_bind_v2 in the transmit direction and function v2x_radio_rx_sock_create_and_bind_v3() in the receiving direction.
[in] | handle | Identifies the initialized Radio interface. |
[in] | tx_flow_info | Pointer to the Tx SPS or event flow information. To create event flow, set reservation.v2xid and flow_info in this structure. |
[in] | calls | Pointer to reservation callbacks or listeners. This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic. This parameter passes NULL if no callbacks are required. |
[in] | tx_sps_portnum | Requested Tx source port number for SPS transmissions, or -1 for no Tx sps flow. |
[in] | tx_event_portnum | Requested Tx source port number for event transmissions, or -1 for no Tx event flow. |
[in] | rx_portnum | Requested Rx destination port number, or -1 for no Rx subscription. |
[in] | rx_id_list | Pointer to the Rx service ID list for subscription, subscribe wildcard if input nullptr. |
[out] | tx_sps_sock | Pointer to the Tx sps socket that, on success, returns the socket descriptor and the IPv6 socket address. The caller must release this socket with v2x_radio_sock_close(). |
[out] | tx_event_sock | Pointer to the Tx event socket that, on success, returns the socket descriptor and the IPv6 socket address. The caller must release this socket with v2x_radio_sock_close(). |
[out] | rx_sock | Pointer to the Rx socket that, on success, returns the socket descriptor and the IPv6 socket address. The caller must release this socket with v2x_radio_sock_close(). |
int v2x_radio_tx_sps_sock_create_and_bind | ( | v2x_radio_handle_t | handle, |
v2x_tx_bandwidth_reservation_t * | res, | ||
v2x_per_sps_reservation_calls_t * | calls, | ||
int | sps_portnum, | ||
int | event_portnum, | ||
int * | sps_sock, | ||
struct sockaddr_in6 * | sps_sockaddr, | ||
int * | event_sock, | ||
struct sockaddr_in6 * | event_sockaddr | ||
) |
Creates and binds a socket with a bandwidth-reserved (SPS) Tx flow with the requested ID, priority, periodicity, and size on a specified source port number. The socket is created as an IPv6 UDP socket.
[in] | handle | Identifies the initialized Radio interface on which this data connection is made. |
[in] | res | Pointer to the parameter structure (how often the structure is sent, how many bytes are reserved, and so on). |
[in] | calls | Pointer to reservation callbacks or listeners. This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic. This parameter passes NULL if no callbacks are required. |
[in] | sps_portnum | Requested source port number for the bandwidth reserved SPS transmissions. |
[in] | event_portnum | Requested source port number for the bandwidth reserved event transmissions, or -1 for no event port. |
[out] | sps_sock | Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth. |
[out] | sps_sockaddr | Pointer to the IPv6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls. |
[out] | event_sock | Pointer to the socket that is bound to the event-driven transmission port. |
[out] | event_sockaddr | Pointer to the IPV6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls. |
int v2x_radio_tx_sps_only_create | ( | v2x_radio_handle_t | handle, |
v2x_tx_bandwidth_reservation_t * | res, | ||
v2x_per_sps_reservation_calls_t * | calls, | ||
int | sps_portnum, | ||
int * | sps_sock, | ||
struct sockaddr_in6 * | sps_sockaddr | ||
) |
Creates a socket with a bandwidth-reserved (SPS) Tx flow.
Only SPS transmissions are to be implemented for the socket, which is created as an IPv6 UDP socket.
[in] | handle | Identifies the initialized Radio interface on which this data connection is made. |
[in] | res | Pointer to the parameter structure (how often the structure is sent, how many bytes are reserved, and so on). |
[in] | calls | Pointer to reservation callbacks or listeners. This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic. This parameter passes NULL if no callbacks are required. |
[in] | sps_portnum | Requested source port number for the bandwidth reserved SPS transmissions. |
[out] | sps_sock | Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth. |
[out] | sps_sockaddr | Pointer to the IPv6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls. |
v2x_status_enum_type v2x_radio_tx_reservation_change | ( | int * | sps_sock, |
v2x_tx_bandwidth_reservation_t * | updated_reservation | ||
) |
Adjusts the reservation for transmit bandwidth.
[out] | sps_sock | Pointer to the socket bound to the requested port. |
[in] | updated_reservation | Pointer to a bandwidth reservation with new reservation information. |
int v2x_radio_tx_event_sock_create_and_bind | ( | const char * | interface, |
int | v2x_id, | ||
int | event_portnum, | ||
struct sockaddr_in6 * | event_sock_addr, | ||
int * | sock | ||
) |
Opens and binds an event-driven socket (one with no bandwidth reservation). The socket is bound as an AF_INET6 UDP type socket.
[in] | interface | Pointer to the operating system name to use. This interface is an RmNet interface (HLOS). |
[in] | v2x_id | Used for transmissions that are ultimately mapped to an L2 destination address. |
[in] | event_portnum | Local port number to which the socket is bound. Used for transmissions of this ID. |
[out] | event_sock_addr | Pointer to the sockaddr_ll structure buffer to be initialized. |
[out] | sock | Pointer to the file descriptor. Loaded when the function is successful. |
v2x_status_enum_type v2x_radio_start_measurements | ( | v2x_radio_handle_t | handle, |
v2x_chan_meas_params_t * | measure_this_way | ||
) |
Requests a channel utilization (CBP/CBR) measurement result on a channel.
[in] | handle | Handle to the port. |
[in] | measure_this_way | Indicates how and what to measure, and how often to send results. Some higher-level standards (like J2945/1 and ETSI TS102687 DCC) have specific time windows and items to measure. |
v2x_status_enum_type v2x_radio_stop_measurements | ( | v2x_radio_handle_t | handle | ) |
Discontinues any periodic MAC/Phy channel measurements and the reporting of them via listener calls.
[in] | handle | Handle to the radio measurements to be stopped. |
int v2x_radio_sock_close | ( | int * | sock_fd | ) |
Closes a specified socket file descriptor and deregisters any modem resources associated with it (such as reserved SPS bandwidth contracts).
[in] | sock_fd | Socket file descriptor. |
void v2x_radio_set_log_level | ( | int | new_level, |
int | use_syslog | ||
) |
Configures the V2X log level and destination for SDK and lower layers.
[in] | new_level | Log level to set to one of the standard syslog levels (LOG_ERR, LOG_INFO, and so on). |
[in] | use_syslog | Destination: send to stdout (0) or syslog (otherwise). |
v2x_event_t cv2x_status_poll | ( | uint64_t * | status_age_useconds | ) |
Polls for the recent V2X status.
[out] | status_age_useconds | Pointer to the age in microseconds of the last event (radio status) that is being reported. |
int v2x_radio_trigger_l2_update | ( | v2x_radio_handle_t | handle | ) |
Triggers the modem to change its source L2 address by randomly generating a new address.
[in] | handle | Initialized Radio interface on which this data connection is made. |
int v2x_radio_update_trusted_ue_list | ( | unsigned int | malicious_list_len, |
unsigned int | malicious_list[MAX_MALICIOUS_IDS_LIST_LEN], | ||
unsigned int | trusted_list_len, | ||
trusted_ue_info_t | trusted_list[MAX_TRUSTED_IDS_LIST_LEN] | ||
) |
Updates the list of malicious and trusted IDs tracked by the modem.
[in] | malicious_list_len | Number of malicious IDs in malicious_list. |
[in] | malicious_list | List of malicious IDs. |
[in] | trusted_list_len | Number of trusted IDs in trusted_list. |
[in] | trusted_list | List of trusted IDs. |
int v2x_radio_tx_sps_sock_create_and_bind_v2 | ( | v2x_radio_handle_t | handle, |
v2x_tx_sps_flow_info_t * | sps_flow_info, | ||
v2x_per_sps_reservation_calls_t * | calls, | ||
int | sps_portnum, | ||
int | event_portnum, | ||
int * | sps_sock, | ||
struct sockaddr_in6 * | sps_sockaddr, | ||
int * | event_sock, | ||
struct sockaddr_in6 * | event_sockaddr | ||
) |
Creates and binds a socket with a bandwidth-reserved (SPS) Tx flow with the requested ID, priority, periodicity, and size on a specified source port number. The socket is created as an IPv6 UDP socket.
This v2x_radio_tx_sps_sock_create_and_bind_v2() method differs from v2x_radio_tx_sps_sock_create_and_bind() in that you can use the sps_flow_info parameter to specify transmission resource information about the Tx flow.
[in] | handle | Identifies the initialized Radio interface on which this data connection is made. |
[in] | sps_flow_info | Pointer to the flow information in the v2x_tx_sps_flow_info_t structure. |
[in] | calls | Pointer to reservation callbacks or listeners. This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic. This parameter passes NULL if no callbacks are required. |
[in] | sps_portnum | Requested source port number for the bandwidth reserved SPS transmissions. |
[in] | event_portnum | Requested source port number for the bandwidth reserved event transmissions, or -1 for no event port. |
[out] | sps_sock | Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth. |
[out] | sps_sockaddr | Pointer to the IPv6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls. |
[out] | event_sock | Pointer to the socket that is bound to the event-driven transmission port. |
[out] | event_sockaddr | Pointer to the IPV6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls. |
int v2x_radio_tx_sps_only_create_v2 | ( | v2x_radio_handle_t | handle, |
v2x_tx_sps_flow_info_t * | sps_flow_info, | ||
v2x_per_sps_reservation_calls_t * | calls, | ||
int | sps_portnum, | ||
int * | sps_sock, | ||
struct sockaddr_in6 * | sps_sockaddr | ||
) |
Creates a socket with a bandwidth-reserved (SPS) Tx flow.
Only SPS transmissions are to be implemented for the socket, which is created as an IPv6 UDP socket.
This v2x_radio_tx_sps_only_create_v2() method differs from v2x_radio_tx_sps_only_create() in that you can use the sps_flow_info parameter to specify transmission resource information about the Tx flow.
[in] | handle | Identifies the initialized Radio interface on which this data connection is made. |
[in] | sps_flow_info | Pointer to the flow information in the v2x_tx_sps_flow_info_t structure. |
[in] | calls | Pointer to reservation callbacks or listeners. This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic. This parameter passes NULL if no callbacks are required. |
[in] | sps_portnum | Requested source port number for the bandwidth reserved SPS transmissions. |
[out] | sps_sock | Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth. |
[out] | sps_sockaddr | Pointer to the IPv6 UDP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls. |
v2x_status_enum_type v2x_radio_tx_reservation_change_v2 | ( | int * | sps_sock, |
v2x_tx_sps_flow_info_t * | updated_flow_info | ||
) |
Adjusts the reservation for transmit bandwidth.
This v2x_radio_tx_reservation_change_v2() method differs from v2x_radio_tx_reservation_change() in that you can use the updated_flow_info parameter to specify transmission resource information about the Tx flow.
[out] | sps_sock | Pointer to the socket bound to the requested port. |
[in] | updated_flow_info | Pointer to the new reservation information. |
v2x_status_enum_type v2x_radio_tx_event_flow_info_change | ( | int * | sock, |
v2x_tx_flow_info_t * | updated_flow_info | ||
) |
Adjusts the flow parameters for an existing Tx event socket.
[out] | sock | Pointer to the socket bound to the requested port. |
[in] | updated_flow_info | Pointer to the new flow parameters. |
v2x_status_enum_type start_v2x_mode | ( | ) |
Starts V2X mode.
The V2X radio status must be INACTIVE. If the status is ACTIVE or SUSPENDED (see v2x_event_t), call stop_v2x_mode() first.
This call is a blocking call. When it returns, V2X mode has been started, assuming there is no error.
v2x_status_enum_type stop_v2x_mode | ( | ) |
Stops V2X mode.
The V2X radio status must be ACTIVE or SUSPENDED (see v2x_event_t). If the status is INACTIVE, call start_v2x_mode() first.
This call is a blocking call. When it returns, V2X mode has been stopped, assuming there is no error.
v2x_radio_handle_t v2x_radio_init_v2 | ( | traffic_ip_type_t | ip_type, |
v2x_concurrency_sel_t | mode, | ||
v2x_radio_calls_t * | callbacks_p, | ||
void * | ctx_p | ||
) |
Initializes the Radio interface and sets the callback that will be used when events in the radio change (including when radio initialization is complete).
[in] | ip_type | The Ip or non-Ip interface. |
[in] | mode | WAN concurrency mode, although the radio might not support concurrency. Errors can be generated. |
[in] | callbacks_p | Pointer to the v2x_radio_calls_t structure that is prepopulated with function pointers used during radio events (such as loss of time synchronization or accuracy) for subscribers. This parameter also points to a callback for this initialization function. |
[in] | ctx_p | Voluntary pointer to the first parameter on the callback. |
int v2x_radio_init_v3 | ( | v2x_concurrency_sel_t | mode, |
v2x_radio_calls_t * | callbacks_p, | ||
void * | ctx_p, | ||
v2x_radio_handle_t * | ip_handle_p, | ||
v2x_radio_handle_t * | non_ip_handle_p | ||
) |
Initializes Cv2x radio and sets the callback that will be used when events in the radio change (including when radio initialization is complete). The callers can get the handles of Cv2x IP and non-IP interface on success. The handle of interface is used for reconfiguring, opening or changing, and closing reservations.
[in] | mode | WAN concurrency mode, although the radio might not support concurrency. Errors can be generated. |
[in] | callbacks_p | Pointer to the v2x_radio_calls_t structure that is prepopulated with function pointers used during radio events (such as loss of time synchronization or accuracy) for subscribers. This parameter also points to a callback for this initialization function. |
[in] | ctx_p | Voluntary pointer to the first parameter on the callback. |
[out] | ip_handle_p | Pointer to the handle of IP interface. Pass nullptr if IP interface is not used. |
[out] | non_ip_handle_p | Pointer to the handle of non-IP interface. Pass nullptr if non-IP interface is not used. |
int v2x_radio_tx_event_sock_create_and_bind_v3 | ( | traffic_ip_type_t | ip_type, |
int | v2x_id, | ||
int | event_portnum, | ||
v2x_tx_flow_info_t * | event_flow_info, | ||
struct sockaddr_in6 * | event_sockaddr, | ||
int * | sock | ||
) |
Opens and binds an event-driven socket (one with no bandwidth reservation). The socket is bound as an AF_INET6 UDP type socket.
This v2x_radio_tx_event_sock_create_and_bind_v3() method differs from v2x_radio_tx_event_sock_create_and_bind_v2() in that you can use the traffic_ip_type_t parameter to specify traffic ip type instead of requiring the interface name.
[in] | ip_type | traffice_ip_type. |
[in] | v2x_id | Used for transmissions that are ultimately mapped to an L2 destination address. |
[in] | event_portnum | Local port number to which the socket is bound. Used for transmissions of this ID. |
[in] | event_flow_info | Pointer to the event flow parameters. |
[out] | event_sockaddr | Pointer to the sockaddr_ll structure buffer to be initialized. |
[out] | sock | Pointer to the file descriptor. Loaded when the function is successful. |
v2x_status_enum_type get_iface_name | ( | traffic_ip_type_t | ip_type, |
char * | iface_name, | ||
size_t | buffer_len | ||
) |
Returns interface name set during radio initialization.
[in] | ip_type | traffic_ip_type_t |
[out] | iface_name | pointer to buffer for interface name |
[in] | buffer_len | length of the buffer passed for interface name. Must be at least the max buffer size for an interface name (IFNAMSIZE). |
int v2x_radio_tcp_sock_create_and_bind | ( | v2x_radio_handle_t | handle, |
const v2x_tx_flow_info_t * | event_info, | ||
const socket_info_t * | sock_info, | ||
int * | sock_fd, | ||
struct sockaddr_in6 * | sockaddr | ||
) |
Creates a TCP socket for event Tx and Rx. The socket is bound as an AF_INET6 TCP type socket.
This v2x_radio_tcp_sock_create_and_bind() API creates a new TCP socket and binds the socket to the IPv6 address of local IP interface with specified source port. Additionally, this API also registers a Tx event flow and subscribes Rx with specified service ID to enable TCP control and data packets in both transmitting and receiving directions.
[in] | handle | Identifies the initialized Radio interface. The caller must specify IP interface for raido initilization. |
[in] | event_info | Pointer to the Tx event flow information. |
[in] | sock_info | Pointer to the TCP socket information. |
[out] | sock_fd | Pointer to the socket that, on success, returns the TCP socket descriptor. The caller must release this socket with v2x_radio_sock_close(). |
[out] | sockaddr | Pointer to the address of TCP socket. The sockaddr_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind. |
v2x_status_enum_type v2x_set_peak_tx_power | ( | int8_t | txPower | ) |
Set RF peak cv2x transmit power. This affects the power for all existing flows and for any flow created int the future.
Precondition – v2x mode enabled.
[in] | txPower | Desired global Cv2x peak tx power in dbm |
v2x_status_enum_type v2x_set_l2_filters | ( | uint32_t | list_len, |
src_l2_filter_info * | list_array | ||
) |
Set src L2 ID list for filtering. This affects/disables receiving packets from the src L2 IDs in the list.
[in] | list_len | number of rc L2 IDs, max value 50 |
[in] | list_array | array that stores the src L2 IDs, durations and pppp values for filter |
v2x_status_enum_type v2x_remove_l2_filters | ( | uint32_t | list_len, |
uint32_t * | l2_id_list | ||
) |
Remove specific src L2 ID list for filtering. This affects/enables receiving packets from the src L2 IDs in the list.
[in] | list_len | number of rc L2 IDs, max value 50 |
[in] | l2_id_list | array that stores the src L2 IDs |
v2x_status_enum_type v2x_register_tx_status_report_listener | ( | uint16_t | port, |
v2x_tx_status_report_listener | callback | ||
) |
Registers a listener for CV2X Tx status report.
[in] | port | Set this value to the port number of registered Tx Flow if user wants to receive Tx status report associated with its own Tx flow. If user wants to receive Tx status report associated with all Tx flows in system, set this value to 0. |
[in] | callback | Callback function of v2x_tx_status_report_listener structure that is called on Tx status reports. |
v2x_status_enum_type v2x_deregister_tx_status_report_listener | ( | uint16_t | port | ) |
Deregisters a listener for CV2X Tx status report.
[in] | port | Port number of previously registered v2x_tx_status_report_listener that is to be deregistered. If the listener is registered with port number 0, set this value to 0 to deregister the listener. |
v2x_status_enum_type v2x_set_global_IPaddr | ( | uint8_t | prefix_len, |
uint8_t * | ipv6_addr | ||
) |
Set CV2X global IP address for the IP interface.
[in] | prefix_len | CV2X global IP address prefix length in bits, range [64, 128] |
[in] | ipv6_addr | CV2X global IP address. |
v2x_status_enum_type v2x_set_ip_routing_info | ( | uint8_t * | dest_mac_addr | ) |
Set CV2X IP interface global IP unicast routing information.
[in] | dest_mac_addr | CV2X destination L2 address for unicast routing purpose. expecting a 6 bytes array address, in which the L2 addr stored in the last 3 entries in big endian order. |
v2x_status_enum_type v2x_get_ext_radio_status | ( | v2x_radio_status_ex_t * | status | ) |
Get current V2X overall radio status and per pool status.
[out] | status | Pointer to structure v2x_radio_status_ex_t, which contains V2X overall radio status and per pool status on success. |
v2x_status_enum_type v2x_register_ext_radio_status_listener | ( | v2x_ext_radio_status_listener | callback | ) |
Registers a listener for CV2X overall Tx/Rx status and per pool status.
[in] | callback | Callback function of v2x_ext_radio_status_listener structure that is called on CV2X Tx/Rx status change. |