How pylessard/python-udsoncan works
python-udsoncan is a Python implementation of the automotive UDS diagnostic protocol. A developer uses Client with a configured connection to issue diagnostic operations; Client builds service requests, exchanges them with an ECU, and interprets responses. The service modules cover session/security, data access, fault diagnostics, memory transfer, and ECU control. Common modules provide DID codecs and diagnostic data types. The excerpts establish the Client and transport roles; service-family links reflect the documented module layout, not inspected call sites.
Main entry points: client.py Client · BaseService.py Service framework · ReadDTCInformation.py DTC diagnostics · DiagnosticSessionControl.py Session and access
Components 18
Diagnostic API
- Client
udsoncan/client.py - Client config
udsoncan/configs.py - Session and access
udsoncan/services/DiagnosticSessionControl.py - Authentication
udsoncan/services/Authentication.py - Data access
udsoncan/services/ReadDataByIdentifier.py - DTC diagnostics
udsoncan/services/ReadDTCInformation.py - Memory transfer
udsoncan/services/RequestDownload.py - ECU control
udsoncan/services/RoutineControl.py
UDS Protocol
- Request encoding
udsoncan/Request.py - Response decoding
udsoncan/Response.py - Service framework
udsoncan/BaseService.py - Response codes
udsoncan/ResponseCode.py
Diagnostic Data
- DID codecs
udsoncan/common/dids.py - DTC model
udsoncan/common/dtc.py - Diagnostic types
udsoncan/common
Transport
- Connection adapters
udsoncan/connections.py
Other components
- Diagnostic user
- UDS server
Connections 22
- Diagnostic user → Client: calls
- Client → Client config: uses
- Client → Session and access: dispatches
- Client → Authentication: dispatches
- Client → Data access: dispatches
- Client → DTC diagnostics: dispatches
- Client → Memory transfer: dispatches
- Client → ECU control: dispatches
- Client → Request encoding: builds
- Client → Connection adapters: sends and receives
- Connection adapters → UDS server: transports payloads
- Client → Response decoding: decodes
- Session and access → Service framework: implements
- Authentication → Service framework: implements
- Data access → Service framework: implements
- DTC diagnostics → Service framework: implements
- Memory transfer → Service framework: implements
- ECU control → Service framework: implements
- Service framework → Response codes: checks codes
- Client → DID codecs: uses codecs
- DTC diagnostics → DTC model: models DTCs
- Client → Diagnostic types: uses types