summaryrefslogtreecommitdiffstats
path: root/src/obd2/extras.c
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 15:25:16 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 15:25:16 -0500
commit695e488b19d3b6884ccd7ca1010c8180484ccceb (patch)
treed15129d9c16bd0fb0289554925c10a38a5947085 /src/obd2/extras.c
parent3fe62dd9870c59e600eb6f51603a49325372979e (diff)
Clean up the primary diag request handler.
Diffstat (limited to 'src/obd2/extras.c')
-rw-r--r--src/obd2/extras.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/obd2/extras.c b/src/obd2/extras.c
new file mode 100644
index 0000000..ec1d996
--- /dev/null
+++ b/src/obd2/extras.c
@@ -0,0 +1,29 @@
+#include <obd2/obd2.h>
+
+// TODO everything below here is for future work...not critical for now.
+
+DiagnosticRequestHandle diagnostic_request_malfunction_indicator_status(
+ DiagnosticShims* shims,
+ DiagnosticMilStatusReceived callback) {
+ // TODO request malfunction indicator light (MIL) status - request mode 1
+ // pid 1, parse first bit
+}
+
+DiagnosticRequestHandle diagnostic_request_vin(DiagnosticShims* shims,
+ DiagnosticVinReceived callback) {
+}
+
+DiagnosticRequestHandle diagnostic_request_dtc(DiagnosticShims* shims,
+ DiagnosticTroubleCodeType dtc_type,
+ DiagnosticTroubleCodesReceived callback) {
+}
+
+bool diagnostic_clear_dtc(DiagnosticShims* shims) {
+}
+
+DiagnosticRequestHandle diagnostic_enumerate_pids(DiagnosticShims* shims,
+ DiagnosticRequest* request, DiagnosticPidEnumerationReceived callback) {
+ // before calling the callback, split up the received bytes into 1 or 2 byte
+ // chunks depending on the mode so the final pid list is actual 1 or 2 byte PIDs
+ // TODO request supported PIDs - request PID 0 and parse 4 bytes in response
+}