Defines C API functions to access the VehicleIO car controller box.
Data Structures | |
| struct | dwVehicleIOCapabilities |
| VehicleIO Capabilities. More... | |
Macros | |
| #define | DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES 75 |
Typedefs | |
| typedef struct dwVehicleIOObject * | dwVehicleIOHandle_t |
| typedef struct dwVehicleIOCapabilities | dwVehicleIOCapabilities |
| VehicleIO Capabilities. More... | |
| #define DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES 75 |
Definition at line 25 of file VehicleIOCapabilities.h.
| typedef struct dwVehicleIOCapabilities dwVehicleIOCapabilities |
VehicleIO Capabilities.
Note that this some capabilities are imposed by the VehicleIO module itself. For dynamic (vehicle-reported) capabilities,
| typedef struct dwVehicleIOObject* dwVehicleIOHandle_t |
Definition at line 51 of file VehicleIO.h.
| DW_API_PUBLIC dwStatus dwVehicleIO_addDataSensor | ( | uint32_t const | vehicleIOId, |
| dwSensorHandle_t const | sensorHandle, | ||
| dwVehicleIOHandle_t const | obj | ||
| ) |
Add CAN sensor handle and corresponding VehicleIO configuration ID.
Allows sending commands to multiple sensors. For manual VehicleIO initialization with single CAN bus, a vehicleIO ID of 0 is expected.
@req{GID-AV_REQ-6875814}
| [in] | vehicleIOId | Specifies ID of vehicle IO configuration. |
| [in] | sensorHandle | Specifies the underlying VehicleIO CAN sensor. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_consumeDataPacket | ( | const dwDataPacket *const | pkt, |
| uint32_t const | sensorId, | ||
| dwVehicleIOHandle_t const | obj | ||
| ) |
Similar to dwVehicleIO_consumeCANFrame.
Expects a data packet generated by a data sensor. Used for socket based vehicle communication.
@req{GID-AV_REQ-6874207}
| [in] | pkt | data packet to be parsed by the controller. |
| [in] | sensorId | Specifies index of data sensor that message came from. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_getCapabilities | ( | dwVehicleIOCapabilities *const | caps, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Retrieve current VehicleIO capabilities.
@req{GID-AV_REQ-6874208}
| [out] | caps | returned VehicleIO capabilities. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_getVehicleActuationFeedback | ( | dwVehicleIOActuationFeedback *const | actuationFeedback, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Retrieve current vehicle actuation feedback.
Note that if called immediately after sending a new command it might not be reflected in the status, as the command needs to be executed and reported back by the vehicle.
NOTE: This function will be deprecated in a future release. Please use use dwVehicleIO_getVehicleASILState or dwVehicleIO_getVehicleQMState instead.
| [out] | actuationFeedback | returned actuation feedback. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_getVehicleASILState | ( | dwVehicleIOASILStateE2EWrapper *const | asilState, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Retrieve current vehicle state with ASIL rating.
Note that if called immediately after sending a new command it might not be reflected in the status, as the command needs to be executed and reported back by the vehicle.
@req{GID-AV_REQ-6875801}
| [out] | asilState | returned vehicle state with ASIL rating. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_getVehicleNonSafetyState | ( | dwVehicleIONonSafetyState *const | nonSafeState, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Retrieve current vehicle non-safety state.
Note that if called immediately after sending a new command it might not be reflected in the status, as the command needs to be executed and reported back by the vehicle.
NOTE: This function will be deprecated in a future release. Please use use dwVehicleIO_getVehicleASILState or dwVehicleIO_getVehicleQMState instead.
| [out] | nonSafeState | returned vehicle non-safety RoV state. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_getVehicleQMState | ( | dwVehicleIOQMState *const | qmState, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Retrieve current vehicle state with QM rating.
Note that if called immediately after sending a new command it might not be reflected in the status, as the command needs to be executed and reported back by the vehicle.
@req{GID-AV_REQ-6875802}
| [out] | qmState | returned vehicle RoV state with QM rating. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_getVehicleSafetyState | ( | dwVehicleIOSafetyState *const | safeState, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Retrieve current vehicle safety state.
Note that if called immediately after sending a new command it might not be reflected in the status, as the command needs to be executed and reported back by the vehicle.
NOTE: This function will be deprecated in a future release. Please use use dwVehicleIO_getVehicleASILState or dwVehicleIO_getVehicleQMState instead.
| [out] | safeState | returned vehicle safety state. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_initialize | ( | dwVehicleIOHandle_t *const | obj, |
| dwVehicleIOType const | type, | ||
| const dwVehicle *const | properties, | ||
| dwContextHandle_t const | ctx | ||
| ) |
Initialize VehicleIO and prepare all internal structures.
@req{GID-AV_REQ-6874197}
| [out] | obj | A pointer to the car controller handle for the created module. |
| [in] | type | Specifies the VehicleIO controller type. |
| [in] | properties | Vehicle properties as described by dwRig module. |
| [in] | ctx | Specifies the handler to the DriveWorks context. |
| DW_API_PUBLIC dwStatus dwVehicleIO_initializeFromRig | ( | dwVehicleIOHandle_t *const | obj, |
| dwConstRigHandle_t const | rig, | ||
| dwContextHandle_t const | ctx | ||
| ) |
Initialize VehicleIO and prepare all internal structures from Rig Configuration.
@req{GID-AV_REQ-6874197}
| [out] | obj | A pointer to the car controller handle for the created module. |
| [in] | rig | Specifies the handler to the Rig Configuration. |
| [in] | ctx | Specifies the handler to the DriveWorks context. |
| DW_API_PUBLIC dwStatus dwVehicleIO_release | ( | dwVehicleIOHandle_t const | obj | ) |
Release used memory and close all modules.
Connection to VehicleIO will be closed. No more car commands can be accepted when module is released.
@req{GID-AV_REQ-6874202}
| [in] | obj | The car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_reset | ( | dwVehicleIOHandle_t const | obj | ) |
Reset VehicleIO to default state.
@req{GID-AV_REQ-6874198}
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_selectDriverOverrides | ( | bool const | throttleOverride, |
| bool const | steeringOverride, | ||
| bool const | brakeOverride, | ||
| bool const | gearOverride, | ||
| dwVehicleIOHandle_t const | obj | ||
| ) |
Select the overrides that the driver can use to disable vehicle control.
@req{GID-AV_REQ-6874199}
| [in] | throttleOverride | Enables driver override by throttle application |
| [in] | steeringOverride | Enables driver override by steering application |
| [in] | brakeOverride | Enables driver override by brake application |
| [in] | gearOverride | Enables driver override by brake application |
| [in] | obj | A pointer to the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_sendASILCommand | ( | dwVehicleIOASILCommandE2EWrapper const *const | asilCmd, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle command with ASIL rating to the VehicleIO.
@req{GID-AV_REQ-6875804}
| [in] | asilCmd | ASIL command to be sent to the controller. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_sendCalibrationData | ( | dwValSensorCalibration const *const | sensorCalibration, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle sensor calibration to the VehicleIO.
Note that this function must be called before dwVehicleIO_sendASILCommand().
@req{GID-AV_REQ-6875807}
| [in] | sensorCalibration | Sensor calibration data to be sent to the controller. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_sendEgomotionData | ( | dwValEgomotion const *const | egomotion, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle egomotion data to the VehicleIO.
Note that this function must be called before dwVehicleIO_sendASILCommand().
@req{GID-AV_REQ-6875806}
| [in] | egomotion | Egomotion data to be sent to the controller. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_sendNonSafetyCommand | ( | const dwVehicleIONonSafetyCommand *const | nonSafeCmd, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle non-safety command to the VehicleIO.
The non-safety command will be sent along with safety command. This API should be called before dwVehicleIO_sendSafetyCommand.
NOTE: This function will be deprecated in a future release. Please use use dwVehicleIO_sendASILCommand, dwVehicleIO_sendQMCommand, dwVehicleIO_sendEgomotionData or dwVehicleIO_sendCalibrationData instead.
| [in] | nonSafeCmd | Non-safety command to be sent to the controller. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_sendQMCommand | ( | dwVehicleIOQMCommand const *const | qmCmd, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle command with QM rating to the VehicleIO.
@req{GID-AV_REQ-6875805}
| [in] | qmCmd | QM command to be sent to the controller. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_sendSafetyCommand | ( | const dwVehicleIOSafetyCommand *const | safeCmd, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle safety command to the VehicleIO.
NOTE: This function will be deprecated in a future release. Please use use dwVehicleIO_sendASILCommand, dwVehicleIO_sendQMCommand, dwVehicleIO_sendEgomotionData or dwVehicleIO_sendCalibrationData instead.
| [in] | safeCmd | Safety command to be sent to the controller. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_setDrivingMode | ( | dwVehicleIODrivingMode const | mode, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Setting driving mode allows to control the behaviour of VehicleIO module with regards to the permitted commands and number of safety checks performed.
@req{GID-AV_REQ-6875812}
NOTE: Whether certain driving mode is actually supported and when/if it is taken into effect is highly dependent on the type of the actuation interface.
Use dwVehicleIO_getVehicleState call to determine which driving mode is in effect.
Use dwVehicleIO_getCapabilities call to determine which limits are supported when in DW_VEHICLEIO_DRIVING_LIMITED or DW_VEHICLEIO_DRIVING_LIMITED_ND modes.
| [in] | mode | specifies the mode of driving. |
| [in] | obj | Specifies the car controller module handle. |