First working non-multiframe sending
[revag-bap.git] / vw-bap.h
index 656ff0e8a7eb1f2a88b636b4f4bedc59f240cb3c..87a2fc38a7a57c1086cc293aa7dd5fb0b12fa34e 100644 (file)
--- a/vw-bap.h
+++ b/vw-bap.h
@@ -57,6 +57,15 @@ struct BAP_RXer {
 };
 
 
+struct BAP_TXer {
+       /* Temporary storage for frames not yet fully sent */
+       struct BAP_Frame *slot[4];
+
+       /* How many bytes have we already sent on each channel? */
+       BAP_FrameLen slot_done[4];
+};
+
+
 
 /* BAP frame struct handling */
 struct BAP_Frame* vw_bap_frame_alloc(void);
@@ -64,6 +73,8 @@ struct BAP_Frame* vw_bap_frame_alloc(void);
 
 int vw_bap_frame_is_valid(struct BAP_Frame *bap_frame);
 
+struct BAP_Frame* vw_bap_frame_clone(struct BAP_Frame *bap_frame);
+
 void vw_bap_frame_dump(struct BAP_Frame *bap_frame);
 
 
@@ -73,4 +84,10 @@ struct BAP_RXer* vw_bap_rxer_alloc();
 void vw_bap_rxer_free(struct BAP_RXer *bap);
 
 
+/* BAP transmission */
+int vw_bap_txer_queue(struct BAP_TXer* bap, struct BAP_Frame *bap_frame, struct can_frame *frame);
+struct BAP_TXer* vw_bap_txer_alloc();
+void vw_bap_txer_free(struct BAP_TXer *bap);
+
+
 #endif