Expand description
Low-level FFI bindings to the COVESA DLT (Diagnostic Log and Trace) C library (libdlt).
§Overview
dlt-sys provides unsafe Rust bindings to the
COVESA DLT daemon C library.
This crate is intended to be used as a foundation for higher-level safe
Rust abstractions (see dlt-rs).
Note: This crate only implements functionality required for dlt-rs and does not cover
the entire libdlt API.
§Features
- Direct FFI bindings to
libdltfunctions - Custom C wrapper for improved API ergonomics
- Support for all DLT log levels and message types
- Optional
trace_load_ctrlfeature for load control support
§Prerequisites
libdlt and its development headers must be installed on your system.
§Usage
This is a low-level crate with unsafe APIs. Most users should use
dlt-rs instead for a safe, idiomatic Rust API.
§Cargo Features
trace_load_ctrl- Enable DLT load control supportgenerate-bindings- Regenerate bindings from C headers (development only)
§Safety
All functions in this crate are unsafe as they directly call C library functions.
Proper usage requires understanding of:
- DLT library initialization and cleanup
- Memory management across FFI boundaries
- Thread safety considerations
For safe abstractions, use the dlt-rs crate.
§References
Structs§
Constants§
- DLT_
ID_ SIZE - DltLog
Level Type_ DLT_ LOG_ DEBUG - DltLog
Level Type_ DLT_ LOG_ DEFAULT - DltLog
Level Type_ DLT_ LOG_ ERROR - DltLog
Level Type_ DLT_ LOG_ FATAL - DltLog
Level Type_ DLT_ LOG_ INFO - DltLog
Level Type_ DLT_ LOG_ MAX - DltLog
Level Type_ DLT_ LOG_ OFF - DltLog
Level Type_ DLT_ LOG_ VERBOSE - DltLog
Level Type_ DLT_ LOG_ WARN - DltReturn
Value_ DLT_ RETURN_ BUFFER_ FULL - DltReturn
Value_ DLT_ RETURN_ ERROR - DltReturn
Value_ DLT_ RETURN_ FILESZERR - DltReturn
Value_ DLT_ RETURN_ LOAD_ EXCEEDED - DltReturn
Value_ DLT_ RETURN_ LOGGING_ DISABLED - DltReturn
Value_ DLT_ RETURN_ OK - DltReturn
Value_ DLT_ RETURN_ PIPE_ ERROR - DltReturn
Value_ DLT_ RETURN_ PIPE_ FULL - DltReturn
Value_ DLT_ RETURN_ TRUE - DltReturn
Value_ DLT_ RETURN_ USER_ BUFFER_ FULL - DltReturn
Value_ DLT_ RETURN_ WRONG_ PARAMETER - DltTimestamp
Type_ DLT_ AUTO_ TIMESTAMP - DltTimestamp
Type_ DLT_ USER_ TIMESTAMP - DltTrace
Status Type_ DLT_ TRACE_ STATUS_ DEFAULT - DltTrace
Status Type_ DLT_ TRACE_ STATUS_ MAX - DltTrace
Status Type_ DLT_ TRACE_ STATUS_ OFF - DltTrace
Status Type_ DLT_ TRACE_ STATUS_ ON
Functions§
- dltFree⚠
- dltUser
LogWrite ⚠Bool - dltUser
LogWrite ⚠Finish - dltUser
LogWrite ⚠Float32 - dltUser
LogWrite ⚠Float64 - dltUser
LogWrite ⚠Int - dltUser
LogWrite ⚠Int64 - dltUser
LogWrite ⚠Start - dltUser
LogWrite ⚠String - dltUser
LogWrite ⚠Uint - dltUser
LogWrite ⚠Uint64 - logDlt⚠
- logDlt
Int ⚠ - logDlt
String ⚠ - logDlt
Uint ⚠ - register
Application ⚠ - register
Context ⚠ - register
LogLevel ⚠Changed Callback - unregister
Application ⚠Flush Buffered Logs - unregister
Context ⚠