summaryrefslogtreecommitdiffstats
path: root/src/isotp/isotp.h
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 14:29:55 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 14:29:55 -0500
commit980d26f9dfc4eb5b8da0dc786f733110be265aea (patch)
tree333355e7c84f1642addac359e41987e927be7fa0 /src/isotp/isotp.h
parenta5e910714733f309b6db18f6017c6f0864e20d38 (diff)
Document all functions in header files.
Diffstat (limited to 'src/isotp/isotp.h')
-rw-r--r--src/isotp/isotp.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/isotp/isotp.h b/src/isotp/isotp.h
index 1b52ad35..3a3658c7 100644
--- a/src/isotp/isotp.h
+++ b/src/isotp/isotp.h
@@ -12,22 +12,27 @@
extern "C" {
#endif
+/* Public: Initialize an IsoTpShims with the given callback functions.
+ *
+ * If any callbacks are not to be used, set them to NULL. For documentation of
+ * the function type signatures, see isotp_types.h. This struct is a handy
+ * encapsulation used to pass the shims around to the various isotp_* functions.
+ *
+ * Returns a struct with the fields initailized to the callbacks.
+ */
IsoTpShims isotp_init_shims(LogShim log,
SendCanMessageShim send_can_message,
SetTimerShim set_timer);
-void isotp_message_to_string(const IsoTpMessage* message, char* destination,
- size_t destination_length);
-
-/* Public: Change the timeout for waiting on an ISO-TP response frame.
- *
- * If this function is not used, the conventional 100ms is used by default.
+/* Public: Render an IsoTpMessage as a string into the given buffer.
*
- * handler - the ISO-TP handler to modify.
- * timeout - the new timeout in milliseconds.
+ * message - the message to convert to a string, for debug logging.
+ * destination - the target string buffer.
+ * destination_length - the size of the destination buffer, i.e. the max size
+ * for the rendered string.
*/
-// void isotp_set_timeout(IsoTpHandler* handler, uint16_t timeout_ms);
-
+void isotp_message_to_string(const IsoTpMessage* message, char* destination,
+ size_t destination_length);
#ifdef __cplusplus
}