You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/05/05 11:02:56 UTC
[plc4x] 01/03: eip/simulated: fixed wrong use of uint
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit e531eb8c74db43a72cb370bd002d6a194f1aa4aa
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed May 5 12:48:02 2021 +0200
eip/simulated: fixed wrong use of uint
+ simulated added a dummy type to prevent code generation issues in go
---
protocols/eip/src/main/resources/protocols/eip/eip.mspec | 3 ++-
.../src/main/resources/protocols/simulated/simulated.mspec | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/protocols/eip/src/main/resources/protocols/eip/eip.mspec b/protocols/eip/src/main/resources/protocols/eip/eip.mspec
index f375772..650b5f6 100644
--- a/protocols/eip/src/main/resources/protocols/eip/eip.mspec
+++ b/protocols/eip/src/main/resources/protocols/eip/eip.mspec
@@ -123,7 +123,8 @@
['0X02A0' STRUCTURED ['88']]
['0X02A0' STRING ['88']]
['0X02A0' STRING36 ['40']]
- ['-1' UNKNOWN ['-1']]
+ //TODO: -1 is not a valid value for uint
+ //['-1' UNKNOWN ['-1']]
]
[enum uint 16 'EiPCommand'
diff --git a/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec b/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec
index 5ed72d5..ec1fdf8 100644
--- a/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec
+++ b/protocols/simulated/src/main/resources/protocols/simulated/simulated.mspec
@@ -19,6 +19,10 @@
// Remark: The different fields are encoded in Big-endian.
+[type 'Dummy'
+ [simple uint 16 'dummy']
+]
+
[dataIo 'DataItem' [string '-1' 'dataType', uint 16 'numberOfValues']
[typeSwitch 'dataType','numberOfValues'
['BOOL','1' BOOL
@@ -158,6 +162,6 @@
['23' LDATE_AND_TIME ['8']]
['24' CHAR ['1']]
['25' WCHAR ['2']]
- ['26' STRING ['256']]
+ ['26' STRING ['255']]
['27' WSTRING ['127']]
]