How tribui221100/uds_handling works
uds-services is a small, allocation-free C11 UDS service-handler library for embedded ECUs. Its main workflow accepts a reassembled UDS request at the dispatcher, routes by service ID, and returns either a positive response or a wrapped negative response; the application’s transport sends that response. Separate handlers implement diagnostic sessions, reset, DID read/write, security access, communication control, and upload/download transfers. Application callbacks provide hardware- or ECU-specific operations. The README documents the integration flow; unsampled source is not used to infer additional calls.
Main entry points: uds_dispatch.c SID dispatcher · uds_transfer.c Download/upload · uds_session.c Session control · uds_reset.c ECU reset
Components 13
Request dispatch
- SID dispatcher
src/uds_dispatch.c
Diagnostic services
- Session control
src/uds_session.c - ECU reset
src/uds_reset.c - DID read/write
src/uds_data_io.c - Security access
src/uds_security.c - Communication control
src/uds_comm_control.c
Transfer services
- Download/upload
src/uds_transfer.c
Runtime and callbacks
- Context and DID lookup
src/uds_common.c - Public API and state
include/uds.h - Runtime limits
include/uds_config.h
Other components
- UDS client
- ISO-TP transport
- ECU callbacks
Connections 14
- UDS client → ISO-TP transport: sends request
README.md - ISO-TP transport → SID dispatcher: passes request
README.md - SID dispatcher → Session control: routes session
src/uds_dispatch.c - SID dispatcher → ECU reset: routes reset
src/uds_dispatch.c - SID dispatcher → DID read/write: routes DID
src/uds_dispatch.c - SID dispatcher → Security access: routes security
src/uds_dispatch.c - SID dispatcher → Communication control: routes control
src/uds_dispatch.c - SID dispatcher → Download/upload: routes transfer
src/uds_dispatch.c - SID dispatcher → ISO-TP transport: returns response
README.md - DID read/write → Context and DID lookup: looks up DID
src/uds_data_io.c - ECU reset → ECU callbacks: requests reset
src/uds_reset.c - Security access → ECU callbacks: requests key checks
src/uds_security.c - Download/upload → ECU callbacks: reads or writes memory
src/uds_transfer.c - Session control → Download/upload: clears active transfer
src/uds_session.c