Skip to content

Commit

Permalink
fix(cbus): fixed length calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Jul 27, 2022
1 parent 55807bb commit 30aa269
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions plc4go/protocols/cbus/readwrite/model/ReplyEncodedReply.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plc4go/protocols/cbus/readwrite/model/RequestCommand.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plc4go/protocols/cbus/readwrite/model/RequestObsolete.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions protocols/c-bus/src/main/resources/protocols/cbus/c-bus.mspec
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@
calData
'STATIC_CALL("readCALData", readBuffer)'
'STATIC_CALL("writeCALData", writeBuffer, calData)'
'(_value.lengthInBytes*2)*8' ]
'(calData.lengthInBytes*2)*8' ]
]
['REQUEST_COMMAND' *Command
[const byte initiator 0x5C ] // 0x5C == "/"
[manual CBusCommand
cbusCommand
'STATIC_CALL("readCBusCommand", readBuffer, cBusOptions, cBusOptions.srchk)'
'STATIC_CALL("writeCBusCommand", writeBuffer, cbusCommand)'
'(_value.lengthInBytes*2)*8' ]
'(cbusCommand.lengthInBytes*2)*8' ]
[manual Checksum
chksum
'STATIC_CALL("readAndValidateChecksum", readBuffer, cbusCommand, cBusOptions.srchk)'
'STATIC_CALL("calculateChecksum", writeBuffer, cbusCommand, cBusOptions.srchk)'
'8' ]
'cBusOptions.srchk?16:0' ]
[optional Alpha alpha ]
]
['NULL' *Null
Expand All @@ -115,7 +115,7 @@
calData
'STATIC_CALL("readCALData", readBuffer)'
'STATIC_CALL("writeCALData", writeBuffer, calData)'
'(_value.lengthInBytes*2)*8' ]
'(calData.lengthInBytes*2)*8' ]
[optional Alpha alpha ]
]
]
Expand Down Expand Up @@ -1401,12 +1401,12 @@
encodedReply
'STATIC_CALL("readEncodedReply", readBuffer, cBusOptions, requestContext, cBusOptions.srchk)'
'STATIC_CALL("writeEncodedReply", writeBuffer, encodedReply)'
'(_value.lengthInBytes*2)*8' ]
'(encodedReply.lengthInBytes*2)*8' ]
[manual Checksum
chksum
'STATIC_CALL("readAndValidateChecksum", readBuffer, encodedReply, cBusOptions.srchk)'
'STATIC_CALL("calculateChecksum", writeBuffer, encodedReply, cBusOptions.srchk)'
'8' ]
'cBusOptions.srchk?16:0' ]
]
]
]
Expand Down

0 comments on commit 30aa269

Please sign in to comment.