summaryrefslogtreecommitdiffstats
path: root/src/isotp/send.h
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 13:44:39 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-03 13:44:39 -0500
commita5e910714733f309b6db18f6017c6f0864e20d38 (patch)
tree9255d43cd3545ab138595e3abb24c60660052104 /src/isotp/send.h
parent330358c978ea3d324740a8dba884c4493fa339b8 (diff)
Split up functions in send/receive files for clarity.
Diffstat (limited to 'src/isotp/send.h')
-rw-r--r--src/isotp/send.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/isotp/send.h b/src/isotp/send.h
index 8f707b29..90930d8c 100644
--- a/src/isotp/send.h
+++ b/src/isotp/send.h
@@ -9,6 +9,23 @@
extern "C" {
#endif
+typedef struct {
+ bool success;
+ bool completed;
+ uint16_t sending_arbitration_id;
+ uint16_t receiving_arbitration_id;
+ IsoTpMessageSentHandler message_sent_callback;
+ IsoTpCanFrameSentHandler can_frame_sent_callback;
+ // TODO going to need some state here for multi frame messages
+} IsoTpSendHandle;
+
+bool isotp_continue_send(IsoTpShims* shims, IsoTpSendHandle* handle,
+ const uint16_t arbitration_id, const uint8_t data[],
+ const uint8_t size);
+
+IsoTpSendHandle isotp_send(IsoTpShims* shims, const uint16_t arbitration_id,
+ const uint8_t payload[], uint16_t size,
+ IsoTpMessageSentHandler callback);
#ifdef __cplusplus
}