diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDU.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDU.java index 5d39eb13567..d993c7fef27 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDU.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDU.java @@ -38,13 +38,20 @@ public abstract class APDU implements Message { // Abstract accessors for discriminator values. - public abstract Integer getCommand(); // Constant values. - public static final Short STARTBYTE = 0x86; + public static final Short STARTBYTE = 0x68; - public APDU() { + // Properties. + protected final int command; + + public APDU(int command) { super(); + this.command = command; + } + + public int getCommand() { + return command; } public short getStartByte() { @@ -74,10 +81,10 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeUnsignedShort(writeBuffer, 8), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - // Discriminator Field (command) (Used as input to a switch field) - writeDiscriminatorField( + // Simple Field (command) + writeSimpleField( "command", - getCommand(), + command, writeUnsignedInt(writeBuffer, 16), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); @@ -104,7 +111,7 @@ public int getLengthInBits() { // Implicit Field (apciLength) lengthInBits += 8; - // Discriminator Field (command) + // Simple field (command) lengthInBits += 16; // Length of sub-type elements will be added by sub-type... @@ -136,7 +143,7 @@ public static APDU staticParse(ReadBuffer readBuffer) throws ParseException { WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); int command = - readDiscriminatorField( + readSimpleField( "command", readUnsignedInt(readBuffer, 16), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); @@ -157,7 +164,7 @@ public static APDU staticParse(ReadBuffer readBuffer) throws ParseException { builder = APDUUFormatStartDataTransferConfirmation.staticParseAPDUBuilder(readBuffer); } else if (EvaluationHelper.equals(command, (int) 0x01)) { builder = APDUSFormat.staticParseAPDUBuilder(readBuffer); - } else { + } else if (true) { builder = APDUIFormat.staticParseAPDUBuilder(readBuffer); } if (builder == null) { @@ -167,12 +174,12 @@ public static APDU staticParse(ReadBuffer readBuffer) throws ParseException { readBuffer.closeContext("APDU"); // Create the instance - APDU _aPDU = builder.build(); + APDU _aPDU = builder.build(command); return _aPDU; } public interface APDUBuilder { - APDU build(); + APDU build(int command); } @Override @@ -184,12 +191,12 @@ public boolean equals(Object o) { return false; } APDU that = (APDU) o; - return true; + return (getCommand() == that.getCommand()) && true; } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(getCommand()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUIFormat.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUIFormat.java index 5daaf01eb37..af2641c1047 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUIFormat.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUIFormat.java @@ -38,16 +38,13 @@ public class APDUIFormat extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return 0; - } // Properties. protected final int receiveSequenceNo; protected final ASDU asdu; - public APDUIFormat(int receiveSequenceNo, ASDU asdu) { - super(); + public APDUIFormat(int command, int receiveSequenceNo, ASDU asdu) { + super(command); this.receiveSequenceNo = receiveSequenceNo; this.asdu = asdu; } @@ -134,8 +131,8 @@ public APDUIFormatBuilderImpl(int receiveSequenceNo, ASDU asdu) { this.asdu = asdu; } - public APDUIFormat build() { - APDUIFormat aPDUIFormat = new APDUIFormat(receiveSequenceNo, asdu); + public APDUIFormat build(int command) { + APDUIFormat aPDUIFormat = new APDUIFormat(command, receiveSequenceNo, asdu); return aPDUIFormat; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUSFormat.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUSFormat.java index 1a454d41fde..92d7d3ef363 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUSFormat.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUSFormat.java @@ -38,15 +38,12 @@ public class APDUSFormat extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return (int) 0x01; - } // Properties. protected final int receiveSequenceNo; - public APDUSFormat(int receiveSequenceNo) { - super(); + public APDUSFormat(int command, int receiveSequenceNo) { + super(command); this.receiveSequenceNo = receiveSequenceNo; } @@ -110,8 +107,8 @@ public APDUSFormatBuilderImpl(int receiveSequenceNo) { this.receiveSequenceNo = receiveSequenceNo; } - public APDUSFormat build() { - APDUSFormat aPDUSFormat = new APDUSFormat(receiveSequenceNo); + public APDUSFormat build(int command) { + APDUSFormat aPDUSFormat = new APDUSFormat(command, receiveSequenceNo); return aPDUSFormat; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferActivation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferActivation.java index 27ebdbe4391..bd964db7a01 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferActivation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferActivation.java @@ -38,12 +38,9 @@ public class APDUUFormatStartDataTransferActivation extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return (int) 0x07; - } - public APDUUFormatStartDataTransferActivation() { - super(); + public APDUUFormatStartDataTransferActivation(int command) { + super(command); } @Override @@ -103,9 +100,9 @@ public static class APDUUFormatStartDataTransferActivationBuilderImpl public APDUUFormatStartDataTransferActivationBuilderImpl() {} - public APDUUFormatStartDataTransferActivation build() { + public APDUUFormatStartDataTransferActivation build(int command) { APDUUFormatStartDataTransferActivation aPDUUFormatStartDataTransferActivation = - new APDUUFormatStartDataTransferActivation(); + new APDUUFormatStartDataTransferActivation(command); return aPDUUFormatStartDataTransferActivation; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferConfirmation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferConfirmation.java index 768f6e84d64..a02f60db282 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferConfirmation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStartDataTransferConfirmation.java @@ -38,12 +38,9 @@ public class APDUUFormatStartDataTransferConfirmation extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return (int) 0x0B; - } - public APDUUFormatStartDataTransferConfirmation() { - super(); + public APDUUFormatStartDataTransferConfirmation(int command) { + super(command); } @Override @@ -103,9 +100,9 @@ public static class APDUUFormatStartDataTransferConfirmationBuilderImpl public APDUUFormatStartDataTransferConfirmationBuilderImpl() {} - public APDUUFormatStartDataTransferConfirmation build() { + public APDUUFormatStartDataTransferConfirmation build(int command) { APDUUFormatStartDataTransferConfirmation aPDUUFormatStartDataTransferConfirmation = - new APDUUFormatStartDataTransferConfirmation(); + new APDUUFormatStartDataTransferConfirmation(command); return aPDUUFormatStartDataTransferConfirmation; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferActivation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferActivation.java index 6aaddaea9d8..7dfeda37ecf 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferActivation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferActivation.java @@ -38,12 +38,9 @@ public class APDUUFormatStopDataTransferActivation extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return (int) 0x13; - } - public APDUUFormatStopDataTransferActivation() { - super(); + public APDUUFormatStopDataTransferActivation(int command) { + super(command); } @Override @@ -102,9 +99,9 @@ public static class APDUUFormatStopDataTransferActivationBuilderImpl implements public APDUUFormatStopDataTransferActivationBuilderImpl() {} - public APDUUFormatStopDataTransferActivation build() { + public APDUUFormatStopDataTransferActivation build(int command) { APDUUFormatStopDataTransferActivation aPDUUFormatStopDataTransferActivation = - new APDUUFormatStopDataTransferActivation(); + new APDUUFormatStopDataTransferActivation(command); return aPDUUFormatStopDataTransferActivation; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferConfirmation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferConfirmation.java index 1ecaf171b86..cb788e3e6a9 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferConfirmation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatStopDataTransferConfirmation.java @@ -38,12 +38,9 @@ public class APDUUFormatStopDataTransferConfirmation extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return (int) 0x23; - } - public APDUUFormatStopDataTransferConfirmation() { - super(); + public APDUUFormatStopDataTransferConfirmation(int command) { + super(command); } @Override @@ -103,9 +100,9 @@ public static class APDUUFormatStopDataTransferConfirmationBuilderImpl public APDUUFormatStopDataTransferConfirmationBuilderImpl() {} - public APDUUFormatStopDataTransferConfirmation build() { + public APDUUFormatStopDataTransferConfirmation build(int command) { APDUUFormatStopDataTransferConfirmation aPDUUFormatStopDataTransferConfirmation = - new APDUUFormatStopDataTransferConfirmation(); + new APDUUFormatStopDataTransferConfirmation(command); return aPDUUFormatStopDataTransferConfirmation; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameActivation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameActivation.java index e1585b88d74..e01cb88b50d 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameActivation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameActivation.java @@ -38,12 +38,9 @@ public class APDUUFormatTestFrameActivation extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return (int) 0x43; - } - public APDUUFormatTestFrameActivation() { - super(); + public APDUUFormatTestFrameActivation(int command) { + super(command); } @Override @@ -102,9 +99,9 @@ public static class APDUUFormatTestFrameActivationBuilderImpl implements APDU.AP public APDUUFormatTestFrameActivationBuilderImpl() {} - public APDUUFormatTestFrameActivation build() { + public APDUUFormatTestFrameActivation build(int command) { APDUUFormatTestFrameActivation aPDUUFormatTestFrameActivation = - new APDUUFormatTestFrameActivation(); + new APDUUFormatTestFrameActivation(command); return aPDUUFormatTestFrameActivation; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameConfirmation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameConfirmation.java index 5a3fd7630db..fd139b5ebbf 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameConfirmation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/APDUUFormatTestFrameConfirmation.java @@ -38,12 +38,9 @@ public class APDUUFormatTestFrameConfirmation extends APDU implements Message { // Accessors for discriminator values. - public Integer getCommand() { - return (int) 0x83; - } - public APDUUFormatTestFrameConfirmation() { - super(); + public APDUUFormatTestFrameConfirmation(int command) { + super(command); } @Override @@ -102,9 +99,9 @@ public static class APDUUFormatTestFrameConfirmationBuilderImpl implements APDU. public APDUUFormatTestFrameConfirmationBuilderImpl() {} - public APDUUFormatTestFrameConfirmation build() { + public APDUUFormatTestFrameConfirmation build(int command) { APDUUFormatTestFrameConfirmation aPDUUFormatTestFrameConfirmation = - new APDUUFormatTestFrameConfirmation(); + new APDUUFormatTestFrameConfirmation(command); return aPDUUFormatTestFrameConfirmation; } } diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ASDU.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ASDU.java index 7b47d584651..698be607d60 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ASDU.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ASDU.java @@ -112,21 +112,35 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { new DataWriterEnumDefault<>( TypeIdentification::getValue, TypeIdentification::name, - writeUnsignedShort(writeBuffer, 8))); + writeUnsignedShort(writeBuffer, 8)), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (structureQualifier) - writeSimpleField("structureQualifier", structureQualifier, writeBoolean(writeBuffer)); + writeSimpleField( + "structureQualifier", + structureQualifier, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Implicit Field (numberOfObjects) (Used for parsing, but its value is not stored as it's // implicitly given by the objects content) byte numberOfObjects = (byte) (COUNT(getInformationObjects())); - writeImplicitField("numberOfObjects", numberOfObjects, writeUnsignedByte(writeBuffer, 7)); + writeImplicitField( + "numberOfObjects", + numberOfObjects, + writeUnsignedByte(writeBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (test) - writeSimpleField("test", test, writeBoolean(writeBuffer)); + writeSimpleField( + "test", test, writeBoolean(writeBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (negative) - writeSimpleField("negative", negative, writeBoolean(writeBuffer)); + writeSimpleField( + "negative", + negative, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (causeOfTransmission) writeSimpleEnumField( @@ -136,16 +150,29 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { new DataWriterEnumDefault<>( CauseOfTransmission::getValue, CauseOfTransmission::name, - writeUnsignedByte(writeBuffer, 6))); + writeUnsignedByte(writeBuffer, 6)), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (originatorAddress) - writeSimpleField("originatorAddress", originatorAddress, writeUnsignedShort(writeBuffer, 8)); + writeSimpleField( + "originatorAddress", + originatorAddress, + writeUnsignedShort(writeBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (asduAddressField) - writeSimpleField("asduAddressField", asduAddressField, writeUnsignedInt(writeBuffer, 16)); + writeSimpleField( + "asduAddressField", + asduAddressField, + writeUnsignedInt(writeBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Array Field (informationObjects) - writeComplexTypeArrayField("informationObjects", informationObjects, writeBuffer); + writeComplexTypeArrayField( + "informationObjects", + informationObjects, + writeBuffer, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("ASDU"); } @@ -212,34 +239,59 @@ public static ASDU staticParse(ReadBuffer readBuffer) throws ParseException { "typeIdentification", "TypeIdentification", new DataReaderEnumDefault<>( - TypeIdentification::enumForValue, readUnsignedShort(readBuffer, 8))); + TypeIdentification::enumForValue, readUnsignedShort(readBuffer, 8)), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - boolean structureQualifier = readSimpleField("structureQualifier", readBoolean(readBuffer)); + boolean structureQualifier = + readSimpleField( + "structureQualifier", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - byte numberOfObjects = readImplicitField("numberOfObjects", readUnsignedByte(readBuffer, 7)); + byte numberOfObjects = + readImplicitField( + "numberOfObjects", + readUnsignedByte(readBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - boolean test = readSimpleField("test", readBoolean(readBuffer)); + boolean test = + readSimpleField( + "test", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - boolean negative = readSimpleField("negative", readBoolean(readBuffer)); + boolean negative = + readSimpleField( + "negative", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); CauseOfTransmission causeOfTransmission = readEnumField( "causeOfTransmission", "CauseOfTransmission", new DataReaderEnumDefault<>( - CauseOfTransmission::enumForValue, readUnsignedByte(readBuffer, 6))); + CauseOfTransmission::enumForValue, readUnsignedByte(readBuffer, 6)), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); short originatorAddress = - readSimpleField("originatorAddress", readUnsignedShort(readBuffer, 8)); + readSimpleField( + "originatorAddress", + readUnsignedShort(readBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - int asduAddressField = readSimpleField("asduAddressField", readUnsignedInt(readBuffer, 16)); + int asduAddressField = + readSimpleField( + "asduAddressField", + readUnsignedInt(readBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); List informationObjects = readCountArrayField( "informationObjects", new DataReaderComplexDefault<>( - () -> InformationObject.staticParse(readBuffer), readBuffer), - numberOfObjects); + () -> + InformationObject.staticParse( + readBuffer, (TypeIdentification) (typeIdentification)), + readBuffer), + numberOfObjects, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("ASDU"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryCounterReading.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryCounterReading.java index 6e87c17a711..38a8da6bcfe 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryCounterReading.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryCounterReading.java @@ -84,19 +84,39 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("BinaryCounterReading"); // Simple Field (counterValue) - writeSimpleField("counterValue", counterValue, writeUnsignedLong(writeBuffer, 32)); + writeSimpleField( + "counterValue", + counterValue, + writeUnsignedLong(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (counterValid) - writeSimpleField("counterValid", counterValid, writeBoolean(writeBuffer)); + writeSimpleField( + "counterValid", + counterValid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (counterAdjusted) - writeSimpleField("counterAdjusted", counterAdjusted, writeBoolean(writeBuffer)); + writeSimpleField( + "counterAdjusted", + counterAdjusted, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (carry) - writeSimpleField("carry", carry, writeBoolean(writeBuffer)); + writeSimpleField( + "carry", + carry, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (sequenceNumber) - writeSimpleField("sequenceNumber", sequenceNumber, writeUnsignedByte(writeBuffer, 5)); + writeSimpleField( + "sequenceNumber", + sequenceNumber, + writeUnsignedByte(writeBuffer, 5), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("BinaryCounterReading"); } @@ -141,15 +161,33 @@ public static BinaryCounterReading staticParse(ReadBuffer readBuffer) throws Par PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - long counterValue = readSimpleField("counterValue", readUnsignedLong(readBuffer, 32)); - - boolean counterValid = readSimpleField("counterValid", readBoolean(readBuffer)); - - boolean counterAdjusted = readSimpleField("counterAdjusted", readBoolean(readBuffer)); - - boolean carry = readSimpleField("carry", readBoolean(readBuffer)); - - byte sequenceNumber = readSimpleField("sequenceNumber", readUnsignedByte(readBuffer, 5)); + long counterValue = + readSimpleField( + "counterValue", + readUnsignedLong(readBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean counterValid = + readSimpleField( + "counterValid", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean counterAdjusted = + readSimpleField( + "counterAdjusted", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean carry = + readSimpleField( + "carry", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + byte sequenceNumber = + readSimpleField( + "sequenceNumber", + readUnsignedByte(readBuffer, 5), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("BinaryCounterReading"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryStateInformation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryStateInformation.java index bd507a9c1ae..f78c758fc2b 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryStateInformation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/BinaryStateInformation.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("BinaryStateInformation"); // Simple Field (bits) - writeSimpleField("bits", bits, writeUnsignedLong(writeBuffer, 32)); + writeSimpleField( + "bits", + bits, + writeUnsignedLong(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("BinaryStateInformation"); } @@ -88,7 +92,11 @@ public static BinaryStateInformation staticParse(ReadBuffer readBuffer) throws P PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - long bits = readSimpleField("bits", readUnsignedLong(readBuffer, 32)); + long bits = + readSimpleField( + "bits", + readUnsignedLong(readBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("BinaryStateInformation"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/CauseOfInitialization.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/CauseOfInitialization.java index ad376a9d0e5..babee330be0 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/CauseOfInitialization.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/CauseOfInitialization.java @@ -61,10 +61,18 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("CauseOfInitialization"); // Simple Field (select) - writeSimpleField("select", select, writeBoolean(writeBuffer)); + writeSimpleField( + "select", + select, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (qualifier) - writeSimpleField("qualifier", qualifier, writeUnsignedByte(writeBuffer, 7)); + writeSimpleField( + "qualifier", + qualifier, + writeUnsignedByte(writeBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("CauseOfInitialization"); } @@ -100,9 +108,15 @@ public static CauseOfInitialization staticParse(ReadBuffer readBuffer) throws Pa PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean select = readSimpleField("select", readBoolean(readBuffer)); + boolean select = + readSimpleField( + "select", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - byte qualifier = readSimpleField("qualifier", readUnsignedByte(readBuffer, 7)); + byte qualifier = + readSimpleField( + "qualifier", + readUnsignedByte(readBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("CauseOfInitialization"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/DoublePointInformation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/DoublePointInformation.java index 60007bee811..42495bed607 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/DoublePointInformation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/DoublePointInformation.java @@ -80,22 +80,46 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("DoublePointInformation"); // Simple Field (invalid) - writeSimpleField("invalid", invalid, writeBoolean(writeBuffer)); + writeSimpleField( + "invalid", + invalid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (notTopical) - writeSimpleField("notTopical", notTopical, writeBoolean(writeBuffer)); + writeSimpleField( + "notTopical", + notTopical, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (substituted) - writeSimpleField("substituted", substituted, writeBoolean(writeBuffer)); + writeSimpleField( + "substituted", + substituted, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (blocked) - writeSimpleField("blocked", blocked, writeBoolean(writeBuffer)); + writeSimpleField( + "blocked", + blocked, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Reserved Field (reserved) - writeReservedField("reserved", (byte) 0, writeUnsignedByte(writeBuffer, 2)); + writeReservedField( + "reserved", + (byte) 0, + writeUnsignedByte(writeBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (dpiCode) - writeSimpleField("dpiCode", dpiCode, writeUnsignedByte(writeBuffer, 2)); + writeSimpleField( + "dpiCode", + dpiCode, + writeUnsignedByte(writeBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("DoublePointInformation"); } @@ -143,17 +167,38 @@ public static DoublePointInformation staticParse(ReadBuffer readBuffer) throws P PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean invalid = readSimpleField("invalid", readBoolean(readBuffer)); - - boolean notTopical = readSimpleField("notTopical", readBoolean(readBuffer)); - - boolean substituted = readSimpleField("substituted", readBoolean(readBuffer)); - - boolean blocked = readSimpleField("blocked", readBoolean(readBuffer)); - - Byte reservedField0 = readReservedField("reserved", readUnsignedByte(readBuffer, 2), (byte) 0); - - byte dpiCode = readSimpleField("dpiCode", readUnsignedByte(readBuffer, 2)); + boolean invalid = + readSimpleField( + "invalid", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean notTopical = + readSimpleField( + "notTopical", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean substituted = + readSimpleField( + "substituted", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean blocked = + readSimpleField( + "blocked", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + Byte reservedField0 = + readReservedField( + "reserved", + readUnsignedByte(readBuffer, 2), + (byte) 0, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + byte dpiCode = + readSimpleField( + "dpiCode", + readUnsignedByte(readBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("DoublePointInformation"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/FixedTestBitPatternTwoOctet.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/FixedTestBitPatternTwoOctet.java index 67aa60fde6d..2312edf259a 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/FixedTestBitPatternTwoOctet.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/FixedTestBitPatternTwoOctet.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("FixedTestBitPatternTwoOctet"); // Simple Field (pattern) - writeSimpleField("pattern", pattern, writeUnsignedInt(writeBuffer, 16)); + writeSimpleField( + "pattern", + pattern, + writeUnsignedInt(writeBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("FixedTestBitPatternTwoOctet"); } @@ -89,7 +93,11 @@ public static FixedTestBitPatternTwoOctet staticParse(ReadBuffer readBuffer) PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - int pattern = readSimpleField("pattern", readUnsignedInt(readBuffer, 16)); + int pattern = + readSimpleField( + "pattern", + readUnsignedInt(readBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("FixedTestBitPatternTwoOctet"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject.java index 9e9a5b8d6dd..d08b0ad14cb 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject.java @@ -61,7 +61,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("InformationObject"); // Simple Field (address) - writeSimpleField("address", address, writeUnsignedInt(writeBuffer, 24)); + writeSimpleField( + "address", + address, + writeUnsignedInt(writeBuffer, 24), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Switch field (Serialize the sub-type) serializeInformationObjectChild(writeBuffer); @@ -115,7 +119,11 @@ public static InformationObject staticParse( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - int address = readSimpleField("address", readUnsignedInt(readBuffer, 24)); + int address = + readSimpleField( + "address", + readUnsignedInt(readBuffer, 24), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type) InformationObjectBuilder builder = null; diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_ACK_FILE_ACK_SECTION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_ACK_FILE_ACK_SECTION.java index 1b4f0d41df5..7a0338422fa 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_ACK_FILE_ACK_SECTION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_ACK_FILE_ACK_SECTION.java @@ -42,8 +42,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.ACK_FILE_ACK_SECTION; } - public InformationObject_ACK_FILE_ACK_SECTION(int address) { + // Properties. + protected final NameOfFile nof; + protected final NameOfSection nos; + protected final AcknowledgeFileOrSectionQualifier afq; + + public InformationObject_ACK_FILE_ACK_SECTION( + int address, NameOfFile nof, NameOfSection nos, AcknowledgeFileOrSectionQualifier afq) { super(address); + this.nof = nof; + this.nos = nos; + this.afq = afq; + } + + public NameOfFile getNof() { + return nof; + } + + public NameOfSection getNos() { + return nos; + } + + public AcknowledgeFileOrSectionQualifier getAfq() { + return afq; } @Override @@ -53,6 +74,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_ACK_FILE_ACK_SECTION"); + // Simple Field (nof) + writeSimpleField( + "nof", + nof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (nos) + writeSimpleField( + "nos", + nos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (afq) + writeSimpleField( + "afq", + afq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_ACK_FILE_ACK_SECTION"); } @@ -67,6 +109,15 @@ public int getLengthInBits() { InformationObject_ACK_FILE_ACK_SECTION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nof) + lengthInBits += nof.getLengthInBits(); + + // Simple field (nos) + lengthInBits += nos.getLengthInBits(); + + // Simple field (afq) + lengthInBits += afq.getLengthInBits(); + return lengthInBits; } @@ -76,19 +127,46 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NameOfFile nof = + readSimpleField( + "nof", + new DataReaderComplexDefault<>(() -> NameOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + NameOfSection nos = + readSimpleField( + "nos", + new DataReaderComplexDefault<>(() -> NameOfSection.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + AcknowledgeFileOrSectionQualifier afq = + readSimpleField( + "afq", + new DataReaderComplexDefault<>( + () -> AcknowledgeFileOrSectionQualifier.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_ACK_FILE_ACK_SECTION"); // Create the instance - return new InformationObject_ACK_FILE_ACK_SECTIONBuilderImpl(); + return new InformationObject_ACK_FILE_ACK_SECTIONBuilderImpl(nof, nos, afq); } public static class InformationObject_ACK_FILE_ACK_SECTIONBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_ACK_FILE_ACK_SECTIONBuilderImpl() {} + private final NameOfFile nof; + private final NameOfSection nos; + private final AcknowledgeFileOrSectionQualifier afq; + + public InformationObject_ACK_FILE_ACK_SECTIONBuilderImpl( + NameOfFile nof, NameOfSection nos, AcknowledgeFileOrSectionQualifier afq) { + this.nof = nof; + this.nos = nos; + this.afq = afq; + } public InformationObject_ACK_FILE_ACK_SECTION build(int address) { InformationObject_ACK_FILE_ACK_SECTION informationObject_ACK_FILE_ACK_SECTION = - new InformationObject_ACK_FILE_ACK_SECTION(address); + new InformationObject_ACK_FILE_ACK_SECTION(address, nof, nos, afq); return informationObject_ACK_FILE_ACK_SECTION; } } @@ -102,12 +180,16 @@ public boolean equals(Object o) { return false; } InformationObject_ACK_FILE_ACK_SECTION that = (InformationObject_ACK_FILE_ACK_SECTION) o; - return super.equals(that) && true; + return (getNof() == that.getNof()) + && (getNos() == that.getNos()) + && (getAfq() == that.getAfq()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNof(), getNos(), getAfq()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_32_BIT_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_32_BIT_COMMAND.java index 6cca469fd6d..0bb4d7e0e43 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_32_BIT_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_32_BIT_COMMAND.java @@ -43,8 +43,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.BITSTRING_32_BIT_COMMAND; } - public InformationObject_BITSTRING_32_BIT_COMMAND(int address) { + // Properties. + protected final BinaryStateInformation bsi; + + public InformationObject_BITSTRING_32_BIT_COMMAND(int address, BinaryStateInformation bsi) { super(address); + this.bsi = bsi; + } + + public BinaryStateInformation getBsi() { + return bsi; } @Override @@ -54,6 +62,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_BITSTRING_32_BIT_COMMAND"); + // Simple Field (bsi) + writeSimpleField( + "bsi", + bsi, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_BITSTRING_32_BIT_COMMAND"); } @@ -68,6 +83,9 @@ public int getLengthInBits() { InformationObject_BITSTRING_32_BIT_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (bsi) + lengthInBits += bsi.getLengthInBits(); + return lengthInBits; } @@ -77,19 +95,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + BinaryStateInformation bsi = + readSimpleField( + "bsi", + new DataReaderComplexDefault<>( + () -> BinaryStateInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_BITSTRING_32_BIT_COMMAND"); // Create the instance - return new InformationObject_BITSTRING_32_BIT_COMMANDBuilderImpl(); + return new InformationObject_BITSTRING_32_BIT_COMMANDBuilderImpl(bsi); } public static class InformationObject_BITSTRING_32_BIT_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final BinaryStateInformation bsi; - public InformationObject_BITSTRING_32_BIT_COMMANDBuilderImpl() {} + public InformationObject_BITSTRING_32_BIT_COMMANDBuilderImpl(BinaryStateInformation bsi) { + this.bsi = bsi; + } public InformationObject_BITSTRING_32_BIT_COMMAND build(int address) { InformationObject_BITSTRING_32_BIT_COMMAND informationObject_BITSTRING_32_BIT_COMMAND = - new InformationObject_BITSTRING_32_BIT_COMMAND(address); + new InformationObject_BITSTRING_32_BIT_COMMAND(address, bsi); return informationObject_BITSTRING_32_BIT_COMMAND; } } @@ -104,12 +132,12 @@ public boolean equals(Object o) { } InformationObject_BITSTRING_32_BIT_COMMAND that = (InformationObject_BITSTRING_32_BIT_COMMAND) o; - return super.equals(that) && true; + return (getBsi() == that.getBsi()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getBsi()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT.java index 1874082db06..9c7f11da3d8 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT.java @@ -42,8 +42,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.BITSTRING_OF_32_BIT; } - public InformationObject_BITSTRING_OF_32_BIT(int address) { + // Properties. + protected final BinaryStateInformation bsi; + protected final QualityDescriptor qds; + + public InformationObject_BITSTRING_OF_32_BIT( + int address, BinaryStateInformation bsi, QualityDescriptor qds) { super(address); + this.bsi = bsi; + this.qds = qds; + } + + public BinaryStateInformation getBsi() { + return bsi; + } + + public QualityDescriptor getQds() { + return qds; } @Override @@ -53,6 +68,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_BITSTRING_OF_32_BIT"); + // Simple Field (bsi) + writeSimpleField( + "bsi", + bsi, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_BITSTRING_OF_32_BIT"); } @@ -67,6 +96,12 @@ public int getLengthInBits() { InformationObject_BITSTRING_OF_32_BIT _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (bsi) + lengthInBits += bsi.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + return lengthInBits; } @@ -76,19 +111,39 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + BinaryStateInformation bsi = + readSimpleField( + "bsi", + new DataReaderComplexDefault<>( + () -> BinaryStateInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_BITSTRING_OF_32_BIT"); // Create the instance - return new InformationObject_BITSTRING_OF_32_BITBuilderImpl(); + return new InformationObject_BITSTRING_OF_32_BITBuilderImpl(bsi, qds); } public static class InformationObject_BITSTRING_OF_32_BITBuilderImpl implements InformationObject.InformationObjectBuilder { + private final BinaryStateInformation bsi; + private final QualityDescriptor qds; - public InformationObject_BITSTRING_OF_32_BITBuilderImpl() {} + public InformationObject_BITSTRING_OF_32_BITBuilderImpl( + BinaryStateInformation bsi, QualityDescriptor qds) { + this.bsi = bsi; + this.qds = qds; + } public InformationObject_BITSTRING_OF_32_BIT build(int address) { InformationObject_BITSTRING_OF_32_BIT informationObject_BITSTRING_OF_32_BIT = - new InformationObject_BITSTRING_OF_32_BIT(address); + new InformationObject_BITSTRING_OF_32_BIT(address, bsi, qds); return informationObject_BITSTRING_OF_32_BIT; } } @@ -102,12 +157,12 @@ public boolean equals(Object o) { return false; } InformationObject_BITSTRING_OF_32_BIT that = (InformationObject_BITSTRING_OF_32_BIT) o; - return super.equals(that) && true; + return (getBsi() == that.getBsi()) && (getQds() == that.getQds()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getBsi(), getQds()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG.java index b07ea73df89..7bf46b0f13b 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG.java @@ -43,8 +43,32 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.BITSTRING_OF_32_BIT_WITH_TIME_TAG; } - public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG(int address) { + // Properties. + protected final BinaryStateInformation bsi; + protected final QualityDescriptor qds; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG( + int address, + BinaryStateInformation bsi, + QualityDescriptor qds, + ThreeOctetBinaryTime cp24Time2a) { super(address); + this.bsi = bsi; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } + + public BinaryStateInformation getBsi() { + return bsi; + } + + public QualityDescriptor getQds() { + return qds; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +78,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG"); + // Simple Field (bsi) + writeSimpleField( + "bsi", + bsi, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG"); } @@ -68,6 +113,15 @@ public int getLengthInBits() { InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (bsi) + lengthInBits += bsi.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +131,50 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + BinaryStateInformation bsi = + readSimpleField( + "bsi", + new DataReaderComplexDefault<>( + () -> BinaryStateInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG"); // Create the instance - return new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAGBuilderImpl(bsi, qds, cp24Time2a); } public static class InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAGBuilderImpl() {} + private final BinaryStateInformation bsi; + private final QualityDescriptor qds; + private final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAGBuilderImpl( + BinaryStateInformation bsi, QualityDescriptor qds, ThreeOctetBinaryTime cp24Time2a) { + this.bsi = bsi; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG build(int address) { InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG informationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG = - new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG(address); + new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG( + address, bsi, qds, cp24Time2a); return informationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG; } } @@ -105,12 +189,16 @@ public boolean equals(Object o) { } InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG that = (InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getBsi() == that.getBsi()) + && (getQds() == that.getQds()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getBsi(), getQds(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A.java index c6c1b26ea74..58e0d3af2c4 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,32 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final BinaryStateInformation bsi; + protected final QualityDescriptor qds; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A( + int address, + BinaryStateInformation bsi, + QualityDescriptor qds, + SevenOctetBinaryTime cp56Time2a) { super(address); + this.bsi = bsi; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } + + public BinaryStateInformation getBsi() { + return bsi; + } + + public QualityDescriptor getQds() { + return qds; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -54,6 +78,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (bsi) + writeSimpleField( + "bsi", + bsi, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A"); } @@ -68,6 +113,15 @@ public int getLengthInBits() { InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (bsi) + lengthInBits += bsi.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +131,51 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + BinaryStateInformation bsi = + readSimpleField( + "bsi", + new DataReaderComplexDefault<>( + () -> BinaryStateInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + bsi, qds, cp56Time2a); } public static class InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + private final BinaryStateInformation bsi; + private final QualityDescriptor qds; + private final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + BinaryStateInformation bsi, QualityDescriptor qds, SevenOctetBinaryTime cp56Time2a) { + this.bsi = bsi; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } public InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A build(int address) { InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A informationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A( + address, bsi, qds, cp56Time2a); return informationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A; } } @@ -105,12 +190,16 @@ public boolean equals(Object o) { } InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getBsi() == that.getBsi()) + && (getQds() == that.getQds()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getBsi(), getQds(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION.java index 1736760ef46..c91ac591b17 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION.java @@ -43,8 +43,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION; } - public InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION(int address) { + // Properties. + protected final NameOfFile nof; + protected final NameOfSection nos; + protected final SelectAndCallQualifier scq; + + public InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION( + int address, NameOfFile nof, NameOfSection nos, SelectAndCallQualifier scq) { super(address); + this.nof = nof; + this.nos = nos; + this.scq = scq; + } + + public NameOfFile getNof() { + return nof; + } + + public NameOfSection getNos() { + return nos; + } + + public SelectAndCallQualifier getScq() { + return scq; } @Override @@ -54,6 +75,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION"); + // Simple Field (nof) + writeSimpleField( + "nof", + nof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (nos) + writeSimpleField( + "nos", + nos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (scq) + writeSimpleField( + "scq", + scq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION"); } @@ -68,6 +110,15 @@ public int getLengthInBits() { InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nof) + lengthInBits += nof.getLengthInBits(); + + // Simple field (nos) + lengthInBits += nos.getLengthInBits(); + + // Simple field (scq) + lengthInBits += scq.getLengthInBits(); + return lengthInBits; } @@ -77,20 +128,49 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NameOfFile nof = + readSimpleField( + "nof", + new DataReaderComplexDefault<>(() -> NameOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + NameOfSection nos = + readSimpleField( + "nos", + new DataReaderComplexDefault<>(() -> NameOfSection.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SelectAndCallQualifier scq = + readSimpleField( + "scq", + new DataReaderComplexDefault<>( + () -> SelectAndCallQualifier.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION"); // Create the instance - return new InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTIONBuilderImpl(); + return new InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTIONBuilderImpl( + nof, nos, scq); } public static class InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTIONBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTIONBuilderImpl() {} + private final NameOfFile nof; + private final NameOfSection nos; + private final SelectAndCallQualifier scq; + + public InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTIONBuilderImpl( + NameOfFile nof, NameOfSection nos, SelectAndCallQualifier scq) { + this.nof = nof; + this.nos = nos; + this.scq = scq; + } public InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION build(int address) { InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION informationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION = - new InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION(address); + new InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION( + address, nof, nos, scq); return informationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION; } } @@ -105,12 +185,16 @@ public boolean equals(Object o) { } InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION that = (InformationObject_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION) o; - return super.equals(that) && true; + return (getNof() == that.getNof()) + && (getNos() == that.getNos()) + && (getScq() == that.getScq()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNof(), getNos(), getScq()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CLOCK_SYNCHRONISATION_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CLOCK_SYNCHRONISATION_COMMAND.java index 558d8fba29b..a2158200831 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CLOCK_SYNCHRONISATION_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_CLOCK_SYNCHRONISATION_COMMAND.java @@ -43,8 +43,17 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.CLOCK_SYNCHRONISATION_COMMAND; } - public InformationObject_CLOCK_SYNCHRONISATION_COMMAND(int address) { + // Properties. + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_CLOCK_SYNCHRONISATION_COMMAND( + int address, SevenOctetBinaryTime cp56Time2a) { super(address); + this.cp56Time2a = cp56Time2a; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -54,6 +63,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_CLOCK_SYNCHRONISATION_COMMAND"); + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_CLOCK_SYNCHRONISATION_COMMAND"); } @@ -68,6 +84,9 @@ public int getLengthInBits() { InformationObject_CLOCK_SYNCHRONISATION_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +96,31 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_CLOCK_SYNCHRONISATION_COMMAND"); // Create the instance - return new InformationObject_CLOCK_SYNCHRONISATION_COMMANDBuilderImpl(); + return new InformationObject_CLOCK_SYNCHRONISATION_COMMANDBuilderImpl(cp56Time2a); } public static class InformationObject_CLOCK_SYNCHRONISATION_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final SevenOctetBinaryTime cp56Time2a; - public InformationObject_CLOCK_SYNCHRONISATION_COMMANDBuilderImpl() {} + public InformationObject_CLOCK_SYNCHRONISATION_COMMANDBuilderImpl( + SevenOctetBinaryTime cp56Time2a) { + this.cp56Time2a = cp56Time2a; + } public InformationObject_CLOCK_SYNCHRONISATION_COMMAND build(int address) { InformationObject_CLOCK_SYNCHRONISATION_COMMAND informationObject_CLOCK_SYNCHRONISATION_COMMAND = - new InformationObject_CLOCK_SYNCHRONISATION_COMMAND(address); + new InformationObject_CLOCK_SYNCHRONISATION_COMMAND(address, cp56Time2a); return informationObject_CLOCK_SYNCHRONISATION_COMMAND; } } @@ -105,12 +135,12 @@ public boolean equals(Object o) { } InformationObject_CLOCK_SYNCHRONISATION_COMMAND that = (InformationObject_CLOCK_SYNCHRONISATION_COMMAND) o; - return super.equals(that) && true; + return (getCp56Time2a() == that.getCp56Time2a()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_COUNTER_INTERROGATION_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_COUNTER_INTERROGATION_COMMAND.java index a72e1843ae5..d122f2efc50 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_COUNTER_INTERROGATION_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_COUNTER_INTERROGATION_COMMAND.java @@ -43,8 +43,17 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.COUNTER_INTERROGATION_COMMAND; } - public InformationObject_COUNTER_INTERROGATION_COMMAND(int address) { + // Properties. + protected final QualifierOfCounterInterrogationCommand qcc; + + public InformationObject_COUNTER_INTERROGATION_COMMAND( + int address, QualifierOfCounterInterrogationCommand qcc) { super(address); + this.qcc = qcc; + } + + public QualifierOfCounterInterrogationCommand getQcc() { + return qcc; } @Override @@ -54,6 +63,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_COUNTER_INTERROGATION_COMMAND"); + // Simple Field (qcc) + writeSimpleField( + "qcc", + qcc, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_COUNTER_INTERROGATION_COMMAND"); } @@ -68,6 +84,9 @@ public int getLengthInBits() { InformationObject_COUNTER_INTERROGATION_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (qcc) + lengthInBits += qcc.getLengthInBits(); + return lengthInBits; } @@ -77,20 +96,31 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + QualifierOfCounterInterrogationCommand qcc = + readSimpleField( + "qcc", + new DataReaderComplexDefault<>( + () -> QualifierOfCounterInterrogationCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_COUNTER_INTERROGATION_COMMAND"); // Create the instance - return new InformationObject_COUNTER_INTERROGATION_COMMANDBuilderImpl(); + return new InformationObject_COUNTER_INTERROGATION_COMMANDBuilderImpl(qcc); } public static class InformationObject_COUNTER_INTERROGATION_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final QualifierOfCounterInterrogationCommand qcc; - public InformationObject_COUNTER_INTERROGATION_COMMANDBuilderImpl() {} + public InformationObject_COUNTER_INTERROGATION_COMMANDBuilderImpl( + QualifierOfCounterInterrogationCommand qcc) { + this.qcc = qcc; + } public InformationObject_COUNTER_INTERROGATION_COMMAND build(int address) { InformationObject_COUNTER_INTERROGATION_COMMAND informationObject_COUNTER_INTERROGATION_COMMAND = - new InformationObject_COUNTER_INTERROGATION_COMMAND(address); + new InformationObject_COUNTER_INTERROGATION_COMMAND(address, qcc); return informationObject_COUNTER_INTERROGATION_COMMAND; } } @@ -105,12 +135,12 @@ public boolean equals(Object o) { } InformationObject_COUNTER_INTERROGATION_COMMAND that = (InformationObject_COUNTER_INTERROGATION_COMMAND) o; - return super.equals(that) && true; + return (getQcc() == that.getQcc()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getQcc()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DELAY_ACQUISITION_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DELAY_ACQUISITION_COMMAND.java index 57fb95d90f5..e88ce7e1647 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DELAY_ACQUISITION_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DELAY_ACQUISITION_COMMAND.java @@ -43,8 +43,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.DELAY_ACQUISITION_COMMAND; } - public InformationObject_DELAY_ACQUISITION_COMMAND(int address) { + // Properties. + protected final TwoOctetBinaryTime cp16Time2a; + + public InformationObject_DELAY_ACQUISITION_COMMAND(int address, TwoOctetBinaryTime cp16Time2a) { super(address); + this.cp16Time2a = cp16Time2a; + } + + public TwoOctetBinaryTime getCp16Time2a() { + return cp16Time2a; } @Override @@ -54,6 +62,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_DELAY_ACQUISITION_COMMAND"); + // Simple Field (cp16Time2a) + writeSimpleField( + "cp16Time2a", + cp16Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_DELAY_ACQUISITION_COMMAND"); } @@ -68,6 +83,9 @@ public int getLengthInBits() { InformationObject_DELAY_ACQUISITION_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (cp16Time2a) + lengthInBits += cp16Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,19 +95,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + TwoOctetBinaryTime cp16Time2a = + readSimpleField( + "cp16Time2a", + new DataReaderComplexDefault<>( + () -> TwoOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_DELAY_ACQUISITION_COMMAND"); // Create the instance - return new InformationObject_DELAY_ACQUISITION_COMMANDBuilderImpl(); + return new InformationObject_DELAY_ACQUISITION_COMMANDBuilderImpl(cp16Time2a); } public static class InformationObject_DELAY_ACQUISITION_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final TwoOctetBinaryTime cp16Time2a; - public InformationObject_DELAY_ACQUISITION_COMMANDBuilderImpl() {} + public InformationObject_DELAY_ACQUISITION_COMMANDBuilderImpl(TwoOctetBinaryTime cp16Time2a) { + this.cp16Time2a = cp16Time2a; + } public InformationObject_DELAY_ACQUISITION_COMMAND build(int address) { InformationObject_DELAY_ACQUISITION_COMMAND informationObject_DELAY_ACQUISITION_COMMAND = - new InformationObject_DELAY_ACQUISITION_COMMAND(address); + new InformationObject_DELAY_ACQUISITION_COMMAND(address, cp16Time2a); return informationObject_DELAY_ACQUISITION_COMMAND; } } @@ -104,12 +132,12 @@ public boolean equals(Object o) { } InformationObject_DELAY_ACQUISITION_COMMAND that = (InformationObject_DELAY_ACQUISITION_COMMAND) o; - return super.equals(that) && true; + return (getCp16Time2a() == that.getCp16Time2a()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getCp16Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DIRECTORY.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DIRECTORY.java index 1117516721e..25ec67ab647 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DIRECTORY.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DIRECTORY.java @@ -42,8 +42,39 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.DIRECTORY; } - public InformationObject_DIRECTORY(int address) { + // Properties. + protected final NameOfFile nof; + protected final LengthOfFile lof; + protected final StatusOfFile sof; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_DIRECTORY( + int address, + NameOfFile nof, + LengthOfFile lof, + StatusOfFile sof, + SevenOctetBinaryTime cp56Time2a) { super(address); + this.nof = nof; + this.lof = lof; + this.sof = sof; + this.cp56Time2a = cp56Time2a; + } + + public NameOfFile getNof() { + return nof; + } + + public LengthOfFile getLof() { + return lof; + } + + public StatusOfFile getSof() { + return sof; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -53,6 +84,34 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_DIRECTORY"); + // Simple Field (nof) + writeSimpleField( + "nof", + nof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (lof) + writeSimpleField( + "lof", + lof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (sof) + writeSimpleField( + "sof", + sof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_DIRECTORY"); } @@ -67,6 +126,18 @@ public int getLengthInBits() { InformationObject_DIRECTORY _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nof) + lengthInBits += nof.getLengthInBits(); + + // Simple field (lof) + lengthInBits += lof.getLengthInBits(); + + // Simple field (sof) + lengthInBits += sof.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -76,19 +147,54 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NameOfFile nof = + readSimpleField( + "nof", + new DataReaderComplexDefault<>(() -> NameOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + LengthOfFile lof = + readSimpleField( + "lof", + new DataReaderComplexDefault<>(() -> LengthOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + StatusOfFile sof = + readSimpleField( + "sof", + new DataReaderComplexDefault<>(() -> StatusOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_DIRECTORY"); // Create the instance - return new InformationObject_DIRECTORYBuilderImpl(); + return new InformationObject_DIRECTORYBuilderImpl(nof, lof, sof, cp56Time2a); } public static class InformationObject_DIRECTORYBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_DIRECTORYBuilderImpl() {} + private final NameOfFile nof; + private final LengthOfFile lof; + private final StatusOfFile sof; + private final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_DIRECTORYBuilderImpl( + NameOfFile nof, LengthOfFile lof, StatusOfFile sof, SevenOctetBinaryTime cp56Time2a) { + this.nof = nof; + this.lof = lof; + this.sof = sof; + this.cp56Time2a = cp56Time2a; + } public InformationObject_DIRECTORY build(int address) { InformationObject_DIRECTORY informationObject_DIRECTORY = - new InformationObject_DIRECTORY(address); + new InformationObject_DIRECTORY(address, nof, lof, sof, cp56Time2a); return informationObject_DIRECTORY; } } @@ -102,12 +208,17 @@ public boolean equals(Object o) { return false; } InformationObject_DIRECTORY that = (InformationObject_DIRECTORY) o; - return super.equals(that) && true; + return (getNof() == that.getNof()) + && (getLof() == that.getLof()) + && (getSof() == that.getSof()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNof(), getLof(), getSof(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_COMMAND.java index a72ea755301..1ab45934be4 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_COMMAND.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.DOUBLE_COMMAND; } - public InformationObject_DOUBLE_COMMAND(int address) { + // Properties. + protected final DoubleCommand dco; + + public InformationObject_DOUBLE_COMMAND(int address, DoubleCommand dco) { super(address); + this.dco = dco; + } + + public DoubleCommand getDco() { + return dco; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_DOUBLE_COMMAND"); + // Simple Field (dco) + writeSimpleField( + "dco", + dco, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_DOUBLE_COMMAND"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_DOUBLE_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (dco) + lengthInBits += dco.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,28 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + DoubleCommand dco = + readSimpleField( + "dco", + new DataReaderComplexDefault<>(() -> DoubleCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_DOUBLE_COMMAND"); // Create the instance - return new InformationObject_DOUBLE_COMMANDBuilderImpl(); + return new InformationObject_DOUBLE_COMMANDBuilderImpl(dco); } public static class InformationObject_DOUBLE_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final DoubleCommand dco; - public InformationObject_DOUBLE_COMMANDBuilderImpl() {} + public InformationObject_DOUBLE_COMMANDBuilderImpl(DoubleCommand dco) { + this.dco = dco; + } public InformationObject_DOUBLE_COMMAND build(int address) { InformationObject_DOUBLE_COMMAND informationObject_DOUBLE_COMMAND = - new InformationObject_DOUBLE_COMMAND(address); + new InformationObject_DOUBLE_COMMAND(address, dco); return informationObject_DOUBLE_COMMAND; } } @@ -102,12 +129,12 @@ public boolean equals(Object o) { return false; } InformationObject_DOUBLE_COMMAND that = (InformationObject_DOUBLE_COMMAND) o; - return super.equals(that) && true; + return (getDco() == that.getDco()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getDco()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION.java index 2cbf0357a8c..7782b91b78f 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION.java @@ -43,8 +43,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.DOUBLE_POINT_INFORMATION; } - public InformationObject_DOUBLE_POINT_INFORMATION(int address) { + // Properties. + protected final DoublePointInformation diq; + + public InformationObject_DOUBLE_POINT_INFORMATION(int address, DoublePointInformation diq) { super(address); + this.diq = diq; + } + + public DoublePointInformation getDiq() { + return diq; } @Override @@ -54,6 +62,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_DOUBLE_POINT_INFORMATION"); + // Simple Field (diq) + writeSimpleField( + "diq", + diq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_DOUBLE_POINT_INFORMATION"); } @@ -68,6 +83,9 @@ public int getLengthInBits() { InformationObject_DOUBLE_POINT_INFORMATION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (diq) + lengthInBits += diq.getLengthInBits(); + return lengthInBits; } @@ -77,19 +95,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + DoublePointInformation diq = + readSimpleField( + "diq", + new DataReaderComplexDefault<>( + () -> DoublePointInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_DOUBLE_POINT_INFORMATION"); // Create the instance - return new InformationObject_DOUBLE_POINT_INFORMATIONBuilderImpl(); + return new InformationObject_DOUBLE_POINT_INFORMATIONBuilderImpl(diq); } public static class InformationObject_DOUBLE_POINT_INFORMATIONBuilderImpl implements InformationObject.InformationObjectBuilder { + private final DoublePointInformation diq; - public InformationObject_DOUBLE_POINT_INFORMATIONBuilderImpl() {} + public InformationObject_DOUBLE_POINT_INFORMATIONBuilderImpl(DoublePointInformation diq) { + this.diq = diq; + } public InformationObject_DOUBLE_POINT_INFORMATION build(int address) { InformationObject_DOUBLE_POINT_INFORMATION informationObject_DOUBLE_POINT_INFORMATION = - new InformationObject_DOUBLE_POINT_INFORMATION(address); + new InformationObject_DOUBLE_POINT_INFORMATION(address, diq); return informationObject_DOUBLE_POINT_INFORMATION; } } @@ -104,12 +132,12 @@ public boolean equals(Object o) { } InformationObject_DOUBLE_POINT_INFORMATION that = (InformationObject_DOUBLE_POINT_INFORMATION) o; - return super.equals(that) && true; + return (getDiq() == that.getDiq()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getDiq()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG.java index 627a78ce643..bec5445595d 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.DOUBLE_POINT_INFORMATION_WITH_TIME_TAG; } - public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG(int address) { + // Properties. + protected final DoublePointInformation diq; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG( + int address, DoublePointInformation diq, ThreeOctetBinaryTime cp24Time2a) { super(address); + this.diq = diq; + this.cp24Time2a = cp24Time2a; + } + + public DoublePointInformation getDiq() { + return diq; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG"); + // Simple Field (diq) + writeSimpleField( + "diq", + diq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (diq) + lengthInBits += diq.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,41 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + DoublePointInformation diq = + readSimpleField( + "diq", + new DataReaderComplexDefault<>( + () -> DoublePointInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG"); // Create the instance - return new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl(diq, cp24Time2a); } public static class InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { + private final DoublePointInformation diq; + private final ThreeOctetBinaryTime cp24Time2a; - public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl() {} + public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl( + DoublePointInformation diq, ThreeOctetBinaryTime cp24Time2a) { + this.diq = diq; + this.cp24Time2a = cp24Time2a; + } public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG build(int address) { InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG informationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG = - new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG(address); + new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG( + address, diq, cp24Time2a); return informationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG; } } @@ -105,12 +161,15 @@ public boolean equals(Object o) { } InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG that = (InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getDiq() == that.getDiq()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getDiq(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java index dcbee373b9a..52eaf719657 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final DoublePointInformation diq; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A( + int address, DoublePointInformation diq, SevenOctetBinaryTime cp56Time2a) { super(address); + this.diq = diq; + this.cp56Time2a = cp56Time2a; + } + + public DoublePointInformation getDiq() { + return diq; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (diq) + writeSimpleField( + "diq", + diq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (diq) + lengthInBits += diq.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,42 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + DoublePointInformation diq = + readSimpleField( + "diq", + new DataReaderComplexDefault<>( + () -> DoublePointInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + diq, cp56Time2a); } public static class InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { + private final DoublePointInformation diq; + private final SevenOctetBinaryTime cp56Time2a; - public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + DoublePointInformation diq, SevenOctetBinaryTime cp56Time2a) { + this.diq = diq; + this.cp56Time2a = cp56Time2a; + } public InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A build(int address) { InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A informationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A( + address, diq, cp56Time2a); return informationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A; } } @@ -105,12 +162,15 @@ public boolean equals(Object o) { } InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getDiq() == that.getDiq()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getDiq(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_END_OF_INITIALISATION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_END_OF_INITIALISATION.java index b722f06b35b..1b845c19f6b 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_END_OF_INITIALISATION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_END_OF_INITIALISATION.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.END_OF_INITIALISATION; } - public InformationObject_END_OF_INITIALISATION(int address) { + // Properties. + protected final CauseOfInitialization coi; + + public InformationObject_END_OF_INITIALISATION(int address, CauseOfInitialization coi) { super(address); + this.coi = coi; + } + + public CauseOfInitialization getCoi() { + return coi; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_END_OF_INITIALISATION"); + // Simple Field (coi) + writeSimpleField( + "coi", + coi, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_END_OF_INITIALISATION"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_END_OF_INITIALISATION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (coi) + lengthInBits += coi.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + CauseOfInitialization coi = + readSimpleField( + "coi", + new DataReaderComplexDefault<>( + () -> CauseOfInitialization.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_END_OF_INITIALISATION"); // Create the instance - return new InformationObject_END_OF_INITIALISATIONBuilderImpl(); + return new InformationObject_END_OF_INITIALISATIONBuilderImpl(coi); } public static class InformationObject_END_OF_INITIALISATIONBuilderImpl implements InformationObject.InformationObjectBuilder { + private final CauseOfInitialization coi; - public InformationObject_END_OF_INITIALISATIONBuilderImpl() {} + public InformationObject_END_OF_INITIALISATIONBuilderImpl(CauseOfInitialization coi) { + this.coi = coi; + } public InformationObject_END_OF_INITIALISATION build(int address) { InformationObject_END_OF_INITIALISATION informationObject_END_OF_INITIALISATION = - new InformationObject_END_OF_INITIALISATION(address); + new InformationObject_END_OF_INITIALISATION(address, coi); return informationObject_END_OF_INITIALISATION; } } @@ -102,12 +130,12 @@ public boolean equals(Object o) { return false; } InformationObject_END_OF_INITIALISATION that = (InformationObject_END_OF_INITIALISATION) o; - return super.equals(that) && true; + return (getCoi() == that.getCoi()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getCoi()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java index 9b2ac7a0cc3..c39ac875d58 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG; } - public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG(int address) { + // Properties. + protected final TwoOctetBinaryTime cp16Time2a; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG( + int address, TwoOctetBinaryTime cp16Time2a, ThreeOctetBinaryTime cp24Time2a) { super(address); + this.cp16Time2a = cp16Time2a; + this.cp24Time2a = cp24Time2a; + } + + public TwoOctetBinaryTime getCp16Time2a() { + return cp16Time2a; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); + // Simple Field (cp16Time2a) + writeSimpleField( + "cp16Time2a", + cp16Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (cp16Time2a) + lengthInBits += cp16Time2a.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,42 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + TwoOctetBinaryTime cp16Time2a = + readSimpleField( + "cp16Time2a", + new DataReaderComplexDefault<>( + () -> TwoOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); // Create the instance - return new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl( + cp16Time2a, cp24Time2a); } public static class InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { + private final TwoOctetBinaryTime cp16Time2a; + private final ThreeOctetBinaryTime cp24Time2a; - public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl() {} + public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl( + TwoOctetBinaryTime cp16Time2a, ThreeOctetBinaryTime cp24Time2a) { + this.cp16Time2a = cp16Time2a; + this.cp24Time2a = cp24Time2a; + } public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG build(int address) { InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG informationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG = - new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG(address); + new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG( + address, cp16Time2a, cp24Time2a); return informationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG; } } @@ -105,12 +162,15 @@ public boolean equals(Object o) { } InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG that = (InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getCp16Time2a() == that.getCp16Time2a()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getCp16Time2a(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java index 4a304b01044..dd1f6d4fc0d 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final TwoOctetBinaryTime cp16Time2a; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A( + int address, TwoOctetBinaryTime cp16Time2a, SevenOctetBinaryTime cp56Time2a) { super(address); + this.cp16Time2a = cp16Time2a; + this.cp56Time2a = cp56Time2a; + } + + public TwoOctetBinaryTime getCp16Time2a() { + return cp16Time2a; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -55,6 +70,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (cp16Time2a) + writeSimpleField( + "cp16Time2a", + cp16Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); } @@ -70,6 +99,12 @@ public int getLengthInBits() { InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (cp16Time2a) + lengthInBits += cp16Time2a.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -80,23 +115,45 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + TwoOctetBinaryTime cp16Time2a = + readSimpleField( + "cp16Time2a", + new DataReaderComplexDefault<>( + () -> TwoOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + cp16Time2a, cp56Time2a); } public static class InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { + private final TwoOctetBinaryTime cp16Time2a; + private final SevenOctetBinaryTime cp56Time2a; - public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + TwoOctetBinaryTime cp16Time2a, SevenOctetBinaryTime cp56Time2a) { + this.cp16Time2a = cp16Time2a; + this.cp56Time2a = cp56Time2a; + } public InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A build( int address) { InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A informationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A( + address, cp16Time2a, cp56Time2a); return informationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A; } } @@ -111,12 +168,15 @@ public boolean equals(Object o) { } InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getCp16Time2a() == that.getCp16Time2a()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getCp16Time2a(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_FILE_READY.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_FILE_READY.java index 8722cbd44e0..189a3d11ff6 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_FILE_READY.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_FILE_READY.java @@ -42,8 +42,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.FILE_READY; } - public InformationObject_FILE_READY(int address) { + // Properties. + protected final NameOfFile nof; + protected final LengthOfFile lof; + protected final FileReadyQualifier frq; + + public InformationObject_FILE_READY( + int address, NameOfFile nof, LengthOfFile lof, FileReadyQualifier frq) { super(address); + this.nof = nof; + this.lof = lof; + this.frq = frq; + } + + public NameOfFile getNof() { + return nof; + } + + public LengthOfFile getLof() { + return lof; + } + + public FileReadyQualifier getFrq() { + return frq; } @Override @@ -53,6 +74,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_FILE_READY"); + // Simple Field (nof) + writeSimpleField( + "nof", + nof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (lof) + writeSimpleField( + "lof", + lof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (frq) + writeSimpleField( + "frq", + frq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_FILE_READY"); } @@ -67,6 +109,15 @@ public int getLengthInBits() { InformationObject_FILE_READY _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nof) + lengthInBits += nof.getLengthInBits(); + + // Simple field (lof) + lengthInBits += lof.getLengthInBits(); + + // Simple field (frq) + lengthInBits += frq.getLengthInBits(); + return lengthInBits; } @@ -76,19 +127,46 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NameOfFile nof = + readSimpleField( + "nof", + new DataReaderComplexDefault<>(() -> NameOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + LengthOfFile lof = + readSimpleField( + "lof", + new DataReaderComplexDefault<>(() -> LengthOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + FileReadyQualifier frq = + readSimpleField( + "frq", + new DataReaderComplexDefault<>( + () -> FileReadyQualifier.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_FILE_READY"); // Create the instance - return new InformationObject_FILE_READYBuilderImpl(); + return new InformationObject_FILE_READYBuilderImpl(nof, lof, frq); } public static class InformationObject_FILE_READYBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_FILE_READYBuilderImpl() {} + private final NameOfFile nof; + private final LengthOfFile lof; + private final FileReadyQualifier frq; + + public InformationObject_FILE_READYBuilderImpl( + NameOfFile nof, LengthOfFile lof, FileReadyQualifier frq) { + this.nof = nof; + this.lof = lof; + this.frq = frq; + } public InformationObject_FILE_READY build(int address) { InformationObject_FILE_READY informationObject_FILE_READY = - new InformationObject_FILE_READY(address); + new InformationObject_FILE_READY(address, nof, lof, frq); return informationObject_FILE_READY; } } @@ -102,12 +180,16 @@ public boolean equals(Object o) { return false; } InformationObject_FILE_READY that = (InformationObject_FILE_READY) o; - return super.equals(that) && true; + return (getNof() == that.getNof()) + && (getLof() == that.getLof()) + && (getFrq() == that.getFrq()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNof(), getLof(), getFrq()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS.java index 49571a0f8ef..5dfea6d56a8 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.INTEGRATED_TOTALS; } - public InformationObject_INTEGRATED_TOTALS(int address) { + // Properties. + protected final BinaryCounterReading bcr; + + public InformationObject_INTEGRATED_TOTALS(int address, BinaryCounterReading bcr) { super(address); + this.bcr = bcr; + } + + public BinaryCounterReading getBcr() { + return bcr; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_INTEGRATED_TOTALS"); + // Simple Field (bcr) + writeSimpleField( + "bcr", + bcr, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_INTEGRATED_TOTALS"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_INTEGRATED_TOTALS _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (bcr) + lengthInBits += bcr.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + BinaryCounterReading bcr = + readSimpleField( + "bcr", + new DataReaderComplexDefault<>( + () -> BinaryCounterReading.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_INTEGRATED_TOTALS"); // Create the instance - return new InformationObject_INTEGRATED_TOTALSBuilderImpl(); + return new InformationObject_INTEGRATED_TOTALSBuilderImpl(bcr); } public static class InformationObject_INTEGRATED_TOTALSBuilderImpl implements InformationObject.InformationObjectBuilder { + private final BinaryCounterReading bcr; - public InformationObject_INTEGRATED_TOTALSBuilderImpl() {} + public InformationObject_INTEGRATED_TOTALSBuilderImpl(BinaryCounterReading bcr) { + this.bcr = bcr; + } public InformationObject_INTEGRATED_TOTALS build(int address) { InformationObject_INTEGRATED_TOTALS informationObject_INTEGRATED_TOTALS = - new InformationObject_INTEGRATED_TOTALS(address); + new InformationObject_INTEGRATED_TOTALS(address, bcr); return informationObject_INTEGRATED_TOTALS; } } @@ -102,12 +130,12 @@ public boolean equals(Object o) { return false; } InformationObject_INTEGRATED_TOTALS that = (InformationObject_INTEGRATED_TOTALS) o; - return super.equals(that) && true; + return (getBcr() == that.getBcr()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getBcr()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG.java index ba6bff28912..f855f9f5398 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.INTEGRATED_TOTALS_WITH_TIME_TAG; } - public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG(int address) { + // Properties. + protected final BinaryCounterReading bcr; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG( + int address, BinaryCounterReading bcr, ThreeOctetBinaryTime cp24Time2a) { super(address); + this.bcr = bcr; + this.cp24Time2a = cp24Time2a; + } + + public BinaryCounterReading getBcr() { + return bcr; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG"); + // Simple Field (bcr) + writeSimpleField( + "bcr", + bcr, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (bcr) + lengthInBits += bcr.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,40 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + BinaryCounterReading bcr = + readSimpleField( + "bcr", + new DataReaderComplexDefault<>( + () -> BinaryCounterReading.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG"); // Create the instance - return new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAGBuilderImpl(bcr, cp24Time2a); } public static class InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { + private final BinaryCounterReading bcr; + private final ThreeOctetBinaryTime cp24Time2a; - public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAGBuilderImpl() {} + public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAGBuilderImpl( + BinaryCounterReading bcr, ThreeOctetBinaryTime cp24Time2a) { + this.bcr = bcr; + this.cp24Time2a = cp24Time2a; + } public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG build(int address) { InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG informationObject_INTEGRATED_TOTALS_WITH_TIME_TAG = - new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG(address); + new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG(address, bcr, cp24Time2a); return informationObject_INTEGRATED_TOTALS_WITH_TIME_TAG; } } @@ -105,12 +160,15 @@ public boolean equals(Object o) { } InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG that = (InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getBcr() == that.getBcr()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getBcr(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A.java index 1ebbd37b21a..5e903ec3cb7 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final BinaryCounterReading bcr; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A( + int address, BinaryCounterReading bcr, SevenOctetBinaryTime cp56Time2a) { super(address); + this.bcr = bcr; + this.cp56Time2a = cp56Time2a; + } + + public BinaryCounterReading getBcr() { + return bcr; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (bcr) + writeSimpleField( + "bcr", + bcr, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (bcr) + lengthInBits += bcr.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,42 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + BinaryCounterReading bcr = + readSimpleField( + "bcr", + new DataReaderComplexDefault<>( + () -> BinaryCounterReading.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + bcr, cp56Time2a); } public static class InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { + private final BinaryCounterReading bcr; + private final SevenOctetBinaryTime cp56Time2a; - public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + BinaryCounterReading bcr, SevenOctetBinaryTime cp56Time2a) { + this.bcr = bcr; + this.cp56Time2a = cp56Time2a; + } public InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A build(int address) { InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A informationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A( + address, bcr, cp56Time2a); return informationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A; } } @@ -105,12 +162,15 @@ public boolean equals(Object o) { } InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getBcr() == that.getBcr()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getBcr(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTERROGATION_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTERROGATION_COMMAND.java index c318b3be48e..98a3c91cdf7 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTERROGATION_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_INTERROGATION_COMMAND.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.INTERROGATION_COMMAND; } - public InformationObject_INTERROGATION_COMMAND(int address) { + // Properties. + protected final QualifierOfInterrogation qoi; + + public InformationObject_INTERROGATION_COMMAND(int address, QualifierOfInterrogation qoi) { super(address); + this.qoi = qoi; + } + + public QualifierOfInterrogation getQoi() { + return qoi; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_INTERROGATION_COMMAND"); + // Simple Field (qoi) + writeSimpleField( + "qoi", + qoi, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_INTERROGATION_COMMAND"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_INTERROGATION_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (qoi) + lengthInBits += qoi.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + QualifierOfInterrogation qoi = + readSimpleField( + "qoi", + new DataReaderComplexDefault<>( + () -> QualifierOfInterrogation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_INTERROGATION_COMMAND"); // Create the instance - return new InformationObject_INTERROGATION_COMMANDBuilderImpl(); + return new InformationObject_INTERROGATION_COMMANDBuilderImpl(qoi); } public static class InformationObject_INTERROGATION_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final QualifierOfInterrogation qoi; - public InformationObject_INTERROGATION_COMMANDBuilderImpl() {} + public InformationObject_INTERROGATION_COMMANDBuilderImpl(QualifierOfInterrogation qoi) { + this.qoi = qoi; + } public InformationObject_INTERROGATION_COMMAND build(int address) { InformationObject_INTERROGATION_COMMAND informationObject_INTERROGATION_COMMAND = - new InformationObject_INTERROGATION_COMMAND(address); + new InformationObject_INTERROGATION_COMMAND(address, qoi); return informationObject_INTERROGATION_COMMAND; } } @@ -102,12 +130,12 @@ public boolean equals(Object o) { return false; } InformationObject_INTERROGATION_COMMAND that = (InformationObject_INTERROGATION_COMMAND) o; - return super.equals(that) && true; + return (getQoi() == that.getQoi()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getQoi()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_LAST_SECTION_LAST_SEGMENT.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_LAST_SECTION_LAST_SEGMENT.java index 24c9675d708..e13913bd367 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_LAST_SECTION_LAST_SEGMENT.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_LAST_SECTION_LAST_SEGMENT.java @@ -43,8 +43,39 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.LAST_SECTION_LAST_SEGMENT; } - public InformationObject_LAST_SECTION_LAST_SEGMENT(int address) { + // Properties. + protected final NameOfFile nof; + protected final NameOfSection nos; + protected final LastSectionOrSegmentQualifier lsq; + protected final Checksum chs; + + public InformationObject_LAST_SECTION_LAST_SEGMENT( + int address, + NameOfFile nof, + NameOfSection nos, + LastSectionOrSegmentQualifier lsq, + Checksum chs) { super(address); + this.nof = nof; + this.nos = nos; + this.lsq = lsq; + this.chs = chs; + } + + public NameOfFile getNof() { + return nof; + } + + public NameOfSection getNos() { + return nos; + } + + public LastSectionOrSegmentQualifier getLsq() { + return lsq; + } + + public Checksum getChs() { + return chs; } @Override @@ -54,6 +85,34 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_LAST_SECTION_LAST_SEGMENT"); + // Simple Field (nof) + writeSimpleField( + "nof", + nof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (nos) + writeSimpleField( + "nos", + nos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (lsq) + writeSimpleField( + "lsq", + lsq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (chs) + writeSimpleField( + "chs", + chs, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_LAST_SECTION_LAST_SEGMENT"); } @@ -68,6 +127,18 @@ public int getLengthInBits() { InformationObject_LAST_SECTION_LAST_SEGMENT _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nof) + lengthInBits += nof.getLengthInBits(); + + // Simple field (nos) + lengthInBits += nos.getLengthInBits(); + + // Simple field (lsq) + lengthInBits += lsq.getLengthInBits(); + + // Simple field (chs) + lengthInBits += chs.getLengthInBits(); + return lengthInBits; } @@ -77,19 +148,54 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NameOfFile nof = + readSimpleField( + "nof", + new DataReaderComplexDefault<>(() -> NameOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + NameOfSection nos = + readSimpleField( + "nos", + new DataReaderComplexDefault<>(() -> NameOfSection.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + LastSectionOrSegmentQualifier lsq = + readSimpleField( + "lsq", + new DataReaderComplexDefault<>( + () -> LastSectionOrSegmentQualifier.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + Checksum chs = + readSimpleField( + "chs", + new DataReaderComplexDefault<>(() -> Checksum.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_LAST_SECTION_LAST_SEGMENT"); // Create the instance - return new InformationObject_LAST_SECTION_LAST_SEGMENTBuilderImpl(); + return new InformationObject_LAST_SECTION_LAST_SEGMENTBuilderImpl(nof, nos, lsq, chs); } public static class InformationObject_LAST_SECTION_LAST_SEGMENTBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_LAST_SECTION_LAST_SEGMENTBuilderImpl() {} + private final NameOfFile nof; + private final NameOfSection nos; + private final LastSectionOrSegmentQualifier lsq; + private final Checksum chs; + + public InformationObject_LAST_SECTION_LAST_SEGMENTBuilderImpl( + NameOfFile nof, NameOfSection nos, LastSectionOrSegmentQualifier lsq, Checksum chs) { + this.nof = nof; + this.nos = nos; + this.lsq = lsq; + this.chs = chs; + } public InformationObject_LAST_SECTION_LAST_SEGMENT build(int address) { InformationObject_LAST_SECTION_LAST_SEGMENT informationObject_LAST_SECTION_LAST_SEGMENT = - new InformationObject_LAST_SECTION_LAST_SEGMENT(address); + new InformationObject_LAST_SECTION_LAST_SEGMENT(address, nof, nos, lsq, chs); return informationObject_LAST_SECTION_LAST_SEGMENT; } } @@ -104,12 +210,17 @@ public boolean equals(Object o) { } InformationObject_LAST_SECTION_LAST_SEGMENT that = (InformationObject_LAST_SECTION_LAST_SEGMENT) o; - return super.equals(that) && true; + return (getNof() == that.getNof()) + && (getNos() == that.getNos()) + && (getLsq() == that.getLsq()) + && (getChs() == that.getChs()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNof(), getNos(), getLsq(), getChs()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE.java index 882d9f28aa9..df43e033616 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_NORMALISED_VALUE; } - public InformationObject_MEASURED_VALUE_NORMALISED_VALUE(int address) { + // Properties. + protected final NormalizedValue nva; + protected final QualityDescriptor qds; + + public InformationObject_MEASURED_VALUE_NORMALISED_VALUE( + int address, NormalizedValue nva, QualityDescriptor qds) { super(address); + this.nva = nva; + this.qds = qds; + } + + public NormalizedValue getNva() { + return nva; + } + + public QualityDescriptor getQds() { + return qds; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_MEASURED_VALUE_NORMALISED_VALUE"); + // Simple Field (nva) + writeSimpleField( + "nva", + nva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_MEASURED_VALUE_NORMALISED_VALUE"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_NORMALISED_VALUE _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nva) + lengthInBits += nva.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,40 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NormalizedValue nva = + readSimpleField( + "nva", + new DataReaderComplexDefault<>( + () -> NormalizedValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_MEASURED_VALUE_NORMALISED_VALUE"); // Create the instance - return new InformationObject_MEASURED_VALUE_NORMALISED_VALUEBuilderImpl(); + return new InformationObject_MEASURED_VALUE_NORMALISED_VALUEBuilderImpl(nva, qds); } public static class InformationObject_MEASURED_VALUE_NORMALISED_VALUEBuilderImpl implements InformationObject.InformationObjectBuilder { + private final NormalizedValue nva; + private final QualityDescriptor qds; - public InformationObject_MEASURED_VALUE_NORMALISED_VALUEBuilderImpl() {} + public InformationObject_MEASURED_VALUE_NORMALISED_VALUEBuilderImpl( + NormalizedValue nva, QualityDescriptor qds) { + this.nva = nva; + this.qds = qds; + } public InformationObject_MEASURED_VALUE_NORMALISED_VALUE build(int address) { InformationObject_MEASURED_VALUE_NORMALISED_VALUE informationObject_MEASURED_VALUE_NORMALISED_VALUE = - new InformationObject_MEASURED_VALUE_NORMALISED_VALUE(address); + new InformationObject_MEASURED_VALUE_NORMALISED_VALUE(address, nva, qds); return informationObject_MEASURED_VALUE_NORMALISED_VALUE; } } @@ -105,12 +160,12 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_NORMALISED_VALUE that = (InformationObject_MEASURED_VALUE_NORMALISED_VALUE) o; - return super.equals(that) && true; + return (getNva() == that.getNva()) && (getQds() == that.getQds()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNva(), getQds()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A.java index e3b50f4834c..9cda1ef9185 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final NormalizedValue nva; + protected final QualityDescriptor qds; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A( + int address, NormalizedValue nva, QualityDescriptor qds, SevenOctetBinaryTime cp56Time2a) { super(address); + this.nva = nva; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } + + public NormalizedValue getNva() { + return nva; + } + + public QualityDescriptor getQds() { + return qds; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -55,6 +76,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (nva) + writeSimpleField( + "nva", + nva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A"); } @@ -70,6 +112,15 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nva) + lengthInBits += nva.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -80,25 +131,54 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NormalizedValue nva = + readSimpleField( + "nva", + new DataReaderComplexDefault<>( + () -> NormalizedValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + nva, qds, cp56Time2a); } public static class InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { - - public - InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + private final NormalizedValue nva; + private final QualityDescriptor qds; + private final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + NormalizedValue nva, QualityDescriptor qds, SevenOctetBinaryTime cp56Time2a) { + this.nva = nva; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } public InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A build( int address) { InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A informationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A = new InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A( - address); + address, nva, qds, cp56Time2a); return informationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A; } } @@ -114,12 +194,16 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getNva() == that.getNva()) + && (getQds() == that.getQds()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNva(), getQds(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR.java index f85eb4b94af..af19f65f4f0 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR.java @@ -43,8 +43,17 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR; } - public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR(int address) { + // Properties. + protected final NormalizedValue nva; + + public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR( + int address, NormalizedValue nva) { super(address); + this.nva = nva; + } + + public NormalizedValue getNva() { + return nva; } @Override @@ -55,6 +64,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR"); + // Simple Field (nva) + writeSimpleField( + "nva", + nva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR"); } @@ -70,6 +86,9 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nva) + lengthInBits += nva.getLengthInBits(); + return lengthInBits; } @@ -80,25 +99,36 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NormalizedValue nva = + readSimpleField( + "nva", + new DataReaderComplexDefault<>( + () -> NormalizedValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR"); // Create the instance - return new InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTORBuilderImpl(); + return new InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTORBuilderImpl( + nva); } public static class InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTORBuilderImpl implements InformationObject.InformationObjectBuilder { + private final NormalizedValue nva; - public - InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTORBuilderImpl() {} + public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTORBuilderImpl( + NormalizedValue nva) { + this.nva = nva; + } public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR build( int address) { InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR informationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR = new InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR( - address); + address, nva); return informationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR; } } @@ -114,12 +144,12 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR that = (InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR) o; - return super.equals(that) && true; + return (getNva() == that.getNva()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNva()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG.java index 915ea5166c5..323f6ec2024 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG.java @@ -43,8 +43,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG; } - public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG(int address) { + // Properties. + protected final NormalizedValue nva; + protected final QualityDescriptor qds; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG( + int address, NormalizedValue nva, QualityDescriptor qds, ThreeOctetBinaryTime cp24Time2a) { super(address); + this.nva = nva; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } + + public NormalizedValue getNva() { + return nva; + } + + public QualityDescriptor getQds() { + return qds; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +75,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG"); + // Simple Field (nva) + writeSimpleField( + "nva", + nva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG"); } @@ -68,6 +110,15 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nva) + lengthInBits += nva.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +128,51 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NormalizedValue nva = + readSimpleField( + "nva", + new DataReaderComplexDefault<>( + () -> NormalizedValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG"); // Create the instance - return new InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAGBuilderImpl( + nva, qds, cp24Time2a); } public static class InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAGBuilderImpl() {} + private final NormalizedValue nva; + private final QualityDescriptor qds; + private final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAGBuilderImpl( + NormalizedValue nva, QualityDescriptor qds, ThreeOctetBinaryTime cp24Time2a) { + this.nva = nva; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } public InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG build(int address) { InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG informationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG = - new InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG(address); + new InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG( + address, nva, qds, cp24Time2a); return informationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG; } } @@ -105,12 +187,16 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG that = (InformationObject_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getNva() == that.getNva()) + && (getQds() == that.getQds()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNva(), getQds(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE.java index 33dcf0ef73c..2f7d4ce75fe 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_SCALED_VALUE; } - public InformationObject_MEASURED_VALUE_SCALED_VALUE(int address) { + // Properties. + protected final ScaledValue sva; + protected final QualityDescriptor qds; + + public InformationObject_MEASURED_VALUE_SCALED_VALUE( + int address, ScaledValue sva, QualityDescriptor qds) { super(address); + this.sva = sva; + this.qds = qds; + } + + public ScaledValue getSva() { + return sva; + } + + public QualityDescriptor getQds() { + return qds; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_MEASURED_VALUE_SCALED_VALUE"); + // Simple Field (sva) + writeSimpleField( + "sva", + sva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_MEASURED_VALUE_SCALED_VALUE"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_SCALED_VALUE _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sva) + lengthInBits += sva.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + return lengthInBits; } @@ -77,19 +112,38 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ScaledValue sva = + readSimpleField( + "sva", + new DataReaderComplexDefault<>(() -> ScaledValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_MEASURED_VALUE_SCALED_VALUE"); // Create the instance - return new InformationObject_MEASURED_VALUE_SCALED_VALUEBuilderImpl(); + return new InformationObject_MEASURED_VALUE_SCALED_VALUEBuilderImpl(sva, qds); } public static class InformationObject_MEASURED_VALUE_SCALED_VALUEBuilderImpl implements InformationObject.InformationObjectBuilder { + private final ScaledValue sva; + private final QualityDescriptor qds; - public InformationObject_MEASURED_VALUE_SCALED_VALUEBuilderImpl() {} + public InformationObject_MEASURED_VALUE_SCALED_VALUEBuilderImpl( + ScaledValue sva, QualityDescriptor qds) { + this.sva = sva; + this.qds = qds; + } public InformationObject_MEASURED_VALUE_SCALED_VALUE build(int address) { InformationObject_MEASURED_VALUE_SCALED_VALUE informationObject_MEASURED_VALUE_SCALED_VALUE = - new InformationObject_MEASURED_VALUE_SCALED_VALUE(address); + new InformationObject_MEASURED_VALUE_SCALED_VALUE(address, sva, qds); return informationObject_MEASURED_VALUE_SCALED_VALUE; } } @@ -104,12 +158,12 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_SCALED_VALUE that = (InformationObject_MEASURED_VALUE_SCALED_VALUE) o; - return super.equals(that) && true; + return (getSva() == that.getSva()) && (getQds() == that.getQds()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSva(), getQds()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A.java index da377cf3d12..432540a227d 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final ScaledValue sva; + protected final QualityDescriptor qds; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A( + int address, ScaledValue sva, QualityDescriptor qds, SevenOctetBinaryTime cp56Time2a) { super(address); + this.sva = sva; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } + + public ScaledValue getSva() { + return sva; + } + + public QualityDescriptor getQds() { + return qds; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -55,6 +76,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (sva) + writeSimpleField( + "sva", + sva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A"); } @@ -70,6 +112,15 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sva) + lengthInBits += sva.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -80,23 +131,53 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ScaledValue sva = + readSimpleField( + "sva", + new DataReaderComplexDefault<>(() -> ScaledValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + sva, qds, cp56Time2a); } public static class InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + private final ScaledValue sva; + private final QualityDescriptor qds; + private final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + ScaledValue sva, QualityDescriptor qds, SevenOctetBinaryTime cp56Time2a) { + this.sva = sva; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } public InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A build( int address) { InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A informationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A( + address, sva, qds, cp56Time2a); return informationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A; } } @@ -111,12 +192,16 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getSva() == that.getSva()) + && (getQds() == that.getQds()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSva(), getQds(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG.java index a478ee9d969..b0f8ec1a9f2 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG.java @@ -43,8 +43,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG; } - public InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG(int address) { + // Properties. + protected final ScaledValue sva; + protected final QualityDescriptor qds; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG( + int address, ScaledValue sva, QualityDescriptor qds, ThreeOctetBinaryTime cp24Time2a) { super(address); + this.sva = sva; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } + + public ScaledValue getSva() { + return sva; + } + + public QualityDescriptor getQds() { + return qds; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +75,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG"); + // Simple Field (sva) + writeSimpleField( + "sva", + sva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG"); } @@ -68,6 +110,15 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sva) + lengthInBits += sva.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +128,50 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ScaledValue sva = + readSimpleField( + "sva", + new DataReaderComplexDefault<>(() -> ScaledValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG"); // Create the instance - return new InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAGBuilderImpl(); + return new InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAGBuilderImpl( + sva, qds, cp24Time2a); } public static class InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAGBuilderImpl() {} + private final ScaledValue sva; + private final QualityDescriptor qds; + private final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAGBuilderImpl( + ScaledValue sva, QualityDescriptor qds, ThreeOctetBinaryTime cp24Time2a) { + this.sva = sva; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } public InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG build(int address) { InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG informationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG = - new InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG(address); + new InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG( + address, sva, qds, cp24Time2a); return informationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG; } } @@ -105,12 +186,16 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG that = (InformationObject_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG) o; - return super.equals(that) && true; + return (getSva() == that.getSva()) + && (getQds() == that.getQds()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSva(), getQds(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER.java index 6e304101441..982bf34032b 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER; } - public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER(int address) { + // Properties. + protected final float value; + protected final QualityDescriptor qds; + + public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER( + int address, float value, QualityDescriptor qds) { super(address); + this.value = value; + this.qds = qds; + } + + public float getValue() { + return value; + } + + public QualityDescriptor getQds() { + return qds; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER"); + // Simple Field (value) + writeSimpleField( + "value", + value, + writeFloat(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (value) + lengthInBits += 32; + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,37 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + float value = + readSimpleField( + "value", readFloat(readBuffer, 32), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER"); // Create the instance - return new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBERBuilderImpl(); + return new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBERBuilderImpl(value, qds); } public static class InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBERBuilderImpl implements InformationObject.InformationObjectBuilder { + private final float value; + private final QualityDescriptor qds; - public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBERBuilderImpl() {} + public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBERBuilderImpl( + float value, QualityDescriptor qds) { + this.value = value; + this.qds = qds; + } public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER build(int address) { InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER informationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER = - new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER(address); + new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER(address, value, qds); return informationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER; } } @@ -105,12 +157,15 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER that = (InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER) o; - return super.equals(that) && true; + return (getValue() == that.getValue()) + && (getQds() == that.getQds()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getValue(), getQds()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG.java index 8f0baafb92d..421df5ec816 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG.java @@ -43,8 +43,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG; } - public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG(int address) { + // Properties. + protected final float value; + protected final QualityDescriptor qds; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG( + int address, float value, QualityDescriptor qds, ThreeOctetBinaryTime cp24Time2a) { super(address); + this.value = value; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } + + public float getValue() { + return value; + } + + public QualityDescriptor getQds() { + return qds; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -55,6 +76,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG"); + // Simple Field (value) + writeSimpleField( + "value", + value, + writeFloat(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG"); } @@ -70,6 +112,15 @@ public int getLengthInBits() { InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (value) + lengthInBits += 32; + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -80,25 +131,51 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + float value = + readSimpleField( + "value", readFloat(readBuffer, 32), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG"); // Create the instance - return new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAGBuilderImpl( + value, qds, cp24Time2a); } public static class InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { - - public - InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAGBuilderImpl() {} + private final float value; + private final QualityDescriptor qds; + private final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAGBuilderImpl( + float value, QualityDescriptor qds, ThreeOctetBinaryTime cp24Time2a) { + this.value = value; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG build( int address) { InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG informationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG = new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG( - address); + address, value, qds, cp24Time2a); return informationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG; } } @@ -114,12 +191,16 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG that = (InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getValue() == that.getValue()) + && (getQds() == that.getQds()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getValue(), getQds(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A.java index 1980b65b93e..c94b7a46390 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A.java @@ -43,9 +43,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A; } + // Properties. + protected final float value; + protected final QualityDescriptor qds; + protected final SevenOctetBinaryTime cp56Time2a; + public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A( - int address) { + int address, float value, QualityDescriptor qds, SevenOctetBinaryTime cp56Time2a) { super(address); + this.value = value; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } + + public float getValue() { + return value; + } + + public QualityDescriptor getQds() { + return qds; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -56,6 +76,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (value) + writeSimpleField( + "value", + value, + writeFloat(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A"); } @@ -72,6 +113,15 @@ public int getLengthInBits() { this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (value) + lengthInBits += 32; + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -82,25 +132,52 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + float value = + readSimpleField( + "value", readFloat(readBuffer, 32), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + value, qds, cp56Time2a); } public static class InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { + private final float value; + private final QualityDescriptor qds; + private final SevenOctetBinaryTime cp56Time2a; public - InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + float value, QualityDescriptor qds, SevenOctetBinaryTime cp56Time2a) { + this.value = value; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } public InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A build(int address) { InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A informationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A = new InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A( - address); + address, value, qds, cp56Time2a); return informationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A; } } @@ -117,12 +194,16 @@ public boolean equals(Object o) { } InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getValue() == that.getValue()) + && (getQds() == that.getQds()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getValue(), getQds(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java index 8b7d35fb38e..8131142672a 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java @@ -45,9 +45,39 @@ public TypeIdentification getTypeIdentification() { .PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG; } + // Properties. + protected final OutputCircuitInformation oci; + protected final QualityDescriptorForPointsOfProtectionEquipment qdp; + protected final TwoOctetBinaryTime cp16Time2a; + protected final ThreeOctetBinaryTime cp24Time2a; + public InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG( - int address) { + int address, + OutputCircuitInformation oci, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + ThreeOctetBinaryTime cp24Time2a) { super(address); + this.oci = oci; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp24Time2a = cp24Time2a; + } + + public OutputCircuitInformation getOci() { + return oci; + } + + public QualityDescriptorForPointsOfProtectionEquipment getQdp() { + return qdp; + } + + public TwoOctetBinaryTime getCp16Time2a() { + return cp16Time2a; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -58,6 +88,34 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); + // Simple Field (oci) + writeSimpleField( + "oci", + oci, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qdp) + writeSimpleField( + "qdp", + qdp, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp16Time2a) + writeSimpleField( + "cp16Time2a", + cp16Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); } @@ -74,6 +132,18 @@ public int getLengthInBits() { _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (oci) + lengthInBits += oci.getLengthInBits(); + + // Simple field (qdp) + lengthInBits += qdp.getLengthInBits(); + + // Simple field (cp16Time2a) + lengthInBits += cp16Time2a.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -84,25 +154,68 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + OutputCircuitInformation oci = + readSimpleField( + "oci", + new DataReaderComplexDefault<>( + () -> OutputCircuitInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptorForPointsOfProtectionEquipment qdp = + readSimpleField( + "qdp", + new DataReaderComplexDefault<>( + () -> QualityDescriptorForPointsOfProtectionEquipment.staticParse(readBuffer), + readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + TwoOctetBinaryTime cp16Time2a = + readSimpleField( + "cp16Time2a", + new DataReaderComplexDefault<>( + () -> TwoOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); // Create the instance - return new InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl( + oci, qdp, cp16Time2a, cp24Time2a); } public static class InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { + private final OutputCircuitInformation oci; + private final QualityDescriptorForPointsOfProtectionEquipment qdp; + private final TwoOctetBinaryTime cp16Time2a; + private final ThreeOctetBinaryTime cp24Time2a; public - InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl() {} + InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl( + OutputCircuitInformation oci, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + ThreeOctetBinaryTime cp24Time2a) { + this.oci = oci; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp24Time2a = cp24Time2a; + } public InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG build(int address) { InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG informationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG = new InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG( - address); + address, oci, qdp, cp16Time2a, cp24Time2a); return informationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG; } } @@ -120,12 +233,17 @@ public boolean equals(Object o) { InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG that = (InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getOci() == that.getOci()) + && (getQdp() == that.getQdp()) + && (getCp16Time2a() == that.getCp16Time2a()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getOci(), getQdp(), getCp16Time2a(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java index f853763db0e..63a42d1d187 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java @@ -45,10 +45,40 @@ public TypeIdentification getTypeIdentification() { .PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A; } + // Properties. + protected final OutputCircuitInformation oci; + protected final QualityDescriptorForPointsOfProtectionEquipment qdp; + protected final TwoOctetBinaryTime cp16Time2a; + protected final SevenOctetBinaryTime cp56Time2a; + public InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A( - int address) { + int address, + OutputCircuitInformation oci, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + SevenOctetBinaryTime cp56Time2a) { super(address); + this.oci = oci; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp56Time2a = cp56Time2a; + } + + public OutputCircuitInformation getOci() { + return oci; + } + + public QualityDescriptorForPointsOfProtectionEquipment getQdp() { + return qdp; + } + + public TwoOctetBinaryTime getCp16Time2a() { + return cp16Time2a; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -59,6 +89,34 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (oci) + writeSimpleField( + "oci", + oci, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qdp) + writeSimpleField( + "qdp", + qdp, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp16Time2a) + writeSimpleField( + "cp16Time2a", + cp16Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); } @@ -75,6 +133,18 @@ public int getLengthInBits() { _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (oci) + lengthInBits += oci.getLengthInBits(); + + // Simple field (qdp) + lengthInBits += qdp.getLengthInBits(); + + // Simple field (cp16Time2a) + lengthInBits += cp16Time2a.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -85,18 +155,61 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + OutputCircuitInformation oci = + readSimpleField( + "oci", + new DataReaderComplexDefault<>( + () -> OutputCircuitInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptorForPointsOfProtectionEquipment qdp = + readSimpleField( + "qdp", + new DataReaderComplexDefault<>( + () -> QualityDescriptorForPointsOfProtectionEquipment.staticParse(readBuffer), + readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + TwoOctetBinaryTime cp16Time2a = + readSimpleField( + "cp16Time2a", + new DataReaderComplexDefault<>( + () -> TwoOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + oci, qdp, cp16Time2a, cp56Time2a); } public static class InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { + private final OutputCircuitInformation oci; + private final QualityDescriptorForPointsOfProtectionEquipment qdp; + private final TwoOctetBinaryTime cp16Time2a; + private final SevenOctetBinaryTime cp56Time2a; public - InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + OutputCircuitInformation oci, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + SevenOctetBinaryTime cp56Time2a) { + this.oci = oci; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp56Time2a = cp56Time2a; + } public InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A @@ -104,7 +217,7 @@ class InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMEN InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A informationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A = new InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A( - address); + address, oci, qdp, cp16Time2a, cp56Time2a); return informationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A; } } @@ -123,12 +236,17 @@ public boolean equals(Object o) { that = (InformationObject_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getOci() == that.getOci()) + && (getQdp() == that.getQdp()) + && (getCp16Time2a() == that.getCp16Time2a()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getOci(), getQdp(), getCp16Time2a(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION.java index 6be2c4e5697..964ae9eaf23 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION.java @@ -43,9 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION; } + // Properties. + protected final StatusChangeDetection scd; + protected final QualityDescriptor qds; + public InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION( - int address) { + int address, StatusChangeDetection scd, QualityDescriptor qds) { super(address); + this.scd = scd; + this.qds = qds; + } + + public StatusChangeDetection getScd() { + return scd; + } + + public QualityDescriptor getQds() { + return qds; } @Override @@ -56,6 +70,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION"); + // Simple Field (scd) + writeSimpleField( + "scd", + scd, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION"); } @@ -71,6 +99,12 @@ public int getLengthInBits() { InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (scd) + lengthInBits += scd.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + return lengthInBits; } @@ -81,25 +115,46 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + StatusChangeDetection scd = + readSimpleField( + "scd", + new DataReaderComplexDefault<>( + () -> StatusChangeDetection.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION"); // Create the instance - return new InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTIONBuilderImpl(); + return new InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTIONBuilderImpl( + scd, qds); } public static class InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTIONBuilderImpl implements InformationObject.InformationObjectBuilder { + private final StatusChangeDetection scd; + private final QualityDescriptor qds; public - InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTIONBuilderImpl() {} + InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTIONBuilderImpl( + StatusChangeDetection scd, QualityDescriptor qds) { + this.scd = scd; + this.qds = qds; + } public InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION build( int address) { InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION informationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION = new InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION( - address); + address, scd, qds); return informationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION; } } @@ -116,12 +171,12 @@ public boolean equals(Object o) { } InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION that = (InformationObject_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION) o; - return super.equals(that) && true; + return (getScd() == that.getScd()) && (getQds() == that.getQds()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getScd(), getQds()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java index e3d358ea967..b3989c91810 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG.java @@ -43,8 +43,39 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG; } - public InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG(int address) { + // Properties. + protected final SingleEventOfProtectionEquipment sep; + protected final QualityDescriptorForPointsOfProtectionEquipment qdp; + protected final TwoOctetBinaryTime cp16Time2a; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG( + int address, + SingleEventOfProtectionEquipment sep, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + ThreeOctetBinaryTime cp24Time2a) { super(address); + this.sep = sep; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp24Time2a = cp24Time2a; + } + + public SingleEventOfProtectionEquipment getSep() { + return sep; + } + + public QualityDescriptorForPointsOfProtectionEquipment getQdp() { + return qdp; + } + + public TwoOctetBinaryTime getCp16Time2a() { + return cp16Time2a; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -55,6 +86,34 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); + // Simple Field (sep) + writeSimpleField( + "sep", + sep, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qdp) + writeSimpleField( + "qdp", + qdp, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp16Time2a) + writeSimpleField( + "cp16Time2a", + cp16Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); } @@ -70,6 +129,18 @@ public int getLengthInBits() { InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sep) + lengthInBits += sep.getLengthInBits(); + + // Simple field (qdp) + lengthInBits += qdp.getLengthInBits(); + + // Simple field (cp16Time2a) + lengthInBits += cp16Time2a.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -80,25 +151,67 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + SingleEventOfProtectionEquipment sep = + readSimpleField( + "sep", + new DataReaderComplexDefault<>( + () -> SingleEventOfProtectionEquipment.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptorForPointsOfProtectionEquipment qdp = + readSimpleField( + "qdp", + new DataReaderComplexDefault<>( + () -> QualityDescriptorForPointsOfProtectionEquipment.staticParse(readBuffer), + readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + TwoOctetBinaryTime cp16Time2a = + readSimpleField( + "cp16Time2a", + new DataReaderComplexDefault<>( + () -> TwoOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG"); // Create the instance - return new InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl( + sep, qdp, cp16Time2a, cp24Time2a); } public static class InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { - - public - InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl() {} + private final SingleEventOfProtectionEquipment sep; + private final QualityDescriptorForPointsOfProtectionEquipment qdp; + private final TwoOctetBinaryTime cp16Time2a; + private final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAGBuilderImpl( + SingleEventOfProtectionEquipment sep, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + ThreeOctetBinaryTime cp24Time2a) { + this.sep = sep; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp24Time2a = cp24Time2a; + } public InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG build( int address) { InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG informationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG = new InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG( - address); + address, sep, qdp, cp16Time2a, cp24Time2a); return informationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG; } } @@ -114,12 +227,17 @@ public boolean equals(Object o) { } InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG that = (InformationObject_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getSep() == that.getSep()) + && (getQdp() == that.getQdp()) + && (getCp16Time2a() == that.getCp16Time2a()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSep(), getQdp(), getCp16Time2a(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_ACTIVATION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_ACTIVATION.java index 3ab34770d83..8d757bbdecf 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_ACTIVATION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_ACTIVATION.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.PARAMETER_ACTIVATION; } - public InformationObject_PARAMETER_ACTIVATION(int address) { + // Properties. + protected final QualifierOfParameterActivation qpa; + + public InformationObject_PARAMETER_ACTIVATION(int address, QualifierOfParameterActivation qpa) { super(address); + this.qpa = qpa; + } + + public QualifierOfParameterActivation getQpa() { + return qpa; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_PARAMETER_ACTIVATION"); + // Simple Field (qpa) + writeSimpleField( + "qpa", + qpa, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_PARAMETER_ACTIVATION"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_PARAMETER_ACTIVATION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (qpa) + lengthInBits += qpa.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + QualifierOfParameterActivation qpa = + readSimpleField( + "qpa", + new DataReaderComplexDefault<>( + () -> QualifierOfParameterActivation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_PARAMETER_ACTIVATION"); // Create the instance - return new InformationObject_PARAMETER_ACTIVATIONBuilderImpl(); + return new InformationObject_PARAMETER_ACTIVATIONBuilderImpl(qpa); } public static class InformationObject_PARAMETER_ACTIVATIONBuilderImpl implements InformationObject.InformationObjectBuilder { + private final QualifierOfParameterActivation qpa; - public InformationObject_PARAMETER_ACTIVATIONBuilderImpl() {} + public InformationObject_PARAMETER_ACTIVATIONBuilderImpl(QualifierOfParameterActivation qpa) { + this.qpa = qpa; + } public InformationObject_PARAMETER_ACTIVATION build(int address) { InformationObject_PARAMETER_ACTIVATION informationObject_PARAMETER_ACTIVATION = - new InformationObject_PARAMETER_ACTIVATION(address); + new InformationObject_PARAMETER_ACTIVATION(address, qpa); return informationObject_PARAMETER_ACTIVATION; } } @@ -102,12 +130,12 @@ public boolean equals(Object o) { return false; } InformationObject_PARAMETER_ACTIVATION that = (InformationObject_PARAMETER_ACTIVATION) o; - return super.equals(that) && true; + return (getQpa() == that.getQpa()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getQpa()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE.java index c50155064ee..e10515167aa 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE; } - public InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE(int address) { + // Properties. + protected final NormalizedValue nva; + protected final QualifierOfParameterOfMeasuredValues qpm; + + public InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE( + int address, NormalizedValue nva, QualifierOfParameterOfMeasuredValues qpm) { super(address); + this.nva = nva; + this.qpm = qpm; + } + + public NormalizedValue getNva() { + return nva; + } + + public QualifierOfParameterOfMeasuredValues getQpm() { + return qpm; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE"); + // Simple Field (nva) + writeSimpleField( + "nva", + nva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qpm) + writeSimpleField( + "qpm", + qpm, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nva) + lengthInBits += nva.getLengthInBits(); + + // Simple field (qpm) + lengthInBits += qpm.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,41 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NormalizedValue nva = + readSimpleField( + "nva", + new DataReaderComplexDefault<>( + () -> NormalizedValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualifierOfParameterOfMeasuredValues qpm = + readSimpleField( + "qpm", + new DataReaderComplexDefault<>( + () -> QualifierOfParameterOfMeasuredValues.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE"); // Create the instance - return new InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUEBuilderImpl(); + return new InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUEBuilderImpl(nva, qpm); } public static class InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUEBuilderImpl implements InformationObject.InformationObjectBuilder { + private final NormalizedValue nva; + private final QualifierOfParameterOfMeasuredValues qpm; - public InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUEBuilderImpl() {} + public InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUEBuilderImpl( + NormalizedValue nva, QualifierOfParameterOfMeasuredValues qpm) { + this.nva = nva; + this.qpm = qpm; + } public InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE build(int address) { InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE informationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE = - new InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE(address); + new InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE( + address, nva, qpm); return informationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE; } } @@ -105,12 +161,12 @@ public boolean equals(Object o) { } InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE that = (InformationObject_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE) o; - return super.equals(that) && true; + return (getNva() == that.getNva()) && (getQpm() == that.getQpm()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNva(), getQpm()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE.java index 12ee863f81c..587dd5f51e9 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE; } - public InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE(int address) { + // Properties. + protected final ScaledValue sva; + protected final QualifierOfParameterOfMeasuredValues qpm; + + public InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE( + int address, ScaledValue sva, QualifierOfParameterOfMeasuredValues qpm) { super(address); + this.sva = sva; + this.qpm = qpm; + } + + public ScaledValue getSva() { + return sva; + } + + public QualifierOfParameterOfMeasuredValues getQpm() { + return qpm; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE"); + // Simple Field (sva) + writeSimpleField( + "sva", + sva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qpm) + writeSimpleField( + "qpm", + qpm, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sva) + lengthInBits += sva.getLengthInBits(); + + // Simple field (qpm) + lengthInBits += qpm.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,39 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ScaledValue sva = + readSimpleField( + "sva", + new DataReaderComplexDefault<>(() -> ScaledValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualifierOfParameterOfMeasuredValues qpm = + readSimpleField( + "qpm", + new DataReaderComplexDefault<>( + () -> QualifierOfParameterOfMeasuredValues.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE"); // Create the instance - return new InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUEBuilderImpl(); + return new InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUEBuilderImpl(sva, qpm); } public static class InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUEBuilderImpl implements InformationObject.InformationObjectBuilder { + private final ScaledValue sva; + private final QualifierOfParameterOfMeasuredValues qpm; - public InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUEBuilderImpl() {} + public InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUEBuilderImpl( + ScaledValue sva, QualifierOfParameterOfMeasuredValues qpm) { + this.sva = sva; + this.qpm = qpm; + } public InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE build(int address) { InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE informationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE = - new InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE(address); + new InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE(address, sva, qpm); return informationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE; } } @@ -105,12 +159,12 @@ public boolean equals(Object o) { } InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE that = (InformationObject_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE) o; - return super.equals(that) && true; + return (getSva() == that.getSva()) && (getQpm() == that.getQpm()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSva(), getQpm()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER.java index 3227451e13f..fb7aca161a1 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER; } - public InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER(int address) { + // Properties. + protected final float value; + protected final QualifierOfParameterOfMeasuredValues qpm; + + public InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER( + int address, float value, QualifierOfParameterOfMeasuredValues qpm) { super(address); + this.value = value; + this.qpm = qpm; + } + + public float getValue() { + return value; + } + + public QualifierOfParameterOfMeasuredValues getQpm() { + return qpm; } @Override @@ -55,6 +70,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) writeBuffer.pushContext( "InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER"); + // Simple Field (value) + writeSimpleField( + "value", + value, + writeFloat(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qpm) + writeSimpleField( + "qpm", + qpm, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext( "InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER"); } @@ -70,6 +99,12 @@ public int getLengthInBits() { InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (value) + lengthInBits += 32; + + // Simple field (qpm) + lengthInBits += qpm.getLengthInBits(); + return lengthInBits; } @@ -80,25 +115,42 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + float value = + readSimpleField( + "value", readFloat(readBuffer, 32), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualifierOfParameterOfMeasuredValues qpm = + readSimpleField( + "qpm", + new DataReaderComplexDefault<>( + () -> QualifierOfParameterOfMeasuredValues.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext( "InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER"); // Create the instance - return new InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBERBuilderImpl(); + return new InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBERBuilderImpl( + value, qpm); } public static class InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBERBuilderImpl implements InformationObject.InformationObjectBuilder { + private final float value; + private final QualifierOfParameterOfMeasuredValues qpm; - public - InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBERBuilderImpl() {} + public InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBERBuilderImpl( + float value, QualifierOfParameterOfMeasuredValues qpm) { + this.value = value; + this.qpm = qpm; + } public InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER build( int address) { InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER informationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER = new InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER( - address); + address, value, qpm); return informationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER; } } @@ -114,12 +166,15 @@ public boolean equals(Object o) { } InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER that = (InformationObject_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER) o; - return super.equals(that) && true; + return (getValue() == that.getValue()) + && (getQpm() == that.getQpm()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getValue(), getQpm()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java index 800e660a284..23d145a21b4 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,39 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final SingleEventOfProtectionEquipment sep; + protected final QualityDescriptorForPointsOfProtectionEquipment qdp; + protected final TwoOctetBinaryTime cp16Time2a; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A( + int address, + SingleEventOfProtectionEquipment sep, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + SevenOctetBinaryTime cp56Time2a) { super(address); + this.sep = sep; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp56Time2a = cp56Time2a; + } + + public SingleEventOfProtectionEquipment getSep() { + return sep; + } + + public QualityDescriptorForPointsOfProtectionEquipment getQdp() { + return qdp; + } + + public TwoOctetBinaryTime getCp16Time2a() { + return cp16Time2a; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -54,6 +85,34 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (sep) + writeSimpleField( + "sep", + sep, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qdp) + writeSimpleField( + "qdp", + qdp, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp16Time2a) + writeSimpleField( + "cp16Time2a", + cp16Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); } @@ -68,6 +127,18 @@ public int getLengthInBits() { InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sep) + lengthInBits += sep.getLengthInBits(); + + // Simple field (qdp) + lengthInBits += qdp.getLengthInBits(); + + // Simple field (cp16Time2a) + lengthInBits += cp16Time2a.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +148,64 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + SingleEventOfProtectionEquipment sep = + readSimpleField( + "sep", + new DataReaderComplexDefault<>( + () -> SingleEventOfProtectionEquipment.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptorForPointsOfProtectionEquipment qdp = + readSimpleField( + "qdp", + new DataReaderComplexDefault<>( + () -> QualityDescriptorForPointsOfProtectionEquipment.staticParse(readBuffer), + readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + TwoOctetBinaryTime cp16Time2a = + readSimpleField( + "cp16Time2a", + new DataReaderComplexDefault<>( + () -> TwoOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + sep, qdp, cp16Time2a, cp56Time2a); } public static class InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + private final SingleEventOfProtectionEquipment sep; + private final QualityDescriptorForPointsOfProtectionEquipment qdp; + private final TwoOctetBinaryTime cp16Time2a; + private final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + SingleEventOfProtectionEquipment sep, + QualityDescriptorForPointsOfProtectionEquipment qdp, + TwoOctetBinaryTime cp16Time2a, + SevenOctetBinaryTime cp56Time2a) { + this.sep = sep; + this.qdp = qdp; + this.cp16Time2a = cp16Time2a; + this.cp56Time2a = cp56Time2a; + } public InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A build(int address) { InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A informationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A( + address, sep, qdp, cp16Time2a, cp56Time2a); return informationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A; } } @@ -105,12 +220,17 @@ public boolean equals(Object o) { } InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getSep() == that.getSep()) + && (getQdp() == that.getQdp()) + && (getCp16Time2a() == that.getCp16Time2a()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSep(), getQdp(), getCp16Time2a(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_REGULATING_STEP_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_REGULATING_STEP_COMMAND.java index d680ab81387..ffccf6ede2e 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_REGULATING_STEP_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_REGULATING_STEP_COMMAND.java @@ -43,8 +43,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.REGULATING_STEP_COMMAND; } - public InformationObject_REGULATING_STEP_COMMAND(int address) { + // Properties. + protected final RegulatingStepCommand rco; + + public InformationObject_REGULATING_STEP_COMMAND(int address, RegulatingStepCommand rco) { super(address); + this.rco = rco; + } + + public RegulatingStepCommand getRco() { + return rco; } @Override @@ -54,6 +62,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_REGULATING_STEP_COMMAND"); + // Simple Field (rco) + writeSimpleField( + "rco", + rco, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_REGULATING_STEP_COMMAND"); } @@ -68,6 +83,9 @@ public int getLengthInBits() { InformationObject_REGULATING_STEP_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (rco) + lengthInBits += rco.getLengthInBits(); + return lengthInBits; } @@ -77,19 +95,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + RegulatingStepCommand rco = + readSimpleField( + "rco", + new DataReaderComplexDefault<>( + () -> RegulatingStepCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_REGULATING_STEP_COMMAND"); // Create the instance - return new InformationObject_REGULATING_STEP_COMMANDBuilderImpl(); + return new InformationObject_REGULATING_STEP_COMMANDBuilderImpl(rco); } public static class InformationObject_REGULATING_STEP_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final RegulatingStepCommand rco; - public InformationObject_REGULATING_STEP_COMMANDBuilderImpl() {} + public InformationObject_REGULATING_STEP_COMMANDBuilderImpl(RegulatingStepCommand rco) { + this.rco = rco; + } public InformationObject_REGULATING_STEP_COMMAND build(int address) { InformationObject_REGULATING_STEP_COMMAND informationObject_REGULATING_STEP_COMMAND = - new InformationObject_REGULATING_STEP_COMMAND(address); + new InformationObject_REGULATING_STEP_COMMAND(address, rco); return informationObject_REGULATING_STEP_COMMAND; } } @@ -103,12 +131,12 @@ public boolean equals(Object o) { return false; } InformationObject_REGULATING_STEP_COMMAND that = (InformationObject_REGULATING_STEP_COMMAND) o; - return super.equals(that) && true; + return (getRco() == that.getRco()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getRco()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_RESET_PROCESS_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_RESET_PROCESS_COMMAND.java index 70c8f2a6bb1..8103bb987c5 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_RESET_PROCESS_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_RESET_PROCESS_COMMAND.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.RESET_PROCESS_COMMAND; } - public InformationObject_RESET_PROCESS_COMMAND(int address) { + // Properties. + protected final QualifierOfResetProcessCommand qrp; + + public InformationObject_RESET_PROCESS_COMMAND(int address, QualifierOfResetProcessCommand qrp) { super(address); + this.qrp = qrp; + } + + public QualifierOfResetProcessCommand getQrp() { + return qrp; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_RESET_PROCESS_COMMAND"); + // Simple Field (qrp) + writeSimpleField( + "qrp", + qrp, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_RESET_PROCESS_COMMAND"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_RESET_PROCESS_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (qrp) + lengthInBits += qrp.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + QualifierOfResetProcessCommand qrp = + readSimpleField( + "qrp", + new DataReaderComplexDefault<>( + () -> QualifierOfResetProcessCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_RESET_PROCESS_COMMAND"); // Create the instance - return new InformationObject_RESET_PROCESS_COMMANDBuilderImpl(); + return new InformationObject_RESET_PROCESS_COMMANDBuilderImpl(qrp); } public static class InformationObject_RESET_PROCESS_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final QualifierOfResetProcessCommand qrp; - public InformationObject_RESET_PROCESS_COMMANDBuilderImpl() {} + public InformationObject_RESET_PROCESS_COMMANDBuilderImpl(QualifierOfResetProcessCommand qrp) { + this.qrp = qrp; + } public InformationObject_RESET_PROCESS_COMMAND build(int address) { InformationObject_RESET_PROCESS_COMMAND informationObject_RESET_PROCESS_COMMAND = - new InformationObject_RESET_PROCESS_COMMAND(address); + new InformationObject_RESET_PROCESS_COMMAND(address, qrp); return informationObject_RESET_PROCESS_COMMAND; } } @@ -102,12 +130,12 @@ public boolean equals(Object o) { return false; } InformationObject_RESET_PROCESS_COMMAND that = (InformationObject_RESET_PROCESS_COMMAND) o; - return super.equals(that) && true; + return (getQrp() == that.getQrp()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getQrp()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SECTION_READY.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SECTION_READY.java index a8a47587dcd..7347c6c59dc 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SECTION_READY.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SECTION_READY.java @@ -42,8 +42,35 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SECTION_READY; } - public InformationObject_SECTION_READY(int address) { + // Properties. + protected final NameOfFile nof; + protected final NameOfSection nos; + protected final LengthOfFile lof; + protected final SectionReadyQualifier srq; + + public InformationObject_SECTION_READY( + int address, NameOfFile nof, NameOfSection nos, LengthOfFile lof, SectionReadyQualifier srq) { super(address); + this.nof = nof; + this.nos = nos; + this.lof = lof; + this.srq = srq; + } + + public NameOfFile getNof() { + return nof; + } + + public NameOfSection getNos() { + return nos; + } + + public LengthOfFile getLof() { + return lof; + } + + public SectionReadyQualifier getSrq() { + return srq; } @Override @@ -53,6 +80,34 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SECTION_READY"); + // Simple Field (nof) + writeSimpleField( + "nof", + nof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (nos) + writeSimpleField( + "nos", + nos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (lof) + writeSimpleField( + "lof", + lof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (srq) + writeSimpleField( + "srq", + srq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SECTION_READY"); } @@ -67,6 +122,18 @@ public int getLengthInBits() { InformationObject_SECTION_READY _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nof) + lengthInBits += nof.getLengthInBits(); + + // Simple field (nos) + lengthInBits += nos.getLengthInBits(); + + // Simple field (lof) + lengthInBits += lof.getLengthInBits(); + + // Simple field (srq) + lengthInBits += srq.getLengthInBits(); + return lengthInBits; } @@ -76,19 +143,54 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NameOfFile nof = + readSimpleField( + "nof", + new DataReaderComplexDefault<>(() -> NameOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + NameOfSection nos = + readSimpleField( + "nos", + new DataReaderComplexDefault<>(() -> NameOfSection.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + LengthOfFile lof = + readSimpleField( + "lof", + new DataReaderComplexDefault<>(() -> LengthOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SectionReadyQualifier srq = + readSimpleField( + "srq", + new DataReaderComplexDefault<>( + () -> SectionReadyQualifier.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SECTION_READY"); // Create the instance - return new InformationObject_SECTION_READYBuilderImpl(); + return new InformationObject_SECTION_READYBuilderImpl(nof, nos, lof, srq); } public static class InformationObject_SECTION_READYBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_SECTION_READYBuilderImpl() {} + private final NameOfFile nof; + private final NameOfSection nos; + private final LengthOfFile lof; + private final SectionReadyQualifier srq; + + public InformationObject_SECTION_READYBuilderImpl( + NameOfFile nof, NameOfSection nos, LengthOfFile lof, SectionReadyQualifier srq) { + this.nof = nof; + this.nos = nos; + this.lof = lof; + this.srq = srq; + } public InformationObject_SECTION_READY build(int address) { InformationObject_SECTION_READY informationObject_SECTION_READY = - new InformationObject_SECTION_READY(address); + new InformationObject_SECTION_READY(address, nof, nos, lof, srq); return informationObject_SECTION_READY; } } @@ -102,12 +204,17 @@ public boolean equals(Object o) { return false; } InformationObject_SECTION_READY that = (InformationObject_SECTION_READY) o; - return super.equals(that) && true; + return (getNof() == that.getNof()) + && (getNos() == that.getNos()) + && (getLof() == that.getLof()) + && (getSrq() == that.getSrq()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNof(), getNos(), getLof(), getSrq()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SEGMENT.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SEGMENT.java index c2391df82fa..87da39bfcf4 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SEGMENT.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SEGMENT.java @@ -42,8 +42,29 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SEGMENT; } - public InformationObject_SEGMENT(int address) { + // Properties. + protected final NameOfFile nof; + protected final NameOfSection nos; + protected final LengthOfSegment los; + + public InformationObject_SEGMENT( + int address, NameOfFile nof, NameOfSection nos, LengthOfSegment los) { super(address); + this.nof = nof; + this.nos = nos; + this.los = los; + } + + public NameOfFile getNof() { + return nof; + } + + public NameOfSection getNos() { + return nos; + } + + public LengthOfSegment getLos() { + return los; } @Override @@ -53,6 +74,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SEGMENT"); + // Simple Field (nof) + writeSimpleField( + "nof", + nof, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (nos) + writeSimpleField( + "nos", + nos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (los) + writeSimpleField( + "los", + los, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SEGMENT"); } @@ -67,6 +109,15 @@ public int getLengthInBits() { InformationObject_SEGMENT _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nof) + lengthInBits += nof.getLengthInBits(); + + // Simple field (nos) + lengthInBits += nos.getLengthInBits(); + + // Simple field (los) + lengthInBits += los.getLengthInBits(); + return lengthInBits; } @@ -76,18 +127,46 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NameOfFile nof = + readSimpleField( + "nof", + new DataReaderComplexDefault<>(() -> NameOfFile.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + NameOfSection nos = + readSimpleField( + "nos", + new DataReaderComplexDefault<>(() -> NameOfSection.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + LengthOfSegment los = + readSimpleField( + "los", + new DataReaderComplexDefault<>( + () -> LengthOfSegment.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SEGMENT"); // Create the instance - return new InformationObject_SEGMENTBuilderImpl(); + return new InformationObject_SEGMENTBuilderImpl(nof, nos, los); } public static class InformationObject_SEGMENTBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_SEGMENTBuilderImpl() {} + private final NameOfFile nof; + private final NameOfSection nos; + private final LengthOfSegment los; + + public InformationObject_SEGMENTBuilderImpl( + NameOfFile nof, NameOfSection nos, LengthOfSegment los) { + this.nof = nof; + this.nos = nos; + this.los = los; + } public InformationObject_SEGMENT build(int address) { - InformationObject_SEGMENT informationObject_SEGMENT = new InformationObject_SEGMENT(address); + InformationObject_SEGMENT informationObject_SEGMENT = + new InformationObject_SEGMENT(address, nof, nos, los); return informationObject_SEGMENT; } } @@ -101,12 +180,16 @@ public boolean equals(Object o) { return false; } InformationObject_SEGMENT that = (InformationObject_SEGMENT) o; - return super.equals(that) && true; + return (getNof() == that.getNof()) + && (getNos() == that.getNos()) + && (getLos() == that.getLos()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNof(), getNos(), getLos()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE.java index a997111317e..d50db764153 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SET_POINT_COMMAND_NORMALISED_VALUE; } - public InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE(int address) { + // Properties. + protected final NormalizedValue nva; + protected final QualifierOfSetPointCommand qos; + + public InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE( + int address, NormalizedValue nva, QualifierOfSetPointCommand qos) { super(address); + this.nva = nva; + this.qos = qos; + } + + public NormalizedValue getNva() { + return nva; + } + + public QualifierOfSetPointCommand getQos() { + return qos; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE"); + // Simple Field (nva) + writeSimpleField( + "nva", + nva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qos) + writeSimpleField( + "qos", + qos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (nva) + lengthInBits += nva.getLengthInBits(); + + // Simple field (qos) + lengthInBits += qos.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,40 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + NormalizedValue nva = + readSimpleField( + "nva", + new DataReaderComplexDefault<>( + () -> NormalizedValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualifierOfSetPointCommand qos = + readSimpleField( + "qos", + new DataReaderComplexDefault<>( + () -> QualifierOfSetPointCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE"); // Create the instance - return new InformationObject_SET_POINT_COMMAND_NORMALISED_VALUEBuilderImpl(); + return new InformationObject_SET_POINT_COMMAND_NORMALISED_VALUEBuilderImpl(nva, qos); } public static class InformationObject_SET_POINT_COMMAND_NORMALISED_VALUEBuilderImpl implements InformationObject.InformationObjectBuilder { + private final NormalizedValue nva; + private final QualifierOfSetPointCommand qos; - public InformationObject_SET_POINT_COMMAND_NORMALISED_VALUEBuilderImpl() {} + public InformationObject_SET_POINT_COMMAND_NORMALISED_VALUEBuilderImpl( + NormalizedValue nva, QualifierOfSetPointCommand qos) { + this.nva = nva; + this.qos = qos; + } public InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE build(int address) { InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE informationObject_SET_POINT_COMMAND_NORMALISED_VALUE = - new InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE(address); + new InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE(address, nva, qos); return informationObject_SET_POINT_COMMAND_NORMALISED_VALUE; } } @@ -105,12 +160,12 @@ public boolean equals(Object o) { } InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE that = (InformationObject_SET_POINT_COMMAND_NORMALISED_VALUE) o; - return super.equals(that) && true; + return (getNva() == that.getNva()) && (getQos() == that.getQos()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getNva(), getQos()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SCALED_VALUE.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SCALED_VALUE.java index 22bee7493eb..b22d4c5bd6f 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SCALED_VALUE.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SCALED_VALUE.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SET_POINT_COMMAND_SCALED_VALUE; } - public InformationObject_SET_POINT_COMMAND_SCALED_VALUE(int address) { + // Properties. + protected final ScaledValue sva; + protected final QualifierOfSetPointCommand qos; + + public InformationObject_SET_POINT_COMMAND_SCALED_VALUE( + int address, ScaledValue sva, QualifierOfSetPointCommand qos) { super(address); + this.sva = sva; + this.qos = qos; + } + + public ScaledValue getSva() { + return sva; + } + + public QualifierOfSetPointCommand getQos() { + return qos; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SET_POINT_COMMAND_SCALED_VALUE"); + // Simple Field (sva) + writeSimpleField( + "sva", + sva, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qos) + writeSimpleField( + "qos", + qos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SET_POINT_COMMAND_SCALED_VALUE"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_SET_POINT_COMMAND_SCALED_VALUE _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sva) + lengthInBits += sva.getLengthInBits(); + + // Simple field (qos) + lengthInBits += qos.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,39 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ScaledValue sva = + readSimpleField( + "sva", + new DataReaderComplexDefault<>(() -> ScaledValue.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualifierOfSetPointCommand qos = + readSimpleField( + "qos", + new DataReaderComplexDefault<>( + () -> QualifierOfSetPointCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SET_POINT_COMMAND_SCALED_VALUE"); // Create the instance - return new InformationObject_SET_POINT_COMMAND_SCALED_VALUEBuilderImpl(); + return new InformationObject_SET_POINT_COMMAND_SCALED_VALUEBuilderImpl(sva, qos); } public static class InformationObject_SET_POINT_COMMAND_SCALED_VALUEBuilderImpl implements InformationObject.InformationObjectBuilder { + private final ScaledValue sva; + private final QualifierOfSetPointCommand qos; - public InformationObject_SET_POINT_COMMAND_SCALED_VALUEBuilderImpl() {} + public InformationObject_SET_POINT_COMMAND_SCALED_VALUEBuilderImpl( + ScaledValue sva, QualifierOfSetPointCommand qos) { + this.sva = sva; + this.qos = qos; + } public InformationObject_SET_POINT_COMMAND_SCALED_VALUE build(int address) { InformationObject_SET_POINT_COMMAND_SCALED_VALUE informationObject_SET_POINT_COMMAND_SCALED_VALUE = - new InformationObject_SET_POINT_COMMAND_SCALED_VALUE(address); + new InformationObject_SET_POINT_COMMAND_SCALED_VALUE(address, sva, qos); return informationObject_SET_POINT_COMMAND_SCALED_VALUE; } } @@ -105,12 +159,12 @@ public boolean equals(Object o) { } InformationObject_SET_POINT_COMMAND_SCALED_VALUE that = (InformationObject_SET_POINT_COMMAND_SCALED_VALUE) o; - return super.equals(that) && true; + return (getSva() == that.getSva()) && (getQos() == that.getQos()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSva(), getQos()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER.java index 9ec16d5cde8..0e4e80664e7 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER; } - public InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER(int address) { + // Properties. + protected final float value; + protected final QualifierOfSetPointCommand qos; + + public InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER( + int address, float value, QualifierOfSetPointCommand qos) { super(address); + this.value = value; + this.qos = qos; + } + + public float getValue() { + return value; + } + + public QualifierOfSetPointCommand getQos() { + return qos; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER"); + // Simple Field (value) + writeSimpleField( + "value", + value, + writeFloat(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qos) + writeSimpleField( + "qos", + qos, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (value) + lengthInBits += 32; + + // Simple field (qos) + lengthInBits += qos.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,39 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + float value = + readSimpleField( + "value", readFloat(readBuffer, 32), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualifierOfSetPointCommand qos = + readSimpleField( + "qos", + new DataReaderComplexDefault<>( + () -> QualifierOfSetPointCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER"); // Create the instance - return new InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBERBuilderImpl(); + return new InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBERBuilderImpl( + value, qos); } public static class InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBERBuilderImpl implements InformationObject.InformationObjectBuilder { + private final float value; + private final QualifierOfSetPointCommand qos; - public InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBERBuilderImpl() {} + public InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBERBuilderImpl( + float value, QualifierOfSetPointCommand qos) { + this.value = value; + this.qos = qos; + } public InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER build(int address) { InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER informationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER = - new InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER(address); + new InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER( + address, value, qos); return informationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER; } } @@ -105,12 +159,15 @@ public boolean equals(Object o) { } InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER that = (InformationObject_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER) o; - return super.equals(that) && true; + return (getValue() == that.getValue()) + && (getQos() == that.getQos()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getValue(), getQos()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_COMMAND.java index 544d6f05d5c..722956e01ed 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_COMMAND.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SINGLE_COMMAND; } - public InformationObject_SINGLE_COMMAND(int address) { + // Properties. + protected final SingleCommand sco; + + public InformationObject_SINGLE_COMMAND(int address, SingleCommand sco) { super(address); + this.sco = sco; + } + + public SingleCommand getSco() { + return sco; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SINGLE_COMMAND"); + // Simple Field (sco) + writeSimpleField( + "sco", + sco, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SINGLE_COMMAND"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_SINGLE_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (sco) + lengthInBits += sco.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,28 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + SingleCommand sco = + readSimpleField( + "sco", + new DataReaderComplexDefault<>(() -> SingleCommand.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SINGLE_COMMAND"); // Create the instance - return new InformationObject_SINGLE_COMMANDBuilderImpl(); + return new InformationObject_SINGLE_COMMANDBuilderImpl(sco); } public static class InformationObject_SINGLE_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final SingleCommand sco; - public InformationObject_SINGLE_COMMANDBuilderImpl() {} + public InformationObject_SINGLE_COMMANDBuilderImpl(SingleCommand sco) { + this.sco = sco; + } public InformationObject_SINGLE_COMMAND build(int address) { InformationObject_SINGLE_COMMAND informationObject_SINGLE_COMMAND = - new InformationObject_SINGLE_COMMAND(address); + new InformationObject_SINGLE_COMMAND(address, sco); return informationObject_SINGLE_COMMAND; } } @@ -102,12 +129,12 @@ public boolean equals(Object o) { return false; } InformationObject_SINGLE_COMMAND that = (InformationObject_SINGLE_COMMAND) o; - return super.equals(that) && true; + return (getSco() == that.getSco()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSco()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION.java index fcbdae34b90..cd8ce729bf7 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION.java @@ -43,8 +43,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SINGLE_POINT_INFORMATION; } - public InformationObject_SINGLE_POINT_INFORMATION(int address) { + // Properties. + protected final SinglePointInformation siq; + + public InformationObject_SINGLE_POINT_INFORMATION(int address, SinglePointInformation siq) { super(address); + this.siq = siq; + } + + public SinglePointInformation getSiq() { + return siq; } @Override @@ -54,6 +62,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SINGLE_POINT_INFORMATION"); + // Simple Field (siq) + writeSimpleField( + "siq", + siq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SINGLE_POINT_INFORMATION"); } @@ -68,6 +83,9 @@ public int getLengthInBits() { InformationObject_SINGLE_POINT_INFORMATION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (siq) + lengthInBits += siq.getLengthInBits(); + return lengthInBits; } @@ -77,19 +95,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + SinglePointInformation siq = + readSimpleField( + "siq", + new DataReaderComplexDefault<>( + () -> SinglePointInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SINGLE_POINT_INFORMATION"); // Create the instance - return new InformationObject_SINGLE_POINT_INFORMATIONBuilderImpl(); + return new InformationObject_SINGLE_POINT_INFORMATIONBuilderImpl(siq); } public static class InformationObject_SINGLE_POINT_INFORMATIONBuilderImpl implements InformationObject.InformationObjectBuilder { + private final SinglePointInformation siq; - public InformationObject_SINGLE_POINT_INFORMATIONBuilderImpl() {} + public InformationObject_SINGLE_POINT_INFORMATIONBuilderImpl(SinglePointInformation siq) { + this.siq = siq; + } public InformationObject_SINGLE_POINT_INFORMATION build(int address) { InformationObject_SINGLE_POINT_INFORMATION informationObject_SINGLE_POINT_INFORMATION = - new InformationObject_SINGLE_POINT_INFORMATION(address); + new InformationObject_SINGLE_POINT_INFORMATION(address, siq); return informationObject_SINGLE_POINT_INFORMATION; } } @@ -104,12 +132,12 @@ public boolean equals(Object o) { } InformationObject_SINGLE_POINT_INFORMATION that = (InformationObject_SINGLE_POINT_INFORMATION) o; - return super.equals(that) && true; + return (getSiq() == that.getSiq()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSiq()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG.java index 3da3c8e00cc..b02400b976f 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SINGLE_POINT_INFORMATION_WITH_TIME_TAG; } - public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG(int address) { + // Properties. + protected final SinglePointInformation siq; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG( + int address, SinglePointInformation siq, ThreeOctetBinaryTime cp24Time2a) { super(address); + this.siq = siq; + this.cp24Time2a = cp24Time2a; + } + + public SinglePointInformation getSiq() { + return siq; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG"); + // Simple Field (siq) + writeSimpleField( + "siq", + siq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (siq) + lengthInBits += siq.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,41 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + SinglePointInformation siq = + readSimpleField( + "siq", + new DataReaderComplexDefault<>( + () -> SinglePointInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG"); // Create the instance - return new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl(siq, cp24Time2a); } public static class InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { + private final SinglePointInformation siq; + private final ThreeOctetBinaryTime cp24Time2a; - public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl() {} + public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAGBuilderImpl( + SinglePointInformation siq, ThreeOctetBinaryTime cp24Time2a) { + this.siq = siq; + this.cp24Time2a = cp24Time2a; + } public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG build(int address) { InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG informationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG = - new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG(address); + new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG( + address, siq, cp24Time2a); return informationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG; } } @@ -105,12 +161,15 @@ public boolean equals(Object o) { } InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG that = (InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getSiq() == that.getSiq()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSiq(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java index db254aa1cbe..4c2228bc26b 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final SinglePointInformation siq; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A( + int address, SinglePointInformation siq, SevenOctetBinaryTime cp56Time2a) { super(address); + this.siq = siq; + this.cp56Time2a = cp56Time2a; + } + + public SinglePointInformation getSiq() { + return siq; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (siq) + writeSimpleField( + "siq", + siq, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (siq) + lengthInBits += siq.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +112,42 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + SinglePointInformation siq = + readSimpleField( + "siq", + new DataReaderComplexDefault<>( + () -> SinglePointInformation.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + siq, cp56Time2a); } public static class InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { + private final SinglePointInformation siq; + private final SevenOctetBinaryTime cp56Time2a; - public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + SinglePointInformation siq, SevenOctetBinaryTime cp56Time2a) { + this.siq = siq; + this.cp56Time2a = cp56Time2a; + } public InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A build(int address) { InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A informationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A( + address, siq, cp56Time2a); return informationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A; } } @@ -105,12 +162,15 @@ public boolean equals(Object o) { } InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getSiq() == that.getSiq()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getSiq(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION.java index c765a84306a..a7d9f70dccd 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION.java @@ -43,8 +43,23 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.STEP_POSITION_INFORMATION; } - public InformationObject_STEP_POSITION_INFORMATION(int address) { + // Properties. + protected final ValueWithTransientStateIndication vti; + protected final QualityDescriptor qds; + + public InformationObject_STEP_POSITION_INFORMATION( + int address, ValueWithTransientStateIndication vti, QualityDescriptor qds) { super(address); + this.vti = vti; + this.qds = qds; + } + + public ValueWithTransientStateIndication getVti() { + return vti; + } + + public QualityDescriptor getQds() { + return qds; } @Override @@ -54,6 +69,20 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_STEP_POSITION_INFORMATION"); + // Simple Field (vti) + writeSimpleField( + "vti", + vti, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_STEP_POSITION_INFORMATION"); } @@ -68,6 +97,12 @@ public int getLengthInBits() { InformationObject_STEP_POSITION_INFORMATION _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (vti) + lengthInBits += vti.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + return lengthInBits; } @@ -77,19 +112,39 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ValueWithTransientStateIndication vti = + readSimpleField( + "vti", + new DataReaderComplexDefault<>( + () -> ValueWithTransientStateIndication.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_STEP_POSITION_INFORMATION"); // Create the instance - return new InformationObject_STEP_POSITION_INFORMATIONBuilderImpl(); + return new InformationObject_STEP_POSITION_INFORMATIONBuilderImpl(vti, qds); } public static class InformationObject_STEP_POSITION_INFORMATIONBuilderImpl implements InformationObject.InformationObjectBuilder { + private final ValueWithTransientStateIndication vti; + private final QualityDescriptor qds; - public InformationObject_STEP_POSITION_INFORMATIONBuilderImpl() {} + public InformationObject_STEP_POSITION_INFORMATIONBuilderImpl( + ValueWithTransientStateIndication vti, QualityDescriptor qds) { + this.vti = vti; + this.qds = qds; + } public InformationObject_STEP_POSITION_INFORMATION build(int address) { InformationObject_STEP_POSITION_INFORMATION informationObject_STEP_POSITION_INFORMATION = - new InformationObject_STEP_POSITION_INFORMATION(address); + new InformationObject_STEP_POSITION_INFORMATION(address, vti, qds); return informationObject_STEP_POSITION_INFORMATION; } } @@ -104,12 +159,12 @@ public boolean equals(Object o) { } InformationObject_STEP_POSITION_INFORMATION that = (InformationObject_STEP_POSITION_INFORMATION) o; - return super.equals(that) && true; + return (getVti() == that.getVti()) && (getQds() == that.getQds()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getVti(), getQds()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG.java index 550c7946cad..e480cbd49bd 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG.java @@ -43,8 +43,32 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.STEP_POSITION_INFORMATION_WITH_TIME_TAG; } - public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG(int address) { + // Properties. + protected final ValueWithTransientStateIndication vti; + protected final QualityDescriptor qds; + protected final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG( + int address, + ValueWithTransientStateIndication vti, + QualityDescriptor qds, + ThreeOctetBinaryTime cp24Time2a) { super(address); + this.vti = vti; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } + + public ValueWithTransientStateIndication getVti() { + return vti; + } + + public QualityDescriptor getQds() { + return qds; + } + + public ThreeOctetBinaryTime getCp24Time2a() { + return cp24Time2a; } @Override @@ -54,6 +78,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG"); + // Simple Field (vti) + writeSimpleField( + "vti", + vti, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp24Time2a) + writeSimpleField( + "cp24Time2a", + cp24Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG"); } @@ -68,6 +113,15 @@ public int getLengthInBits() { InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (vti) + lengthInBits += vti.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp24Time2a) + lengthInBits += cp24Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,20 +131,53 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ValueWithTransientStateIndication vti = + readSimpleField( + "vti", + new DataReaderComplexDefault<>( + () -> ValueWithTransientStateIndication.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + ThreeOctetBinaryTime cp24Time2a = + readSimpleField( + "cp24Time2a", + new DataReaderComplexDefault<>( + () -> ThreeOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG"); // Create the instance - return new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAGBuilderImpl(); + return new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAGBuilderImpl( + vti, qds, cp24Time2a); } public static class InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAGBuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAGBuilderImpl() {} + private final ValueWithTransientStateIndication vti; + private final QualityDescriptor qds; + private final ThreeOctetBinaryTime cp24Time2a; + + public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAGBuilderImpl( + ValueWithTransientStateIndication vti, + QualityDescriptor qds, + ThreeOctetBinaryTime cp24Time2a) { + this.vti = vti; + this.qds = qds; + this.cp24Time2a = cp24Time2a; + } public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG build(int address) { InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG informationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG = - new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG(address); + new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG( + address, vti, qds, cp24Time2a); return informationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG; } } @@ -105,12 +192,16 @@ public boolean equals(Object o) { } InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG that = (InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG) o; - return super.equals(that) && true; + return (getVti() == that.getVti()) + && (getQds() == that.getQds()) + && (getCp24Time2a() == that.getCp24Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getVti(), getQds(), getCp24Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java index b6234cee0e6..0d8ac8cdc5a 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A.java @@ -43,8 +43,32 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A; } - public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A(int address) { + // Properties. + protected final ValueWithTransientStateIndication vti; + protected final QualityDescriptor qds; + protected final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A( + int address, + ValueWithTransientStateIndication vti, + QualityDescriptor qds, + SevenOctetBinaryTime cp56Time2a) { super(address); + this.vti = vti; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } + + public ValueWithTransientStateIndication getVti() { + return vti; + } + + public QualityDescriptor getQds() { + return qds; + } + + public SevenOctetBinaryTime getCp56Time2a() { + return cp56Time2a; } @Override @@ -54,6 +78,27 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); + // Simple Field (vti) + writeSimpleField( + "vti", + vti, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (qds) + writeSimpleField( + "qds", + qds, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + // Simple Field (cp56Time2a) + writeSimpleField( + "cp56Time2a", + cp56Time2a, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); } @@ -68,6 +113,15 @@ public int getLengthInBits() { InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (vti) + lengthInBits += vti.getLengthInBits(); + + // Simple field (qds) + lengthInBits += qds.getLengthInBits(); + + // Simple field (cp56Time2a) + lengthInBits += cp56Time2a.getLengthInBits(); + return lengthInBits; } @@ -77,21 +131,54 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + ValueWithTransientStateIndication vti = + readSimpleField( + "vti", + new DataReaderComplexDefault<>( + () -> ValueWithTransientStateIndication.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + QualityDescriptor qds = + readSimpleField( + "qds", + new DataReaderComplexDefault<>( + () -> QualityDescriptor.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + SevenOctetBinaryTime cp56Time2a = + readSimpleField( + "cp56Time2a", + new DataReaderComplexDefault<>( + () -> SevenOctetBinaryTime.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A"); // Create the instance - return new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl(); + return new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + vti, qds, cp56Time2a); } public static class InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl implements InformationObject.InformationObjectBuilder { - - public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl() {} + private final ValueWithTransientStateIndication vti; + private final QualityDescriptor qds; + private final SevenOctetBinaryTime cp56Time2a; + + public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2ABuilderImpl( + ValueWithTransientStateIndication vti, + QualityDescriptor qds, + SevenOctetBinaryTime cp56Time2a) { + this.vti = vti; + this.qds = qds; + this.cp56Time2a = cp56Time2a; + } public InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A build(int address) { InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A informationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A = - new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A(address); + new InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A( + address, vti, qds, cp56Time2a); return informationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A; } } @@ -106,12 +193,16 @@ public boolean equals(Object o) { } InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A that = (InformationObject_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A) o; - return super.equals(that) && true; + return (getVti() == that.getVti()) + && (getQds() == that.getQds()) + && (getCp56Time2a() == that.getCp56Time2a()) + && super.equals(that) + && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getVti(), getQds(), getCp56Time2a()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_TEST_COMMAND.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_TEST_COMMAND.java index f699879eff1..831d27dc726 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_TEST_COMMAND.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/InformationObject_TEST_COMMAND.java @@ -42,8 +42,16 @@ public TypeIdentification getTypeIdentification() { return TypeIdentification.TEST_COMMAND; } - public InformationObject_TEST_COMMAND(int address) { + // Properties. + protected final FixedTestBitPatternTwoOctet fbp; + + public InformationObject_TEST_COMMAND(int address, FixedTestBitPatternTwoOctet fbp) { super(address); + this.fbp = fbp; + } + + public FixedTestBitPatternTwoOctet getFbp() { + return fbp; } @Override @@ -53,6 +61,13 @@ protected void serializeInformationObjectChild(WriteBuffer writeBuffer) boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("InformationObject_TEST_COMMAND"); + // Simple Field (fbp) + writeSimpleField( + "fbp", + fbp, + new DataWriterComplexDefault<>(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("InformationObject_TEST_COMMAND"); } @@ -67,6 +82,9 @@ public int getLengthInBits() { InformationObject_TEST_COMMAND _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (fbp) + lengthInBits += fbp.getLengthInBits(); + return lengthInBits; } @@ -76,19 +94,29 @@ public static InformationObjectBuilder staticParseInformationObjectBuilder( PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + FixedTestBitPatternTwoOctet fbp = + readSimpleField( + "fbp", + new DataReaderComplexDefault<>( + () -> FixedTestBitPatternTwoOctet.staticParse(readBuffer), readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("InformationObject_TEST_COMMAND"); // Create the instance - return new InformationObject_TEST_COMMANDBuilderImpl(); + return new InformationObject_TEST_COMMANDBuilderImpl(fbp); } public static class InformationObject_TEST_COMMANDBuilderImpl implements InformationObject.InformationObjectBuilder { + private final FixedTestBitPatternTwoOctet fbp; - public InformationObject_TEST_COMMANDBuilderImpl() {} + public InformationObject_TEST_COMMANDBuilderImpl(FixedTestBitPatternTwoOctet fbp) { + this.fbp = fbp; + } public InformationObject_TEST_COMMAND build(int address) { InformationObject_TEST_COMMAND informationObject_TEST_COMMAND = - new InformationObject_TEST_COMMAND(address); + new InformationObject_TEST_COMMAND(address, fbp); return informationObject_TEST_COMMAND; } } @@ -102,12 +130,12 @@ public boolean equals(Object o) { return false; } InformationObject_TEST_COMMAND that = (InformationObject_TEST_COMMAND) o; - return super.equals(that) && true; + return (getFbp() == that.getFbp()) && super.equals(that) && true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode(), getFbp()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/NormalizedValue.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/NormalizedValue.java index 9f09e671925..77993d7e8b6 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/NormalizedValue.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/NormalizedValue.java @@ -37,8 +37,16 @@ public class NormalizedValue implements Message { - public NormalizedValue() { + // Properties. + protected final int value; + + public NormalizedValue(int value) { super(); + this.value = value; + } + + public int getValue() { + return value; } public void serialize(WriteBuffer writeBuffer) throws SerializationException { @@ -46,6 +54,13 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("NormalizedValue"); + // Simple Field (value) + writeSimpleField( + "value", + value, + writeUnsignedInt(writeBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("NormalizedValue"); } @@ -60,6 +75,9 @@ public int getLengthInBits() { NormalizedValue _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Simple field (value) + lengthInBits += 16; + return lengthInBits; } @@ -74,10 +92,16 @@ public static NormalizedValue staticParse(ReadBuffer readBuffer) throws ParseExc PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + int value = + readSimpleField( + "value", + readUnsignedInt(readBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("NormalizedValue"); // Create the instance NormalizedValue _normalizedValue; - _normalizedValue = new NormalizedValue(); + _normalizedValue = new NormalizedValue(value); return _normalizedValue; } @@ -90,12 +114,12 @@ public boolean equals(Object o) { return false; } NormalizedValue that = (NormalizedValue) o; - return true; + return (getValue() == that.getValue()) && true; } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(getValue()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/OutputCircuitInformation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/OutputCircuitInformation.java index 8d22d72b206..48034089cb1 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/OutputCircuitInformation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/OutputCircuitInformation.java @@ -77,19 +77,39 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("OutputCircuitInformation"); // Reserved Field (reserved) - writeReservedField("reserved", (byte) 0, writeUnsignedByte(writeBuffer, 4)); + writeReservedField( + "reserved", + (byte) 0, + writeUnsignedByte(writeBuffer, 4), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (stateOfOperationPhaseL3) - writeSimpleField("stateOfOperationPhaseL3", stateOfOperationPhaseL3, writeBoolean(writeBuffer)); + writeSimpleField( + "stateOfOperationPhaseL3", + stateOfOperationPhaseL3, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (stateOfOperationPhaseL2) - writeSimpleField("stateOfOperationPhaseL2", stateOfOperationPhaseL2, writeBoolean(writeBuffer)); + writeSimpleField( + "stateOfOperationPhaseL2", + stateOfOperationPhaseL2, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (stateOfOperationPhaseL1) - writeSimpleField("stateOfOperationPhaseL1", stateOfOperationPhaseL1, writeBoolean(writeBuffer)); + writeSimpleField( + "stateOfOperationPhaseL1", + stateOfOperationPhaseL1, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (generalStartOfOperation) - writeSimpleField("generalStartOfOperation", generalStartOfOperation, writeBoolean(writeBuffer)); + writeSimpleField( + "generalStartOfOperation", + generalStartOfOperation, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("OutputCircuitInformation"); } @@ -134,19 +154,36 @@ public static OutputCircuitInformation staticParse(ReadBuffer readBuffer) throws PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - Byte reservedField0 = readReservedField("reserved", readUnsignedByte(readBuffer, 4), (byte) 0); + Byte reservedField0 = + readReservedField( + "reserved", + readUnsignedByte(readBuffer, 4), + (byte) 0, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean stateOfOperationPhaseL3 = - readSimpleField("stateOfOperationPhaseL3", readBoolean(readBuffer)); + readSimpleField( + "stateOfOperationPhaseL3", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean stateOfOperationPhaseL2 = - readSimpleField("stateOfOperationPhaseL2", readBoolean(readBuffer)); + readSimpleField( + "stateOfOperationPhaseL2", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean stateOfOperationPhaseL1 = - readSimpleField("stateOfOperationPhaseL1", readBoolean(readBuffer)); + readSimpleField( + "stateOfOperationPhaseL1", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean generalStartOfOperation = - readSimpleField("generalStartOfOperation", readBoolean(readBuffer)); + readSimpleField( + "generalStartOfOperation", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("OutputCircuitInformation"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCommand.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCommand.java index 032ce9b5bde..ac46b2c49b2 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCommand.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCommand.java @@ -61,10 +61,18 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualifierOfCommand"); // Simple Field (select) - writeSimpleField("select", select, writeBoolean(writeBuffer)); + writeSimpleField( + "select", + select, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (qualifier) - writeSimpleField("qualifier", qualifier, writeUnsignedByte(writeBuffer, 5)); + writeSimpleField( + "qualifier", + qualifier, + writeUnsignedByte(writeBuffer, 5), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualifierOfCommand"); } @@ -100,9 +108,15 @@ public static QualifierOfCommand staticParse(ReadBuffer readBuffer) throws Parse PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean select = readSimpleField("select", readBoolean(readBuffer)); + boolean select = + readSimpleField( + "select", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - byte qualifier = readSimpleField("qualifier", readUnsignedByte(readBuffer, 5)); + byte qualifier = + readSimpleField( + "qualifier", + readUnsignedByte(readBuffer, 5), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualifierOfCommand"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCounterInterrogationCommand.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCounterInterrogationCommand.java index 2d6ad58c603..1f0c136b334 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCounterInterrogationCommand.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfCounterInterrogationCommand.java @@ -61,10 +61,18 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualifierOfCounterInterrogationCommand"); // Simple Field (freeze) - writeSimpleField("freeze", freeze, writeUnsignedByte(writeBuffer, 2)); + writeSimpleField( + "freeze", + freeze, + writeUnsignedByte(writeBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (request) - writeSimpleField("request", request, writeUnsignedByte(writeBuffer, 6)); + writeSimpleField( + "request", + request, + writeUnsignedByte(writeBuffer, 6), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualifierOfCounterInterrogationCommand"); } @@ -101,9 +109,17 @@ public static QualifierOfCounterInterrogationCommand staticParse(ReadBuffer read PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - byte freeze = readSimpleField("freeze", readUnsignedByte(readBuffer, 2)); - - byte request = readSimpleField("request", readUnsignedByte(readBuffer, 6)); + byte freeze = + readSimpleField( + "freeze", + readUnsignedByte(readBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + byte request = + readSimpleField( + "request", + readUnsignedByte(readBuffer, 6), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualifierOfCounterInterrogationCommand"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfInterrogation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfInterrogation.java index f11597fa4a3..edf7466db05 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfInterrogation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfInterrogation.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualifierOfInterrogation"); // Simple Field (qualifierOfCommand) - writeSimpleField("qualifierOfCommand", qualifierOfCommand, writeUnsignedShort(writeBuffer, 8)); + writeSimpleField( + "qualifierOfCommand", + qualifierOfCommand, + writeUnsignedShort(writeBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualifierOfInterrogation"); } @@ -89,7 +93,10 @@ public static QualifierOfInterrogation staticParse(ReadBuffer readBuffer) throws boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); short qualifierOfCommand = - readSimpleField("qualifierOfCommand", readUnsignedShort(readBuffer, 8)); + readSimpleField( + "qualifierOfCommand", + readUnsignedShort(readBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualifierOfInterrogation"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterActivation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterActivation.java index 51d3767319c..6f01b64c2ac 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterActivation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterActivation.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualifierOfParameterActivation"); // Simple Field (qualifier) - writeSimpleField("qualifier", qualifier, writeUnsignedShort(writeBuffer, 8)); + writeSimpleField( + "qualifier", + qualifier, + writeUnsignedShort(writeBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualifierOfParameterActivation"); } @@ -89,7 +93,11 @@ public static QualifierOfParameterActivation staticParse(ReadBuffer readBuffer) PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - short qualifier = readSimpleField("qualifier", readUnsignedShort(readBuffer, 8)); + short qualifier = + readSimpleField( + "qualifier", + readUnsignedShort(readBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualifierOfParameterActivation"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterOfMeasuredValues.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterOfMeasuredValues.java index ec9aa60ebdd..1c3b5dd049c 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterOfMeasuredValues.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfParameterOfMeasuredValues.java @@ -68,13 +68,25 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualifierOfParameterOfMeasuredValues"); // Simple Field (parameterInOperation) - writeSimpleField("parameterInOperation", parameterInOperation, writeBoolean(writeBuffer)); + writeSimpleField( + "parameterInOperation", + parameterInOperation, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (localParameterChange) - writeSimpleField("localParameterChange", localParameterChange, writeBoolean(writeBuffer)); + writeSimpleField( + "localParameterChange", + localParameterChange, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (kindOfParameter) - writeSimpleField("kindOfParameter", kindOfParameter, writeUnsignedByte(writeBuffer, 6)); + writeSimpleField( + "kindOfParameter", + kindOfParameter, + writeUnsignedByte(writeBuffer, 6), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualifierOfParameterOfMeasuredValues"); } @@ -114,11 +126,23 @@ public static QualifierOfParameterOfMeasuredValues staticParse(ReadBuffer readBu PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean parameterInOperation = readSimpleField("parameterInOperation", readBoolean(readBuffer)); - - boolean localParameterChange = readSimpleField("localParameterChange", readBoolean(readBuffer)); - - byte kindOfParameter = readSimpleField("kindOfParameter", readUnsignedByte(readBuffer, 6)); + boolean parameterInOperation = + readSimpleField( + "parameterInOperation", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean localParameterChange = + readSimpleField( + "localParameterChange", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + byte kindOfParameter = + readSimpleField( + "kindOfParameter", + readUnsignedByte(readBuffer, 6), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualifierOfParameterOfMeasuredValues"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfResetProcessCommand.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfResetProcessCommand.java index beae465555b..65ab6629940 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfResetProcessCommand.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfResetProcessCommand.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualifierOfResetProcessCommand"); // Simple Field (qualifier) - writeSimpleField("qualifier", qualifier, writeUnsignedShort(writeBuffer, 8)); + writeSimpleField( + "qualifier", + qualifier, + writeUnsignedShort(writeBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualifierOfResetProcessCommand"); } @@ -89,7 +93,11 @@ public static QualifierOfResetProcessCommand staticParse(ReadBuffer readBuffer) PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - short qualifier = readSimpleField("qualifier", readUnsignedShort(readBuffer, 8)); + short qualifier = + readSimpleField( + "qualifier", + readUnsignedShort(readBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualifierOfResetProcessCommand"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfSetPointCommand.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfSetPointCommand.java index 5e4da9dc3f7..9dec36ff4bb 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfSetPointCommand.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualifierOfSetPointCommand.java @@ -61,10 +61,18 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualifierOfSetPointCommand"); // Simple Field (select) - writeSimpleField("select", select, writeBoolean(writeBuffer)); + writeSimpleField( + "select", + select, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (qualifier) - writeSimpleField("qualifier", qualifier, writeUnsignedByte(writeBuffer, 7)); + writeSimpleField( + "qualifier", + qualifier, + writeUnsignedByte(writeBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualifierOfSetPointCommand"); } @@ -101,9 +109,15 @@ public static QualifierOfSetPointCommand staticParse(ReadBuffer readBuffer) PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean select = readSimpleField("select", readBoolean(readBuffer)); + boolean select = + readSimpleField( + "select", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - byte qualifier = readSimpleField("qualifier", readUnsignedByte(readBuffer, 7)); + byte qualifier = + readSimpleField( + "qualifier", + readUnsignedByte(readBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualifierOfSetPointCommand"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptor.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptor.java index 900dd2fe685..f84ffa0b9cc 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptor.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptor.java @@ -80,22 +80,46 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualityDescriptor"); // Simple Field (invalid) - writeSimpleField("invalid", invalid, writeBoolean(writeBuffer)); + writeSimpleField( + "invalid", + invalid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (notTopical) - writeSimpleField("notTopical", notTopical, writeBoolean(writeBuffer)); + writeSimpleField( + "notTopical", + notTopical, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (substituted) - writeSimpleField("substituted", substituted, writeBoolean(writeBuffer)); + writeSimpleField( + "substituted", + substituted, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (blocked) - writeSimpleField("blocked", blocked, writeBoolean(writeBuffer)); + writeSimpleField( + "blocked", + blocked, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Reserved Field (reserved) - writeReservedField("reserved", (byte) 0, writeUnsignedByte(writeBuffer, 3)); + writeReservedField( + "reserved", + (byte) 0, + writeUnsignedByte(writeBuffer, 3), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (overflow) - writeSimpleField("overflow", overflow, writeBoolean(writeBuffer)); + writeSimpleField( + "overflow", + overflow, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualityDescriptor"); } @@ -143,17 +167,36 @@ public static QualityDescriptor staticParse(ReadBuffer readBuffer) throws ParseE PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean invalid = readSimpleField("invalid", readBoolean(readBuffer)); - - boolean notTopical = readSimpleField("notTopical", readBoolean(readBuffer)); - - boolean substituted = readSimpleField("substituted", readBoolean(readBuffer)); - - boolean blocked = readSimpleField("blocked", readBoolean(readBuffer)); - - Byte reservedField0 = readReservedField("reserved", readUnsignedByte(readBuffer, 3), (byte) 0); - - boolean overflow = readSimpleField("overflow", readBoolean(readBuffer)); + boolean invalid = + readSimpleField( + "invalid", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean notTopical = + readSimpleField( + "notTopical", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean substituted = + readSimpleField( + "substituted", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean blocked = + readSimpleField( + "blocked", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + Byte reservedField0 = + readReservedField( + "reserved", + readUnsignedByte(readBuffer, 3), + (byte) 0, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean overflow = + readSimpleField( + "overflow", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualityDescriptor"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptorForPointsOfProtectionEquipment.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptorForPointsOfProtectionEquipment.java index 8fe14f7bc7f..dafb220154d 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptorForPointsOfProtectionEquipment.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/QualityDescriptorForPointsOfProtectionEquipment.java @@ -84,22 +84,46 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("QualityDescriptorForPointsOfProtectionEquipment"); // Simple Field (invalid) - writeSimpleField("invalid", invalid, writeBoolean(writeBuffer)); + writeSimpleField( + "invalid", + invalid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (notTopical) - writeSimpleField("notTopical", notTopical, writeBoolean(writeBuffer)); + writeSimpleField( + "notTopical", + notTopical, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (substituted) - writeSimpleField("substituted", substituted, writeBoolean(writeBuffer)); + writeSimpleField( + "substituted", + substituted, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (blocked) - writeSimpleField("blocked", blocked, writeBoolean(writeBuffer)); + writeSimpleField( + "blocked", + blocked, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (elapsedTimeInvalid) - writeSimpleField("elapsedTimeInvalid", elapsedTimeInvalid, writeBoolean(writeBuffer)); + writeSimpleField( + "elapsedTimeInvalid", + elapsedTimeInvalid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Reserved Field (reserved) - writeReservedField("reserved", (byte) 0, writeUnsignedByte(writeBuffer, 3)); + writeReservedField( + "reserved", + (byte) 0, + writeUnsignedByte(writeBuffer, 3), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("QualityDescriptorForPointsOfProtectionEquipment"); } @@ -148,17 +172,38 @@ public static QualityDescriptorForPointsOfProtectionEquipment staticParse(ReadBu PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean invalid = readSimpleField("invalid", readBoolean(readBuffer)); - - boolean notTopical = readSimpleField("notTopical", readBoolean(readBuffer)); - - boolean substituted = readSimpleField("substituted", readBoolean(readBuffer)); - - boolean blocked = readSimpleField("blocked", readBoolean(readBuffer)); - - boolean elapsedTimeInvalid = readSimpleField("elapsedTimeInvalid", readBoolean(readBuffer)); - - Byte reservedField0 = readReservedField("reserved", readUnsignedByte(readBuffer, 3), (byte) 0); + boolean invalid = + readSimpleField( + "invalid", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean notTopical = + readSimpleField( + "notTopical", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean substituted = + readSimpleField( + "substituted", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean blocked = + readSimpleField( + "blocked", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean elapsedTimeInvalid = + readSimpleField( + "elapsedTimeInvalid", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + Byte reservedField0 = + readReservedField( + "reserved", + readUnsignedByte(readBuffer, 3), + (byte) 0, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("QualityDescriptorForPointsOfProtectionEquipment"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ScaledValue.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ScaledValue.java index 6e249ca6b78..97c3ad23cc6 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ScaledValue.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ScaledValue.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("ScaledValue"); // Simple Field (value) - writeSimpleField("value", value, writeSignedShort(writeBuffer, 16)); + writeSimpleField( + "value", + value, + writeSignedShort(writeBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("ScaledValue"); } @@ -88,7 +92,11 @@ public static ScaledValue staticParse(ReadBuffer readBuffer) throws ParseExcepti PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - short value = readSimpleField("value", readSignedShort(readBuffer, 16)); + short value = + readSimpleField( + "value", + readSignedShort(readBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("ScaledValue"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SevenOctetBinaryTime.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SevenOctetBinaryTime.java index 9df07b8502c..c53951ed107 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SevenOctetBinaryTime.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SevenOctetBinaryTime.java @@ -37,8 +37,16 @@ public class SevenOctetBinaryTime implements Message { - public SevenOctetBinaryTime() { + // Properties. + protected final byte[] value; + + public SevenOctetBinaryTime(byte[] value) { super(); + this.value = value; + } + + public byte[] getValue() { + return value; } public void serialize(WriteBuffer writeBuffer) throws SerializationException { @@ -46,6 +54,13 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("SevenOctetBinaryTime"); + // Array Field (value) + writeByteArrayField( + "value", + value, + writeByteArray(writeBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("SevenOctetBinaryTime"); } @@ -60,6 +75,11 @@ public int getLengthInBits() { SevenOctetBinaryTime _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Array field + if (value != null) { + lengthInBits += 8 * value.length; + } + return lengthInBits; } @@ -74,10 +94,14 @@ public static SevenOctetBinaryTime staticParse(ReadBuffer readBuffer) throws Par PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + byte[] value = + readBuffer.readByteArray( + "value", Math.toIntExact(7), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("SevenOctetBinaryTime"); // Create the instance SevenOctetBinaryTime _sevenOctetBinaryTime; - _sevenOctetBinaryTime = new SevenOctetBinaryTime(); + _sevenOctetBinaryTime = new SevenOctetBinaryTime(value); return _sevenOctetBinaryTime; } @@ -90,12 +114,12 @@ public boolean equals(Object o) { return false; } SevenOctetBinaryTime that = (SevenOctetBinaryTime) o; - return true; + return (getValue() == that.getValue()) && true; } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(getValue()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ShortFloatingPointNumber.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ShortFloatingPointNumber.java index 841f07e1b1b..6c495ea5028 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ShortFloatingPointNumber.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ShortFloatingPointNumber.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("ShortFloatingPointNumber"); // Simple Field (value) - writeSimpleField("value", value, writeFloat(writeBuffer, 16)); + writeSimpleField( + "value", + value, + writeFloat(writeBuffer, 16), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("ShortFloatingPointNumber"); } @@ -88,7 +92,9 @@ public static ShortFloatingPointNumber staticParse(ReadBuffer readBuffer) throws PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - float value = readSimpleField("value", readFloat(readBuffer, 16)); + float value = + readSimpleField( + "value", readFloat(readBuffer, 16), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("ShortFloatingPointNumber"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SingleEventOfProtectionEquipment.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SingleEventOfProtectionEquipment.java index 0938c4a367d..4e56003c0ec 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SingleEventOfProtectionEquipment.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SingleEventOfProtectionEquipment.java @@ -91,25 +91,53 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("SingleEventOfProtectionEquipment"); // Simple Field (invalid) - writeSimpleField("invalid", invalid, writeBoolean(writeBuffer)); + writeSimpleField( + "invalid", + invalid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (notTopical) - writeSimpleField("notTopical", notTopical, writeBoolean(writeBuffer)); + writeSimpleField( + "notTopical", + notTopical, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (substituted) - writeSimpleField("substituted", substituted, writeBoolean(writeBuffer)); + writeSimpleField( + "substituted", + substituted, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (blocked) - writeSimpleField("blocked", blocked, writeBoolean(writeBuffer)); + writeSimpleField( + "blocked", + blocked, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (elapsedTimeInvalid) - writeSimpleField("elapsedTimeInvalid", elapsedTimeInvalid, writeBoolean(writeBuffer)); + writeSimpleField( + "elapsedTimeInvalid", + elapsedTimeInvalid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Reserved Field (reserved) - writeReservedField("reserved", (byte) 0, writeUnsignedByte(writeBuffer, 1)); + writeReservedField( + "reserved", + (byte) 0, + writeUnsignedByte(writeBuffer, 1), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (eventState) - writeSimpleField("eventState", eventState, writeUnsignedByte(writeBuffer, 2)); + writeSimpleField( + "eventState", + eventState, + writeUnsignedByte(writeBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("SingleEventOfProtectionEquipment"); } @@ -161,19 +189,44 @@ public static SingleEventOfProtectionEquipment staticParse(ReadBuffer readBuffer PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean invalid = readSimpleField("invalid", readBoolean(readBuffer)); - - boolean notTopical = readSimpleField("notTopical", readBoolean(readBuffer)); - - boolean substituted = readSimpleField("substituted", readBoolean(readBuffer)); - - boolean blocked = readSimpleField("blocked", readBoolean(readBuffer)); - - boolean elapsedTimeInvalid = readSimpleField("elapsedTimeInvalid", readBoolean(readBuffer)); - - Byte reservedField0 = readReservedField("reserved", readUnsignedByte(readBuffer, 1), (byte) 0); - - byte eventState = readSimpleField("eventState", readUnsignedByte(readBuffer, 2)); + boolean invalid = + readSimpleField( + "invalid", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean notTopical = + readSimpleField( + "notTopical", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean substituted = + readSimpleField( + "substituted", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean blocked = + readSimpleField( + "blocked", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean elapsedTimeInvalid = + readSimpleField( + "elapsedTimeInvalid", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + Byte reservedField0 = + readReservedField( + "reserved", + readUnsignedByte(readBuffer, 1), + (byte) 0, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + byte eventState = + readSimpleField( + "eventState", + readUnsignedByte(readBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("SingleEventOfProtectionEquipment"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SinglePointInformation.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SinglePointInformation.java index e5b06364669..995eefaef41 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SinglePointInformation.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/SinglePointInformation.java @@ -80,22 +80,46 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("SinglePointInformation"); // Simple Field (invalid) - writeSimpleField("invalid", invalid, writeBoolean(writeBuffer)); + writeSimpleField( + "invalid", + invalid, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (notTopical) - writeSimpleField("notTopical", notTopical, writeBoolean(writeBuffer)); + writeSimpleField( + "notTopical", + notTopical, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (substituted) - writeSimpleField("substituted", substituted, writeBoolean(writeBuffer)); + writeSimpleField( + "substituted", + substituted, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (blocked) - writeSimpleField("blocked", blocked, writeBoolean(writeBuffer)); + writeSimpleField( + "blocked", + blocked, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Reserved Field (reserved) - writeReservedField("reserved", (byte) 0, writeUnsignedByte(writeBuffer, 3)); + writeReservedField( + "reserved", + (byte) 0, + writeUnsignedByte(writeBuffer, 3), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (stausOn) - writeSimpleField("stausOn", stausOn, writeBoolean(writeBuffer)); + writeSimpleField( + "stausOn", + stausOn, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("SinglePointInformation"); } @@ -143,17 +167,36 @@ public static SinglePointInformation staticParse(ReadBuffer readBuffer) throws P PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean invalid = readSimpleField("invalid", readBoolean(readBuffer)); - - boolean notTopical = readSimpleField("notTopical", readBoolean(readBuffer)); - - boolean substituted = readSimpleField("substituted", readBoolean(readBuffer)); - - boolean blocked = readSimpleField("blocked", readBoolean(readBuffer)); - - Byte reservedField0 = readReservedField("reserved", readUnsignedByte(readBuffer, 3), (byte) 0); - - boolean stausOn = readSimpleField("stausOn", readBoolean(readBuffer)); + boolean invalid = + readSimpleField( + "invalid", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean notTopical = + readSimpleField( + "notTopical", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean substituted = + readSimpleField( + "substituted", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean blocked = + readSimpleField( + "blocked", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + Byte reservedField0 = + readReservedField( + "reserved", + readUnsignedByte(readBuffer, 3), + (byte) 0, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + boolean stausOn = + readSimpleField( + "stausOn", readBoolean(readBuffer), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("SinglePointInformation"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StartEventsOfProtectionEquipment.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StartEventsOfProtectionEquipment.java index f1192b4933a..b40824a0c3f 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StartEventsOfProtectionEquipment.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StartEventsOfProtectionEquipment.java @@ -91,28 +91,53 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("StartEventsOfProtectionEquipment"); // Reserved Field (reserved) - writeReservedField("reserved", (byte) 0, writeUnsignedByte(writeBuffer, 2)); + writeReservedField( + "reserved", + (byte) 0, + writeUnsignedByte(writeBuffer, 2), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (startOfOperationInReverseDirection) writeSimpleField( "startOfOperationInReverseDirection", startOfOperationInReverseDirection, - writeBoolean(writeBuffer)); + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (startOfOperationIE) - writeSimpleField("startOfOperationIE", startOfOperationIE, writeBoolean(writeBuffer)); + writeSimpleField( + "startOfOperationIE", + startOfOperationIE, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (stateOfOperationPhaseL3) - writeSimpleField("stateOfOperationPhaseL3", stateOfOperationPhaseL3, writeBoolean(writeBuffer)); + writeSimpleField( + "stateOfOperationPhaseL3", + stateOfOperationPhaseL3, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (stateOfOperationPhaseL2) - writeSimpleField("stateOfOperationPhaseL2", stateOfOperationPhaseL2, writeBoolean(writeBuffer)); + writeSimpleField( + "stateOfOperationPhaseL2", + stateOfOperationPhaseL2, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (stateOfOperationPhaseL1) - writeSimpleField("stateOfOperationPhaseL1", stateOfOperationPhaseL1, writeBoolean(writeBuffer)); + writeSimpleField( + "stateOfOperationPhaseL1", + stateOfOperationPhaseL1, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (generalStartOfOperation) - writeSimpleField("generalStartOfOperation", generalStartOfOperation, writeBoolean(writeBuffer)); + writeSimpleField( + "generalStartOfOperation", + generalStartOfOperation, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("StartEventsOfProtectionEquipment"); } @@ -164,24 +189,48 @@ public static StartEventsOfProtectionEquipment staticParse(ReadBuffer readBuffer PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - Byte reservedField0 = readReservedField("reserved", readUnsignedByte(readBuffer, 2), (byte) 0); + Byte reservedField0 = + readReservedField( + "reserved", + readUnsignedByte(readBuffer, 2), + (byte) 0, + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean startOfOperationInReverseDirection = - readSimpleField("startOfOperationInReverseDirection", readBoolean(readBuffer)); + readSimpleField( + "startOfOperationInReverseDirection", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); - boolean startOfOperationIE = readSimpleField("startOfOperationIE", readBoolean(readBuffer)); + boolean startOfOperationIE = + readSimpleField( + "startOfOperationIE", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean stateOfOperationPhaseL3 = - readSimpleField("stateOfOperationPhaseL3", readBoolean(readBuffer)); + readSimpleField( + "stateOfOperationPhaseL3", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean stateOfOperationPhaseL2 = - readSimpleField("stateOfOperationPhaseL2", readBoolean(readBuffer)); + readSimpleField( + "stateOfOperationPhaseL2", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean stateOfOperationPhaseL1 = - readSimpleField("stateOfOperationPhaseL1", readBoolean(readBuffer)); + readSimpleField( + "stateOfOperationPhaseL1", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); boolean generalStartOfOperation = - readSimpleField("generalStartOfOperation", readBoolean(readBuffer)); + readSimpleField( + "generalStartOfOperation", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("StartEventsOfProtectionEquipment"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StatusChangeDetection.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StatusChangeDetection.java index 7e2a3506ce8..357efcd2098 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StatusChangeDetection.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/StatusChangeDetection.java @@ -55,7 +55,11 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("StatusChangeDetection"); // Simple Field (bits) - writeSimpleField("bits", bits, writeUnsignedLong(writeBuffer, 32)); + writeSimpleField( + "bits", + bits, + writeUnsignedLong(writeBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("StatusChangeDetection"); } @@ -88,7 +92,11 @@ public static StatusChangeDetection staticParse(ReadBuffer readBuffer) throws Pa PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - long bits = readSimpleField("bits", readUnsignedLong(readBuffer, 32)); + long bits = + readSimpleField( + "bits", + readUnsignedLong(readBuffer, 32), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("StatusChangeDetection"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ThreeOctetBinaryTime.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ThreeOctetBinaryTime.java index 4353ef83def..5ffb21fcf3c 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ThreeOctetBinaryTime.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ThreeOctetBinaryTime.java @@ -37,8 +37,16 @@ public class ThreeOctetBinaryTime implements Message { - public ThreeOctetBinaryTime() { + // Properties. + protected final byte[] value; + + public ThreeOctetBinaryTime(byte[] value) { super(); + this.value = value; + } + + public byte[] getValue() { + return value; } public void serialize(WriteBuffer writeBuffer) throws SerializationException { @@ -46,6 +54,13 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("ThreeOctetBinaryTime"); + // Array Field (value) + writeByteArrayField( + "value", + value, + writeByteArray(writeBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("ThreeOctetBinaryTime"); } @@ -60,6 +75,11 @@ public int getLengthInBits() { ThreeOctetBinaryTime _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Array field + if (value != null) { + lengthInBits += 8 * value.length; + } + return lengthInBits; } @@ -74,10 +94,14 @@ public static ThreeOctetBinaryTime staticParse(ReadBuffer readBuffer) throws Par PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + byte[] value = + readBuffer.readByteArray( + "value", Math.toIntExact(3), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("ThreeOctetBinaryTime"); // Create the instance ThreeOctetBinaryTime _threeOctetBinaryTime; - _threeOctetBinaryTime = new ThreeOctetBinaryTime(); + _threeOctetBinaryTime = new ThreeOctetBinaryTime(value); return _threeOctetBinaryTime; } @@ -90,12 +114,12 @@ public boolean equals(Object o) { return false; } ThreeOctetBinaryTime that = (ThreeOctetBinaryTime) o; - return true; + return (getValue() == that.getValue()) && true; } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(getValue()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/TwoOctetBinaryTime.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/TwoOctetBinaryTime.java index dab83662ade..73e36f383e4 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/TwoOctetBinaryTime.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/TwoOctetBinaryTime.java @@ -37,8 +37,16 @@ public class TwoOctetBinaryTime implements Message { - public TwoOctetBinaryTime() { + // Properties. + protected final byte[] value; + + public TwoOctetBinaryTime(byte[] value) { super(); + this.value = value; + } + + public byte[] getValue() { + return value; } public void serialize(WriteBuffer writeBuffer) throws SerializationException { @@ -46,6 +54,13 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); writeBuffer.pushContext("TwoOctetBinaryTime"); + // Array Field (value) + writeByteArrayField( + "value", + value, + writeByteArray(writeBuffer, 8), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + writeBuffer.popContext("TwoOctetBinaryTime"); } @@ -60,6 +75,11 @@ public int getLengthInBits() { TwoOctetBinaryTime _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + // Array field + if (value != null) { + lengthInBits += 8 * value.length; + } + return lengthInBits; } @@ -74,10 +94,14 @@ public static TwoOctetBinaryTime staticParse(ReadBuffer readBuffer) throws Parse PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); + byte[] value = + readBuffer.readByteArray( + "value", Math.toIntExact(2), WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + readBuffer.closeContext("TwoOctetBinaryTime"); // Create the instance TwoOctetBinaryTime _twoOctetBinaryTime; - _twoOctetBinaryTime = new TwoOctetBinaryTime(); + _twoOctetBinaryTime = new TwoOctetBinaryTime(value); return _twoOctetBinaryTime; } @@ -90,12 +114,12 @@ public boolean equals(Object o) { return false; } TwoOctetBinaryTime that = (TwoOctetBinaryTime) o; - return true; + return (getValue() == that.getValue()) && true; } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(getValue()); } @Override diff --git a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ValueWithTransientStateIndication.java b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ValueWithTransientStateIndication.java index 8162da232ea..1a1a4406a4b 100644 --- a/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ValueWithTransientStateIndication.java +++ b/plc4j/drivers/iec-60870/src/main/generated/org/apache/plc4x/java/iec608705104/readwrite/ValueWithTransientStateIndication.java @@ -61,10 +61,18 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { writeBuffer.pushContext("ValueWithTransientStateIndication"); // Simple Field (transientState) - writeSimpleField("transientState", transientState, writeBoolean(writeBuffer)); + writeSimpleField( + "transientState", + transientState, + writeBoolean(writeBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); // Simple Field (value) - writeSimpleField("value", value, writeUnsignedByte(writeBuffer, 7)); + writeSimpleField( + "value", + value, + writeUnsignedByte(writeBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); writeBuffer.popContext("ValueWithTransientStateIndication"); } @@ -101,9 +109,17 @@ public static ValueWithTransientStateIndication staticParse(ReadBuffer readBuffe PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - boolean transientState = readSimpleField("transientState", readBoolean(readBuffer)); - - byte value = readSimpleField("value", readUnsignedByte(readBuffer, 7)); + boolean transientState = + readSimpleField( + "transientState", + readBoolean(readBuffer), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); + + byte value = + readSimpleField( + "value", + readUnsignedByte(readBuffer, 7), + WithOption.WithByteOrder(ByteOrder.LITTLE_ENDIAN)); readBuffer.closeContext("ValueWithTransientStateIndication"); // Create the instance diff --git a/plc4j/drivers/iec-60870/src/test/java/org/apache/plc4x/java/iec608705104/IEC608705104ParserSerializerTest.java b/plc4j/drivers/iec-60870/src/test/java/org/apache/plc4x/java/iec608705104/IEC608705104ParserSerializerTest.java index 308db1e1084..e7a2ac7fbb1 100644 --- a/plc4j/drivers/iec-60870/src/test/java/org/apache/plc4x/java/iec608705104/IEC608705104ParserSerializerTest.java +++ b/plc4j/drivers/iec-60870/src/test/java/org/apache/plc4x/java/iec608705104/IEC608705104ParserSerializerTest.java @@ -23,7 +23,7 @@ public class IEC608705104ParserSerializerTest extends ParserSerializerTestsuiteRunner { public IEC608705104ParserSerializerTest() { - super("/protocols/iec608705104/ParserSerializerTestsuite.xml"); + super("/protocols/iec608705104/ParserSerializerTestsuite.xml", true); } } diff --git a/protocols/iec-60870/src/main/resources/protocols/iec608705104/iec-60870-5-104.mspec b/protocols/iec-60870/src/main/resources/protocols/iec608705104/iec-60870-5-104.mspec index 517b6609ab0..e56165999db 100644 --- a/protocols/iec-60870/src/main/resources/protocols/iec608705104/iec-60870-5-104.mspec +++ b/protocols/iec-60870/src/main/resources/protocols/iec608705104/iec-60870-5-104.mspec @@ -23,10 +23,10 @@ [const uint 16 defaultPort 2404] ] -[discriminatedType APDU byteOrder='LITTLE_ENDIAN' - [const uint 8 startByte 0x86 ] +[discriminatedType APDU byteOrder='LITTLE_ENDIAN' + [const uint 8 startByte 0x68 ] [implicit uint 8 apciLength 'lengthInBytes - 2'] - [discriminator uint 16 command ] + [simple uint 16 command ] [typeSwitch command // U-Format Frames ['0x43' *UFormatTestFrameActivation @@ -54,7 +54,7 @@ ] // I-Format Frames (Catch-all for all other values) - [ APDUIFormat + [* *IFormat // TODO: Fix this ... // [virtual uint 15 sendSequenceNo 'command >> 1'] // TODO: Shift this right by one bit to make it a uint 15 @@ -65,139 +65,188 @@ ] ] -[type ASDU - [simple TypeIdentification typeIdentification ] - [simple bit structureQualifier ] - [implicit uint 7 numberOfObjects 'COUNT(informationObjects)'] - [simple bit test ] - [simple bit negative ] - [simple CauseOfTransmission causeOfTransmission ] - [simple uint 8 originatorAddress ] - [simple uint 16 asduAddressField ] - [array InformationObject informationObjects count 'numberOfObjects' ] +[type ASDU byteOrder='LITTLE_ENDIAN' + [simple TypeIdentification typeIdentification ] + [simple bit structureQualifier ] + [implicit uint 7 numberOfObjects 'COUNT(informationObjects)'] + [simple bit test ] + [simple bit negative ] + [simple CauseOfTransmission causeOfTransmission ] + [simple uint 8 originatorAddress ] + [simple uint 16 asduAddressField ] + [array InformationObject('typeIdentification') informationObjects count 'numberOfObjects' ] ] // http://ijlalhaider.pbworks.com/w/file/fetch/64131148/Practical%20Modern%20SCADA%20Protocols.pdf -[discriminatedType InformationObject(TypeIdentification typeIdentification) +[discriminatedType InformationObject(TypeIdentification typeIdentification) byteOrder='LITTLE_ENDIAN' [simple uint 24 address] [typeSwitch typeIdentification ['SINGLE_POINT_INFORMATION' *_SINGLE_POINT_INFORMATION -// SIQ + [simple SinglePointInformation siq] ] ['SINGLE_POINT_INFORMATION_WITH_TIME_TAG' *_SINGLE_POINT_INFORMATION_WITH_TIME_TAG -// SIQ + CP24Time2a + [simple SinglePointInformation siq] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['DOUBLE_POINT_INFORMATION' *_DOUBLE_POINT_INFORMATION -// DIQ + [simple DoublePointInformation diq] ] ['DOUBLE_POINT_INFORMATION_WITH_TIME_TAG' *_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG -// DIQ + CP24Time2a + [simple DoublePointInformation diq] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['STEP_POSITION_INFORMATION' *_STEP_POSITION_INFORMATION -// VTI + QDS + [simple ValueWithTransientStateIndication vti] + [simple QualityDescriptor qds] ] ['STEP_POSITION_INFORMATION_WITH_TIME_TAG' *_STEP_POSITION_INFORMATION_WITH_TIME_TAG -// VTI + QDS + CP24Time2a + [simple ValueWithTransientStateIndication vti] + [simple QualityDescriptor qds] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['BITSTRING_OF_32_BIT' *_BITSTRING_OF_32_BIT -// BSI + QDS + [simple BinaryStateInformation bsi] + [simple QualityDescriptor qds] ] ['BITSTRING_OF_32_BIT_WITH_TIME_TAG' *_BITSTRING_OF_32_BIT_WITH_TIME_TAG -// BSI + QDS + P24Time2a + [simple BinaryStateInformation bsi] + [simple QualityDescriptor qds] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['MEASURED_VALUE_NORMALISED_VALUE' *_MEASURED_VALUE_NORMALISED_VALUE -// NVA + QDS + [simple NormalizedValue nva] + [simple QualityDescriptor qds] ] ['MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG' *_MEASURED_VALUE_NORMALIZED_VALUE_WITH_TIME_TAG -// NVA + QDS + CP24Time2a + [simple NormalizedValue nva] + [simple QualityDescriptor qds] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['MEASURED_VALUE_SCALED_VALUE' *_MEASURED_VALUE_SCALED_VALUE -// SVA + QDS + [simple ScaledValue sva] + [simple QualityDescriptor qds] ] ['MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG' *_MEASURED_VALUE_SCALED_VALUE_WIT_TIME_TAG -// SVA + QDS + CP24Time2a + [simple ScaledValue sva] + [simple QualityDescriptor qds] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER' *_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER -// IEEE STD 754 + QDS + [simple float 32 value] + [simple QualityDescriptor qds] ] ['MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG' *_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG -// IEEE STD 754 + QDS + CP24Time2a + [simple float 32 value] + [simple QualityDescriptor qds] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['INTEGRATED_TOTALS' *_INTEGRATED_TOTALS -// BCR + [simple BinaryCounterReading bcr] ] ['INTEGRATED_TOTALS_WITH_TIME_TAG' *_INTEGRATED_TOTALS_WITH_TIME_TAG -// BCR + CP24Time2a + [simple BinaryCounterReading bcr] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG' *_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG -// CP16Time2a + CP24Time2a + [simple TwoOctetBinaryTime cp16Time2a] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG' *_PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG -// SEP + QDP +CP16Time2a + CP24Time2a + [simple SingleEventOfProtectionEquipment sep] + [simple QualityDescriptorForPointsOfProtectionEquipment qdp] + [simple TwoOctetBinaryTime cp16Time2a] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG' *_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG -// OCI + QDP + CP16Time2a + CP24Time2a + [simple OutputCircuitInformation oci] + [simple QualityDescriptorForPointsOfProtectionEquipment qdp] + [simple TwoOctetBinaryTime cp16Time2a] + [simple ThreeOctetBinaryTime cp24Time2a] ] ['PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION' *_PACKED_SINGLE_POINT_INFORMATION_WITH_STATUS_CHANGE_DETECTION -// SCD + QDS + [simple StatusChangeDetection scd] + [simple QualityDescriptor qds] ] ['MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR' *_MEASURED_VALUE_NORMALIZED_VALUE_WITHOUT_QUALITY_DESCRIPTOR -// NVA + [simple NormalizedValue nva] ] ['SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A' *_SINGLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A -// SIQ + CP56Time2a + [simple SinglePointInformation siq] + [simple SevenOctetBinaryTime cp56Time2a] ] ['DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A' *_DOUBLE_POINT_INFORMATION_WITH_TIME_TAG_CP56TIME2A -// DIQ + CP56Time2a + [simple DoublePointInformation diq] + [simple SevenOctetBinaryTime cp56Time2a] ] ['STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A' *_STEP_POSITION_INFORMATION_WITH_TIME_TAG_CP56TIME2A -// VTI + QDS + CP56Time2a + [simple ValueWithTransientStateIndication vti] + [simple QualityDescriptor qds] + [simple SevenOctetBinaryTime cp56Time2a] ] ['BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A' *_BITSTRING_OF_32_BIT_WITH_TIME_TAG_CP56TIME2A -// BSI + QDS + CP56Time2a + [simple BinaryStateInformation bsi] + [simple QualityDescriptor qds] + [simple SevenOctetBinaryTime cp56Time2a] ] ['MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A' *_MEASURED_VALUE_NORMALISED_VALUE_WITH_TIME_TAG_CP56TIME2A -// NVA + QDS + CP56Time2a + [simple NormalizedValue nva] + [simple QualityDescriptor qds] + [simple SevenOctetBinaryTime cp56Time2a] ] ['MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A' *_MEASURED_VALUE_SCALED_VALUE_WITH_TIME_TAG_CP56TIME2A -// SVA + QDS + CP56Time2a + [simple ScaledValue sva] + [simple QualityDescriptor qds] + [simple SevenOctetBinaryTime cp56Time2a] ] ['MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A' *_MEASURED_VALUE_SHORT_FLOATING_POINT_NUMBER_WITH_TIME_TAG_CP56TIME2A -// IEEE STD 754 + QDS + CP56Time2a + [simple float 32 value] + [simple QualityDescriptor qds] + [simple SevenOctetBinaryTime cp56Time2a] ] ['INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A' *_INTEGRATED_TOTALS_WITH_TIME_TAG_CP56TIME2A -// BCR + CP56Time2a + [simple BinaryCounterReading bcr] + [simple SevenOctetBinaryTime cp56Time2a] ] ['EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A' *_EVENT_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A -// CP16Time2a + CP56Time2a + [simple TwoOctetBinaryTime cp16Time2a] + [simple SevenOctetBinaryTime cp56Time2a] ] ['PACKED_START_EVENTS_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A' *_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A -// SEP + QDP + CP16Time2a + CP56Time2a + [simple SingleEventOfProtectionEquipment sep] + [simple QualityDescriptorForPointsOfProtectionEquipment qdp] + [simple TwoOctetBinaryTime cp16Time2a] + [simple SevenOctetBinaryTime cp56Time2a] ] ['PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A' *_PACKED_OUTPUT_CIRCUIT_INFORMATION_OF_PROTECTION_EQUIPMENT_WITH_TIME_TAG_CP56TIME2A -// OCI + QDP + CP16Time2a + CP56Time2a + [simple OutputCircuitInformation oci] + [simple QualityDescriptorForPointsOfProtectionEquipment qdp] + [simple TwoOctetBinaryTime cp16Time2a] + [simple SevenOctetBinaryTime cp56Time2a] ] ['SINGLE_COMMAND' *_SINGLE_COMMAND -// SCO + [simple SingleCommand sco] ] ['DOUBLE_COMMAND' *_DOUBLE_COMMAND -// DCO + [simple DoubleCommand dco] ] ['REGULATING_STEP_COMMAND' *_REGULATING_STEP_COMMAND -// RCO + [simple RegulatingStepCommand rco] ] ['SET_POINT_COMMAND_NORMALISED_VALUE' *_SET_POINT_COMMAND_NORMALISED_VALUE -// NVA + QOS + [simple NormalizedValue nva] + [simple QualifierOfSetPointCommand qos] ] ['SET_POINT_COMMAND_SCALED_VALUE' *_SET_POINT_COMMAND_SCALED_VALUE -// SVA + QOS + [simple ScaledValue sva] + [simple QualifierOfSetPointCommand qos] ] ['SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER' *_SET_POINT_COMMAND_SHORT_FLOATING_POINT_NUMBER -// 1 IEEE STD 754 + QOS + [simple float 32 value] + [simple QualifierOfSetPointCommand qos] ] ['BITSTRING_32_BIT_COMMAND' *_BITSTRING_32_BIT_COMMAND -// BSI + [simple BinaryStateInformation bsi] ] ['SINGLE_COMMAND_WITH_TIME_TAG_CP56TIME2A' *_SINGLE_COMMAND_WITH_TIME_TAG_CP56TIME2A ] @@ -214,62 +263,83 @@ ['BITSTRING_OF_32_BIT_COMMAND_WITH_TIME_TAG_CP56TIME2A' *_BITSTRING_OF_32_BIT_COMMAND_WITH_TIME_TAG_CP56TIME2A ] ['END_OF_INITIALISATION' *_END_OF_INITIALISATION -// COI + [simple CauseOfInitialization coi] ] ['INTERROGATION_COMMAND' *_INTERROGATION_COMMAND -// QOI + [simple QualifierOfInterrogation qoi] ] ['COUNTER_INTERROGATION_COMMAND' *_COUNTER_INTERROGATION_COMMAND -// QCC + [simple QualifierOfCounterInterrogationCommand qcc] ] ['READ_COMMAND' *_READ_COMMAND ] ['CLOCK_SYNCHRONISATION_COMMAND' *_CLOCK_SYNCHRONISATION_COMMAND -// CP56Time2a + [simple SevenOctetBinaryTime cp56Time2a] ] ['TEST_COMMAND' *_TEST_COMMAND -// FBP + [simple FixedTestBitPatternTwoOctet fbp] ] ['RESET_PROCESS_COMMAND' *_RESET_PROCESS_COMMAND -// QRP + [simple QualifierOfResetProcessCommand qrp] ] ['DELAY_ACQUISITION_COMMAND' *_DELAY_ACQUISITION_COMMAND -// CP16Time2a + [simple TwoOctetBinaryTime cp16Time2a] ] ['TEST_COMMAND_WITH_TIME_TAG_CP56TIME2A' *_TEST_COMMAND_WITH_TIME_TAG_CP56TIME2A ] ['PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE' *_PARAMETER_OF_MEASURED_VALUES_NORMALIZED_VALUE -// NVA + QPM + [simple NormalizedValue nva] + [simple QualifierOfParameterOfMeasuredValues qpm] ] ['PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE' *_PARAMETER_OF_MEASURED_VALUES_SCALED_VALUE -// SVA + QPM + [simple ScaledValue sva] + [simple QualifierOfParameterOfMeasuredValues qpm] ] ['PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER' *_PARAMETER_OF_MEASURED_VALUES_SHORT_FLOATING_POINT_NUMBER -// IEEE STD 754 + QPM + [simple float 32 value] + [simple QualifierOfParameterOfMeasuredValues qpm] ] ['PARAMETER_ACTIVATION' *_PARAMETER_ACTIVATION -// QPA + [simple QualifierOfParameterActivation qpa] ] ['FILE_READY' *_FILE_READY -// NOF + LOF + FRQ + [simple NameOfFile nof] + [simple LengthOfFile lof] + [simple FileReadyQualifier frq] ] ['SECTION_READY' *_SECTION_READY -// NOF + NOS + LOF + SRQ + [simple NameOfFile nof] + [simple NameOfSection nos] + [simple LengthOfFile lof] + [simple SectionReadyQualifier srq] ] ['CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION' *_CALL_DIRECTORY_SELECT_FILE_CALL_FILE_CALL_SECTION -// NOF + NOS + SCQ + [simple NameOfFile nof] + [simple NameOfSection nos] + [simple SelectAndCallQualifier scq] ] ['LAST_SECTION_LAST_SEGMENT' *_LAST_SECTION_LAST_SEGMENT -// NOF + NOS + LSQ + CHS + [simple NameOfFile nof] + [simple NameOfSection nos] + [simple LastSectionOrSegmentQualifier lsq] + [simple Checksum chs] ] ['ACK_FILE_ACK_SECTION' *_ACK_FILE_ACK_SECTION -// NOF + NOS + AFQ + [simple NameOfFile nof] + [simple NameOfSection nos] + [simple AcknowledgeFileOrSectionQualifier afq] ] ['SEGMENT' *_SEGMENT -// NOF + NOS + LOS + segment + [simple NameOfFile nof] + [simple NameOfSection nos] + [simple LengthOfSegment los] +// NOF + NOS + LOS + *segment* ] ['DIRECTORY' *_DIRECTORY -// NOF + LOF + SOF + CP56Time2a + [simple NameOfFile nof] + [simple LengthOfFile lof] + [simple StatusOfFile sof] + [simple SevenOctetBinaryTime cp56Time2a] ] ] ] @@ -279,7 +349,7 @@ ////////////////////////////////////////////////////////// // SIQ -[type SinglePointInformation +[type SinglePointInformation byteOrder='LITTLE_ENDIAN' [simple bit invalid ] [simple bit notTopical ] [simple bit substituted ] @@ -289,7 +359,7 @@ ] // DIQ -[type DoublePointInformation +[type DoublePointInformation byteOrder='LITTLE_ENDIAN' [simple bit invalid ] [simple bit notTopical ] [simple bit substituted ] @@ -299,17 +369,17 @@ ] // BSI -[type BinaryStateInformation +[type BinaryStateInformation byteOrder='LITTLE_ENDIAN' [simple uint 32 bits] // TODO: Possibly bit-string ] // SCD -[type StatusChangeDetection +[type StatusChangeDetection byteOrder='LITTLE_ENDIAN' [simple uint 32 bits] // TODO: Possibly bit-string ] // QDS -[type QualityDescriptor +[type QualityDescriptor byteOrder='LITTLE_ENDIAN' [simple bit invalid ] [simple bit notTopical ] [simple bit substituted ] @@ -319,28 +389,28 @@ ] // VTI -[type ValueWithTransientStateIndication +[type ValueWithTransientStateIndication byteOrder='LITTLE_ENDIAN' [simple bit transientState ] [simple uint 7 value ] ] // NVA -[type NormalizedValue - // TODO: F16 +[type NormalizedValue byteOrder='LITTLE_ENDIAN' + [simple uint 16 value] // TODO: F16 ] // SVA -[type ScaledValue +[type ScaledValue byteOrder='LITTLE_ENDIAN' [simple int 16 value ] ] // R32 -[type ShortFloatingPointNumber +[type ShortFloatingPointNumber byteOrder='LITTLE_ENDIAN' [simple float 16 value ] // TODO: Double-Check ] // BCR -[type BinaryCounterReading +[type BinaryCounterReading byteOrder='LITTLE_ENDIAN' [simple uint 32 counterValue ] [simple bit counterValid ] [simple bit counterAdjusted ] @@ -349,7 +419,7 @@ ] // SEP -[type SingleEventOfProtectionEquipment +[type SingleEventOfProtectionEquipment byteOrder='LITTLE_ENDIAN' [simple bit invalid ] [simple bit notTopical ] [simple bit substituted ] @@ -360,7 +430,7 @@ ] // SPE -[type StartEventsOfProtectionEquipment +[type StartEventsOfProtectionEquipment byteOrder='LITTLE_ENDIAN' [reserved uint 2 '0' ] [simple bit startOfOperationInReverseDirection] [simple bit startOfOperationIE ] @@ -371,7 +441,7 @@ ] // OCI -[type OutputCircuitInformation +[type OutputCircuitInformation byteOrder='LITTLE_ENDIAN' [reserved uint 4 '0' ] [simple bit stateOfOperationPhaseL3] [simple bit stateOfOperationPhaseL2] @@ -380,7 +450,7 @@ ] // QDP -[type QualityDescriptorForPointsOfProtectionEquipment +[type QualityDescriptorForPointsOfProtectionEquipment byteOrder='LITTLE_ENDIAN' [simple bit invalid ] [simple bit notTopical ] [simple bit substituted ] @@ -394,17 +464,17 @@ ////////////////////////////////////////////////////////// // SCO -[type SingleCommand +[type SingleCommand byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // DCO -[type DoubleCommand +[type DoubleCommand byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // RCO -[type RegulatingStepCommand +[type RegulatingStepCommand byteOrder='LITTLE_ENDIAN' // TODO: Implement ] @@ -413,17 +483,20 @@ ////////////////////////////////////////////////////////// // CP56Time2a -[type SevenOctetBinaryTime +[type SevenOctetBinaryTime byteOrder='LITTLE_ENDIAN' + [array byte value count '7'] // TODO: Implement ] // CP24Time2a -[type ThreeOctetBinaryTime +[type ThreeOctetBinaryTime byteOrder='LITTLE_ENDIAN' + [array byte value count '3'] // TODO: Implement ] // CP16Time2av -[type TwoOctetBinaryTime +[type TwoOctetBinaryTime byteOrder='LITTLE_ENDIAN' + [array byte value count '2'] // TODO: Implement ] @@ -432,42 +505,42 @@ ////////////////////////////////////////////////////////// // QOI -[type QualifierOfInterrogation +[type QualifierOfInterrogation byteOrder='LITTLE_ENDIAN' [simple uint 8 qualifierOfCommand ] // TODO: Possible ENUM ] // QCC -[type QualifierOfCounterInterrogationCommand +[type QualifierOfCounterInterrogationCommand byteOrder='LITTLE_ENDIAN' [simple uint 2 freeze ] // TODO: Possible ENUM [simple uint 6 request ] // TODO: Possible ENUM ] // QPM -[type QualifierOfParameterOfMeasuredValues +[type QualifierOfParameterOfMeasuredValues byteOrder='LITTLE_ENDIAN' [simple bit parameterInOperation] [simple bit localParameterChange] [simple uint 6 kindOfParameter ] // TODO: Possible ENUM ] // QPA -[type QualifierOfParameterActivation +[type QualifierOfParameterActivation byteOrder='LITTLE_ENDIAN' [simple uint 8 qualifier ] // TODO: Possible ENUM ] // QOC // TODO: Only 6 bit long !!!!!! -[type QualifierOfCommand +[type QualifierOfCommand byteOrder='LITTLE_ENDIAN' [simple bit select] [simple uint 5 qualifier ] // TODO: Possible ENUM ] // QRP -[type QualifierOfResetProcessCommand +[type QualifierOfResetProcessCommand byteOrder='LITTLE_ENDIAN' [simple uint 8 qualifier ] // TODO: Possible ENUM ] // QOS -[type QualifierOfSetPointCommand +[type QualifierOfSetPointCommand byteOrder='LITTLE_ENDIAN' [simple bit select] [simple uint 7 qualifier ] // TODO: Possible ENUM ] @@ -477,56 +550,56 @@ ////////////////////////////////////////////////////////// // FRQ -[type FileReadyQualifier +[type FileReadyQualifier byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // SRQ -[type SectionReadyQualifier +[type SectionReadyQualifier byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // SCQ -[type SelectAndCallQualifier +[type SelectAndCallQualifier byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // LSQ -[type LastSectionOrSegmentQualifier +[type LastSectionOrSegmentQualifier byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // AFQ -[type AcknowledgeFileOrSectionQualifier +[type AcknowledgeFileOrSectionQualifier byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // NOF -[type NameOfFile +[type NameOfFile byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // NOS -[type NameOfSection +[type NameOfSection byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // LOF -[type LengthOfFile +[type LengthOfFile byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // LOS -[type LengthOfSegment +[type LengthOfSegment byteOrder='LITTLE_ENDIAN' // TODO: Implement ] // CHS -[type Checksum +[type Checksum byteOrder='LITTLE_ENDIAN' // TODO: Implement ] -// SOF +// SOF byteOrder='LITTLE_ENDIAN' [type StatusOfFile // TODO: Implement ] @@ -536,13 +609,13 @@ ////////////////////////////////////////////////////////// // COI -[type CauseOfInitialization +[type CauseOfInitialization byteOrder='LITTLE_ENDIAN' [simple bit select] [simple uint 7 qualifier ] // TODO: Possible ENUM ] // FBP -[type FixedTestBitPatternTwoOctet +[type FixedTestBitPatternTwoOctet byteOrder='LITTLE_ENDIAN' [simple uint 16 pattern] // TODO: Possibly bit-string ] diff --git a/protocols/iec-60870/src/test/resources/protocols/iec608705104/ParserSerializerTestsuite.xml b/protocols/iec-60870/src/test/resources/protocols/iec608705104/ParserSerializerTestsuite.xml index ea9df5715dc..af5efc038d7 100644 --- a/protocols/iec-60870/src/test/resources/protocols/iec608705104/ParserSerializerTestsuite.xml +++ b/protocols/iec-60870/src/test/resources/protocols/iec608705104/ParserSerializerTestsuite.xml @@ -25,55 +25,1509 @@ iec-60870-5-104 read-write - + + >- TESTRF-act + 680443000000 + APDU + + + 104 + 4 + 67 + + + 0 + 0 + + + + + + + + -> TESTRF-con + 680483000000 + APDU + + + 104 + 4 + 131 + + + 0 + 0 + + + + + + + + >- STARTDT-act + 680407000000 + APDU + + + 104 + 4 + 7 + + + 0 + 0 + + + + + + + + -> STARTDT-con + 68040b000000 + APDU + + + 104 + 4 + 11 + + + 0 + 0 + + + + + + + + >- I (0,0) ASDU=10 C_IC_NA_1 Act IOA=0 + 680e00000000640106000a0000000014 + APDU + + + 104 + 14 + 0 + + 0 + + + + 100 + + false + 1 + false + false + + 6 + + 0 + 10 + + +
0
+ + + + 20 + + + +
+
+
+
+
+
+
+
+ + + -> I (0,0) ASDU=10 M_EI_NA_1 Init IOA=0 + 680e00000000460104000a0000000000 + APDU + + + 104 + 14 + 0 + + 0 + + + + 70 + + false + 1 + false + false + + 4 + + 0 + 10 + + +
0
+ + + + + 0 + + + +
+
+
+
+
+
+
+
+ + + >- I (0,0) ASDU=10 C_IC_NA_1 Act IOA=0 (Second Time) + 680e00000000640106000a0000000014 + APDU + + + 104 + 14 + 0 + + 0 + + + + 100 + + false + 1 + false + false + + 6 + + 0 + 10 + + +
0
+ + + + 20 + + + +
+
+
+
+
+
+
+
+ + + -> I (1,1) ASDU=10 C_IC_NA_1 ActCon IOA=0 + 680e02000200640107000a0000000014 + APDU + + + 104 + 14 + 2 + + 2 + + + + 100 + + false + 1 + false + false + + 7 + + 0 + 10 + + +
0
+ + + + 20 + + + +
+
+
+
+
+
+
+
+ + -> I (2,1) ASDU=10 M_SP_NA_1 Inrogen IOA[4]=1,... + 681a04000200010414000a0001000000020000000300000004000000 + APDU + + + 104 + 26 + 4 + + 2 + + + + 1 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
1
+ + + + false + false + false + false + 0 + false + + + +
+ +
2
+ + + + false + false + false + false + 0 + false + + + +
+ +
3
+ + + + false + false + false + false + 0 + false + + + +
+ +
4
+ + + + false + false + false + false + 0 + false + + + +
+
+
+
+
+
+
+
+ + -> I (3,1) ASDU=10 M_DP_NA_1 Inrogen IOA[4]=1,... + 681a06000200030414000a0001000000020000000300000004000000 + APDU + + + 104 + 26 + 6 + + 2 + + + + 3 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
1
+ + + + false + false + false + false + 0 + 0 + + + +
+ +
2
+ + + + false + false + false + false + 0 + 0 + + + +
+ +
3
+ + + + false + false + false + false + 0 + 0 + + + +
+ +
4
+ + + + false + false + false + false + 0 + 0 + + + +
+
+
+
+
+
+
+
+ + + -> I (4,2) ASDU=10 M_ST_NA_1 Inrogen IOA[4]=1,... + 681e08000400050414000a000100000000020000000003000000000400000000 + APDU + + + 104 + 30 + 8 + + 4 + + + + 5 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
1
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
2
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
3
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
4
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + +
+
+
+
+
+
+
+
+ + -> I (5,2) ASDU=10 M_BO_NA_1 Inrogen IOA[4]=1,... + 682a0a000400070414000a000100000000000000020000000000000003000000000000000400000000000000 + APDU + + + 104 + 42 + 10 + + 4 + + + + 7 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
1
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
2
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
3
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
4
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+
+
+
+
+
+
+
+ + -> I (6,2) ASDU=10 M_ME_NA_1 Inrogen IOA[4]=1,... + 68220c000400090414000a00010000000000020000000000030000000000040000000000 + APDU + + + 104 + 34 + 12 + + 4 + + + + 9 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
1
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
2
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
3
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
4
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+
+
+
+
+
+
+
+ + -> I (7,2) ASDU=10 M_ME_NB_1 Inrogen IOA[4]=1,... + 68220e0004000b0414000a00010000000000020000000000030000000000040000000000 + APDU + + + 104 + 34 + 14 + + 4 + + + + 11 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
1
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
2
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
3
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+ +
4
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + +
+
+
+
+
+
+
+
+ + -> I (8,2) ASDU=10 M_ME_NC_1 Inrogen IOA[4]=1,... + 682a100004000d0414000a000100000000000000020000000000000003000000000000000400000000000000 + APDU + + + 104 + 42 + 16 + + 4 + + + + 13 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
1
+ + 0.0 + + + false + false + false + false + 0 + false + + + +
+ +
2
+ + 0.0 + + + false + false + false + false + 0 + false + + + +
+ +
3
+ + 0.0 + + + false + false + false + false + 0 + false + + + +
+ +
4
+ + 0.0 + + + false + false + false + false + 0 + false + + + +
+
+
+
+
+
+
+
+ + -> I (9,2) ASDU=10 M_SP_TB_1 Inrogen IOA[4]=11,... + 6836120004001e0414000a000b0000003110170884070d0c0000003110170884070d0d0000003110170884070d0e0000003110170884070d + APDU + + + 104 + 54 + 18 + + 4 + + + + 30 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
11
+ + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
12
+ + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
13
+ + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
14
+ + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+
+
+
+
+
+
+
+ + -> I (10,2) ASDU=10 M_DP_TB_1 Inrogen IOA[4]=11,... + 6836140004001f0414000a000b0000003110170884070d0c0000003110170884070d0d0000003110170884070d0e0000003110170884070d + APDU + + + 104 + 54 + 20 + + 4 + + + + 31 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
11
+ + + + false + false + false + false + 0 + 0 + + + + + 0x3110170884070d + + + +
+ +
12
+ + + + false + false + false + false + 0 + 0 + + + + + 0x3110170884070d + + + +
+ +
13
+ + + + false + false + false + false + 0 + 0 + + + + + 0x3110170884070d + + + +
+ +
14
+ + + + false + false + false + false + 0 + 0 + + + + + 0x3110170884070d + + + +
+
+
+
+
+
+
+
+ + -> I (11,2) ASDU=10 M_ST_TB_1 Inrogen IOA[4]=11,... + 683a16000400200414000a000b000000003110170884070d0c000000003110170884070d0d000000003110170884070d0e000000003110170884070d + APDU + + + 104 + 58 + 22 + + 4 + + + + 32 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
11
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
12
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
13
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
14
+ + + + false + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+
+
+
+
+
+
+
+ + -> I (12,2) ASDU=10 M_BO_TB_1 Inrogen IOA[4]=11,... + 684618000400210414000a000b000000000000003110170884070d0c000000000000003110170884070d0d000000000000003110170884070d0e000000000000003110170884070d + APDU + + + 104 + 70 + 24 + + 4 + + + + 33 + + false + 4 + false + false + + 20 + + 0 + 10 + + +
11
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
12
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
13
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+ +
14
+ + + + 0 + + + + + false + false + false + false + 0 + false + + + + + 0x3110170884070d + + + +
+
+
+
+
+
+
+
+ + + >- S (13) + 680401001a00 + APDU + + + 104 + 4 + 1 + + 26 + + + + \ No newline at end of file