Skip to content

Commit

Permalink
fix(plc4go/test): fixed s7io test
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl authored and chrisdutz committed Nov 17, 2021
1 parent ada0abd commit 73cc47f
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions plc4go/internal/plc4go/s7/s7Io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,29 @@ func TestS7MessageBytes(t *testing.T) {
"tpduRef__plc4x_bitLength": 7,
"tpduRef__plc4x_dataType": "uint"
},
"headerLength": 5,
"headerLength__plc4x_bitLength": 8,
"headerLength__plc4x_dataType": "uint",
"parameters": [
{
"COTPParameter": {
"COTPParameterTpduSize": {
"tpduSize": {
"COTPTpduSize": 12,
"COTPTpduSize__plc4x_bitLength": 8,
"COTPTpduSize__plc4x_dataType": "int",
"COTPTpduSize__plc4x_stringRepresentation": "SIZE_4096"
}
},
"parameterLength": 1,
"parameterLength__plc4x_bitLength": 8,
"parameterLength__plc4x_dataType": "uint",
"parameterType": 192,
"parameterType__plc4x_bitLength": 8,
"parameterType__plc4x_dataType": "uint"
}
}
],
"payload": {
"S7Message": {
"S7MessageResponseData": {
Expand All @@ -263,6 +286,9 @@ func TestS7MessageBytes(t *testing.T) {
"errorCode__plc4x_bitLength": 8,
"errorCode__plc4x_dataType": "uint"
},
"messageType": 3,
"messageType__plc4x_bitLength": 8,
"messageType__plc4x_dataType": "uint",
"parameter": {
"S7Parameter": {
"S7ParameterReadVarResponse": {
Expand All @@ -275,6 +301,9 @@ func TestS7MessageBytes(t *testing.T) {
"parameterType__plc4x_dataType": "uint"
}
},
"parameterLength": 2,
"parameterLength__plc4x_bitLength": 16,
"parameterLength__plc4x_dataType": "uint",
"payload": {
"S7Payload": {
"S7PayloadReadVarResponse": {
Expand All @@ -289,9 +318,9 @@ func TestS7MessageBytes(t *testing.T) {
"data__plc4x_dataType": "byte",
"padding": [
{
"value__plc4x_dataType": "uint",
"value": 0,
"value__plc4x_bitLength": 8,
"value": 0
"value__plc4x_dataType": "uint"
}
],
"returnCode": {
Expand All @@ -312,12 +341,6 @@ func TestS7MessageBytes(t *testing.T) {
}
}
},
"messageType": 3,
"messageType__plc4x_bitLength": 8,
"messageType__plc4x_dataType": "uint",
"parameterLength": 2,
"parameterLength__plc4x_bitLength": 16,
"parameterLength__plc4x_dataType": "uint",
"payloadLength": 6,
"payloadLength__plc4x_bitLength": 16,
"payloadLength__plc4x_dataType": "uint",
Expand All @@ -332,29 +355,6 @@ func TestS7MessageBytes(t *testing.T) {
"tpduReference__plc4x_dataType": "uint"
}
},
"headerLength": 5,
"headerLength__plc4x_bitLength": 8,
"headerLength__plc4x_dataType": "uint",
"parameters": [
{
"COTPParameter": {
"COTPParameterTpduSize": {
"tpduSize": {
"COTPTpduSize": 12,
"COTPTpduSize__plc4x_bitLength": 8,
"COTPTpduSize__plc4x_dataType": "int",
"COTPTpduSize__plc4x_stringRepresentation": "SIZE_4096"
}
},
"parameterLength": 1,
"parameterLength__plc4x_bitLength": 8,
"parameterLength__plc4x_dataType": "uint",
"parameterType": 192,
"parameterType__plc4x_bitLength": 8,
"parameterType__plc4x_dataType": "uint"
}
}
],
"tpduCode": 240,
"tpduCode__plc4x_bitLength": 8,
"tpduCode__plc4x_dataType": "uint"
Expand All @@ -370,9 +370,9 @@ func TestS7MessageBytes(t *testing.T) {
}
`,
wantDump: `
00|03 00 00 1d 05 f0 0d c0 01 0c '..........'
10|32 03 00 00 00 0b 00 02 00 05 '2.........'
20|00 00 04 01 ff 03 00 01 01 '......... '
00|03 00 00 1e 05 f0 0d c0 01 0c '..........'
10|32 03 00 00 00 0b 00 02 00 06 '2.........'
20|00 00 04 01 ff 03 00 01 01 00 '..........'
`,
},
{
Expand Down

0 comments on commit 73cc47f

Please sign in to comment.