summaryrefslogtreecommitdiffstats
path: root/CAN-binder/libs/uds-c/src/uds/extras.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-02 17:52:11 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-02 17:52:11 +0200
commit0242c26c2f5dc96387bca7efb118364c800f4ee7 (patch)
treeba0a67a78004a45afd158a3ca3fb01c6fc012e06 /CAN-binder/libs/uds-c/src/uds/extras.c
parent3102ec9ce009d0f28355c5b7df9c5bd5013e6e75 (diff)
parentca20db3dd978871bbb9f01f3c862b510c03d1dc4 (diff)
Add 'CAN-binder/libs/uds-c/' from commit 'ca20db3dd978871bbb9f01f3c862b510c03d1dc4'
git-subtree-dir: CAN-binder/libs/uds-c git-subtree-mainline: 3102ec9ce009d0f28355c5b7df9c5bd5013e6e75 git-subtree-split: ca20db3dd978871bbb9f01f3c862b510c03d1dc4
Diffstat (limited to 'CAN-binder/libs/uds-c/src/uds/extras.c')
-rw-r--r--CAN-binder/libs/uds-c/src/uds/extras.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/CAN-binder/libs/uds-c/src/uds/extras.c b/CAN-binder/libs/uds-c/src/uds/extras.c
new file mode 100644
index 00000000..2be6bdd8
--- /dev/null
+++ b/CAN-binder/libs/uds-c/src/uds/extras.c
@@ -0,0 +1,39 @@
+#include <uds/extras.h>
+#include <uds/uds.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 handle;
+ return handle;
+}
+
+DiagnosticRequestHandle diagnostic_request_vin(DiagnosticShims* shims,
+ DiagnosticVinReceived callback) {
+ DiagnosticRequestHandle handle;
+ return handle;
+}
+
+DiagnosticRequestHandle diagnostic_request_dtc(DiagnosticShims* shims,
+ DiagnosticTroubleCodeType dtc_type,
+ DiagnosticTroubleCodesReceived callback) {
+ DiagnosticRequestHandle handle;
+ return handle;
+}
+
+bool diagnostic_clear_dtc(DiagnosticShims* shims) {
+ return false;
+}
+
+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
+ DiagnosticRequestHandle handle;
+ return handle;
+}