From c54fefd6696fe58d35debe4ba1447c764a960573 Mon Sep 17 00:00:00 2001 From: norly Date: Sat, 25 Mar 2017 00:35:23 +0100 Subject: Comment BAP frame --- vw-bap.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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]; -- cgit v1.2.3