iso14229 0.9.0
ISO14229-1 (UDS) C Library
|
The UDS client API provides functionality for sending diagnostic requests to UDS servers.
For transport initialization, see Transport Selection.
The UDSClient structure contains:
p2_ms
, p2_star_ms
- Server response timing parameterstp
- Pointer to ISO-TP transport layerstate
- Current client stateoptions
, defaultOptions
- Request behavior flagsfn
, fn_data
- Event handler and user datarecv_buf
, send_buf
- Internal message buffersCombine these flags when sending requests:
Flag | Description |
---|---|
UDS_SUPPRESS_POS_RESP | Suppress positive response (0x80 bit) |
UDS_FUNCTIONAL | Send as functional request (broadcast) |
UDS_IGNORE_SRV_TIMINGS | Ignore the server-provided P2/P2* values returned by a successful call to DiagnosticSessionControl |
Example:
The client uses callbacks to notify the application of events:
See UDS Services.
Helper functions are provided to parse complex responses:
Client behavior can be configured at compile-time:
Define | Default | Description |
---|---|---|
UDS_CLIENT_DEFAULT_P2_MS | 150 | Default P2 timeout (ms) |
UDS_CLIENT_DEFAULT_P2_STAR_MS | 1500 | Default P2* timeout (ms) |
UDS_CLIENT_SEND_BUF_SIZE | 4095 | Send buffer size |
UDS_CLIENT_RECV_BUF_SIZE | 4095 | Receive buffer size |