DiagAPI
group DiagAPI
This includes APIs for application to support UDS diagnostic functionalities.
Members
enum
RetType
Values | Descriptions |
---|---|
OK | Success case. |
NOK | Failure case. |
Common return type for function.
enum
OperationStatus
Values | Descriptions |
---|---|
SUCCESS | Success case. |
NO_CONNECTED_CLIENT | No client is connected, App can ignore this. |
RESPONSE_SIZE_TOO_LONG | Size of the response is longer than configured. |
APP_DID_READ_ERROR | Error while reading DID value. |
APP_DID_WRITE_ERROR | Error while writing DID value. |
APP_IO_CTRL_ERROR | Error while doing IO Control operation. |
APP_NO_HANDLER | No Handler is registered for performing the operation. |
APP_NRC_REQUEST_OUT_OF_RANGE | NRC 31. |
APP_NRC_GENERAL_PROGRAMMING_FAILURE | NRC 72. |
Specifies the final status of the operation requested.
enum
RoutineControlType
Values | Descriptions |
---|---|
ROUTINE_START | |
ROUTINE_STOP | |
ROUTINE_RESULT |
Apps developers can ignore this type.
enum
EventStatusType
Values | Descriptions |
---|---|
EVENT_STATUS_NA | |
EVENT_STATUS_PASSED | |
EVENT_STATUS_FAILED | |
EVENT_STATUS_PREPASSED | |
EVENT_STATUS_PREFAILED | |
EVENT_STATUS_FDC_THRESHOLD_REACHED |
Value of the Event status to set. The values are as per spec.
public void
start
()
Start the APP and DM communication interface.
This must be called before performing any other operations.
public void
registerApp
(int16_t appId)
Register this application using this appId.
APP Ids are used by the DM server for routing Service requests.
- Parameters
appId
Id of the application as defined in the configuration
public void
setReadDIDHandler
(
ReadDIDHandler
handler)
Set the Read DID Handler.
- Parameters
handler
call back function
public void
setWriteDIDHandler
(
WriteDIDHandler
handler)
Set the Write DID Handler object.
- Parameters
handler
call back function
public void
setStartRoutineHandler
(
RoutineHandler
handler)
Set the Start Routine Handler object.
- Parameters
handler
call back function
public void
setStopRoutineHandler
(
RoutineHandler
handler)
Set the Stop Routine Handler object.
- Parameters
handler
call back function
public void
setfetchRoutineResultHandler
(
RoutineHandler
handler)
Set the Get Routine Result handler.
- Parameters
handler
call back function
public void
setEventStatus
(EventIdType eid,
EventStatusType
status)
Set the DTC Event Status.
- Parameters
eid
Event Idstatus
Event Status
public void
setIOControlByIdHandler
(
IOControlByIdHandler
handler)
Set the IOControlBy DID handler.
- Parameters
handler
call back function
struct OperationResponse
This struct defines the response that Apps need to send back to the server.
Summary
Members | Descriptions |
---|---|
public OperationStatus operationStatus | Status of this operation. |
public int32_t dataLength | Length of the response data. |
public uint8_t * data | Pointer to the response data. |
Members
public
OperationStatus
operationStatus
Status of this operation.
public int32_t
dataLength
Length of the response data.
public uint8_t *
data
Pointer to the response data.
struct DataContainer
Generic container for all sorts of data transfer operations.
Summary
Members | Descriptions |
---|---|
public int32_t dataLength | Length of the data provided. |
public uint8_t * data | Pointer to the actual data provided. |
Members
public int32_t
dataLength
Length of the data provided.
public uint8_t *
data
Pointer to the actual data provided.