Defines the APIs to access the VehicleIO car controller box.
Data Structures | |
| struct | dwStateValueFloat |
| Generic state field structure capturing data validity and timestamp. More... | |
| struct | dwVehicleIOAxleStatus |
| struct | dwVehicleIOCapabilities |
| VehicleIO Capabilities. More... | |
| struct | dwVehicleIOCapabilityState |
| The capability state data. More... | |
| struct | dwVehicleIOCommand |
| The command data. More... | |
| struct | dwVehicleIOMiscCommand |
| struct | dwVehicleIOState |
| The state data. More... | |
| struct | dwVehicleIOTrailerState |
Modules | |
| VehicleIO Driver Interface | |
| Defines the VehicleIO Driver module for accessing a custom VehicleIO backend. | |
Macros | |
| #define | DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES 50 |
Typedefs | |
| typedef struct dwVehicleIOObject * | dwVehicleIOHandle_t |
Functions | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_addCANSensor (uint32_t const vehicleIOId, dwSensorHandle_t const sensorHandle, dwVehicleIOHandle_t const obj) |
| Add CAN sensor handle and corresponding VehicleIO configuration ID. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_addDataSensor (uint32_t const vehicleIOId, dwSensorHandle_t const sensorHandle, dwVehicleIOHandle_t const obj) |
| Add data sensor handle and corresponding VehicleIO configuration ID. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_consumeCANFrame (dwCANMessage const *const msg, uint32_t const sensorId, dwVehicleIOHandle_t const obj) |
| Parse a received event. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_consumeDataPacket (const dwDataPacket *const pkt, uint32_t const sensorId, dwVehicleIOHandle_t const obj) |
| Similar to dwVehicleIO_consumeCANFrame. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_getCapabilities (dwVehicleIOCapabilities *const caps, dwVehicleIOHandle_t const obj) |
| Retrieve current VehicleIO capabilities. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_getVehicleState (dwVehicleIOState *const state, dwVehicleIOHandle_t const obj) |
| Retrieve current vehicle state. More... | |
| 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. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_initializeFromDBC (dwVehicleIOHandle_t *const obj, dwVehicleIOType const type, const dwVehicle *const properties, const char *const dbcFilePath, dwContextHandle_t const ctx) |
| Initialize VehicleIO and prepare all internal structures from DBC File. More... | |
| 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. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_release (dwVehicleIOHandle_t const obj) |
| Release used memory and close all modules. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_reset (dwVehicleIOHandle_t const obj) |
| Reset VehicleIO to default state. More... | |
| 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. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_sendCommand (const dwVehicleIOCommand *const cmd, dwVehicleIOHandle_t const obj) |
| Send a vehicle command to the VehicleIO. More... | |
| DW_API_PUBLIC dwStatus | dwVehicleIO_sendMiscCommand (const dwVehicleIOMiscCommand *const cmd, dwVehicleIOHandle_t const obj) |
| Send a vehicle command to the VehicleIO. More... | |
| 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. More... | |
| struct dwVehicleIOAxleStatus |
| Data Fields | ||
|---|---|---|
| dwStateValueFloat | driverLoad | Load on driver axle [kg]. |
| dwStateValueFloat | frontLoad | Load on front axle [kg]. |
| dwStateValueFloat | pusherLoad | Load on pusher axle [kg]. |
| dwStateValueFloat | trailerLoad | Sum of load on all trailer axles [kg]. |
| struct dwVehicleIOCapabilities |
| Data Fields | ||
|---|---|---|
| float32_t | brakeValueLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | brakeValueLUTSize | Size of the corresponding lookup table. |
| float32_t | frontSteeringAngleLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | frontSteeringAngleLUTSize | Size of the corresponding lookup table. |
| float32_t | frontSteeringSpeedLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | frontSteeringSpeedLUTSize | Size of the corresponding lookup table. |
| float32_t | maxAccelerationLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | maxAccelerationLUTSize | Size of the corresponding lookup table. |
| float32_t | minAccelerationLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | minAccelerationLUTSize | Size of the corresponding lookup table. |
| float32_t | reverseSpeedLimit | Normally a negative value (m/s) |
| float32_t | steeringSpeedLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | steeringSpeedLUTSize | Size of the corresponding lookup table. |
| float32_t | steeringWheelAngleLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | steeringWheelAngleLUTSize | Size of the corresponding lookup table. |
| float32_t | throttleValueLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES] | Lookup Table indexed by speed (m/s), i.e. LUT[i] is the capability value at speed = i m/s. |
| int32_t | throttleValueLUTSize | Size of the corresponding lookup table. |
| struct dwVehicleIOCapabilityState |
| Data Fields | ||
|---|---|---|
| dwStateValueFloat | frontWheelAngleMax | The maximum front wheel angle command that can be guaranteed. |
| dwStateValueFloat | lonAccelerationMax | The maximum longutidinal acceleration command that can be guaranteed. |
| float32_t | longVelocityForwardMax | A maximum positive longitudinal vehicle speed that the vehicle is designed for. |
| dwTime_t | longVelocityForwardMaxTimestamp | |
| float32_t | longVelocityForwardMin | A minimum positive longitudinal vehicle speed, when driving forward, to avoid burning the clutch. |
| dwTime_t | longVelocityForwardMinTimestamp | |
| dwTime_t | rearAxleCurvatureCapabilityTimestamp | |
| float32_t | rearAxleCurvatureMax | The tightest radius (left) that can be guaranteed. |
| float32_t | rearAxleCurvatureMin | The tightest radius (right) that can be guaranteed. |
| dwStateValueFloat | rearWheelAngleMax | The maximum rear wheel angle command that can be guaranteed. |
| struct dwVehicleIOCommand |
| Data Fields | ||
|---|---|---|
| bool | aebRequest | Request to activate AEB. |
| dwVehicleIOAEBState | aebState | AEB system status/state. |
| bool | brakeValid | True if setting break. |
| float32_t | brakeValue | range 0.0 to 1.0 |
| dwVehicleIOCDWRequestType | cdwRequest | Request to activate CDW. |
| bool | clearFaults | Setting > 0 clears any canbus faults/errors. |
| bool | decelerationValid | True if setting deceleration. |
| float32_t | decelerationValue | decleration m/s^2 - represented as a positive number |
| bool | enable | True if we are driving by wire. Has to always be set. |
| bool | fcwRequest | Request to activate FCW. |
| dwVehicleIOFCWState | fcwState | FCW system status/state. |
| float32_t | frontSteeringAngle | Desired front wheel steering angle (rad) |
| bool | frontSteeringValid | True if setting front wheel steering. |
| dwVehicleIOGear | gear | Desired gear: 0=UNKNOWN, 1=PARK, 2=REVERSE, 3=NEUTRAL, 4=DRIVE. |
| bool | gearValid | True if setting gear. |
| uint64_t | heartbeatCounter | VIO command heartbeat. |
| bool | latAccelerationValid | True if setting lateral acceleration. |
| float32_t | latAccelerationValue | lateral acceleration (m/s^2) |
| dwVehicleIOLatMode | latMode | |
| bool | latModeValid | True if setting lateral function. |
| bool | lonAccelerationValid | True if setting longitudinal acceleration. |
| float32_t | lonAccelerationValue | longitudinal acceleration (m/s^2) |
| dwVehicleIOLonMode | lonMode | |
| bool | lonModeValid | True if setting longitudinal function. |
| float32_t | maxFrontSteeringSpeed | Maximum front wheel speed of the turning command (rad/s) |
| float32_t | maxSpeed | Maximum allowed speed to support remaining distance request (m/s) |
| bool | maxSpeedValid | True if setting speed request. |
| float32_t | maxSteeringWheelSpeed | Maximum steering wheel speed of the turning command rad/s. |
| bool | prefillRequest | Request to activate prefill. |
| bool | rearAxleCurvatureValid | True if setting rear axle curvature. |
| float32_t | rearAxleCurvatureValue | Path curvature request based on travelled distance (1/m) |
| float32_t | rearSteeringAngle | Desired rear wheel steering angle (rad) |
| bool | rearSteeringValid | True if setting rear wheel steering. |
| float32_t | remainingDistance | Desired longitudinal offset from current position (m) |
| bool | remainingDistanceValid | True if setting remaining distance. |
| float32_t | steeringWheelAngle | Desired steering wheel angle (rad) |
| float32_t | steeringWheelTorque |
Additional steering wheel torque request (Nm). Does not affect vehicle steering, rather to be used as feedback for the driver |
| bool | steeringWheelTorqueValid | True if setting steering torque. |
| bool | steeringWheelValid | True if setting steering wheel steering. |
| bool | throttleValid | True if setting throttle. |
| float32_t | throttleValue | range 0.0 to 1.0 |
| dwVehicleIOTurnSignal | turnSig | Turn signal value. |
| bool | turnSigValid | True if setting turn signal. |
| struct dwVehicleIOMiscCommand |
| Data Fields | ||
|---|---|---|
| float32_t | accSetSpeed | Current ACC Set Speed in m/s. |
| dwVehicleIOBSMRequest | bsmAudioRequest | Request corresponding to the audio warning. |
| dwVehicleIOBSMRequest | bsmLeftRequest | Request corresponding to the left visual warning. |
| dwVehicleIOBSMRequest | bsmRightRequest | Request corresponding to the right visual warning. |
| bool | clearFaults | |
| bool | displayBrightnessValid | True if setting display brightness. |
| uint8_t | displayBrightnessValue | |
| dwVehicleIODoorLock | doorLock | basic lock or unlock |
| bool | doorLockValid | True if setting door locks. |
| bool | enable | |
| dwVehicleIOHeadlights | headlights | ON/OFF, LOW_BEAM, HIGH_BEAM, DRL. |
| bool | headlightsValid | True if setting headlights. |
| float32_t | ldwSeverity | LDW Warning severity. |
| dwVehicleIOLaneDepartureWarningSide | ldwSide | LDW Warning side of ego lane- left/right. |
| dwVehicleIOLaneDepartureWarningState | ldwState | LDW Warning state- on/off. |
| bool | longitudinalTOR | True if an immediate takeover is needed. |
| bool | mirrorAdjustValid | True if setting mirror adjustment. |
| float32_t | mirrorAdjustX | float value 0-5.0 seconds |
| float32_t | mirrorAdjustY | float value 0-5.0 seconds |
| bool | mirrorFoldValid | True if setting mirror un/fold. |
| dwVehicleIOMirror | mirrors | FOLD, UNFOLD, ADJUST_LEFT, ADJUST_RIGHT. |
| dwVehicleIOMoonroof | moonroof | basic open or close |
| bool | moonroofValid | True if setting moonroof movement. |
| dwVehicleIOTurnSignal | turnSig | Turn signal - misc also wants this. |
| bool | turnSigValid | True if setting turn signal. |
| struct dwVehicleIOState |
| Data Fields | ||
|---|---|---|
| dwVector2f | acceleration | Actual acceleration measured in m/s^2. |
| dwTime_t | accelerationTimestamp | Time at which acceleration was updated. |
| dwVehicleIOAxleStatus | axles | |
| float32_t | brakeCmd | Last acknowledged brake value from a command (0..1 +- 0.01 fraction of max pedal depressed, unitless) |
| bool | brakeEnabled | Brake by-wire enablement reported by vehicle. |
| float32_t | brakeState | Brake value in effect (0..1 +- 0.01 fraction of max pedal depressed, unitless) |
| dwTime_t | brakeTimestamp | Time at which brake was updated. |
| float32_t | brakeTorqueActual | Actual applied brake torque value (Nm) |
| float32_t | brakeTorqueRequested | Requested value of brake torque (Nm) |
| float32_t | brakeValue | Current brake value as requested by a driver (0..1 +- 0.01 fraction of max pedal depressed, unitless) |
| bool | buckleDriver | |
| bool | bucklePassenger | |
| bool | buttonCruiseControlCancel | |
| bool | buttonCruiseControlDecrement | |
| bool | buttonCruiseControlGapDecrement | |
| bool | buttonCruiseControlGapIncrement | |
| bool | buttonCruiseControlIncrement | |
| bool | buttonCruiseControlOnOff | |
| bool | buttonCruiseControlReset | |
| bool | buttonCruiseControlResetCancel | |
| bool | buttonLaneAssistOnOff | |
| bool | buttonLeftKeypadDown | |
| bool | buttonLeftKeypadOk | |
| bool | buttonLeftKeypadUp | |
| bool | buttonTimeGapCycle | |
| dwVehicleIOCapabilityState | capability | Rear wheel angle on road. |
| bool | doorDriver | |
| bool | doorHood | |
| bool | doorPassenger | |
| bool | doorRearLeft | |
| bool | doorRearRight | |
| bool | doorTrunk | |
| dwVehicleIODrivingMode | drivingMode | |
| bool | enabled | |
| float32_t | engineSpeed | engine rpm speed [RPM] |
| dwTime_t | engineSpeedTimestamp | engine speed timestamp[us] |
| uint32_t | faults | Faults detected (0 = none). Flags defined in dwVehicleIOFaults. |
| float32_t | frontSteeringAngle | Same as inverseSteeringR described as an angle instead of radius [rad]. |
| float32_t | frontSteeringAngleCmd | Last acknowledged front steering value from a command (-1.0 to 1.0 +- 0.01rad) |
| float32_t | fuelLevel | (0 to 1 +- 0.01 fraction of tank volume, unitless) |
| dwVehicleIOGear | gear | Vehicle gear. |
| dwVehicleIOGear | gearCmd | Last acknowledged gear from a command. |
| bool | handsOnWheel | |
| bool | highBeamHeadlights | |
| float32_t | inverseSteeringR |
Inverse turning radius of the vehicle on the road. The radius depends on the vehicle wheel base, steering wheel angle, drivetrain properties and current speed. |
| dwVehicleIOLatMode | latMode | |
| dwVehicleIOLonMode | lonMode | |
| dwStateValueFloat | mass | Total mass of vehicle [kg]. |
| dwStateValueFloat | outsideTemperature | outside temperature [degrees C] |
| uint32_t | overrides | Overrides in place (0 = none). Flags defined in dwVehicleIOOverrides. |
| bool | passengerAirbag | |
| bool | passengerDetect | |
| dwVector2f | radarVelocity | Reported velocity from radar unit(s) |
| dwTime_t | radarVelocityTimestamp | |
| float32_t | rearAxleCurvature | Path curvature [1/m]. |
| dwTime_t | rearAxleCurvatureTimestamp | Timestamp for all motion signals. |
| dwStateValueFloat | rearWheelAngle | |
| float32_t | speed | Signed norm of velocity vector. |
| dwVehicleIOSignalQuality | speedQuality | Speed and velocity signal quality. |
| dwTime_t | speedTimestamp | Time at which speed was updated. |
| bool | steeringEnabled | Steering by-wire enablement reported by vehicle. |
| dwTime_t | steeringTimestamp | Time at which steering was updated. |
| float32_t | steeringWheelAngle | Steering wheel angle (-10.0 to 10.0 +- 0.01rad) |
| float32_t | steeringWheelAngleCmd | Last acknowledged steering wheel value from a command (-10.0 to 10.0 +- 0.01rad) |
| float32_t | steeringWheelTorque | Steering wheel torque (0 to 10.0 +- 0.01 Nm) |
| float32_t | suspension[DW_VEHICLE_NUM_WHEELS] | Vehicle Suspension data. |
| float32_t | throttleCmd | Last acknowledged throttle value from a command (0..1 +- 0.01 fraction of max pedal depressed, unitless) |
| bool | throttleEnabled | Throttle by-wire enablement reported by vehicle. |
| float32_t | throttleState | Throttle value in effect (0..1 +- 0.01 fraction of max pedal depressed, unitless) |
| dwTime_t | throttleTimestamp | Time at which throttle was updated. |
| float32_t | throttleValue | Current thottle value as requested by a driver (0..1 +- 0.01 fraction of max pedal depressed, unitless) |
| float32_t | tirePressure[DW_VEHICLE_NUM_WHEELS] | Vehicle tire pressure data. |
| dwVehicleIOTrailerState | trailer | |
| dwVehicleIOTurnSignal | turnSignal | Turn signal value. |
| dwVector2f | velocity | Vehicle velocity (longitudinal, lateral) measured in m/s at the rear axle. |
| int16_t | wheelPosition[DW_VEHICLE_NUM_WHEELS] |
Vehicle Wheel Position counters. The counters are subject to roll-over. Actual wheel travel distance depends on wheel radius, which requires calibration. |
| dwTime_t | wheelPositionTimestamp[DW_VEHICLE_NUM_WHEELS] | individual timestamps of wheel position readings |
| float32_t | wheelSpeed[DW_VEHICLE_NUM_WHEELS] | vehicle individual wheel speeds (rad/s) |
| dwTime_t | wheelSpeedTimestamp[DW_VEHICLE_NUM_WHEELS] | vehicle individual timestamps of wheel speeds readings |
| bool | wiper | |
| struct dwVehicleIOTrailerState |
| Data Fields | ||
|---|---|---|
| dwStateValueFloat | articulationAngle |
Yaw articulation angle between truck and trailer measured at rear axle [rad] Angle measured as described by ISO8855. For example, 0 when driving in line, positive when turning left. |
| dwVehicleIOTrailerConnectedStatus | connected | |
| dwStateValueFloat | mass | Total mass of trailer unit [kg]. |
| #define DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES 50 |
Definition at line 546 of file VehicleIO.h.
| typedef struct dwVehicleIOObject* dwVehicleIOHandle_t |
Definition at line 64 of file VehicleIO.h.
| enum dwVehicleIOAEBState |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_AEB_STATE_UNKNOWN | |
| DW_VEHICLEIO_AEB_STATE_OFF | |
| DW_VEHICLEIO_AEB_STATE_READY | |
Definition at line 173 of file VehicleIO.h.
| Enumerator | |
|---|---|
| DW_VEHICLEIO_BSM_REQUEST_UNKNOWN | |
| DW_VEHICLEIO_BSM_REQUEST_NONE | |
| DW_VEHICLEIO_BSM_REQUEST_CONTINUOUS | |
| DW_VEHICLEIO_BSM_REQUEST_FLASHING | |
Definition at line 194 of file VehicleIO.h.
| Enumerator | |
|---|---|
| DW_VEHICLEIO_CDW_REQUEST_NONE | |
| DW_VEHICLEIO_CDW_REQUEST_LEVEL_1 | |
| DW_VEHICLEIO_CDW_REQUEST_LEVEL_2 | |
Definition at line 187 of file VehicleIO.h.
| enum dwVehicleIODoorLock |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_DOOR_UNKNOWN | |
| DW_VEHICLEIO_DOOR_UNLOCK | |
| DW_VEHICLEIO_DOOR_LOCK | |
Definition at line 144 of file VehicleIO.h.
Definition at line 66 of file VehicleIO.h.
| enum dwVehicleIOFaults |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_FAULT_NONE | |
| DW_VEHICLEIO_FAULT_BRAKE | |
| DW_VEHICLEIO_FAULT_STEERING | |
| DW_VEHICLEIO_FAULT_THROTTLE | |
| DW_VEHICLEIO_FAULT_GEAR | |
| DW_VEHICLEIO_FAULT_SAFETY | |
| DW_VEHICLEIO_FAULT_MAX | |
Definition at line 94 of file VehicleIO.h.
| enum dwVehicleIOFCWState |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_FCW_STATE_UNKNOWN | |
| DW_VEHICLEIO_FCW_STATE_OFF | |
| DW_VEHICLEIO_FCW_STATE_READY | |
Definition at line 180 of file VehicleIO.h.
| enum dwVehicleIOGear |
Definition at line 113 of file VehicleIO.h.
| Enumerator | |
|---|---|
| DW_VEHICLEIO_HEADLIGHTS_UNKNOWN | |
| DW_VEHICLEIO_HEADLIGHTS_OFF | |
| DW_VEHICLEIO_HEADLIGHTS_LOW_BEAM | |
| DW_VEHICLEIO_HEADLIGHTS_HIGH_BEAM | |
| DW_VEHICLEIO_HEADLIGHTS_DRL | |
Definition at line 164 of file VehicleIO.h.
Driveworks LDW sides with respect to the ego lane.
Definition at line 341 of file VehicleIO.h.
Driveworks Lane Departure Warning (LDW) activation states.
| Enumerator | |
|---|---|
| DW_VIO_LANE_DEPARTURE_WARNING_STATE_OFF | Warning not active. |
| DW_VIO_LANE_DEPARTURE_WARNING_STATE_ON | Warning active. |
| DW_VIO_LANE_DEPARTURE_WARNING_STATE_COUNT | Count of LDW states. |
Definition at line 331 of file VehicleIO.h.
| Enumerator | |
|---|---|
| DW_VEHICLEIO_LATERAL_ACTUATOR_UNKNOWN | |
| DW_VEHICLEIO_LATERAL_STEERING_WHEEL_ANGLE | |
| DW_VEHICLEIO_LATERAL_FRONT_WHEEL_ANGLE | |
| DW_VEHICLEIO_LATERAL_CURVATURE | |
Definition at line 201 of file VehicleIO.h.
| enum dwVehicleIOLatMode |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_LAT_MODE_UNKNOWN | |
| DW_VEHICLEIO_LAT_MODE_IDLE | |
| DW_VEHICLEIO_LAT_MODE_L2 | |
| DW_VEHICLEIO_LAT_MODE_L3 | |
| DW_VEHICLEIO_LAT_MODE_PARK | |
| DW_VEHICLEIO_LAT_MODE_LSS | |
Definition at line 210 of file VehicleIO.h.
| enum dwVehicleIOLonMode |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_LON_MODE_UNKNOWN | |
| DW_VEHICLEIO_LON_MODE_IDLE | |
| DW_VEHICLEIO_LON_MODE_PARK | |
| DW_VEHICLEIO_LON_MODE_CA | |
| DW_VEHICLEIO_LON_MODE_DRIVE_L2 | |
| DW_VEHICLEIO_LON_MODE_DRIVE_L3 | |
Definition at line 221 of file VehicleIO.h.
| enum dwVehicleIOMirror |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_MIRROR_UNKNOWN | |
| DW_VEHICLEIO_MIRROR_FOLD | |
| DW_VEHICLEIO_MIRROR_UNFOLD | |
| DW_VEHICLEIO_MIRROR_ADJUST_LEFT | |
| DW_VEHICLEIO_MIRROR_ADJUST_RIGHT | |
Definition at line 156 of file VehicleIO.h.
| enum dwVehicleIOMoonroof |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_MOONROOF_UNKNOWN | |
| DW_VEHICLEIO_MOONROOF_CLOSE | |
| DW_VEHICLEIO_MOONROOF_OPEN | |
Definition at line 150 of file VehicleIO.h.
| enum dwVehicleIOOverrides |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_OVERRIDE_NONE | |
| DW_VEHICLEIO_OVERRIDE_BRAKE | |
| DW_VEHICLEIO_OVERRIDE_STEERING | |
| DW_VEHICLEIO_OVERRIDE_THROTTLE | |
| DW_VEHICLEIO_OVERRIDE_GEAR | |
| DW_VEHICLEIO_OVERRIDE_MAX | |
Definition at line 104 of file VehicleIO.h.
| Enumerator | |
|---|---|
| DW_VEHICLEIO_SIGNAL_QUALITY_NOT_OK | |
| DW_VEHICLEIO_SIGNAL_QUALITY_OK | |
Definition at line 239 of file VehicleIO.h.
| Enumerator | |
|---|---|
| DW_VEHICLEIO_TRAILER_CONNECTED_UNKNOWN | |
| DW_VEHICLEIO_TRAILER_CONNECTED_NO | |
| DW_VEHICLEIO_TRAILER_CONNECTED_YES | |
| DW_VEHICLEIO_TRAILER_CONNECTED_ERROR | |
Definition at line 231 of file VehicleIO.h.
| Enumerator | |
|---|---|
| DW_VEHICLEIO_TURNSIGNAL_UNKNOWN | |
| DW_VEHICLEIO_TURNSIGNAL_OFF | |
| DW_VEHICLEIO_TURNSIGNAL_LEFT | |
| DW_VEHICLEIO_TURNSIGNAL_RIGHT | |
| DW_VEHICLEIO_TURNSIGNAL_EMERGENCY | |
Definition at line 136 of file VehicleIO.h.
| enum dwVehicleIOType |
| Enumerator | |
|---|---|
| DW_VEHICLEIO_DATASPEED | |
| DW_VEHICLEIO_GENERIC | |
| DW_VEHICLEIO_CUSTOM | |
| DW_VEHICLEIO_DRIVER_COUNT | |
Definition at line 87 of file VehicleIO.h.
| DW_API_PUBLIC dwStatus dwVehicleIO_addCANSensor | ( | 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.
| [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_addDataSensor | ( | uint32_t const | vehicleIOId, |
| dwSensorHandle_t const | sensorHandle, | ||
| dwVehicleIOHandle_t const | obj | ||
| ) |
Add data sensor handle and corresponding VehicleIO configuration ID.
Allows sending commands to multiple sensors. For manual VehicleIO initialization with single data sensor, a vehicleIO ID of 0 is expected.
| [in] | vehicleIOId | Specifies ID of vehicle IO configuration. |
| [in] | sensorHandle | Specifies the underlying VehicleIO data sensor. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_consumeCANFrame | ( | dwCANMessage const *const | msg, |
| uint32_t const | sensorId, | ||
| dwVehicleIOHandle_t const | obj | ||
| ) |
Parse a received event.
A parsed messages will generate certain reports, which can be gathered using the according callbacks. A sensor ID not corresponding to the incoming message may cause incorrect behavior. For manual VehicleIO initialization with single can BUS, a sensor ID of 0 is expected.
| [in] | msg | CAN message to be parsed by the controller. |
| [in] | sensorId | Specifies index of CAN sensor that message came from. |
| [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.
| [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.
| [out] | caps | returned VehicleIO capabilities. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_getVehicleState | ( | dwVehicleIOState *const | state, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Retrieve current vehicle 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.
| [out] | state | returned vehicle 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.
| [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_initializeFromDBC | ( | dwVehicleIOHandle_t *const | obj, |
| dwVehicleIOType const | type, | ||
| const dwVehicle *const | properties, | ||
| const char *const | dbcFilePath, | ||
| dwContextHandle_t const | ctx | ||
| ) |
Initialize VehicleIO and prepare all internal structures from DBC File.
| [out] | obj | A pointer to the car controller handle for the created module. |
| [in] | type | Specifies the VehicleIO controller type. |
| [in] | properties | Specified Vehicle properties (from rig.json) |
| [in] | dbcFilePath | Speficifes path to the dbc file for initializing a DBC-based canbus interpreter |
| [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.
| [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.
| [in] | obj | The car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_reset | ( | dwVehicleIOHandle_t const | obj | ) |
Reset VehicleIO to default state.
| [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.
| [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_sendCommand | ( | const dwVehicleIOCommand *const | cmd, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle command to the VehicleIO.
| [in] | cmd | Command to be sent to the controller. |
| [in] | obj | Specifies the car controller module handle. |
| DW_API_PUBLIC dwStatus dwVehicleIO_sendMiscCommand | ( | const dwVehicleIOMiscCommand *const | cmd, |
| dwVehicleIOHandle_t const | obj | ||
| ) |
Send a vehicle command to the VehicleIO.
| [in] | cmd | 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.
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. |