You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/11/19 10:48:01 UTC
[plc4x] 02/03: - Changed the destinationAddress to be a 2-byte byte
array as the interpretation depends on the representation selected in ETS5
- Added a type which can be used to parse the 2-byte arrays to real objects
(Manually done in applications ... the type is not linked with the rest)
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/knxnet-ip
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 74669de3e060011bceb87436077a9d03b1b59a25
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Nov 19 11:46:40 2019 +0100
- Changed the destinationAddress to be a 2-byte byte array as the interpretation depends on the representation selected in ETS5
- Added a type which can be used to parse the 2-byte arrays to real objects (Manually done in applications ... the type is not linked with the rest)
---
.../resources/protocols/knxnetip/knxnetip.mspec | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec b/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec
index 4122aa8..218265e 100644
--- a/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec
+++ b/protocols/knxnetip/src/main/resources/protocols/knxnetip/knxnetip.mspec
@@ -196,6 +196,23 @@
[simple uint 8 'subGroup']
]
+[discriminatedType 'KNXGroupAddress' [uint 2 'numLevels']
+ [typeSwitch 'numLevels'
+ ['1' KNXGroupAddressFreeLevel
+ [simple uint 16 'subGroup']
+ ]
+ ['2' KNXGroupAddress2Level
+ [simple uint 5 'mainGroup']
+ [simple uint 11 'subGroup']
+ ]
+ ['3' KNXGroupAddress3Level
+ [simple uint 5 'mainGroup']
+ [simple uint 3 'middleGroup']
+ [simple uint 8 'subGroup']
+ ]
+ ]
+]
+
[type 'DeviceStatus'
[reserved uint 7 '0x00']
[simple bit 'programMode']
@@ -304,7 +321,7 @@
]
['true','true','false' CEMIFrameData
[simple KNXAddress 'sourceAddress']
- [simple KNXAddress 'destinationAddress']
+ [array int 8 'destinationAddress' count '2']
[simple bit 'groupAddress']
[simple uint 3 'hopCount']
[simple uint 4 'dataLength']
@@ -319,7 +336,7 @@
[simple uint 3 'hopCount']
[simple uint 4 'extendedFrameFormat']
[simple KNXAddress 'sourceAddress']
- [simple KNXAddress 'destinationAddress']
+ [array int 8 'destinationAddress' count '2']
[simple uint 8 'dataLength']
[simple uint 6 'tpci']
[enum APCI 'apci']