4 #include <uds/uds_types.h>
10 // TODO everything in here is unused for the moment!
17 } DiagnosticTroubleCodeGroup;
20 DiagnosticTroubleCodeGroup group;
23 } DiagnosticTroubleCode;
26 /* Private: TODO unused for now
32 } DiagnosticTroubleCodeType;
35 // TODO should we enumerate every OBD-II PID? need conversion formulas, too
38 uint8_t bytes_returned;
41 } DiagnosticParameter;
43 typedef void (*DiagnosticMilStatusReceived)(bool malfunction_indicator_status);
44 typedef void (*DiagnosticVinReceived)(uint8_t vin[]);
45 typedef void (*DiagnosticTroubleCodesReceived)(
46 DiagnosticMode mode, DiagnosticTroubleCode* codes);
47 typedef void (*DiagnosticPidEnumerationReceived)(
48 const DiagnosticResponse* response, uint16_t* pids);
50 DiagnosticRequestHandle diagnostic_request_malfunction_indicator_status(
51 DiagnosticShims* shims,
52 DiagnosticMilStatusReceived callback);
54 DiagnosticRequestHandle diagnostic_request_vin(DiagnosticShims* shims,
55 DiagnosticVinReceived callback);
57 DiagnosticRequestHandle diagnostic_request_dtc(DiagnosticShims* shims,
58 DiagnosticTroubleCodeType dtc_type,
59 DiagnosticTroubleCodesReceived callback);
61 bool diagnostic_clear_dtc(DiagnosticShims* shims);
63 DiagnosticRequestHandle diagnostic_enumerate_pids(DiagnosticShims* shims,
64 DiagnosticRequest* request, DiagnosticPidEnumerationReceived callback);
67 float diagnostic_decode_OBD2_pid(DiagnosticResponse* response);
73 #endif // __EXTRAS_H__