Skip to content

Commit

Permalink
fix(plc-simulator/cbus): fixed simulator returning wrong data
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Aug 5, 2022
1 parent 8b9da2a commit fa96517
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,14 @@ private void startMMIMonitor(ChannelHandlerContext ctx) {
CALReply calReply;
if (cBusOptions.getExstat()) {
List<StatusByte> statusBytes = new LinkedList<>();
for (int i = 0; i < 21; i++) {
for (int i = 0; i < 22; i++) {
statusBytes.add(new StatusByte(GAVState.ON, GAVState.ERROR, GAVState.OFF, GAVState.DOES_NOT_EXIST));
}
CALData calData = new CALDataStatusExtended(CALCommandTypeContainer.CALCommandStatusExtended_25Bytes, null, StatusCoding.BINARY_BY_ELSEWHERE, ApplicationIdContainer.LIGHTING_38, (byte) 0x00, statusBytes, null, requestContext);
calReply = new CALReplyLong((byte) 0x86, calData, 0x00, new UnitAddress((byte) 0x04), null, new SerialInterfaceAddress((byte) 0x02), (byte) 0x00, null, cBusOptions, requestContext);
} else {
List<StatusByte> statusBytes = new LinkedList<>();
for (int i = 0; i < 22; i++) {
for (int i = 0; i < 23; i++) {
statusBytes.add(new StatusByte(GAVState.ON, GAVState.ERROR, GAVState.OFF, GAVState.DOES_NOT_EXIST));
}
CALData calData = new CALDataStatus(CALCommandTypeContainer.CALCommandStatus_25Bytes, null, ApplicationIdContainer.LIGHTING_38, (byte) 0x00, statusBytes, requestContext);
Expand Down

0 comments on commit fa96517

Please sign in to comment.