Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.20.37 Release
    For Test and Development only

    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    VehicleIO Driver Interface

    Detailed Description

    Defines the VehicleIO Driver module for accessing a custom VehicleIO backend.

    Functions

    dwStatus _dwVehicleIODriver_clearFaults (dwSensorHandle_t sensor, const dwVehicleIOState *state)
     Clear faults in current vehicle state. More...
     
    dwStatus _dwVehicleIODriver_clearFaults_new (dwSensorHandle_t const sensorHandle, dwVehicleIOSafetyState const *vioSafetyState, dwVehicleIONonSafetyState const *vioNonSafetyState, dwVehicleIOActuationFeedback const *vioActuationFeedback)
     Clear any outstanding faults based on incoming VIO state structures. More...
     
    dwStatus _dwVehicleIODriver_consume (const dwCANMessage *msg, dwVehicleIOState *state)
     Consume a received CAN message and update the vehicle state. More...
     
    dwStatus _dwVehicleIODriver_consumeDataExt (dwDataPacket const *dataPacket)
     Extract VehicleIO signals from incoming data packet. More...
     
    dwStatus _dwVehicleIODriver_consumeDataForActuationFeedback (dwDataPacket const *dataPacket, dwVehicleIOActuationFeedback *actuationFeedback)
     Extract dwVehicleIOActuationFeedback from incoming data packet. More...
     
    dwStatus _dwVehicleIODriver_consumeDataForNonSafeState (dwDataPacket const *dataPacket, dwVehicleIONonSafetyState *nonSafetyState)
     Extract dwVehicleIONonSafetyState from incoming data packet. More...
     
    dwStatus _dwVehicleIODriver_consumeDataForSafeState (dwDataPacket const *dataPacket, dwVehicleIOSafetyState *safetyState)
     Extract dwVehicleIOSafetyState from incoming data packet. More...
     
    dwStatus _dwVehicleIODriver_consumeExt (dwCANMessage const *canMessage)
     Extract VehicleIO signals from incoming CAN message. More...
     
    dwStatus _dwVehicleIODriver_consumeForActuationFeedback (dwCANMessage const *canMessage, dwVehicleIOActuationFeedback *actuationFeedback)
     Extract dwVehicleIOActuationFeedback from incoming CAN message. More...
     
    dwStatus _dwVehicleIODriver_consumeForNonSafeState (dwCANMessage const *canMessage, dwVehicleIONonSafetyState *nonSafetyState)
     Extract dwVehicleIONonSafetyState from incoming CAN message. More...
     
    dwStatus _dwVehicleIODriver_consumeForSafeState (dwCANMessage const *canMessage, dwVehicleIOSafetyState *safetyState)
     Extract dwVehicleIOSafetyState from incoming CAN message. More...
     
    dwStatus _dwVehicleIODriver_initialize ()
     Initializes the VehicleIO Driver. More...
     
    dwStatus _dwVehicleIODriver_initialize_V2 (dwContextHandle_t context, char8_t const *vehicleTypeString, dwVehicle const *vehicleProperties, dwVehicleIOCapabilities *vehicleIOCapabilities, char8_t const *dbcFilepath, dwVehicleIOState *vioState, dwVehicleIOSafetyState *vioSafetyState, dwVehicleIONonSafetyState *vioNonSafetyState, dwVehicleIOActuationFeedback *vioActuationFeedback)
     Initialize Plugin VIO Driver. More...
     
    dwStatus _dwVehicleIODriver_initialize_V3 (dwContextHandle_t context, dwVehicle const *vehicleProperties, dwVehicleIOCapabilities *vehicleIOCapabilities, char8_t const *dbcFilepath, dwVehicleIOASILStateE2EWrapper *vioAsilState, dwVehicleIOQMState *vioQmState)
     Initialize Plugin VIO Driver. More...
     
    dwStatus _dwVehicleIODriver_release ()
     Releases the VehicleIO Driver. More...
     
    dwStatus _dwVehicleIODriver_reset ()
     Reset driver to default state. More...
     
    dwStatus _dwVehicleIODriver_sendASILCommand (dwVehicleIOASILCommandE2EWrapper const *asilCommand, dwSensorHandle_t sensorHandle)
     Send dwVehicleIOASILCommandE2EWrapper over specified sensor. More...
     
    dwStatus _dwVehicleIODriver_sendCommand (const dwVehicleIOCommand *cmd, dwSensorHandle_t sensor)
     Send a vehicle command to the given CAN sensor. More...
     
    dwStatus _dwVehicleIODriver_sendEgomotion (dwValEgomotion const *egomotion, dwSensorHandle_t sensorHandle)
     Send dwValEgomotion over specified sensor. More...
     
    dwStatus _dwVehicleIODriver_sendMiscCommand (const dwVehicleIOMiscCommand *cmd, dwSensorHandle_t sensor)
     Send misc vehicle command to the given CAN sensor. More...
     
    dwStatus _dwVehicleIODriver_sendNonSafetyCommand (dwVehicleIONonSafetyCommand const *nonSafetyCommand, dwSensorHandle_t sensorHandle)
     Send dwVehicleIONonSafetyCommand over specified sensor. More...
     
    dwStatus _dwVehicleIODriver_sendQMCommand (dwVehicleIOQMCommand const *qmCommand, dwSensorHandle_t sensorHandle)
     Send dwVehicleIOQMCommand over specified sensor. More...
     
    dwStatus _dwVehicleIODriver_sendSafetyCommand (dwVehicleIOSafetyCommand const *safetyCommand, dwSensorHandle_t sensorHandle)
     Send dwVehicleIOSafetyCommand over specified sensor. More...
     
    dwStatus _dwVehicleIODriver_sendSensorCalibration (dwValSensorCalibration const *calibration, dwSensorHandle_t sensorHandle)
     Send dwValSensorCalibration over specified sensor. More...
     
    dwStatus _dwVehicleIODriver_setDrivingMode (const dwVehicleIODrivingMode mode)
     Set driving mode. More...
     

    Function Documentation

    ◆ _dwVehicleIODriver_clearFaults()

    dwStatus _dwVehicleIODriver_clearFaults ( dwSensorHandle_t  sensor,
    const dwVehicleIOState state 
    )

    Clear faults in current vehicle state.

    Parameters
    [in]sensorCAN sensor to send CAN messages.
    [in]stateStructure specifying overrides or faults.
    Returns
    DW_FAILURE, DW_SUCCESS
    API Group
    • Init: Yes
    • Runtime: Yes
    • De-Init: Yes

    ◆ _dwVehicleIODriver_clearFaults_new()

    dwStatus _dwVehicleIODriver_clearFaults_new ( dwSensorHandle_t const  sensorHandle,
    dwVehicleIOSafetyState const *  vioSafetyState,
    dwVehicleIONonSafetyState const *  vioNonSafetyState,
    dwVehicleIOActuationFeedback const *  vioActuationFeedback 
    )

    Clear any outstanding faults based on incoming VIO state structures.

    NOTE: This function will be deprecated in a future release.

    Parameters
    [in]sensorHandleSensor handle
    [in]vioSafetyStatedwVehicleIOSafetyState
    [in]vioNonSafetyStatedwVehicleIONonSafetyState
    [in]vioActuationFeedbackdwVehicleIOActuationFeedback
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consume()

    dwStatus _dwVehicleIODriver_consume ( const dwCANMessage msg,
    dwVehicleIOState state 
    )

    Consume a received CAN message and update the vehicle state.

    Parameters
    [in]msgCAN message to be consumed.
    [in]stateStructure updated with data from CAN message.
    Returns
    DW_FAILURE, DW_SUCCESS
    API Group
    • Init: Yes
    • Runtime: Yes
    • De-Init: Yes

    ◆ _dwVehicleIODriver_consumeDataExt()

    dwStatus _dwVehicleIODriver_consumeDataExt ( dwDataPacket const *  dataPacket)

    Extract VehicleIO signals from incoming data packet.

    Parameters
    [in]dataPacketIncoming data-packet.
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consumeDataForActuationFeedback()

    dwStatus _dwVehicleIODriver_consumeDataForActuationFeedback ( dwDataPacket const *  dataPacket,
    dwVehicleIOActuationFeedback actuationFeedback 
    )

    Extract dwVehicleIOActuationFeedback from incoming data packet.

    Parameters
    [in]dataPacketIncoming data-packet.
    [out]actuationFeedbackExtracted dwVehicleIOActuationFeedback.
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consumeDataForNonSafeState()

    dwStatus _dwVehicleIODriver_consumeDataForNonSafeState ( dwDataPacket const *  dataPacket,
    dwVehicleIONonSafetyState nonSafetyState 
    )

    Extract dwVehicleIONonSafetyState from incoming data packet.

    Parameters
    [in]dataPacketIncoming data-packet.
    [out]nonSafetyStateExtracted dwVehicleIONonSafetyState.
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consumeDataForSafeState()

    dwStatus _dwVehicleIODriver_consumeDataForSafeState ( dwDataPacket const *  dataPacket,
    dwVehicleIOSafetyState safetyState 
    )

    Extract dwVehicleIOSafetyState from incoming data packet.

    Parameters
    [in]dataPacketIncoming data-packet.
    [out]safetyStateExtracted dwVehicleIOSafetyState.
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consumeExt()

    dwStatus _dwVehicleIODriver_consumeExt ( dwCANMessage const *  canMessage)

    Extract VehicleIO signals from incoming CAN message.

    Parameters
    [in]canMessageCAN message
    Returns
    dwStatus DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consumeForActuationFeedback()

    dwStatus _dwVehicleIODriver_consumeForActuationFeedback ( dwCANMessage const *  canMessage,
    dwVehicleIOActuationFeedback actuationFeedback 
    )

    Extract dwVehicleIOActuationFeedback from incoming CAN message.

    Parameters
    [in]canMessageCAN message
    [out]actuationFeedbackExtracted dwVehicleIOActuationFeedback
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consumeForNonSafeState()

    dwStatus _dwVehicleIODriver_consumeForNonSafeState ( dwCANMessage const *  canMessage,
    dwVehicleIONonSafetyState nonSafetyState 
    )

    Extract dwVehicleIONonSafetyState from incoming CAN message.

    Parameters
    [in]canMessageCAN message
    [out]nonSafetyStateExtracted dwVehicleIONonSafetyState
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_consumeForSafeState()

    dwStatus _dwVehicleIODriver_consumeForSafeState ( dwCANMessage const *  canMessage,
    dwVehicleIOSafetyState safetyState 
    )

    Extract dwVehicleIOSafetyState from incoming CAN message.

    Parameters
    [in]canMessageCAN message
    [out]safetyStateExtracted dwVehicleIOSafetyState
    Returns
    dwStatus DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_initialize()

    dwStatus _dwVehicleIODriver_initialize ( )

    Initializes the VehicleIO Driver.

    Returns
    DW_FAILURE, DW_SUCCESS
    API Group
    • Init: Yes
    • Runtime: No
    • De-Init: No

    ◆ _dwVehicleIODriver_initialize_V2()

    dwStatus _dwVehicleIODriver_initialize_V2 ( dwContextHandle_t  context,
    char8_t const *  vehicleTypeString,
    dwVehicle const *  vehicleProperties,
    dwVehicleIOCapabilities vehicleIOCapabilities,
    char8_t const *  dbcFilepath,
    dwVehicleIOState vioState,
    dwVehicleIOSafetyState vioSafetyState,
    dwVehicleIONonSafetyState vioNonSafetyState,
    dwVehicleIOActuationFeedback vioActuationFeedback 
    )

    Initialize Plugin VIO Driver.

    NOTE: This function will be deprecated in a future release. Please use use _dwVehicleIODriver_initialize_V3 instead.

    Parameters
    [in]contextDriveworks context
    [in]vehicleTypeStringThe string to specify the type of partner VehicleIO driver to create
    [in]vehiclePropertiesSpecified Vehicle properties (from rig.json).
    [in]vehicleIOCapabilitiesSpecifies VehicleIO capabilities.
    [in]dbcFilepathSpeficifes path to the dbc file for initializing a DBC-based canbus interpreter
    [in]vioStateVehicle IO State.
    [in]vioSafetyStateVehicle IO Safety State.
    [in]vioNonSafetyStateVehicle IO Non-Safety State.
    [in]vioActuationFeedbackVehicle IO Actuation Feedback State.
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_initialize_V3()

    dwStatus _dwVehicleIODriver_initialize_V3 ( dwContextHandle_t  context,
    dwVehicle const *  vehicleProperties,
    dwVehicleIOCapabilities vehicleIOCapabilities,
    char8_t const *  dbcFilepath,
    dwVehicleIOASILStateE2EWrapper vioAsilState,
    dwVehicleIOQMState vioQmState 
    )

    Initialize Plugin VIO Driver.

    Parameters
    [in]contextDriveworks context
    [in]vehiclePropertiesSpecified Vehicle properties (from rig.json).
    [in]vehicleIOCapabilitiesSpecifies VehicleIO capabilities.
    [in]dbcFilepathSpeficifes path to the dbc file for initializing a DBC-based canbus interpreter
    [in]vioAsilStateVehicle IO ASIL State.
    [in]vioQmStateVehicle IO QM State.
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_release()

    dwStatus _dwVehicleIODriver_release ( )

    Releases the VehicleIO Driver.

    Returns
    DW_FAILURE, DW_SUCCESS
    API Group
    • Init: Yes
    • Runtime: No
    • De-Init: Yes

    ◆ _dwVehicleIODriver_reset()

    dwStatus _dwVehicleIODriver_reset ( )

    Reset driver to default state.

    Returns
    DW_FAILURE, DW_SUCCESS
    Note
    This would not perform any changes regarding current vehicle state.
    API Group
    • Init: Yes
    • Runtime: Yes
    • De-Init: Yes

    ◆ _dwVehicleIODriver_sendASILCommand()

    dwStatus _dwVehicleIODriver_sendASILCommand ( dwVehicleIOASILCommandE2EWrapper const *  asilCommand,
    dwSensorHandle_t  sensorHandle 
    )

    Send dwVehicleIOASILCommandE2EWrapper over specified sensor.

    Parameters
    [in]asilCommanddwVehicleIOASILCommandE2EWrapper to send
    [in]sensorHandleSensor handle
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_sendCommand()

    dwStatus _dwVehicleIODriver_sendCommand ( const dwVehicleIOCommand cmd,
    dwSensorHandle_t  sensor 
    )

    Send a vehicle command to the given CAN sensor.

    Parameters
    [in]cmdCommand with parameters to be sent.
    [in]sensorCAN sensor to send CAN messages.
    Returns
    DW_FAILURE, DW_SUCCESS
    API Group
    • Init: Yes
    • Runtime: Yes
    • De-Init: Yes

    ◆ _dwVehicleIODriver_sendEgomotion()

    dwStatus _dwVehicleIODriver_sendEgomotion ( dwValEgomotion const *  egomotion,
    dwSensorHandle_t  sensorHandle 
    )

    Send dwValEgomotion over specified sensor.

    Parameters
    [in]egomotiondwValEgomotion to send
    [in]sensorHandleSensor handle
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_sendMiscCommand()

    dwStatus _dwVehicleIODriver_sendMiscCommand ( const dwVehicleIOMiscCommand cmd,
    dwSensorHandle_t  sensor 
    )

    Send misc vehicle command to the given CAN sensor.

    Parameters
    [in]cmdCommand with parameters to be sent.
    [in]sensorCAN sensor to send CAN messages.
    Returns
    DW_FAILURE, DW_SUCCESS
    API Group
    • Init: Yes
    • Runtime: Yes
    • De-Init: Yes

    ◆ _dwVehicleIODriver_sendNonSafetyCommand()

    dwStatus _dwVehicleIODriver_sendNonSafetyCommand ( dwVehicleIONonSafetyCommand const *  nonSafetyCommand,
    dwSensorHandle_t  sensorHandle 
    )

    Send dwVehicleIONonSafetyCommand over specified sensor.

    NOTE: This function will be deprecated in a future release. Please use use _dwVehicleIODriver_sendASILCommand, _dwVehicleIODriver_sendQMCommand, _dwVehicleIODriver_sendEgomotion or _dwVehicleIODriver_sendSensorCalibration instead.

    Parameters
    [in]nonSafetyCommanddwVehicleIONonSafetyCommand to send
    [in]sensorHandleSensor handle
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_sendQMCommand()

    dwStatus _dwVehicleIODriver_sendQMCommand ( dwVehicleIOQMCommand const *  qmCommand,
    dwSensorHandle_t  sensorHandle 
    )

    Send dwVehicleIOQMCommand over specified sensor.

    Parameters
    [in]qmCommanddwVehicleIOQMCommand to send
    [in]sensorHandleSensor handle
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_sendSafetyCommand()

    dwStatus _dwVehicleIODriver_sendSafetyCommand ( dwVehicleIOSafetyCommand const *  safetyCommand,
    dwSensorHandle_t  sensorHandle 
    )

    Send dwVehicleIOSafetyCommand over specified sensor.

    NOTE: This function will be deprecated in a future release. Please use use _dwVehicleIODriver_sendASILCommand, _dwVehicleIODriver_sendQMCommand, _dwVehicleIODriver_sendEgomotion or _dwVehicleIODriver_sendSensorCalibration instead.

    Parameters
    [in]safetyCommanddwVehicleIOSafetyCommand to send
    [in]sensorHandleSensor handle
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_sendSensorCalibration()

    dwStatus _dwVehicleIODriver_sendSensorCalibration ( dwValSensorCalibration const *  calibration,
    dwSensorHandle_t  sensorHandle 
    )

    Send dwValSensorCalibration over specified sensor.

    Parameters
    [in]calibrationdwValSensorCalibration to send
    [in]sensorHandleSensor handle
    Returns
    DW_FAILURE, DW_SUCCESS

    ◆ _dwVehicleIODriver_setDrivingMode()

    dwStatus _dwVehicleIODriver_setDrivingMode ( const dwVehicleIODrivingMode  mode)

    Set driving mode.

    Parameters
    [in]modespecifies the mode of driving.
    Returns
    DW_NOT_SUPPORTED - if the mode is not supported. DW_SUCCESS - if the new mode has been accepted.
    API Group
    • Init: Yes
    • Runtime: Yes
    • De-Init: Yes
    人人超碰97caoporen国产