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/05/31 12:45:36 UTC
[plc4x] branch feature/code-gen updated: - Updated the spec to not
rely on context fields.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/code-gen
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/code-gen by this push:
new ed40dff - Updated the spec to not rely on context fields.
ed40dff is described below
commit ed40dff6a5fdb1b17c0d6fd9c66f1def062f5336
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri May 31 14:45:27 2019 +0200
- Updated the spec to not rely on context fields.
---
.../src/main/resources/protocols/s7/protocol.spec | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sandbox/code-generation/protocol-s7/src/main/resources/protocols/s7/protocol.spec b/sandbox/code-generation/protocol-s7/src/main/resources/protocols/s7/protocol.spec
index e95c5bf..fae81f4 100644
--- a/sandbox/code-generation/protocol-s7/src/main/resources/protocols/s7/protocol.spec
+++ b/sandbox/code-generation/protocol-s7/src/main/resources/protocols/s7/protocol.spec
@@ -83,15 +83,12 @@
[implicit uint 16 'payloadLength' 'payloads.size']
[typeSwitch 'messageType'
['0x01' S7MessageRequest
- [context string 'messageType' '"request"']
]
['0x03' S7MessageResponse
- [context string 'messageType' '"response"']
[field uint 8 'errorClass']
[field uint 8 'errorCode']
]
['0x07' S7MessageUserData
- [context string 'messageType' '"userData"']
]
]
[field S7Parameter 'parameter' ['messageType']]
@@ -110,21 +107,21 @@
[field uint 16 'maxAmqCallee']
[field uint 16 'pduLength']
]
- ['0x04','request' S7ParameterReadVarRequest
+ ['0x04','0x01' S7ParameterReadVarRequest
[implicit uint 8 'numItems' 'items.size']
[arrayField S7VarRequestParameterItem 'items' count 'numItems']
]
- ['0x04','response' S7ParameterReadVarResponse
+ ['0x04','0x03' S7ParameterReadVarResponse
[field uint 8 'numItems']
]
- ['0x05','request' S7ParameterWriteVarRequest
+ ['0x05','0x01' S7ParameterWriteVarRequest
[implicit uint 8 'numItems' 'items.size']
[arrayField S7VarRequestParameterItem 'items' count 'numItems']
]
- ['0x05','response' S7ParameterWriteVarResponse
+ ['0x05','0x03' S7ParameterWriteVarResponse
[field uint 8 'numItems']
]
- ['0x00','userData' S7ParameterUserData
+ ['0x00','0x07' S7ParameterUserData
[implicit uint 8 'numItems' 'items.size']
[arrayField UserDataItem 'items' count 'numItems']
]