You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by ld...@apache.org on 2020/10/22 11:55:12 UTC
[plc4x] 03/22: Step back to virtual fields in can transport.
This is an automated email from the ASF dual-hosted git repository.
ldywicki pushed a commit to branch feature/socketcan
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 36f38c235340467053bb36de75f53967f1b718c2
Author: Ćukasz Dywicki <lu...@code-house.org>
AuthorDate: Mon Aug 24 17:57:02 2020 +0200
Step back to virtual fields in can transport.
---
protocols/can/src/main/resources/protocols/can/can.mspec | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/protocols/can/src/main/resources/protocols/can/can.mspec b/protocols/can/src/main/resources/protocols/can/can.mspec
index 113e304..16408fd 100644
--- a/protocols/can/src/main/resources/protocols/can/can.mspec
+++ b/protocols/can/src/main/resources/protocols/can/can.mspec
@@ -52,7 +52,7 @@ struct canfd_frame {
};
*/
-[type 'OtherSocketCANFrame'
+[type 'SocketCANFrame'
[simple int 32 'rawId']
[virtual bit 'extended'
'STATIC_CALL("org.apache.plc4x.java.can.helper.HeaderParser.isRemote", rawId)'
@@ -63,6 +63,7 @@ struct canfd_frame {
[virtual bit 'error'
'STATIC_CALL("org.apache.plc4x.java.can.helper.HeaderParser.isError", rawId)'
]
+ [implicit uint 8 'size' 'COUNT(data)']
// [typeSwitch 'extended'
// ['true' ExtendedOtherSocketCanFrame
// [simple uint 8 'flags']
@@ -71,13 +72,13 @@ struct canfd_frame {
[reserved uint 8 '0x0']
// ]
// ]
- [reserved uint 8 '0x0']
- [reserved uint 8 '0x0']
- [implicit uint 8 'size' 'COUNT(data)']
+ [reserved uint 8 '0x0'] //flags
+ [reserved uint 8 '0x0'] // padding 1
+ [reserved uint 8 '0x0'] // padding 2
[array int 8 'data' COUNT 'size']
]
-[type 'SocketCANFrame'
+[type 'SimplifiedSocketCANFrame'
[simple bit 'extended']
[simple bit 'remote']
[simple bit 'error']