summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2017-03-25 00:35:23 +0100
committernorly <ny-git@enpas.org>2017-03-25 00:35:23 +0100
commitc54fefd6696fe58d35debe4ba1447c764a960573 (patch)
tree461ad4a09a1f4e776db0428a76e99809c0557379
parentc70b9c81d49e087011016d4216d4755249fb3fa4 (diff)
Comment BAP frame
-rw-r--r--vw-bap.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/vw-bap.h b/vw-bap.h
index 61e5da5..9930cfb 100644
--- 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];