Telematics SDK - Interface Specification
v1.37.0
|
Data Structures | |
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 |
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) |
Typedefs | |
typedef int | v2x_radio_handle_t |
typedef traffic_ip_type_t | traffic_ip_type |
Enumerations | |
enum | v2x_concurrency_sel_t { V2X_WWAN_NONCONCURRENT = 0, V2X_WWAN_CONCURRENT = 1 } |
enum | v2x_event_t { V2X_INACTIVE = 0, V2X_ACTIVE, V2X_TX_SUSPENDED, V2X_RX_SUSPENDED, V2X_TXRX_SUSPENDED } |
enum | v2x_priority_et { V2X_PRIO_MOST_URGENT = 0, V2X_PRIO_1 = 1, V2X_PRIO_2 = 2, V2X_PRIO_3 = 3, V2X_PRIO_4 = 4, V2X_PRIO_5 = 5, V2X_PRIO_6 = 6, V2X_PRIO_BACKGROUND = 7 } |
enum | v2x_service_status_t { SERVICE_UNAVAILABLE = 0, SERVICE_AVAILABLE = 1 } |
enum | v2x_auto_retransmit_policy_t { V2X_AUTO_RETRANSMIT_DISABLED = 0, V2X_AUTO_RETRANSMIT_ENABLED = 1, V2X_AUTO_RETRANSMIT_DONT_CARE = 2 } |
enum | traffic_ip_type_t { TRAFFIC_IP = 0, TRAFFIC_NON_IP = 1 } |
This section contains C Radio APIs related to Cellular-V2X operation. 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 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 frequencies for a Tx pool ID. 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 frequency in MHz. |
uint16_t | max_freq |
Maximum frequency in MHz. |
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. [block]Supported values:
|
unsigned | supports_20ms_periodicity: 1 |
Indicates whether an n*20 ms bandwidth reservation is supported. [block]Supported values:
|
unsigned | supports_50ms_periodicity: 1 |
Indicates whether 50 ms periodicity is supported. [block]Supported values:
|
unsigned | supports_100ms_periodicity: 1 |
Indicates whether the basic minimum periodicity of 100 ms is supported. [block]Supported values:
|
unsigned | max_quantity_of_auto_retrans: 4 |
Maximum number automatic retransmissions. [block]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. [block]Supported values:
|
int32_t | default_tx_power |
Default power used for transmission. |
uint8_t | mcs_index_valid |
Indicates whether the MCS index is specified. [block]Supported values:
|
uint8_t | mcs_index |
MCS index number |
uint8_t | tx_pool_id_valid |
Indicates whether the Tx pool ID is valid. [block]Supported values:
|
uint8_t | tx_pool_id |
ID of the Tx pool. |
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 |
#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().
typedef int v2x_radio_handle_t |
Radio data handle to the interface.
typedef traffic_ip_type_t traffic_ip_type |
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 |
enum traffic_ip_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_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 | 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] | context | Voluntary pointer to the first parameter on the callback. |
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_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 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. |