Telematics SDK - Interface Specification  v1.38.19
V2x_api_config

Data Structures

struct  v2x_config_event_info_t
 

Typedefs

typedef void(* cv2x_config_event_listener) (v2x_config_event_info_t info)
 

Enumerations

enum  v2x_config_soure_t { V2X_CONFIG_SOURCE_UNKNOWN = 0u, V2X_CONFIG_SOURCE_PRECONFIG = 1u, V2X_CONFIG_SOURCE_SIM_CARD = 2u, V2X_CONFIG_SOURCE_OMA_DM = 4u }
 
enum  v2x_config_event_t { V2X_CONFIG_EVENT_CHANGED = 0u, V2X_CONFIG_EVENT_EXPIRED = 1u }
 

Functions

v2x_status_enum_type v2x_register_for_config_change_ind (cv2x_config_event_listener callback)
 
v2x_status_enum_type v2x_update_configuration (const char *config_file_path)
 
v2x_status_enum_type v2x_retrieve_configuration (const char *config_file_path)
 

Detailed Description

Abstraction of the CV2X configuration relevant interfaces.


Data Structure Documentation

struct v2x_config_event_info_t

Information about any update to a V2X config file.

Data Fields
v2x_config_soure_t source

The type of the V2X config file.

v2x_config_event_t event

Config file event.

Typedef Documentation

typedef void(* cv2x_config_event_listener) (v2x_config_event_info_t info)

Callback made when the v2x config file changes.

Associated data types
v2x_config_event_info_t
Parameters
[in]configV2X config file information.

Enumeration Type Documentation

V2X configuration source types listed in ascending order of priority. The system always uses the V2X configuration with the highest priority if multiple V2X configuration sources exist.

Enumerator
V2X_CONFIG_SOURCE_UNKNOWN 

V2X config file source is unknown

V2X_CONFIG_SOURCE_PRECONFIG 

V2X config file source is preconfig

V2X_CONFIG_SOURCE_SIM_CARD 

V2X config file source is SIM card

V2X_CONFIG_SOURCE_OMA_DM 

V2X config file source is OMA-DM

Events relevant to CV2X config file.

Enumerator
V2X_CONFIG_EVENT_CHANGED 

V2X config file is changed

V2X_CONFIG_EVENT_EXPIRED 

V2X config file is expired

Function Documentation

v2x_status_enum_type v2x_register_for_config_change_ind ( cv2x_config_event_listener  callback)

Register listener for any updates to CV2X configuration.

Associated data types
cv2x_config_event_listener
Parameters
[in]callbackCallback function of cv2x_config_event_listener structure that is used during CV2X config events (such as CV2X configuration expriy or changed).

Detailed description
This function should be called before calling v2x_update_configuration or v2x_request_configuration if the caller has interest in the notification of V2X configuration events.
V2X_CONFIG_EVENT_CHANGED v2x_config_event_t is sent to registered CV2X configuration listeners if the content of the active V2X configuration file is changed by calling v2x_update_configuration or the active V2X configuration file source v2x_config_soure_t is changed from one type to another.
V2X_CONFIG_EVENT_EXPIRED v2x_config_event_t is sent to registered CV2X configuration listeners when the active V2X configuration file is expired.
Returns
V2X_STATUS_SUCCESS.
V2X_STATUS_FAIL – If there is an error.
v2x_status_enum_type v2x_update_configuration ( const char *  config_file_path)

Updates the OMA-DM V2X radio configuration file.

Parameters
[in]config_file_pathPointer to the path of the configuration file.
Detailed description
The V2X radio status must be INACTIVE. If the V2X status is ACTIVE or SUSPENDED (see v2x_event_t), call stop_v2x_mode() first.
The functionality of V2X configuration expiration is supported by adding an expiration leaf to the V2X configuration file passed in. When the active configuration expires, the system fallbacks to a lower priority V2X configuration v2x_config_soure_t if existed. If the V2X stauts is active, it changes to suspended when the active V2X configuration expires and then changes to active after the system fallbacks to a lower priority V2X configuration or changes to inactive if no V2X configuration is available.
This call is a blocking call. When it returns the configuration has been updated, assuming no error.
Returns
V2X_STATUS_SUCCESS.
Otherwise:
Dependencies
V2X radio status must be V2X_INACTIVE (v2x_event_t).
v2x_status_enum_type v2x_retrieve_configuration ( const char *  config_file_path)

Retrieve the V2X radio configuration file.

Parameters
[in]config_file_pathPointer to the path of the configuration file.
This call is a blocking call. When it returns the configuration has been read out, assuming no error.
Returns
V2X_STATUS_SUCCESS.
Otherwise: