Telematics SDK - API Reference
v1.54.0
|
Data Structures | |
union | v2x_control_status_ut |
struct | v2x_control_status_ut.bits |
union | vehicleEventFlags_ut |
struct | vehicleEventFlags_ut.bits |
union | ExteriorLights_ut |
struct | ExteriorLights_ut.bits |
struct | high_resolution_motion_t |
struct | current_dynamic_vehicle_state_t |
struct | static_vehicle_parameters_t |
Macros | |
#define | V2X_VDATA_HANDLE_BAD (-1) |
#define | V2X_J2735_TRACTION_CONTROL_MAX (4) |
#define | V2X_TRACTION_CTRL_MAX (4) |
#define | J2735_ABS_MAX (4) |
#define | V2X_STABILITY_CONTROL_MAX (4) |
#define | V2X_AUX_BRAKE_MAX (4) |
Typedefs | |
typedef int | v2x_vehicle_handle_t |
typedef int | v2x_motion_data_handle_t |
typedef void(* | v2x_high_res_motion_listener_t) (high_resolution_motion_t *motion_data) |
typedef void(* | v2x_vehicle_event_listener_t) (current_dynamic_vehicle_state_t *current_state, void *context) |
This section contains C Vehicle APIs related to Cellular-V2X operation. These APIs are provided as reference APIs to work with QTI reference hardware. Customers would need to modify the implementation of these APIs based on the specific H/W and CAN controller being used.
Abstraction of the vehicle system parameters required for CAM/BSM ITS beacons.
union v2x_control_status_ut |
Contains information related to ABS, TCS, stability control state, and other vehicle output controls that might occur and be ongoing. This structure mirrors the J2735 bit frames.
Data Fields | ||
---|---|---|
struct v2x_control_status_ut | bits |
Bit values for control status information.Bit values for control status information. |
unsigned short | word |
Byte data access to the packed v2x_control_status union structure. |
struct v2x_control_status_ut.bits |
Bit values for control status information.
Data Fields | ||
---|---|---|
unsigned | unused_padding: 1 |
Reserved for 16-bit alignment. This field is critical because of 16-bit word access to the packed v2x_control_status_ut union structure. |
v2x_AuxBrakeStatus_enum_type | aux_brake_status: 2 |
Indicates whether the auxiliary braking system is on. Supported values:
|
v2x_BrakeBoostApplied_enum_type | brake_boost_applied: 2 |
Indicates whether the brakes are actively being boosted. Supported values:
|
v2x_StabilityControlStatus_enum_type | stability_control_status: 2 |
Indicates whether stability control is on and engaged. Supported values:
|
v2x_AntiLockBrakeStatus_enum_type | antilock_brake_status: 2 |
Indicates the status of the ABS. |
v2x_TractionControlStatus_enum_type | traction_control_status: 2 |
Indicates whether status of the TCS. |
unsigned | rightRear: 1 |
Indicates whether the right rear brakes are actively being applied. Supported values:
|
unsigned | rightFront: 1 |
Indicates whether the right front brakes are actively being applied. Supported values:
|
unsigned | leftRear: 1 |
Indicates whether the left rear brakes are actively being applied Supported values:
|
unsigned | leftFront: 1 |
Indicates whether the front left brakes are actively being applied. Supported values:
|
unsigned | unavailable: 1 |
No information is available. |
union vehicleEventFlags_ut |
Contains critical events and communication of ongoing events. Also is used for combinations of critical and not critical (wipers) events
This typedef can match the J2735 2016 version or another version you are working with.
Data Fields | ||
---|---|---|
struct vehicleEventFlags_ut | bits |
Bit values for vehicle event flags. A flag indicates the state of the event.Bit values for vehicle event flags. |
unsigned short | data |
Sixteen-bit word access to the packed vehicleEventFlags union structure. |
struct vehicleEventFlags_ut.bits |
Bit values for vehicle event flags. A flag indicates the state of the event.
Data Fields | ||
---|---|---|
unsigned | unused: 3 |
Reserved for 16-bit alignment in the union access. |
unsigned | eventAirBagDeployment: 1 |
Indicates whether the airbag is deployed. Supported values:
|
unsigned | eventDisabledVehicle: 1 |
Indicates whether the vehicle is disabled. Supported values:
|
unsigned | eventFlatTire: 1 |
Indicates whether the tire is flat. Supported values:
|
unsigned | eventWipersChanged: 1 |
Indicates the status of the windshield wipers. For more information, See the wiper state variables in current_dynamic_vehicle_state_t. |
unsigned | eventLightsChanged: 1 |
Indicates the status of one or more lights (such as blinkers and fog). |
unsigned | eventHardBraking: 1 |
Indicates whether hard braking is activated. Supported values:
|
unsigned | eventReserved1: 1 |
Event bit reserved for future use. Do not use. |
unsigned | eventHazardousMaterials: 1 |
Indicates whether a hazmat load is present. Supported values:
|
unsigned | eventStabilityControlactivated: 1 |
Indicates whether stability control is on. Supported values:
|
unsigned | eventTractionControlLoss: 1 |
Indicates whether traction control is activated (1) or not (0). Supported values:
|
unsigned | eventABSactivated: 1 |
Indicates whether ABS is activated. Supported values:
|
unsigned | eventStopLineViolation: 1 |
Indicates whether the vehicle has detected that a violation of the Stop Line is imminent. Supported values:
|
unsigned | eventHazardLights: 1 |
Indicates whether the hazard lights are on. Supported values:
|
union ExteriorLights_ut |
Contains information about the state of the exterior lights.
Data Fields | ||
---|---|---|
struct ExteriorLights_ut | bits |
Bit values for exterior light flags.Bit values for exterior light flags. |
unsigned short | data |
16-bit short word access to the packed ExteriorLights union structure. |
struct ExteriorLights_ut.bits |
Bit values for exterior light flags.
struct high_resolution_motion_t |
struct current_dynamic_vehicle_state_t |
Contains information about the dynamic state of the vehicle.
Data Fields | ||
---|---|---|
v2x_transmission_state_enum_type | prndl |
Specifies the current state of the transmission gear: forward, reverse, and so on. |
vehicleEventFlags_ut | events |
Flags all critical events and combinations of critical events. |
double | throttle_position |
Per the J2735 definition, indicates the throttle position from 0% to 100%. However, this value is in double precision between 0 and 1. |
double | throttle_confidence |
Per the J2735 definition, double precision degrees of confidence. |
double | steering_wheel_angle |
Per the J2735 definition, double precision degrees of the wheel angle. Supported values:-192.0 through 189.0 degrees, with positive being turned to the right |
v2x_control_status_ut | brake_status |
Indicates whether brakes or emergency brakes (ABS) are activated. Supported values:
|
ExteriorLights_ut | exterior_lights |
Conglomeration of bits that indicate the status of the exterior lights, such as blinkers. |
unsigned char | front_wiper_status |
Status of the front windshield wipers. |
unsigned char | rear_wiper_status |
Status of the rear windshield wipers. |
struct static_vehicle_parameters_t |
Contains static vehicle parameters.
#define V2X_VDATA_HANDLE_BAD (-1) |
Invalid handle returned when there is an error.
#define V2X_J2735_TRACTION_CONTROL_MAX (4) |
Guard check value on v2x_transmission_state_enum_type for V2X_TRANSMISSION_MAX. This value is used in a 3-bit bitfield in J2735.
#define V2X_TRACTION_CTRL_MAX (4) |
Guard check value on v2x_TractionControlStatus_enum_type for V2X_TRACTION_CTRL_MAX. This value is used in a 2-bit bitfield in J2735.
#define J2735_ABS_MAX (4) |
Guard check value on v2x_AntiLockBrakeStatus_enum_type.
This value cannot be part of the enumeration because the value eventually ends up in 2-bit bitfield over the air.
#define V2X_STABILITY_CONTROL_MAX (4) |
Guard check value on v2x_StabilityControlStatus_enum_type.
This value is eventually used over the air in a 2-bit bitfield. The enumeration value must never be larger than 4.
#define V2X_AUX_BRAKE_MAX (4) |
Guard check value on v2x_AuxBrakeStatus_enum_type. This value must never be set this high.
typedef int v2x_vehicle_handle_t |
Vehicle data handle to the interface
typedef int v2x_motion_data_handle_t |
Vehicle high-resolution motion handle to the interface
typedef void(* v2x_high_res_motion_listener_t) (high_resolution_motion_t *motion_data) |
Callback used for high resolution motion data.
[in] | motion_data | Pointer to the dynamic state of the vehicle. |
typedef void(* v2x_vehicle_event_listener_t) (current_dynamic_vehicle_state_t *current_state, void *context) |
Callback used for critical event notification and other less critical events.
[in] | current_state | Pointer to the dynamic state of the vehicle. |
[in] | context | Pointer to the application context used with the callbacks to help the caller code. |
Valid types for main transmission drive states.
Valid types for traction control states.
This enumeration currently matches the J2735 2016 version for the Traction Control System (TCS).
Enumerator | |
---|---|
V2X_TRACTION_CTRL_UNAVAIL |
Status is unknown. |
V2X_TRACTION_CTRL_OFF | |
V2X_TRACTION_CTRL_ON |
On but currently not engaged. |
V2X_TRACTION_CTRL_ENGAGED |
Actively being engaged. |
Valid types for antilock-braking states.
This enumeration matches the J2735 2016 version for the Antilock Braking System (ABS) to help BSM packing and unpacking.
Enumerator | |
---|---|
V2X_ABS_Unavailable |
ABS is not equipped, or the status is unknown. |
V2X_ABS_Off | |
V2X_ABS_On |
On but currently not active. |
V2X_ABS_Engaged |
Actively being engaged on one or more wheels. |
Valid types for the stability control status. This enumeration should be equivalent to the J2735 BSM version you are working with.
v2x_api_ver_t v2x_vehicle_api_version | ( | void | ) |
Gets the compiled API version interface (as an integer number).
v2x_status_enum_type v2x_vehicle_get_static_params | ( | static_vehicle_parameters_t * | parameters | ) |
Returns (via a reference pointer) the static_vehicle_parameters_t structure that enumerates static (unchanging) data items used by ITS stacks.
[out] | parameters | Pointer to the static vehicle parameters, including vehicle dimensions, make, model, and so on. |
v2x_motion_data_handle_t v2x_high_res_motion_register_listener | ( | v2x_high_res_motion_listener_t | cb | ) |
Registers for high-resolution motion callbacks from the vehicle data network (CAN bus) when the data changes.
[in] | cb | Callback function to use for this listener. |
v2x_status_enum_type v2x_high_res_motion_deregister_listener | ( | v2x_motion_data_handle_t | handle | ) |
Deregisters a previously registered high-resolution motion data callback that was requested via v2x_high_res_motion_register_listener().
[in] | handle | Handle of the listener callback previously set up. |
v2x_vehicle_handle_t v2x_vehicle_register_listener | ( | v2x_vehicle_event_listener_t | cb, |
void * | context | ||
) |
Registers for a callback for state updates from the vehicle data network (CAN bus). This function requests vehicle data callbacks when data changes or events occur.
[in] | cb | Callback function to use for this listener. |
[in] | context | Pointer to the application context for use with the callbacks, which can help the caller code. |
v2x_status_enum_type v2x_vehicle_deregister_for_callback | ( | v2x_vehicle_handle_t | handle | ) |
Deregisters a previously registered dynamic event callback that was requested via v2x_vehicle_register_listener().
[in] | handle | Handle of the listener callback previously set up. |