Comment BAP frame
authornorly <ny-git@enpas.org>
Fri, 24 Mar 2017 23:35:23 +0000 (00:35 +0100)
committernorly <ny-git@enpas.org>
Fri, 24 Mar 2017 23:35:23 +0000 (00:35 +0100)
vw-bap.h

index 61e5da5a9d6de342aeec01bdd2d9bf91717ffdaf..9930cfb3862a7929604e895e21c49f5388984031 100644 (file)
--- a/vw-bap.h
+++ b/vw-bap.h
@@ -10,19 +10,48 @@ typedef unsigned char BAP_Function;
 typedef unsigned short BAP_FrameLen;
 
 
+/* A BAP frame at the BCL (BAP communication layer) as defined in
+ * http://www.itwissen.info/BCL-BAP-communication-layer.html
+ *
+ * This is basically BAP's equivalent of IP and TCP.
+ */
 struct BAP_Frame {
        /* True if frame was/will be transmitted in multi-frame syntax */
        int is_multiframe;
 
+
+       /* Request/reply, kind of */
        BAP_OpCode opcode;
+
+       /* LSG = Logisches Steuergeraet
+        * https://www.springerprofessional.de/technische-informatik/eingebettete-systeme/neues-protokoll-vereinfacht-kommunikation-von-steuergeraeten/6592480
+        *
+        * BAP's equivalent of an IP address (to be confirmed).
+        *
+        * Always the same per CAN ID in the (simple) devices I looked at.
+        */
        BAP_Node node;
+
+       /* The "RPC" function, or "status register" ID.
+        *
+        * BAP's equivalent of a "TCP port".
+        */
        BAP_Function function;
+
+       /* Payload length, up to 2^12 = 4096 bytes.
+        *
+        * 4095 bytes according to:
+        * http://www.itwissen.info/BCL-BAP-communication-layer.html
+        */
        BAP_FrameLen len;
 
+
+       /* Payload */
        char data[4096];
 };
 
 
+
 struct BAP_RXer {
        /* Temporary storage for incomplete frames */
        struct BAP_Frame *mfchannel[8];