You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/05/31 17:11:42 UTC
[plc4x] branch develop updated (85a9b486f0 -> 0d1ace47f9)
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
from 85a9b486f0 fix(bacnet): fixed several outstanding issues...
new 65f55262db feat(bacnet): implemented all bit strings similar to enums
new 99c274ad8b refactor(codegen): change index on variable literal to make use of optional
new 0d1ace47f9 refactor(bacnet): relax useage of BACnetPriorityArray
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../plc4x/language/c/CLanguageTemplateHelper.java | 8 +-
.../language/go/GoLanguageTemplateHelper.java | 8 +-
.../templates/go/complex-type-template.go.ftlh | 4 +-
.../language/java/JavaLanguageTemplateHelper.java | 18 +-
.../mspec/expression/ExpressionStringListener.java | 2 +-
.../mspec/model/terms/DefaultVariableLiteral.java | 8 +-
.../expression/ExpressionStringParserTest.java | 8 +-
.../protocols/bacnet/ParserSerializerTestsuite.xml | 34 +-
.../protocols/bacnetip/readwrite/ParserHelper.go | 68 +-
.../bacnetip/readwrite/XmlParserHelper.go | 78 +-
.../bacnetip/readwrite/model/APDUComplexAck.go | 4 +-
.../readwrite/model/APDUConfirmedRequest.go | 4 +-
.../model/BACnetApplicationTagObjectIdentifier.go | 4 +-
...medServiceRequestCreateObjectObjectSpecifier.go | 4 +-
.../model/BACnetConstructedDataPriorityArray.go | 2 +-
.../model/BACnetContextTagObjectIdentifier.go | 4 +-
.../bacnetip/readwrite/model/BACnetDaysOfWeek.go | 162 ++++
.../readwrite/model/BACnetDaysOfWeekTagged.go | 337 +++++++
.../bacnetip/readwrite/model/BACnetEventSummary.go | 22 +-
.../readwrite/model/BACnetEventTransitionBits.go | 235 ++---
.../model/BACnetEventTransitionBitsTagged.go | 269 ++++++
.../bacnetip/readwrite/model/BACnetLimitEnable.go | 122 +++
.../readwrite/model/BACnetLimitEnableTagged.go | 252 ++++++
.../bacnetip/readwrite/model/BACnetLogStatus.go | 130 +++
.../readwrite/model/BACnetLogStatusTagged.go | 269 ++++++
.../BACnetNotificationParametersAccessEvent.go | 14 +-
...ACnetNotificationParametersChangeOfBitString.go | 14 +-
...otificationParametersChangeOfCharacterString.go | 14 +-
...tNotificationParametersChangeOfDiscreteValue.go | 14 +-
...CnetNotificationParametersChangeOfLifeSafety.go | 14 +-
...netNotificationParametersChangeOfReliability.go | 14 +-
.../BACnetNotificationParametersChangeOfState.go | 14 +-
...netNotificationParametersChangeOfStatusFlags.go | 14 +-
.../BACnetNotificationParametersChangeOfTimer.go | 14 +-
.../BACnetNotificationParametersChangeOfValue.go | 14 +-
.../BACnetNotificationParametersCommandFailure.go | 14 +-
...BACnetNotificationParametersDoubleOutOfRange.go | 14 +-
.../BACnetNotificationParametersFloatingLimit.go | 14 +-
.../BACnetNotificationParametersOutOfRange.go | 14 +-
...BACnetNotificationParametersSignedOutOfRange.go | 14 +-
...CnetNotificationParametersUnsignedOutOfRange.go | 14 +-
.../BACnetNotificationParametersUnsignedRange.go | 14 +-
.../readwrite/model/BACnetObjectTypesSupported.go | 586 +++++++++++++
.../readwrite/model/BACnetPriorityArray.go | 971 ++++++---------------
.../bacnetip/readwrite/model/BACnetResultFlags.go | 235 ++---
.../readwrite/model/BACnetResultFlagsTagged.go | 269 ++++++
.../model/BACnetServiceAckGetAlarmSummary.go | 14 +-
.../readwrite/model/BACnetServiceAckReadRange.go | 14 +-
.../readwrite/model/BACnetServicesSupported.go | 434 +++++++++
.../bacnetip/readwrite/model/BACnetStatusFlags.go | 260 ++----
.../readwrite/model/BACnetStatusFlagsTagged.go | 286 ++++++
plc4go/protocols/cbus/readwrite/model/CALData.go | 4 +-
.../protocols/cbus/readwrite/model/CBusCommand.go | 4 +-
plc4go/protocols/cbus/readwrite/model/SALData.go | 4 +-
.../plc4x/java/bacnetip/RandomPackagesTest.java | 6 +-
.../plc4x/java/spi/generation/StaticHelper.java | 42 +-
protocols/bacnetip/pom.xml | 10 +
.../plc4x/protocol/bacnetip/BacNetIpProtocol.java | 6 +
.../protocols/bacnetip/bacnet-bit-strings.mspec | 186 ++++
.../resources/protocols/bacnetip/bacnetip.mspec | 163 ++--
...Enums.groovy => produceTaggedBitStrings.groovy} | 33 +-
.../protocols/bacnet/ParserSerializerTestsuite.xml | 34 +-
62 files changed, 4185 insertions(+), 1670 deletions(-)
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go
create mode 100644 plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go
create mode 100644 protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnet-bit-strings.mspec
copy protocols/bacnetip/src/main/script/{produceTaggedPrivateEnums.groovy => produceTaggedBitStrings.groovy} (69%)
[plc4x] 02/03: refactor(codegen): change index on variable literal to make use of optional
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 99c274ad8b84eb890d94de01b23e45680ecb8271
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 31 19:10:58 2022 +0200
refactor(codegen): change index on variable literal to make use of optional
---
.../plc4x/language/c/CLanguageTemplateHelper.java | 8 ++---
.../language/go/GoLanguageTemplateHelper.java | 8 ++---
.../templates/go/complex-type-template.go.ftlh | 4 +--
.../language/java/JavaLanguageTemplateHelper.java | 18 ++++++----
.../mspec/expression/ExpressionStringListener.java | 2 +-
.../mspec/model/terms/DefaultVariableLiteral.java | 8 ++---
.../expression/ExpressionStringParserTest.java | 8 ++---
.../plc4x/java/spi/generation/StaticHelper.java | 42 +---------------------
8 files changed, 31 insertions(+), 67 deletions(-)
diff --git a/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java b/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
index c72017b0fb..efb04cf942 100644
--- a/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
+++ b/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
@@ -856,8 +856,8 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
}
sb.append(")");
}
- if (variableLiteral.getIndex() != VariableLiteral.NO_INDEX) {
- sb.append("[").append(variableLiteral.getIndex()).append("]");
+ if (variableLiteral.getIndex().isPresent()) {
+ sb.append("[").append(variableLiteral.getIndex().orElseThrow()).append("]");
}
if (variableLiteral.getChild().isPresent()) {
sb.append(".");
@@ -1192,11 +1192,11 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
private void appendVariableExpressionRest(StringBuilder sb, TypeDefinition baseType, VariableLiteral variableLiteral) {
Tracer tracer = Tracer.start("appendVariableExpressionRest");
- if (variableLiteral.isIndexed()) {
+ if (variableLiteral.getIndex().isPresent()) {
tracer = tracer.dive("isindexed");
sb.insert(0, "plc4c_utils_list_get_value(");
sb.append(camelCaseToSnakeCase(variableLiteral.getName()));
- sb.append(", ").append(variableLiteral.getIndex()).append(")");
+ sb.append(", ").append(variableLiteral.getIndex().orElseThrow()).append(")");
} else {
sb.append(camelCaseToSnakeCase(variableLiteral.getName()));
}
diff --git a/code-generation/language-go/src/main/java/org/apache/plc4x/language/go/GoLanguageTemplateHelper.java b/code-generation/language-go/src/main/java/org/apache/plc4x/language/go/GoLanguageTemplateHelper.java
index 16e5d1b533..95a5738235 100644
--- a/code-generation/language-go/src/main/java/org/apache/plc4x/language/go/GoLanguageTemplateHelper.java
+++ b/code-generation/language-go/src/main/java/org/apache/plc4x/language/go/GoLanguageTemplateHelper.java
@@ -834,10 +834,10 @@ public class GoLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelp
.orElse("");
}
String indexCall = "";
- if (variableLiteral.getIndex() >= 0) {
+ if (variableLiteral.getIndex().isPresent()) {
tracer = tracer.dive("indexCall");
// We have a index call
- indexCall = "[" + variableLiteral.getIndex() + "]";
+ indexCall = "[" + variableLiteral.getIndex().orElseThrow() + "]";
}
tracer = tracer.dive("else");
Tracer tracer2 = tracer;
@@ -866,8 +866,8 @@ public class GoLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelp
}
sb.append(")");
}
- if (variableLiteral.getIndex() != VariableLiteral.NO_INDEX) {
- sb.append("[").append(variableLiteral.getIndex()).append("]");
+ if (variableLiteral.getIndex().isPresent()) {
+ sb.append("[").append(variableLiteral.getIndex().orElseThrow()).append("]");
}
return tracer + sb.toString() + variableLiteral.getChild()
.map(child -> "." + toVariableExpression(field, typeReference, child, parserArguments, serializerArguments, false, suppressPointerAccess, true))
diff --git a/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh b/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh
index 4620325434..8b8853ad88 100644
--- a/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh
+++ b/code-generation/language-go/src/main/resources/templates/go/complex-type-template.go.ftlh
@@ -264,7 +264,7 @@ func (m *${type.name}) Get${field.name?cap_first}() <#if helper.needsPointerAcce
${field.name} := m.${field.name?cap_first}
_ = ${field.name}
</#list>
- return ${helper.getLanguageTypeNameForTypeReference(typeRef)}(${helper.toSerializationExpression(field, field.type, field.valueExpression, parserArguments)})
+ return <#if typeRef.isNonSimpleTypeReference()>Cast</#if>${helper.getLanguageTypeNameForTypeReference(typeRef)}(${helper.toSerializationExpression(field, field.type, field.valueExpression, parserArguments)})
}
</#list>
@@ -1385,7 +1385,7 @@ func ${type.name}Parse(readBuffer utils.ReadBuffer<#if hasParserArguments>, ${pa
// Virtual field
_${virtualField.name} := ${helper.toParseExpression(virtualField, virtualField.type, virtualField.valueExpression, parserArguments)}
- ${virtualField.name} := ${helper.getLanguageTypeNameForTypeReference(virtualField.type)}(_${virtualField.name})
+ ${virtualField.name} := <#if virtualField.type.isNonSimpleTypeReference()>Cast</#if>${helper.getLanguageTypeNameForTypeReference(virtualField.type)}(_${virtualField.name})
_ = ${virtualField.name}
<#break>
<#case "validation">
diff --git a/code-generation/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java b/code-generation/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java
index 516e03e8c2..efcff232d1 100644
--- a/code-generation/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java
+++ b/code-generation/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java
@@ -862,7 +862,11 @@ public class JavaLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHe
return tracer + "";
}
} else {
- return tracer + variableLiteral.getName() + variableLiteral.getChild().map(child -> "." + toVariableExpressionRest(field, resultType, child)).orElse("");
+ String indexAddon = "";
+ if (variableLiteral.getIndex().isPresent()) {
+ indexAddon = ".get(" + variableLiteral.getIndex().orElseThrow() + ")";
+ }
+ return tracer + variableLiteral.getName() + indexAddon + variableLiteral.getChild().map(child -> "." + toVariableExpressionRest(field, resultType, child)).orElse("");
}
}
@@ -950,9 +954,9 @@ public class JavaLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHe
}*/
}
sb.append(")");
- if (variableLiteral.getIndex() != VariableLiteral.NO_INDEX) {
+ if (variableLiteral.getIndex().isPresent()) {
// TODO: If this is a byte typed field, this needs to be an array accessor instead.
- sb.append(".get(").append(variableLiteral.getIndex()).append(")");
+ sb.append(".get(").append(variableLiteral.getIndex().orElseThrow()).append(")");
}
return tracer + sb.toString();
}
@@ -973,9 +977,9 @@ public class JavaLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHe
}
sb.append(")");
}
- if (variableLiteral.getIndex() != VariableLiteral.NO_INDEX) {
+ if (variableLiteral.getIndex().isPresent()) {
// TODO: If this is a byte typed field, this needs to be an array accessor instead.
- sb.append(".get(").append(variableLiteral.getIndex()).append(")");
+ sb.append(".get(").append(variableLiteral.getIndex().orElseThrow()).append(")");
}
return tracer + sb.toString() + variableLiteral.getChild().map(child -> "." + toVariableExpressionRest(field, resultType, child)).orElse("");
}
@@ -1151,10 +1155,10 @@ public class JavaLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHe
String variableLiteralName = variableLiteral.getName();
if (variableLiteralName.equals("length")) {
tracer = tracer.dive("length");
- return tracer + variableLiteralName + "()" + ((variableLiteral.isIndexed() ? ".get(" + variableLiteral.getIndex() + ")" : "") +
+ return tracer + variableLiteralName + "()" + ((variableLiteral.getIndex().isPresent() ? ".get(" + variableLiteral.getIndex().orElseThrow() + ")" : "") +
variableLiteral.getChild().map(child -> "." + toVariableExpressionRest(field, resultType, child)).orElse(""));
}
- return tracer + "get" + WordUtils.capitalize(variableLiteralName) + "()" + ((variableLiteral.isIndexed() ? ".get(" + variableLiteral.getIndex() + ")" : "") +
+ return tracer + "get" + WordUtils.capitalize(variableLiteralName) + "()" + ((variableLiteral.getIndex().isPresent() ? ".get(" + variableLiteral.getIndex().orElseThrow() + ")" : "") +
variableLiteral.getChild().map(child -> "." + toVariableExpressionRest(field, resultType, child)).orElse(""));
}
diff --git a/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringListener.java b/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringListener.java
index 3d97662f42..ff1eadf9d0 100644
--- a/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringListener.java
+++ b/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringListener.java
@@ -220,7 +220,7 @@ public class ExpressionStringListener extends ExpressionBaseListener {
String name = ctx.name.getText();
// TODO: Based on the current context type-definition, get the type of the property with name ctx.name.getText()
- int index = VariableLiteral.NO_INDEX;
+ Integer index = null;
if (indexContext != null) {
// TODO: Add a check, that the field providing the property is an "array" or "manualArray" field.
index = indexContext.getFirst().getNumber().intValue();
diff --git a/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java b/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java
index 0c0d8b4d5d..d5f33f1364 100644
--- a/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java
+++ b/code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/terms/DefaultVariableLiteral.java
@@ -31,10 +31,10 @@ public class DefaultVariableLiteral implements VariableLiteral {
private final String name;
private TypeReference typeReference;
private final List<Term> args;
- private final int index;
+ private final Integer index;
private final VariableLiteral child;
- public DefaultVariableLiteral(String name, List<Term> args, int index, VariableLiteral child) {
+ public DefaultVariableLiteral(String name, List<Term> args, Integer index, VariableLiteral child) {
this.name = Objects.requireNonNull(name);
this.args = args;
this.index = index;
@@ -66,8 +66,8 @@ public class DefaultVariableLiteral implements VariableLiteral {
}
@Override
- public int getIndex() {
- return index;
+ public Optional<Integer> getIndex() {
+ return Optional.ofNullable(index);
}
@Override
diff --git a/code-generation/protocol-base-mspec/src/test/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringParserTest.java b/code-generation/protocol-base-mspec/src/test/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringParserTest.java
index bdd7581e89..c3099abcb3 100644
--- a/code-generation/protocol-base-mspec/src/test/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringParserTest.java
+++ b/code-generation/protocol-base-mspec/src/test/java/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/ExpressionStringParserTest.java
@@ -148,19 +148,19 @@ class ExpressionStringParserTest {
}
void assertVariableLiteral(Term term, String name) {
- assertVariableLiteral(term, name, null, null, -1);
+ assertVariableLiteral(term, name, null, null, null);
}
void assertVariableLiteral(Term term, String name, Consumer<List<Term>> argsAsserter, Consumer<VariableLiteral> childAsserter) {
- assertVariableLiteral(term, name, argsAsserter, childAsserter, -1);
+ assertVariableLiteral(term, name, argsAsserter, childAsserter, null);
}
- void assertVariableLiteral(Term term, String name, Consumer<List<Term>> argsAsserter, Consumer<VariableLiteral> childAsserter, int index) {
+ void assertVariableLiteral(Term term, String name, Consumer<List<Term>> argsAsserter, Consumer<VariableLiteral> childAsserter, Integer index) {
assertThat(term, not(nullValue()));
assertThat(term, instanceOf(VariableLiteral.class));
VariableLiteral variableLiteral = (VariableLiteral) term;
assertThat(variableLiteral.getName(), is(name));
- assertThat(variableLiteral.getIndex(), is(index));
+ assertThat(variableLiteral.getIndex().orElse(null), is(index));
if (argsAsserter != null) {
argsAsserter.accept(variableLiteral.getArgs().orElseThrow(RuntimeException::new));
} else {
diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/StaticHelper.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/StaticHelper.java
index 7cfe304f26..3b266d5751 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/StaticHelper.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/generation/StaticHelper.java
@@ -95,7 +95,7 @@ public class StaticHelper {
return arr.length;
}
} else if (obj instanceof Collection) {
- Collection col = (Collection) obj;
+ Collection<?> col = (Collection<?>) obj;
return col.size();
}
throw new PlcRuntimeException("Unable to count object of type " + obj.getClass().getName());
@@ -124,44 +124,4 @@ public class StaticHelper {
return (int) Math.ceil(value);
}
- // TODO: Commented out this block and the next as we're trying to get rid of the code all together.
- /*public static double toFloat(ReadBuffer io, boolean signed, int bitsExponent, int bitsMantissa) {
- return toFloat(io, "", signed, bitsExponent, bitsMantissa);
- }
-
- // TODO: refactor so that we only emit one logical name
- public static double toFloat(ReadBuffer io, String logicalName, boolean signed, int bitsExponent, int bitsMantissa) {
- try {
- if (signed && bitsExponent == 8 && bitsMantissa == 23) {
- return io.readFloat(logicalName, 32);
- } else if (signed && bitsExponent == 11 & bitsMantissa == 52) {
- return io.readDouble(logicalName, 64);
- }
- boolean negative = (signed) && io.readBit(logicalName);
- long exponent = io.readUnsignedLong(logicalName, bitsExponent);
- exponent = exponent - (((long) Math.pow(2, bitsExponent) / 2) - 1);
- double mantissa = 1D;
- for (int i = 1; i <= bitsMantissa; i++) {
- if (io.readBit(logicalName)) {
- mantissa += Math.pow(2, (double) i * -1);
- }
- }
- return ((negative) ? -1 : 1) * mantissa * Math.pow(2, exponent);
- } catch (ParseException e) {
- return 0.0f;
- }
- }*/
-
- public static boolean fromFloatSign(double value) {
- return value < 0;
- }
-
- public static long fromFloatExponent(double value, int bitsExponent) {
- return 0;
- }
-
- public static long fromFloatMantissa(double value, int bitsMantissa) {
- return 0;
- }
-
}
[plc4x] 03/03: refactor(bacnet): relax useage of BACnetPriorityArray
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 0d1ace47f99964ced2a1c64f9acb5887b93e59ef
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 31 19:11:33 2022 +0200
refactor(bacnet): relax useage of BACnetPriorityArray
---
.../protocols/bacnet/ParserSerializerTestsuite.xml | 34 +-
.../protocols/bacnetip/readwrite/ParserHelper.go | 6 +-
.../bacnetip/readwrite/XmlParserHelper.go | 7 +-
.../model/BACnetApplicationTagObjectIdentifier.go | 4 +-
...medServiceRequestCreateObjectObjectSpecifier.go | 4 +-
.../model/BACnetConstructedDataPriorityArray.go | 2 +-
.../model/BACnetContextTagObjectIdentifier.go | 4 +-
.../readwrite/model/BACnetPriorityArray.go | 971 ++++++---------------
plc4go/protocols/cbus/readwrite/model/CALData.go | 4 +-
.../protocols/cbus/readwrite/model/CBusCommand.go | 4 +-
plc4go/protocols/cbus/readwrite/model/SALData.go | 4 +-
.../resources/protocols/bacnetip/bacnetip.mspec | 49 +-
.../protocols/bacnet/ParserSerializerTestsuite.xml | 34 +-
13 files changed, 310 insertions(+), 817 deletions(-)
diff --git a/plc4go/assets/testing/protocols/bacnet/ParserSerializerTestsuite.xml b/plc4go/assets/testing/protocols/bacnet/ParserSerializerTestsuite.xml
index 02d302fa7d..e0a569cec0 100644
--- a/plc4go/assets/testing/protocols/bacnet/ParserSerializerTestsuite.xml
+++ b/plc4go/assets/testing/protocols/bacnet/ParserSerializerTestsuite.xml
@@ -4491,7 +4491,7 @@
<BACnetConstructedDataPriorityArray>
<priorityArray>
<BACnetPriorityArray>
- <priorityValue01>
+ <data isList="true">
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4511,8 +4511,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue01>
- <priorityValue02>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4532,8 +4530,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue02>
- <priorityValue03>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4553,8 +4549,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue03>
- <priorityValue04>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4574,8 +4568,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue04>
- <priorityValue05>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4595,8 +4587,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue05>
- <priorityValue06>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4616,8 +4606,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue06>
- <priorityValue07>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4637,8 +4625,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue07>
- <priorityValue08>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4658,8 +4644,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue08>
- <priorityValue09>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4679,8 +4663,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue09>
- <priorityValue10>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4700,8 +4682,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue10>
- <priorityValue11>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4721,8 +4701,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue11>
- <priorityValue12>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4742,8 +4720,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue12>
- <priorityValue13>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4763,8 +4739,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue13>
- <priorityValue14>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4784,8 +4758,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue14>
- <priorityValue15>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4805,8 +4777,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue15>
- <priorityValue16>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4826,7 +4796,7 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue16>
+ </data>
</BACnetPriorityArray>
</priorityArray>
</BACnetConstructedDataPriorityArray>
diff --git a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
index 4c2e70a046..bcac47f8cc 100644
--- a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
@@ -61,7 +61,11 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return model.BACnetOpeningTagParse(io, tagNumberArgument)
case "BACnetPriorityArray":
objectType := model.BACnetObjectTypeByName(arguments[0])
- return model.BACnetPriorityArrayParse(io, objectType)
+ tagNumber, err := utils.StrToUint8(arguments[1])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ return model.BACnetPriorityArrayParse(io, objectType, tagNumber)
case "BACnetAuthorizationExemptionTagged":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
index 46f67a3f93..abec523294 100644
--- a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
@@ -75,7 +75,12 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
return model.BACnetOpeningTagParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumberArgument)
case "BACnetPriorityArray":
objectType := model.BACnetObjectTypeByName(parserArguments[0])
- return model.BACnetPriorityArrayParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectType)
+ parsedUint1, err := strconv.ParseUint(parserArguments[1], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint1)
+ return model.BACnetPriorityArrayParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectType, tagNumber)
case "BACnetAuthorizationExemptionTagged":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go
index e3d9a97320..fc6bd91e54 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetApplicationTagObjectIdentifier.go
@@ -86,7 +86,7 @@ func (m *BACnetApplicationTagObjectIdentifier) GetPayload() *BACnetTagPayloadObj
///////////////////////
func (m *BACnetApplicationTagObjectIdentifier) GetObjectType() BACnetObjectType {
- return BACnetObjectType(m.GetPayload().GetObjectType())
+ return CastBACnetObjectType(m.GetPayload().GetObjectType())
}
func (m *BACnetApplicationTagObjectIdentifier) GetInstanceNumber() uint32 {
@@ -173,7 +173,7 @@ func BACnetApplicationTagObjectIdentifierParse(readBuffer utils.ReadBuffer) (*BA
// Virtual field
_objectType := payload.GetObjectType()
- objectType := BACnetObjectType(_objectType)
+ objectType := CastBACnetObjectType(_objectType)
_ = objectType
// Virtual field
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go
index 9a823f3d31..988f7b3290 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConfirmedServiceRequestCreateObjectObjectSpecifier.go
@@ -105,7 +105,7 @@ func (m *BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetObjectType
_ = rawObjectType
objectIdentifier := m.ObjectIdentifier
_ = objectIdentifier
- return BACnetObjectType(MapBACnetObjectType((*m.GetRawObjectType())))
+ return CastBACnetObjectType(MapBACnetObjectType((*m.GetRawObjectType())))
}
func (m *BACnetConfirmedServiceRequestCreateObjectObjectSpecifier) GetIsObjectIdentifier() bool {
@@ -226,7 +226,7 @@ func BACnetConfirmedServiceRequestCreateObjectObjectSpecifierParse(readBuffer ut
// Virtual field
_objectType := MapBACnetObjectType((*rawObjectType))
- objectType := BACnetObjectType(_objectType)
+ objectType := CastBACnetObjectType(_objectType)
_ = objectType
// Optional Field (objectIdentifier) (Can be skipped, if a given expression evaluates to false)
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go
index eb06dce6e9..43a9bb516d 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetConstructedDataPriorityArray.go
@@ -149,7 +149,7 @@ func BACnetConstructedDataPriorityArrayParse(readBuffer utils.ReadBuffer, tagNum
if pullErr := readBuffer.PullContext("priorityArray"); pullErr != nil {
return nil, pullErr
}
- _priorityArray, _priorityArrayErr := BACnetPriorityArrayParse(readBuffer, BACnetObjectType(objectType))
+ _priorityArray, _priorityArrayErr := BACnetPriorityArrayParse(readBuffer, BACnetObjectType(objectType), uint8(tagNumber))
if _priorityArrayErr != nil {
return nil, errors.Wrap(_priorityArrayErr, "Error parsing 'priorityArray' field")
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go
index 56c90f99e2..6b3ecbe5e3 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetContextTagObjectIdentifier.go
@@ -93,7 +93,7 @@ func (m *BACnetContextTagObjectIdentifier) GetPayload() *BACnetTagPayloadObjectI
///////////////////////
func (m *BACnetContextTagObjectIdentifier) GetObjectType() BACnetObjectType {
- return BACnetObjectType(m.GetPayload().GetObjectType())
+ return CastBACnetObjectType(m.GetPayload().GetObjectType())
}
func (m *BACnetContextTagObjectIdentifier) GetInstanceNumber() uint32 {
@@ -180,7 +180,7 @@ func BACnetContextTagObjectIdentifierParse(readBuffer utils.ReadBuffer, tagNumbe
// Virtual field
_objectType := payload.GetObjectType()
- objectType := BACnetObjectType(_objectType)
+ objectType := CastBACnetObjectType(_objectType)
_ = objectType
// Virtual field
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go
index 493e6bda39..a855ca96ae 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetPriorityArray.go
@@ -22,73 +22,61 @@ package model
import (
"github.com/apache/plc4x/plc4go/internal/spi/utils"
"github.com/pkg/errors"
- "io"
)
// Code generated by code-generation. DO NOT EDIT.
// BACnetPriorityArray is the data-structure of this message
type BACnetPriorityArray struct {
- PriorityValue01 *BACnetPriorityValue
- PeekedTagHeader *BACnetTagHeader
- PriorityValue02 *BACnetPriorityValue
- PriorityValue03 *BACnetPriorityValue
- PriorityValue04 *BACnetPriorityValue
- PriorityValue05 *BACnetPriorityValue
- PriorityValue06 *BACnetPriorityValue
- PriorityValue07 *BACnetPriorityValue
- PriorityValue08 *BACnetPriorityValue
- PriorityValue09 *BACnetPriorityValue
- PriorityValue10 *BACnetPriorityValue
- PriorityValue11 *BACnetPriorityValue
- PriorityValue12 *BACnetPriorityValue
- PriorityValue13 *BACnetPriorityValue
- PriorityValue14 *BACnetPriorityValue
- PriorityValue15 *BACnetPriorityValue
- PriorityValue16 *BACnetPriorityValue
+ Data []*BACnetPriorityValue
// Arguments.
ObjectType BACnetObjectType
+ TagNumber uint8
}
// IBACnetPriorityArray is the corresponding interface of BACnetPriorityArray
type IBACnetPriorityArray interface {
- // GetPriorityValue01 returns PriorityValue01 (property field)
+ // GetData returns Data (property field)
+ GetData() []*BACnetPriorityValue
+ // GetPriorityValue01 returns PriorityValue01 (virtual field)
GetPriorityValue01() *BACnetPriorityValue
- // GetPeekedTagHeader returns PeekedTagHeader (property field)
- GetPeekedTagHeader() *BACnetTagHeader
- // GetPriorityValue02 returns PriorityValue02 (property field)
+ // GetPriorityValue02 returns PriorityValue02 (virtual field)
GetPriorityValue02() *BACnetPriorityValue
- // GetPriorityValue03 returns PriorityValue03 (property field)
+ // GetPriorityValue03 returns PriorityValue03 (virtual field)
GetPriorityValue03() *BACnetPriorityValue
- // GetPriorityValue04 returns PriorityValue04 (property field)
+ // GetPriorityValue04 returns PriorityValue04 (virtual field)
GetPriorityValue04() *BACnetPriorityValue
- // GetPriorityValue05 returns PriorityValue05 (property field)
+ // GetPriorityValue05 returns PriorityValue05 (virtual field)
GetPriorityValue05() *BACnetPriorityValue
- // GetPriorityValue06 returns PriorityValue06 (property field)
+ // GetPriorityValue06 returns PriorityValue06 (virtual field)
GetPriorityValue06() *BACnetPriorityValue
- // GetPriorityValue07 returns PriorityValue07 (property field)
+ // GetPriorityValue07 returns PriorityValue07 (virtual field)
GetPriorityValue07() *BACnetPriorityValue
- // GetPriorityValue08 returns PriorityValue08 (property field)
+ // GetPriorityValue08 returns PriorityValue08 (virtual field)
GetPriorityValue08() *BACnetPriorityValue
- // GetPriorityValue09 returns PriorityValue09 (property field)
+ // GetPriorityValue09 returns PriorityValue09 (virtual field)
GetPriorityValue09() *BACnetPriorityValue
- // GetPriorityValue10 returns PriorityValue10 (property field)
+ // GetPriorityValue10 returns PriorityValue10 (virtual field)
GetPriorityValue10() *BACnetPriorityValue
- // GetPriorityValue11 returns PriorityValue11 (property field)
+ // GetPriorityValue11 returns PriorityValue11 (virtual field)
GetPriorityValue11() *BACnetPriorityValue
- // GetPriorityValue12 returns PriorityValue12 (property field)
+ // GetPriorityValue12 returns PriorityValue12 (virtual field)
GetPriorityValue12() *BACnetPriorityValue
- // GetPriorityValue13 returns PriorityValue13 (property field)
+ // GetPriorityValue13 returns PriorityValue13 (virtual field)
GetPriorityValue13() *BACnetPriorityValue
- // GetPriorityValue14 returns PriorityValue14 (property field)
+ // GetPriorityValue14 returns PriorityValue14 (virtual field)
GetPriorityValue14() *BACnetPriorityValue
- // GetPriorityValue15 returns PriorityValue15 (property field)
+ // GetPriorityValue15 returns PriorityValue15 (virtual field)
GetPriorityValue15() *BACnetPriorityValue
- // GetPriorityValue16 returns PriorityValue16 (property field)
+ // GetPriorityValue16 returns PriorityValue16 (virtual field)
GetPriorityValue16() *BACnetPriorityValue
- // GetLikelyArrayAccessWhichIsNotImplemented returns LikelyArrayAccessWhichIsNotImplemented (virtual field)
- GetLikelyArrayAccessWhichIsNotImplemented() bool
+ // GetIsValidPriorityArray returns IsValidPriorityArray (virtual field)
+ GetIsValidPriorityArray() bool
+ // GetIsIndexedAccess returns IsIndexedAccess (virtual field)
+ GetIsIndexedAccess() bool
+ // GetIndexEntry returns IndexEntry (virtual field)
+ GetIndexEntry() *BACnetPriorityValue
// GetLengthInBytes returns the length in bytes
GetLengthInBytes() uint16
// GetLengthInBits returns the length in bits
@@ -102,115 +90,93 @@ type IBACnetPriorityArray interface {
/////////////////////// Accessors for property fields.
///////////////////////
-func (m *BACnetPriorityArray) GetPriorityValue01() *BACnetPriorityValue {
- return m.PriorityValue01
+func (m *BACnetPriorityArray) GetData() []*BACnetPriorityValue {
+ return m.Data
}
-func (m *BACnetPriorityArray) GetPeekedTagHeader() *BACnetTagHeader {
- return m.PeekedTagHeader
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetPriorityArray) GetPriorityValue01() *BACnetPriorityValue {
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (0)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[0]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue02() *BACnetPriorityValue {
- return m.PriorityValue02
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (1)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[1]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue03() *BACnetPriorityValue {
- return m.PriorityValue03
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (2)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[2]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue04() *BACnetPriorityValue {
- return m.PriorityValue04
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (3)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[3]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue05() *BACnetPriorityValue {
- return m.PriorityValue05
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (4)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[4]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue06() *BACnetPriorityValue {
- return m.PriorityValue06
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (5)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[5]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue07() *BACnetPriorityValue {
- return m.PriorityValue07
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (6)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[6]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue08() *BACnetPriorityValue {
- return m.PriorityValue08
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (7)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[7]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue09() *BACnetPriorityValue {
- return m.PriorityValue09
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (8)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[8]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue10() *BACnetPriorityValue {
- return m.PriorityValue10
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (9)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[9]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue11() *BACnetPriorityValue {
- return m.PriorityValue11
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (10)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[10]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue12() *BACnetPriorityValue {
- return m.PriorityValue12
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (11)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[11]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue13() *BACnetPriorityValue {
- return m.PriorityValue13
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (12)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[12]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue14() *BACnetPriorityValue {
- return m.PriorityValue14
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (13)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[13]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue15() *BACnetPriorityValue {
- return m.PriorityValue15
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (14)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[14]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
func (m *BACnetPriorityArray) GetPriorityValue16() *BACnetPriorityValue {
- return m.PriorityValue16
+ return CastBACnetPriorityValue(CastBACnetPriorityValue(utils.InlineIf(bool((len(m.GetData())) > (15)), func() interface{} { return CastBACnetPriorityValue(m.GetData()[15]) }, func() interface{} { return CastBACnetPriorityValue(nil) })))
}
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for virtual fields.
-///////////////////////
+func (m *BACnetPriorityArray) GetIsValidPriorityArray() bool {
+ return bool(bool((len(m.GetData())) == (16)))
+}
-func (m *BACnetPriorityArray) GetLikelyArrayAccessWhichIsNotImplemented() bool {
- priorityValue02 := m.PriorityValue02
- _ = priorityValue02
- priorityValue03 := m.PriorityValue03
- _ = priorityValue03
- priorityValue04 := m.PriorityValue04
- _ = priorityValue04
- priorityValue05 := m.PriorityValue05
- _ = priorityValue05
- priorityValue06 := m.PriorityValue06
- _ = priorityValue06
- priorityValue07 := m.PriorityValue07
- _ = priorityValue07
- priorityValue08 := m.PriorityValue08
- _ = priorityValue08
- priorityValue09 := m.PriorityValue09
- _ = priorityValue09
- priorityValue10 := m.PriorityValue10
- _ = priorityValue10
- priorityValue11 := m.PriorityValue11
- _ = priorityValue11
- priorityValue12 := m.PriorityValue12
- _ = priorityValue12
- priorityValue13 := m.PriorityValue13
- _ = priorityValue13
- priorityValue14 := m.PriorityValue14
- _ = priorityValue14
- priorityValue15 := m.PriorityValue15
- _ = priorityValue15
- priorityValue16 := m.PriorityValue16
- _ = priorityValue16
- return bool(bool((m.GetPeekedTagHeader().GetLengthValueType()) == (0x7)))
+func (m *BACnetPriorityArray) GetIsIndexedAccess() bool {
+ return bool(bool((len(m.GetData())) == (1)))
+}
+
+func (m *BACnetPriorityArray) GetIndexEntry() *BACnetPriorityValue {
+ return CastBACnetPriorityValue(m.GetPriorityValue01())
}
///////////////////////
@@ -219,8 +185,8 @@ func (m *BACnetPriorityArray) GetLikelyArrayAccessWhichIsNotImplemented() bool {
///////////////////////////////////////////////////////////
// NewBACnetPriorityArray factory function for BACnetPriorityArray
-func NewBACnetPriorityArray(priorityValue01 *BACnetPriorityValue, peekedTagHeader *BACnetTagHeader, priorityValue02 *BACnetPriorityValue, priorityValue03 *BACnetPriorityValue, priorityValue04 *BACnetPriorityValue, priorityValue05 *BACnetPriorityValue, priorityValue06 *BACnetPriorityValue, priorityValue07 *BACnetPriorityValue, priorityValue08 *BACnetPriorityValue, priorityValue09 *BACnetPriorityValue, priorityValue10 *BACnetPriorityValue, priorityValue11 *BACnetPriorityValue, priorityValu [...]
- return &BACnetPriorityArray{PriorityValue01: priorityValue01, PeekedTagHeader: peekedTagHeader, PriorityValue02: priorityValue02, PriorityValue03: priorityValue03, PriorityValue04: priorityValue04, PriorityValue05: priorityValue05, PriorityValue06: priorityValue06, PriorityValue07: priorityValue07, PriorityValue08: priorityValue08, PriorityValue09: priorityValue09, PriorityValue10: priorityValue10, PriorityValue11: priorityValue11, PriorityValue12: priorityValue12, PriorityValue13: prio [...]
+func NewBACnetPriorityArray(data []*BACnetPriorityValue, objectType BACnetObjectType, tagNumber uint8) *BACnetPriorityArray {
+ return &BACnetPriorityArray{Data: data, ObjectType: objectType, TagNumber: tagNumber}
}
func CastBACnetPriorityArray(structType interface{}) *BACnetPriorityArray {
@@ -244,85 +210,50 @@ func (m *BACnetPriorityArray) GetLengthInBits() uint16 {
func (m *BACnetPriorityArray) GetLengthInBitsConditional(lastItem bool) uint16 {
lengthInBits := uint16(0)
- // Simple field (priorityValue01)
- lengthInBits += m.PriorityValue01.GetLengthInBits()
+ // Array field
+ if len(m.Data) > 0 {
+ for _, element := range m.Data {
+ lengthInBits += element.GetLengthInBits()
+ }
+ }
// A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue02)
- if m.PriorityValue02 != nil {
- lengthInBits += (*m.PriorityValue02).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue03)
- if m.PriorityValue03 != nil {
- lengthInBits += (*m.PriorityValue03).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue04)
- if m.PriorityValue04 != nil {
- lengthInBits += (*m.PriorityValue04).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue05)
- if m.PriorityValue05 != nil {
- lengthInBits += (*m.PriorityValue05).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue06)
- if m.PriorityValue06 != nil {
- lengthInBits += (*m.PriorityValue06).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue07)
- if m.PriorityValue07 != nil {
- lengthInBits += (*m.PriorityValue07).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue08)
- if m.PriorityValue08 != nil {
- lengthInBits += (*m.PriorityValue08).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue09)
- if m.PriorityValue09 != nil {
- lengthInBits += (*m.PriorityValue09).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue10)
- if m.PriorityValue10 != nil {
- lengthInBits += (*m.PriorityValue10).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue11)
- if m.PriorityValue11 != nil {
- lengthInBits += (*m.PriorityValue11).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue12)
- if m.PriorityValue12 != nil {
- lengthInBits += (*m.PriorityValue12).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue13)
- if m.PriorityValue13 != nil {
- lengthInBits += (*m.PriorityValue13).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue14)
- if m.PriorityValue14 != nil {
- lengthInBits += (*m.PriorityValue14).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue15)
- if m.PriorityValue15 != nil {
- lengthInBits += (*m.PriorityValue15).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
- // Optional Field (priorityValue16)
- if m.PriorityValue16 != nil {
- lengthInBits += (*m.PriorityValue16).GetLengthInBits()
- }
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
return lengthInBits
}
@@ -331,7 +262,7 @@ func (m *BACnetPriorityArray) GetLengthInBytes() uint16 {
return m.GetLengthInBits() / 8
}
-func BACnetPriorityArrayParse(readBuffer utils.ReadBuffer, objectType BACnetObjectType) (*BACnetPriorityArray, error) {
+func BACnetPriorityArrayParse(readBuffer utils.ReadBuffer, objectType BACnetObjectType, tagNumber uint8) (*BACnetPriorityArray, error) {
positionAware := readBuffer
_ = positionAware
if pullErr := readBuffer.PullContext("BACnetPriorityArray"); pullErr != nil {
@@ -340,353 +271,127 @@ func BACnetPriorityArrayParse(readBuffer utils.ReadBuffer, objectType BACnetObje
currentPos := positionAware.GetPos()
_ = currentPos
- // Simple Field (priorityValue01)
- if pullErr := readBuffer.PullContext("priorityValue01"); pullErr != nil {
+ // Array field (data)
+ if pullErr := readBuffer.PullContext("data", utils.WithRenderAsList(true)); pullErr != nil {
return nil, pullErr
}
- _priorityValue01, _priorityValue01Err := BACnetPriorityValueParse(readBuffer, BACnetObjectType(objectType))
- if _priorityValue01Err != nil {
- return nil, errors.Wrap(_priorityValue01Err, "Error parsing 'priorityValue01' field")
+ // Terminated array
+ data := make([]*BACnetPriorityValue, 0)
+ {
+ for !bool(IsBACnetConstructedDataClosingTag(readBuffer, false, tagNumber)) {
+ _item, _err := BACnetPriorityValueParse(readBuffer, objectType)
+ if _err != nil {
+ return nil, errors.Wrap(_err, "Error parsing 'data' field")
+ }
+ data = append(data, CastBACnetPriorityValue(_item))
+
+ }
}
- priorityValue01 := CastBACnetPriorityValue(_priorityValue01)
- if closeErr := readBuffer.CloseContext("priorityValue01"); closeErr != nil {
+ if closeErr := readBuffer.CloseContext("data", utils.WithRenderAsList(true)); closeErr != nil {
return nil, closeErr
}
- // Peek Field (peekedTagHeader)
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("peekedTagHeader"); pullErr != nil {
- return nil, pullErr
- }
- peekedTagHeader, _ := BACnetTagHeaderParse(readBuffer)
- readBuffer.Reset(currentPos)
+ // Virtual field
+ _priorityValue01 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (0)), func() interface{} { return CastBACnetPriorityValue(data[0]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue01 := CastBACnetPriorityValue(_priorityValue01)
+ _ = priorityValue01
// Virtual field
- _likelyArrayAccessWhichIsNotImplemented := bool((peekedTagHeader.GetLengthValueType()) == (0x7))
- likelyArrayAccessWhichIsNotImplemented := bool(_likelyArrayAccessWhichIsNotImplemented)
- _ = likelyArrayAccessWhichIsNotImplemented
+ _priorityValue02 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (1)), func() interface{} { return CastBACnetPriorityValue(data[1]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue02 := CastBACnetPriorityValue(_priorityValue02)
+ _ = priorityValue02
- // Optional Field (priorityValue02) (Can be skipped, if a given expression evaluates to false)
- var priorityValue02 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue02"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue02' field")
- default:
- priorityValue02 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue02"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue03 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (2)), func() interface{} { return CastBACnetPriorityValue(data[2]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue03 := CastBACnetPriorityValue(_priorityValue03)
+ _ = priorityValue03
- // Optional Field (priorityValue03) (Can be skipped, if a given expression evaluates to false)
- var priorityValue03 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue03"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue03' field")
- default:
- priorityValue03 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue03"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue04 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (3)), func() interface{} { return CastBACnetPriorityValue(data[3]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue04 := CastBACnetPriorityValue(_priorityValue04)
+ _ = priorityValue04
- // Optional Field (priorityValue04) (Can be skipped, if a given expression evaluates to false)
- var priorityValue04 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue04"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue04' field")
- default:
- priorityValue04 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue04"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue05 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (4)), func() interface{} { return CastBACnetPriorityValue(data[4]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue05 := CastBACnetPriorityValue(_priorityValue05)
+ _ = priorityValue05
- // Optional Field (priorityValue05) (Can be skipped, if a given expression evaluates to false)
- var priorityValue05 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue05"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue05' field")
- default:
- priorityValue05 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue05"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue06 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (5)), func() interface{} { return CastBACnetPriorityValue(data[5]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue06 := CastBACnetPriorityValue(_priorityValue06)
+ _ = priorityValue06
- // Optional Field (priorityValue06) (Can be skipped, if a given expression evaluates to false)
- var priorityValue06 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue06"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue06' field")
- default:
- priorityValue06 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue06"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue07 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (6)), func() interface{} { return CastBACnetPriorityValue(data[6]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue07 := CastBACnetPriorityValue(_priorityValue07)
+ _ = priorityValue07
- // Optional Field (priorityValue07) (Can be skipped, if a given expression evaluates to false)
- var priorityValue07 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue07"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue07' field")
- default:
- priorityValue07 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue07"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue08 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (7)), func() interface{} { return CastBACnetPriorityValue(data[7]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue08 := CastBACnetPriorityValue(_priorityValue08)
+ _ = priorityValue08
- // Optional Field (priorityValue08) (Can be skipped, if a given expression evaluates to false)
- var priorityValue08 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue08"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue08' field")
- default:
- priorityValue08 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue08"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue09 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (8)), func() interface{} { return CastBACnetPriorityValue(data[8]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue09 := CastBACnetPriorityValue(_priorityValue09)
+ _ = priorityValue09
- // Optional Field (priorityValue09) (Can be skipped, if a given expression evaluates to false)
- var priorityValue09 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue09"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue09' field")
- default:
- priorityValue09 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue09"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue10 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (9)), func() interface{} { return CastBACnetPriorityValue(data[9]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue10 := CastBACnetPriorityValue(_priorityValue10)
+ _ = priorityValue10
- // Optional Field (priorityValue10) (Can be skipped, if a given expression evaluates to false)
- var priorityValue10 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue10"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue10' field")
- default:
- priorityValue10 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue10"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue11 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (10)), func() interface{} { return CastBACnetPriorityValue(data[10]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue11 := CastBACnetPriorityValue(_priorityValue11)
+ _ = priorityValue11
- // Optional Field (priorityValue11) (Can be skipped, if a given expression evaluates to false)
- var priorityValue11 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue11"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue11' field")
- default:
- priorityValue11 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue11"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue12 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (11)), func() interface{} { return CastBACnetPriorityValue(data[11]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue12 := CastBACnetPriorityValue(_priorityValue12)
+ _ = priorityValue12
- // Optional Field (priorityValue12) (Can be skipped, if a given expression evaluates to false)
- var priorityValue12 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue12"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue12' field")
- default:
- priorityValue12 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue12"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue13 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (12)), func() interface{} { return CastBACnetPriorityValue(data[12]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue13 := CastBACnetPriorityValue(_priorityValue13)
+ _ = priorityValue13
- // Optional Field (priorityValue13) (Can be skipped, if a given expression evaluates to false)
- var priorityValue13 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue13"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue13' field")
- default:
- priorityValue13 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue13"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue14 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (13)), func() interface{} { return CastBACnetPriorityValue(data[13]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue14 := CastBACnetPriorityValue(_priorityValue14)
+ _ = priorityValue14
- // Optional Field (priorityValue14) (Can be skipped, if a given expression evaluates to false)
- var priorityValue14 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue14"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue14' field")
- default:
- priorityValue14 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue14"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue15 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (14)), func() interface{} { return CastBACnetPriorityValue(data[14]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue15 := CastBACnetPriorityValue(_priorityValue15)
+ _ = priorityValue15
- // Optional Field (priorityValue15) (Can be skipped, if a given expression evaluates to false)
- var priorityValue15 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue15"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue15' field")
- default:
- priorityValue15 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue15"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _priorityValue16 := CastBACnetPriorityValue(utils.InlineIf(bool((len(data)) > (15)), func() interface{} { return CastBACnetPriorityValue(data[15]) }, func() interface{} { return CastBACnetPriorityValue(nil) }))
+ priorityValue16 := CastBACnetPriorityValue(_priorityValue16)
+ _ = priorityValue16
- // Optional Field (priorityValue16) (Can be skipped, if a given expression evaluates to false)
- var priorityValue16 *BACnetPriorityValue = nil
- if !(likelyArrayAccessWhichIsNotImplemented) {
- currentPos = positionAware.GetPos()
- if pullErr := readBuffer.PullContext("priorityValue16"); pullErr != nil {
- return nil, pullErr
- }
- _val, _err := BACnetPriorityValueParse(readBuffer, objectType)
- switch {
- case errors.Is(_err, utils.ParseAssertError{}) || errors.Is(_err, io.EOF):
- readBuffer.Reset(currentPos)
- case _err != nil:
- return nil, errors.Wrap(_err, "Error parsing 'priorityValue16' field")
- default:
- priorityValue16 = CastBACnetPriorityValue(_val)
- if closeErr := readBuffer.CloseContext("priorityValue16"); closeErr != nil {
- return nil, closeErr
- }
- }
- }
+ // Virtual field
+ _isValidPriorityArray := bool((len(data)) == (16))
+ isValidPriorityArray := bool(_isValidPriorityArray)
+ _ = isValidPriorityArray
+
+ // Virtual field
+ _isIndexedAccess := bool((len(data)) == (1))
+ isIndexedAccess := bool(_isIndexedAccess)
+ _ = isIndexedAccess
+
+ // Virtual field
+ _indexEntry := priorityValue01
+ indexEntry := CastBACnetPriorityValue(_indexEntry)
+ _ = indexEntry
if closeErr := readBuffer.CloseContext("BACnetPriorityArray"); closeErr != nil {
return nil, closeErr
}
// Create the instance
- return NewBACnetPriorityArray(priorityValue01, peekedTagHeader, priorityValue02, priorityValue03, priorityValue04, priorityValue05, priorityValue06, priorityValue07, priorityValue08, priorityValue09, priorityValue10, priorityValue11, priorityValue12, priorityValue13, priorityValue14, priorityValue15, priorityValue16, objectType), nil
+ return NewBACnetPriorityArray(data, objectType, tagNumber), nil
}
func (m *BACnetPriorityArray) Serialize(writeBuffer utils.WriteBuffer) error {
@@ -696,260 +401,96 @@ func (m *BACnetPriorityArray) Serialize(writeBuffer utils.WriteBuffer) error {
return pushErr
}
- // Simple Field (priorityValue01)
- if pushErr := writeBuffer.PushContext("priorityValue01"); pushErr != nil {
- return pushErr
- }
- _priorityValue01Err := m.PriorityValue01.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue01"); popErr != nil {
- return popErr
+ // Array Field (data)
+ if m.Data != nil {
+ if pushErr := writeBuffer.PushContext("data", utils.WithRenderAsList(true)); pushErr != nil {
+ return pushErr
+ }
+ for _, _element := range m.Data {
+ _elementErr := _element.Serialize(writeBuffer)
+ if _elementErr != nil {
+ return errors.Wrap(_elementErr, "Error serializing 'data' field")
+ }
+ }
+ if popErr := writeBuffer.PopContext("data", utils.WithRenderAsList(true)); popErr != nil {
+ return popErr
+ }
}
- if _priorityValue01Err != nil {
+ // Virtual field
+ if _priorityValue01Err := writeBuffer.WriteVirtual("priorityValue01", m.GetPriorityValue01()); _priorityValue01Err != nil {
return errors.Wrap(_priorityValue01Err, "Error serializing 'priorityValue01' field")
}
// Virtual field
- if _likelyArrayAccessWhichIsNotImplementedErr := writeBuffer.WriteVirtual("likelyArrayAccessWhichIsNotImplemented", m.GetLikelyArrayAccessWhichIsNotImplemented()); _likelyArrayAccessWhichIsNotImplementedErr != nil {
- return errors.Wrap(_likelyArrayAccessWhichIsNotImplementedErr, "Error serializing 'likelyArrayAccessWhichIsNotImplemented' field")
+ if _priorityValue02Err := writeBuffer.WriteVirtual("priorityValue02", m.GetPriorityValue02()); _priorityValue02Err != nil {
+ return errors.Wrap(_priorityValue02Err, "Error serializing 'priorityValue02' field")
}
-
- // Optional Field (priorityValue02) (Can be skipped, if the value is null)
- var priorityValue02 *BACnetPriorityValue = nil
- if m.PriorityValue02 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue02"); pushErr != nil {
- return pushErr
- }
- priorityValue02 = m.PriorityValue02
- _priorityValue02Err := priorityValue02.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue02"); popErr != nil {
- return popErr
- }
- if _priorityValue02Err != nil {
- return errors.Wrap(_priorityValue02Err, "Error serializing 'priorityValue02' field")
- }
+ // Virtual field
+ if _priorityValue03Err := writeBuffer.WriteVirtual("priorityValue03", m.GetPriorityValue03()); _priorityValue03Err != nil {
+ return errors.Wrap(_priorityValue03Err, "Error serializing 'priorityValue03' field")
}
-
- // Optional Field (priorityValue03) (Can be skipped, if the value is null)
- var priorityValue03 *BACnetPriorityValue = nil
- if m.PriorityValue03 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue03"); pushErr != nil {
- return pushErr
- }
- priorityValue03 = m.PriorityValue03
- _priorityValue03Err := priorityValue03.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue03"); popErr != nil {
- return popErr
- }
- if _priorityValue03Err != nil {
- return errors.Wrap(_priorityValue03Err, "Error serializing 'priorityValue03' field")
- }
+ // Virtual field
+ if _priorityValue04Err := writeBuffer.WriteVirtual("priorityValue04", m.GetPriorityValue04()); _priorityValue04Err != nil {
+ return errors.Wrap(_priorityValue04Err, "Error serializing 'priorityValue04' field")
}
-
- // Optional Field (priorityValue04) (Can be skipped, if the value is null)
- var priorityValue04 *BACnetPriorityValue = nil
- if m.PriorityValue04 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue04"); pushErr != nil {
- return pushErr
- }
- priorityValue04 = m.PriorityValue04
- _priorityValue04Err := priorityValue04.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue04"); popErr != nil {
- return popErr
- }
- if _priorityValue04Err != nil {
- return errors.Wrap(_priorityValue04Err, "Error serializing 'priorityValue04' field")
- }
+ // Virtual field
+ if _priorityValue05Err := writeBuffer.WriteVirtual("priorityValue05", m.GetPriorityValue05()); _priorityValue05Err != nil {
+ return errors.Wrap(_priorityValue05Err, "Error serializing 'priorityValue05' field")
}
-
- // Optional Field (priorityValue05) (Can be skipped, if the value is null)
- var priorityValue05 *BACnetPriorityValue = nil
- if m.PriorityValue05 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue05"); pushErr != nil {
- return pushErr
- }
- priorityValue05 = m.PriorityValue05
- _priorityValue05Err := priorityValue05.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue05"); popErr != nil {
- return popErr
- }
- if _priorityValue05Err != nil {
- return errors.Wrap(_priorityValue05Err, "Error serializing 'priorityValue05' field")
- }
+ // Virtual field
+ if _priorityValue06Err := writeBuffer.WriteVirtual("priorityValue06", m.GetPriorityValue06()); _priorityValue06Err != nil {
+ return errors.Wrap(_priorityValue06Err, "Error serializing 'priorityValue06' field")
}
-
- // Optional Field (priorityValue06) (Can be skipped, if the value is null)
- var priorityValue06 *BACnetPriorityValue = nil
- if m.PriorityValue06 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue06"); pushErr != nil {
- return pushErr
- }
- priorityValue06 = m.PriorityValue06
- _priorityValue06Err := priorityValue06.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue06"); popErr != nil {
- return popErr
- }
- if _priorityValue06Err != nil {
- return errors.Wrap(_priorityValue06Err, "Error serializing 'priorityValue06' field")
- }
+ // Virtual field
+ if _priorityValue07Err := writeBuffer.WriteVirtual("priorityValue07", m.GetPriorityValue07()); _priorityValue07Err != nil {
+ return errors.Wrap(_priorityValue07Err, "Error serializing 'priorityValue07' field")
}
-
- // Optional Field (priorityValue07) (Can be skipped, if the value is null)
- var priorityValue07 *BACnetPriorityValue = nil
- if m.PriorityValue07 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue07"); pushErr != nil {
- return pushErr
- }
- priorityValue07 = m.PriorityValue07
- _priorityValue07Err := priorityValue07.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue07"); popErr != nil {
- return popErr
- }
- if _priorityValue07Err != nil {
- return errors.Wrap(_priorityValue07Err, "Error serializing 'priorityValue07' field")
- }
+ // Virtual field
+ if _priorityValue08Err := writeBuffer.WriteVirtual("priorityValue08", m.GetPriorityValue08()); _priorityValue08Err != nil {
+ return errors.Wrap(_priorityValue08Err, "Error serializing 'priorityValue08' field")
}
-
- // Optional Field (priorityValue08) (Can be skipped, if the value is null)
- var priorityValue08 *BACnetPriorityValue = nil
- if m.PriorityValue08 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue08"); pushErr != nil {
- return pushErr
- }
- priorityValue08 = m.PriorityValue08
- _priorityValue08Err := priorityValue08.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue08"); popErr != nil {
- return popErr
- }
- if _priorityValue08Err != nil {
- return errors.Wrap(_priorityValue08Err, "Error serializing 'priorityValue08' field")
- }
+ // Virtual field
+ if _priorityValue09Err := writeBuffer.WriteVirtual("priorityValue09", m.GetPriorityValue09()); _priorityValue09Err != nil {
+ return errors.Wrap(_priorityValue09Err, "Error serializing 'priorityValue09' field")
}
-
- // Optional Field (priorityValue09) (Can be skipped, if the value is null)
- var priorityValue09 *BACnetPriorityValue = nil
- if m.PriorityValue09 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue09"); pushErr != nil {
- return pushErr
- }
- priorityValue09 = m.PriorityValue09
- _priorityValue09Err := priorityValue09.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue09"); popErr != nil {
- return popErr
- }
- if _priorityValue09Err != nil {
- return errors.Wrap(_priorityValue09Err, "Error serializing 'priorityValue09' field")
- }
+ // Virtual field
+ if _priorityValue10Err := writeBuffer.WriteVirtual("priorityValue10", m.GetPriorityValue10()); _priorityValue10Err != nil {
+ return errors.Wrap(_priorityValue10Err, "Error serializing 'priorityValue10' field")
}
-
- // Optional Field (priorityValue10) (Can be skipped, if the value is null)
- var priorityValue10 *BACnetPriorityValue = nil
- if m.PriorityValue10 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue10"); pushErr != nil {
- return pushErr
- }
- priorityValue10 = m.PriorityValue10
- _priorityValue10Err := priorityValue10.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue10"); popErr != nil {
- return popErr
- }
- if _priorityValue10Err != nil {
- return errors.Wrap(_priorityValue10Err, "Error serializing 'priorityValue10' field")
- }
+ // Virtual field
+ if _priorityValue11Err := writeBuffer.WriteVirtual("priorityValue11", m.GetPriorityValue11()); _priorityValue11Err != nil {
+ return errors.Wrap(_priorityValue11Err, "Error serializing 'priorityValue11' field")
}
-
- // Optional Field (priorityValue11) (Can be skipped, if the value is null)
- var priorityValue11 *BACnetPriorityValue = nil
- if m.PriorityValue11 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue11"); pushErr != nil {
- return pushErr
- }
- priorityValue11 = m.PriorityValue11
- _priorityValue11Err := priorityValue11.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue11"); popErr != nil {
- return popErr
- }
- if _priorityValue11Err != nil {
- return errors.Wrap(_priorityValue11Err, "Error serializing 'priorityValue11' field")
- }
+ // Virtual field
+ if _priorityValue12Err := writeBuffer.WriteVirtual("priorityValue12", m.GetPriorityValue12()); _priorityValue12Err != nil {
+ return errors.Wrap(_priorityValue12Err, "Error serializing 'priorityValue12' field")
}
-
- // Optional Field (priorityValue12) (Can be skipped, if the value is null)
- var priorityValue12 *BACnetPriorityValue = nil
- if m.PriorityValue12 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue12"); pushErr != nil {
- return pushErr
- }
- priorityValue12 = m.PriorityValue12
- _priorityValue12Err := priorityValue12.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue12"); popErr != nil {
- return popErr
- }
- if _priorityValue12Err != nil {
- return errors.Wrap(_priorityValue12Err, "Error serializing 'priorityValue12' field")
- }
+ // Virtual field
+ if _priorityValue13Err := writeBuffer.WriteVirtual("priorityValue13", m.GetPriorityValue13()); _priorityValue13Err != nil {
+ return errors.Wrap(_priorityValue13Err, "Error serializing 'priorityValue13' field")
}
-
- // Optional Field (priorityValue13) (Can be skipped, if the value is null)
- var priorityValue13 *BACnetPriorityValue = nil
- if m.PriorityValue13 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue13"); pushErr != nil {
- return pushErr
- }
- priorityValue13 = m.PriorityValue13
- _priorityValue13Err := priorityValue13.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue13"); popErr != nil {
- return popErr
- }
- if _priorityValue13Err != nil {
- return errors.Wrap(_priorityValue13Err, "Error serializing 'priorityValue13' field")
- }
+ // Virtual field
+ if _priorityValue14Err := writeBuffer.WriteVirtual("priorityValue14", m.GetPriorityValue14()); _priorityValue14Err != nil {
+ return errors.Wrap(_priorityValue14Err, "Error serializing 'priorityValue14' field")
}
-
- // Optional Field (priorityValue14) (Can be skipped, if the value is null)
- var priorityValue14 *BACnetPriorityValue = nil
- if m.PriorityValue14 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue14"); pushErr != nil {
- return pushErr
- }
- priorityValue14 = m.PriorityValue14
- _priorityValue14Err := priorityValue14.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue14"); popErr != nil {
- return popErr
- }
- if _priorityValue14Err != nil {
- return errors.Wrap(_priorityValue14Err, "Error serializing 'priorityValue14' field")
- }
+ // Virtual field
+ if _priorityValue15Err := writeBuffer.WriteVirtual("priorityValue15", m.GetPriorityValue15()); _priorityValue15Err != nil {
+ return errors.Wrap(_priorityValue15Err, "Error serializing 'priorityValue15' field")
}
-
- // Optional Field (priorityValue15) (Can be skipped, if the value is null)
- var priorityValue15 *BACnetPriorityValue = nil
- if m.PriorityValue15 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue15"); pushErr != nil {
- return pushErr
- }
- priorityValue15 = m.PriorityValue15
- _priorityValue15Err := priorityValue15.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue15"); popErr != nil {
- return popErr
- }
- if _priorityValue15Err != nil {
- return errors.Wrap(_priorityValue15Err, "Error serializing 'priorityValue15' field")
- }
+ // Virtual field
+ if _priorityValue16Err := writeBuffer.WriteVirtual("priorityValue16", m.GetPriorityValue16()); _priorityValue16Err != nil {
+ return errors.Wrap(_priorityValue16Err, "Error serializing 'priorityValue16' field")
}
-
- // Optional Field (priorityValue16) (Can be skipped, if the value is null)
- var priorityValue16 *BACnetPriorityValue = nil
- if m.PriorityValue16 != nil {
- if pushErr := writeBuffer.PushContext("priorityValue16"); pushErr != nil {
- return pushErr
- }
- priorityValue16 = m.PriorityValue16
- _priorityValue16Err := priorityValue16.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("priorityValue16"); popErr != nil {
- return popErr
- }
- if _priorityValue16Err != nil {
- return errors.Wrap(_priorityValue16Err, "Error serializing 'priorityValue16' field")
- }
+ // Virtual field
+ if _isValidPriorityArrayErr := writeBuffer.WriteVirtual("isValidPriorityArray", m.GetIsValidPriorityArray()); _isValidPriorityArrayErr != nil {
+ return errors.Wrap(_isValidPriorityArrayErr, "Error serializing 'isValidPriorityArray' field")
+ }
+ // Virtual field
+ if _isIndexedAccessErr := writeBuffer.WriteVirtual("isIndexedAccess", m.GetIsIndexedAccess()); _isIndexedAccessErr != nil {
+ return errors.Wrap(_isIndexedAccessErr, "Error serializing 'isIndexedAccess' field")
+ }
+ // Virtual field
+ if _indexEntryErr := writeBuffer.WriteVirtual("indexEntry", m.GetIndexEntry()); _indexEntryErr != nil {
+ return errors.Wrap(_indexEntryErr, "Error serializing 'indexEntry' field")
}
if popErr := writeBuffer.PopContext("BACnetPriorityArray"); popErr != nil {
diff --git a/plc4go/protocols/cbus/readwrite/model/CALData.go b/plc4go/protocols/cbus/readwrite/model/CALData.go
index ea5e4853b2..1fb268bf2e 100644
--- a/plc4go/protocols/cbus/readwrite/model/CALData.go
+++ b/plc4go/protocols/cbus/readwrite/model/CALData.go
@@ -79,7 +79,7 @@ func (m *CALData) GetCommandTypeContainer() CALCommandTypeContainer {
///////////////////////
func (m *CALData) GetCommandType() CALCommandType {
- return CALCommandType(m.GetCommandTypeContainer().CommandType())
+ return CastCALCommandType(m.GetCommandTypeContainer().CommandType())
}
///////////////////////
@@ -156,7 +156,7 @@ func CALDataParse(readBuffer utils.ReadBuffer) (*CALData, error) {
// Virtual field
_commandType := commandTypeContainer.CommandType()
- commandType := CALCommandType(_commandType)
+ commandType := CastCALCommandType(_commandType)
_ = commandType
// Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
diff --git a/plc4go/protocols/cbus/readwrite/model/CBusCommand.go b/plc4go/protocols/cbus/readwrite/model/CBusCommand.go
index 59d063d664..6340b4aeb8 100644
--- a/plc4go/protocols/cbus/readwrite/model/CBusCommand.go
+++ b/plc4go/protocols/cbus/readwrite/model/CBusCommand.go
@@ -86,7 +86,7 @@ func (m *CBusCommand) GetHeader() *CBusHeader {
///////////////////////
func (m *CBusCommand) GetDestinationAddressType() DestinationAddressType {
- return DestinationAddressType(m.GetHeader().GetDestinationAddressType())
+ return CastDestinationAddressType(m.GetHeader().GetDestinationAddressType())
}
///////////////////////
@@ -188,7 +188,7 @@ func CBusCommandParse(readBuffer utils.ReadBuffer, srchk bool) (*CBusCommand, er
// Virtual field
_destinationAddressType := header.GetDestinationAddressType()
- destinationAddressType := DestinationAddressType(_destinationAddressType)
+ destinationAddressType := CastDestinationAddressType(_destinationAddressType)
_ = destinationAddressType
// Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
diff --git a/plc4go/protocols/cbus/readwrite/model/SALData.go b/plc4go/protocols/cbus/readwrite/model/SALData.go
index eb34f69c1d..1b91c0a294 100644
--- a/plc4go/protocols/cbus/readwrite/model/SALData.go
+++ b/plc4go/protocols/cbus/readwrite/model/SALData.go
@@ -79,7 +79,7 @@ func (m *SALData) GetCommandTypeContainer() SALCommandTypeContainer {
///////////////////////
func (m *SALData) GetCommandType() SALCommandType {
- return SALCommandType(m.GetCommandTypeContainer().CommandType())
+ return CastSALCommandType(m.GetCommandTypeContainer().CommandType())
}
///////////////////////
@@ -156,7 +156,7 @@ func SALDataParse(readBuffer utils.ReadBuffer) (*SALData, error) {
// Virtual field
_commandType := commandTypeContainer.CommandType()
- commandType := SALCommandType(_commandType)
+ commandType := CastSALCommandType(_commandType)
_ = commandType
// Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index e43a8b32b9..4d1c18c069 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -1833,28 +1833,31 @@
writeSuccessful ]
]
-[type BACnetPriorityArray(BACnetObjectType objectType)
- [simple BACnetPriorityValue('objectType') priorityValue01 ]
- // TODO: fixme ugly workaround as we don't handle the index at all so we might do that somehow
- [peek BACnetTagHeader
- peekedTagHeader ]
- [virtual bit likelyArrayAccessWhichIsNotImplemented
- 'peekedTagHeader.lengthValueType == 0x7' ]
- [optional BACnetPriorityValue('objectType') priorityValue02 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue03 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue04 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue05 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue06 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue07 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue08 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue09 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue10 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue11 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue12 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue13 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue14 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue15 '!likelyArrayAccessWhichIsNotImplemented']
- [optional BACnetPriorityValue('objectType') priorityValue16 '!likelyArrayAccessWhichIsNotImplemented']
+// Note per spec this should be 16 but we reuse this for index access and non conformant transmission
+[type BACnetPriorityArray(BACnetObjectType objectType, uint 8 tagNumber)
+ [array BACnetPriorityValue('objectType')
+ data
+ terminated
+ 'STATIC_CALL("isBACnetConstructedDataClosingTag", readBuffer, false, tagNumber)']
+ [virtual BACnetPriorityValue priorityValue01 'COUNT(data)>0?data[0]:null' ]
+ [virtual BACnetPriorityValue priorityValue02 'COUNT(data)>1?data[1]:null' ]
+ [virtual BACnetPriorityValue priorityValue03 'COUNT(data)>2?data[2]:null' ]
+ [virtual BACnetPriorityValue priorityValue04 'COUNT(data)>3?data[3]:null' ]
+ [virtual BACnetPriorityValue priorityValue05 'COUNT(data)>4?data[4]:null' ]
+ [virtual BACnetPriorityValue priorityValue06 'COUNT(data)>5?data[5]:null' ]
+ [virtual BACnetPriorityValue priorityValue07 'COUNT(data)>6?data[6]:null' ]
+ [virtual BACnetPriorityValue priorityValue08 'COUNT(data)>7?data[7]:null' ]
+ [virtual BACnetPriorityValue priorityValue09 'COUNT(data)>8?data[8]:null' ]
+ [virtual BACnetPriorityValue priorityValue10 'COUNT(data)>9?data[9]:null' ]
+ [virtual BACnetPriorityValue priorityValue11 'COUNT(data)>10?data[10]:null' ]
+ [virtual BACnetPriorityValue priorityValue12 'COUNT(data)>11?data[11]:null' ]
+ [virtual BACnetPriorityValue priorityValue13 'COUNT(data)>12?data[12]:null' ]
+ [virtual BACnetPriorityValue priorityValue14 'COUNT(data)>13?data[13]:null' ]
+ [virtual BACnetPriorityValue priorityValue15 'COUNT(data)>14?data[14]:null' ]
+ [virtual BACnetPriorityValue priorityValue16 'COUNT(data)>15?data[15]:null' ]
+ [virtual bit isValidPriorityArray 'COUNT(data) == 16' ]
+ [virtual bit isIndexedAccess 'COUNT(data) == 1' ]
+ [virtual BACnetPriorityValue indexEntry 'priorityValue01' ]
]
[type BACnetPriorityValue(BACnetObjectType objectType)
@@ -2887,7 +2890,7 @@
//[*, 'PRESENT_VALUE' BACnetConstructedDataPresentValue [validation '1 == 2' "TODO: implement me PRESENT_VALUE BACnetConstructedDataPresentValue"]]
//[*, 'PRIORITY' BACnetConstructedDataPriority [validation '1 == 2' "TODO: implement me PRIORITY BACnetConstructedDataPriority"]]
[*, 'PRIORITY_ARRAY' BACnetConstructedDataPriorityArray
- [simple BACnetPriorityArray('objectType') priorityArray ]
+ [simple BACnetPriorityArray('objectType', 'tagNumber') priorityArray ]
]
//[*, 'PRIORITY_FOR_WRITING' BACnetConstructedDataPriorityForWriting [validation '1 == 2' "TODO: implement me PRIORITY_FOR_WRITING BACnetConstructedDataPriorityForWriting"]]
//[*, 'PROCESS_IDENTIFIER' BACnetConstructedDataProcessIdentifier [validation '1 == 2' "TODO: implement me PROCESS_IDENTIFIER BACnetConstructedDataProcessIdentifier"]]
diff --git a/protocols/bacnetip/src/test/resources/protocols/bacnet/ParserSerializerTestsuite.xml b/protocols/bacnetip/src/test/resources/protocols/bacnet/ParserSerializerTestsuite.xml
index 02d302fa7d..e0a569cec0 100644
--- a/protocols/bacnetip/src/test/resources/protocols/bacnet/ParserSerializerTestsuite.xml
+++ b/protocols/bacnetip/src/test/resources/protocols/bacnet/ParserSerializerTestsuite.xml
@@ -4491,7 +4491,7 @@
<BACnetConstructedDataPriorityArray>
<priorityArray>
<BACnetPriorityArray>
- <priorityValue01>
+ <data isList="true">
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4511,8 +4511,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue01>
- <priorityValue02>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4532,8 +4530,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue02>
- <priorityValue03>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4553,8 +4549,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue03>
- <priorityValue04>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4574,8 +4568,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue04>
- <priorityValue05>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4595,8 +4587,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue05>
- <priorityValue06>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4616,8 +4606,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue06>
- <priorityValue07>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4637,8 +4625,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue07>
- <priorityValue08>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4658,8 +4644,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue08>
- <priorityValue09>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4679,8 +4663,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue09>
- <priorityValue10>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4700,8 +4682,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue10>
- <priorityValue11>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4721,8 +4701,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue11>
- <priorityValue12>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4742,8 +4720,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue12>
- <priorityValue13>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4763,8 +4739,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue13>
- <priorityValue14>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4784,8 +4758,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue14>
- <priorityValue15>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4805,8 +4777,6 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue15>
- <priorityValue16>
<BACnetPriorityValue>
<BACnetPriorityValueNull>
<nullValue>
@@ -4826,7 +4796,7 @@
</nullValue>
</BACnetPriorityValueNull>
</BACnetPriorityValue>
- </priorityValue16>
+ </data>
</BACnetPriorityArray>
</priorityArray>
</BACnetConstructedDataPriorityArray>
[plc4x] 01/03: feat(bacnet): implemented all bit strings similar to enums
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 65f55262db012d67a51d24bd7a54b5e3ce298966
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue May 31 17:44:57 2022 +0200
feat(bacnet): implemented all bit strings similar to enums
---
.../protocols/bacnetip/readwrite/ParserHelper.go | 62 ++-
.../bacnetip/readwrite/XmlParserHelper.go | 71 ++-
.../bacnetip/readwrite/model/APDUComplexAck.go | 4 +-
.../readwrite/model/APDUConfirmedRequest.go | 4 +-
.../bacnetip/readwrite/model/BACnetDaysOfWeek.go | 162 ++++++
.../readwrite/model/BACnetDaysOfWeekTagged.go | 337 ++++++++++++
.../bacnetip/readwrite/model/BACnetEventSummary.go | 22 +-
.../readwrite/model/BACnetEventTransitionBits.go | 235 +++------
.../model/BACnetEventTransitionBitsTagged.go | 269 ++++++++++
.../bacnetip/readwrite/model/BACnetLimitEnable.go | 122 +++++
.../readwrite/model/BACnetLimitEnableTagged.go | 252 +++++++++
.../bacnetip/readwrite/model/BACnetLogStatus.go | 130 +++++
.../readwrite/model/BACnetLogStatusTagged.go | 269 ++++++++++
.../BACnetNotificationParametersAccessEvent.go | 14 +-
...ACnetNotificationParametersChangeOfBitString.go | 14 +-
...otificationParametersChangeOfCharacterString.go | 14 +-
...tNotificationParametersChangeOfDiscreteValue.go | 14 +-
...CnetNotificationParametersChangeOfLifeSafety.go | 14 +-
...netNotificationParametersChangeOfReliability.go | 14 +-
.../BACnetNotificationParametersChangeOfState.go | 14 +-
...netNotificationParametersChangeOfStatusFlags.go | 14 +-
.../BACnetNotificationParametersChangeOfTimer.go | 14 +-
.../BACnetNotificationParametersChangeOfValue.go | 14 +-
.../BACnetNotificationParametersCommandFailure.go | 14 +-
...BACnetNotificationParametersDoubleOutOfRange.go | 14 +-
.../BACnetNotificationParametersFloatingLimit.go | 14 +-
.../BACnetNotificationParametersOutOfRange.go | 14 +-
...BACnetNotificationParametersSignedOutOfRange.go | 14 +-
...CnetNotificationParametersUnsignedOutOfRange.go | 14 +-
.../BACnetNotificationParametersUnsignedRange.go | 14 +-
.../readwrite/model/BACnetObjectTypesSupported.go | 586 +++++++++++++++++++++
.../bacnetip/readwrite/model/BACnetResultFlags.go | 235 +++------
.../readwrite/model/BACnetResultFlagsTagged.go | 269 ++++++++++
.../model/BACnetServiceAckGetAlarmSummary.go | 14 +-
.../readwrite/model/BACnetServiceAckReadRange.go | 14 +-
.../readwrite/model/BACnetServicesSupported.go | 434 +++++++++++++++
.../bacnetip/readwrite/model/BACnetStatusFlags.go | 260 +++------
.../readwrite/model/BACnetStatusFlagsTagged.go | 286 ++++++++++
.../plc4x/java/bacnetip/RandomPackagesTest.java | 6 +-
protocols/bacnetip/pom.xml | 10 +
.../plc4x/protocol/bacnetip/BacNetIpProtocol.java | 6 +
.../protocols/bacnetip/bacnet-bit-strings.mspec | 186 +++++++
.../resources/protocols/bacnetip/bacnetip.mspec | 114 ++--
.../src/main/script/produceTaggedBitStrings.groovy | 92 ++++
44 files changed, 3914 insertions(+), 775 deletions(-)
diff --git a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
index b49829d510..4c2e70a046 100644
--- a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go
@@ -110,12 +110,6 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParse(io, tagNumber, tagClass)
- case "BACnetEventTransitionBits":
- tagNumber, err := utils.StrToUint8(arguments[0])
- if err != nil {
- return nil, errors.Wrap(err, "Error parsing")
- }
- return model.BACnetEventTransitionBitsParse(io, tagNumber)
case "BACnetDoorStatusTagged":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -157,14 +151,19 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return nil, errors.Wrap(err, "Error parsing")
}
return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParse(io, tagNumber)
- case "BACnetEventTransitionBitsApplication":
- return model.BACnetEventTransitionBitsApplicationParse(io)
case "BACnetTagPayloadEnumerated":
actualLength, err := utils.StrToUint32(arguments[0])
if err != nil {
return nil, errors.Wrap(err, "Error parsing")
}
return model.BACnetTagPayloadEnumeratedParse(io, actualLength)
+ case "BACnetLimitEnableTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetLimitEnableTaggedParse(io, tagNumber, tagClass)
case "BACnetTagPayloadOctetString":
actualLength, err := utils.StrToUint32(arguments[0])
if err != nil {
@@ -211,12 +210,6 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetTimerStateTaggedParse(io, tagNumber, tagClass)
- case "BACnetResultFlags":
- tagNumber, err := utils.StrToUint8(arguments[0])
- if err != nil {
- return nil, errors.Wrap(err, "Error parsing")
- }
- return model.BACnetResultFlagsParse(io, tagNumber)
case "BACnetRecipient":
return model.BACnetRecipientParse(io)
case "BACnetLiftCarDriveStatusTagged":
@@ -262,6 +255,13 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return model.BACnetObjectTypeTaggedParse(io, tagNumber, tagClass)
case "BVLC":
return model.BVLCParse(io)
+ case "BACnetDaysOfWeekTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetDaysOfWeekTaggedParse(io, tagNumber, tagClass)
case "BACnetReadAccessResultListOfResults":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -472,6 +472,13 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return model.BACnetEngineeringUnitsTaggedParse(io, tagNumber, tagClass)
case "ListOfCovNotifications":
return model.ListOfCovNotificationsParse(io)
+ case "BACnetLogStatusTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetLogStatusTaggedParse(io, tagNumber, tagClass)
case "BACnetAbortReasonTagged":
actualLength, err := utils.StrToUint32(arguments[0])
if err != nil {
@@ -549,12 +556,6 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.ErrorClassTaggedParse(io, tagNumber, tagClass)
- case "BACnetStatusFlags":
- tagNumber, err := utils.StrToUint8(arguments[0])
- if err != nil {
- return nil, errors.Wrap(err, "Error parsing")
- }
- return model.BACnetStatusFlagsParse(io, tagNumber)
case "BACnetPriorityValue":
objectType := model.BACnetObjectTypeByName(arguments[0])
return model.BACnetPriorityValueParse(io, objectType)
@@ -647,6 +648,13 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.ErrorCodeTaggedParse(io, tagNumber, tagClass)
+ case "BACnetEventTransitionBitsTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetEventTransitionBitsTaggedParse(io, tagNumber, tagClass)
case "BACnetPolarityTagged":
tagNumber, err := utils.StrToUint8(arguments[0])
if err != nil {
@@ -690,6 +698,13 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
}
tagClass := model.TagClassByName(arguments[1])
return model.BACnetEventTypeTaggedParse(io, tagNumber, tagClass)
+ case "BACnetResultFlagsTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetResultFlagsTaggedParse(io, tagNumber, tagClass)
case "BACnetObjectPropertyReference":
return model.BACnetObjectPropertyReferenceParse(io)
case "BACnetAccessCredentialDisableReasonTagged":
@@ -853,6 +868,13 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util
return nil, errors.Wrap(err, "Error parsing")
}
return model.BACnetTagPayloadCharacterStringParse(io, actualLength)
+ case "BACnetStatusFlagsTagged":
+ tagNumber, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, errors.Wrap(err, "Error parsing")
+ }
+ tagClass := model.TagClassByName(arguments[1])
+ return model.BACnetStatusFlagsTaggedParse(io, tagNumber, tagClass)
case "BACnetTimeStamp":
return model.BACnetTimeStampParse(io)
case "BACnetNotificationParameters":
diff --git a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
index b79c15a4a0..46f67a3f93 100644
--- a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
+++ b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go
@@ -131,13 +131,6 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetConfirmedServiceRequestConfirmedTextMessageMessagePriorityTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
- case "BACnetEventTransitionBits":
- parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
- if err != nil {
- return nil, err
- }
- tagNumber := uint8(parsedUint0)
- return model.BACnetEventTransitionBitsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
case "BACnetDoorStatusTagged":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -185,8 +178,6 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
}
tagNumber := uint8(parsedUint0)
return model.BACnetConfirmedServiceRequestGetEnrollmentSummaryPriorityFilterParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
- case "BACnetEventTransitionBitsApplication":
- return model.BACnetEventTransitionBitsApplicationParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetTagPayloadEnumerated":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32)
if err != nil {
@@ -194,6 +185,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
}
actualLength := uint32(parsedUint0)
return model.BACnetTagPayloadEnumeratedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength)
+ case "BACnetLimitEnableTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetLimitEnableTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BACnetTagPayloadOctetString":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32)
if err != nil {
@@ -246,13 +245,6 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetTimerStateTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
- case "BACnetResultFlags":
- parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
- if err != nil {
- return nil, err
- }
- tagNumber := uint8(parsedUint0)
- return model.BACnetResultFlagsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
case "BACnetRecipient":
return model.BACnetRecipientParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetLiftCarDriveStatusTagged":
@@ -304,6 +296,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
return model.BACnetObjectTypeTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BVLC":
return model.BVLCParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "BACnetDaysOfWeekTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetDaysOfWeekTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BACnetReadAccessResultListOfResults":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -543,6 +543,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
return model.BACnetEngineeringUnitsTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "ListOfCovNotifications":
return model.ListOfCovNotificationsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
+ case "BACnetLogStatusTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetLogStatusTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BACnetAbortReasonTagged":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 32)
if err != nil {
@@ -631,13 +639,6 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.ErrorClassTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
- case "BACnetStatusFlags":
- parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
- if err != nil {
- return nil, err
- }
- tagNumber := uint8(parsedUint0)
- return model.BACnetStatusFlagsParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber)
case "BACnetPriorityValue":
objectType := model.BACnetObjectTypeByName(parserArguments[0])
return model.BACnetPriorityValueParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), objectType)
@@ -741,6 +742,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.ErrorCodeTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetEventTransitionBitsTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetEventTransitionBitsTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BACnetPolarityTagged":
parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
if err != nil {
@@ -789,6 +798,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
tagNumber := uint8(parsedUint0)
tagClass := model.TagClassByName(parserArguments[1])
return model.BACnetEventTypeTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
+ case "BACnetResultFlagsTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetResultFlagsTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BACnetObjectPropertyReference":
return model.BACnetObjectPropertyReferenceParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetAccessCredentialDisableReasonTagged":
@@ -974,6 +991,14 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser
}
actualLength := uint32(parsedUint0)
return model.BACnetTagPayloadCharacterStringParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), actualLength)
+ case "BACnetStatusFlagsTagged":
+ parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8)
+ if err != nil {
+ return nil, err
+ }
+ tagNumber := uint8(parsedUint0)
+ tagClass := model.TagClassByName(parserArguments[1])
+ return model.BACnetStatusFlagsTaggedParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass)
case "BACnetTimeStamp":
return model.BACnetTimeStampParse(utils.NewXmlReadBuffer(strings.NewReader(xmlString)))
case "BACnetNotificationParameters":
diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go b/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go
index b182470120..19daa0d8fd 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/APDUComplexAck.go
@@ -162,7 +162,7 @@ func (m *APDUComplexAck) GetSegmentReduction() uint16 {
_ = serviceAck
segmentServiceChoice := m.SegmentServiceChoice
_ = segmentServiceChoice
- return uint16(utils.InlineIf(bool(bool((m.GetSegmentServiceChoice()) != (nil))), func() interface{} { return uint16(uint16(uint16(m.GetApduHeaderReduction()) + uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(m.GetApduHeaderReduction())) }).(uint16))
+ return uint16(utils.InlineIf(bool(bool((m.GetSegmentServiceChoice()) != (nil))), func() interface{} { return uint16(uint16(uint16(m.GetApduHeaderReduction()) + uint16(uint16(1)))) }, func() interface{} { return uint16(m.GetApduHeaderReduction()) }).(uint16))
}
///////////////////////
@@ -368,7 +368,7 @@ func APDUComplexAckParse(readBuffer utils.ReadBuffer, apduLength uint16) (*APDUC
}
// Virtual field
- _segmentReduction := utils.InlineIf(bool(bool((segmentServiceChoice) != (nil))), func() interface{} { return uint16(uint16(uint16(apduHeaderReduction) + uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(apduHeaderReduction)) }).(uint16)
+ _segmentReduction := utils.InlineIf(bool(bool((segmentServiceChoice) != (nil))), func() interface{} { return uint16(uint16(uint16(apduHeaderReduction) + uint16(uint16(1)))) }, func() interface{} { return uint16(apduHeaderReduction) }).(uint16)
segmentReduction := uint16(_segmentReduction)
_ = segmentReduction
// Byte Array field (segment)
diff --git a/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go b/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go
index a9c151f7e8..2c33df6a42 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/APDUConfirmedRequest.go
@@ -183,7 +183,7 @@ func (m *APDUConfirmedRequest) GetSegmentReduction() uint16 {
_ = serviceRequest
segmentServiceChoice := m.SegmentServiceChoice
_ = segmentServiceChoice
- return uint16(utils.InlineIf(bool(bool((m.GetSegmentServiceChoice()) != (nil))), func() interface{} { return uint16(uint16(uint16(m.GetApduHeaderReduction()) + uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(m.GetApduHeaderReduction())) }).(uint16))
+ return uint16(utils.InlineIf(bool(bool((m.GetSegmentServiceChoice()) != (nil))), func() interface{} { return uint16(uint16(uint16(m.GetApduHeaderReduction()) + uint16(uint16(1)))) }, func() interface{} { return uint16(m.GetApduHeaderReduction()) }).(uint16))
}
///////////////////////
@@ -434,7 +434,7 @@ func APDUConfirmedRequestParse(readBuffer utils.ReadBuffer, apduLength uint16) (
}
// Virtual field
- _segmentReduction := utils.InlineIf(bool(bool((segmentServiceChoice) != (nil))), func() interface{} { return uint16(uint16(uint16(apduHeaderReduction) + uint16(uint16(1)))) }, func() interface{} { return uint16(uint16(apduHeaderReduction)) }).(uint16)
+ _segmentReduction := utils.InlineIf(bool(bool((segmentServiceChoice) != (nil))), func() interface{} { return uint16(uint16(uint16(apduHeaderReduction) + uint16(uint16(1)))) }, func() interface{} { return uint16(apduHeaderReduction) }).(uint16)
segmentReduction := uint16(_segmentReduction)
_ = segmentReduction
// Byte Array field (segment)
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go
new file mode 100644
index 0000000000..12bff5650b
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeek.go
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetDaysOfWeek is an enum
+type BACnetDaysOfWeek uint8
+
+type IBACnetDaysOfWeek interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ BACnetDaysOfWeek_MONDAY BACnetDaysOfWeek = 0
+ BACnetDaysOfWeek_TUESDAY BACnetDaysOfWeek = 1
+ BACnetDaysOfWeek_WEDNESDAY BACnetDaysOfWeek = 2
+ BACnetDaysOfWeek_THURSDAY BACnetDaysOfWeek = 3
+ BACnetDaysOfWeek_FRIDAY BACnetDaysOfWeek = 4
+ BACnetDaysOfWeek_SATURDAY BACnetDaysOfWeek = 5
+ BACnetDaysOfWeek_SUNDAY BACnetDaysOfWeek = 6
+)
+
+var BACnetDaysOfWeekValues []BACnetDaysOfWeek
+
+func init() {
+ _ = errors.New
+ BACnetDaysOfWeekValues = []BACnetDaysOfWeek{
+ BACnetDaysOfWeek_MONDAY,
+ BACnetDaysOfWeek_TUESDAY,
+ BACnetDaysOfWeek_WEDNESDAY,
+ BACnetDaysOfWeek_THURSDAY,
+ BACnetDaysOfWeek_FRIDAY,
+ BACnetDaysOfWeek_SATURDAY,
+ BACnetDaysOfWeek_SUNDAY,
+ }
+}
+
+func BACnetDaysOfWeekByValue(value uint8) BACnetDaysOfWeek {
+ switch value {
+ case 0:
+ return BACnetDaysOfWeek_MONDAY
+ case 1:
+ return BACnetDaysOfWeek_TUESDAY
+ case 2:
+ return BACnetDaysOfWeek_WEDNESDAY
+ case 3:
+ return BACnetDaysOfWeek_THURSDAY
+ case 4:
+ return BACnetDaysOfWeek_FRIDAY
+ case 5:
+ return BACnetDaysOfWeek_SATURDAY
+ case 6:
+ return BACnetDaysOfWeek_SUNDAY
+ }
+ return 0
+}
+
+func BACnetDaysOfWeekByName(value string) BACnetDaysOfWeek {
+ switch value {
+ case "MONDAY":
+ return BACnetDaysOfWeek_MONDAY
+ case "TUESDAY":
+ return BACnetDaysOfWeek_TUESDAY
+ case "WEDNESDAY":
+ return BACnetDaysOfWeek_WEDNESDAY
+ case "THURSDAY":
+ return BACnetDaysOfWeek_THURSDAY
+ case "FRIDAY":
+ return BACnetDaysOfWeek_FRIDAY
+ case "SATURDAY":
+ return BACnetDaysOfWeek_SATURDAY
+ case "SUNDAY":
+ return BACnetDaysOfWeek_SUNDAY
+ }
+ return 0
+}
+
+func BACnetDaysOfWeekKnows(value uint8) bool {
+ for _, typeValue := range BACnetDaysOfWeekValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastBACnetDaysOfWeek(structType interface{}) BACnetDaysOfWeek {
+ castFunc := func(typ interface{}) BACnetDaysOfWeek {
+ if sBACnetDaysOfWeek, ok := typ.(BACnetDaysOfWeek); ok {
+ return sBACnetDaysOfWeek
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m BACnetDaysOfWeek) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m BACnetDaysOfWeek) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetDaysOfWeekParse(readBuffer utils.ReadBuffer) (BACnetDaysOfWeek, error) {
+ val, err := readBuffer.ReadUint8("BACnetDaysOfWeek", 8)
+ if err != nil {
+ return 0, nil
+ }
+ return BACnetDaysOfWeekByValue(val), nil
+}
+
+func (e BACnetDaysOfWeek) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetDaysOfWeek", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
+
+func (e BACnetDaysOfWeek) name() string {
+ switch e {
+ case BACnetDaysOfWeek_MONDAY:
+ return "MONDAY"
+ case BACnetDaysOfWeek_TUESDAY:
+ return "TUESDAY"
+ case BACnetDaysOfWeek_WEDNESDAY:
+ return "WEDNESDAY"
+ case BACnetDaysOfWeek_THURSDAY:
+ return "THURSDAY"
+ case BACnetDaysOfWeek_FRIDAY:
+ return "FRIDAY"
+ case BACnetDaysOfWeek_SATURDAY:
+ return "SATURDAY"
+ case BACnetDaysOfWeek_SUNDAY:
+ return "SUNDAY"
+ }
+ return ""
+}
+
+func (e BACnetDaysOfWeek) String() string {
+ return e.name()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go
new file mode 100644
index 0000000000..7224f8259d
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetDaysOfWeekTagged.go
@@ -0,0 +1,337 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetDaysOfWeekTagged is the data-structure of this message
+type BACnetDaysOfWeekTagged struct {
+ Header *BACnetTagHeader
+ Payload *BACnetTagPayloadBitString
+
+ // Arguments.
+ TagNumber uint8
+ TagClass TagClass
+}
+
+// IBACnetDaysOfWeekTagged is the corresponding interface of BACnetDaysOfWeekTagged
+type IBACnetDaysOfWeekTagged interface {
+ // GetHeader returns Header (property field)
+ GetHeader() *BACnetTagHeader
+ // GetPayload returns Payload (property field)
+ GetPayload() *BACnetTagPayloadBitString
+ // GetMonday returns Monday (virtual field)
+ GetMonday() bool
+ // GetTuesday returns Tuesday (virtual field)
+ GetTuesday() bool
+ // GetWednesday returns Wednesday (virtual field)
+ GetWednesday() bool
+ // GetThursday returns Thursday (virtual field)
+ GetThursday() bool
+ // GetFriday returns Friday (virtual field)
+ GetFriday() bool
+ // GetSaturday returns Saturday (virtual field)
+ GetSaturday() bool
+ // GetSunday returns Sunday (virtual field)
+ GetSunday() bool
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetDaysOfWeekTagged) GetHeader() *BACnetTagHeader {
+ return m.Header
+}
+
+func (m *BACnetDaysOfWeekTagged) GetPayload() *BACnetTagPayloadBitString {
+ return m.Payload
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetDaysOfWeekTagged) GetMonday() bool {
+ return bool(m.GetPayload().GetData()[0])
+}
+
+func (m *BACnetDaysOfWeekTagged) GetTuesday() bool {
+ return bool(m.GetPayload().GetData()[1])
+}
+
+func (m *BACnetDaysOfWeekTagged) GetWednesday() bool {
+ return bool(m.GetPayload().GetData()[2])
+}
+
+func (m *BACnetDaysOfWeekTagged) GetThursday() bool {
+ return bool(m.GetPayload().GetData()[3])
+}
+
+func (m *BACnetDaysOfWeekTagged) GetFriday() bool {
+ return bool(m.GetPayload().GetData()[4])
+}
+
+func (m *BACnetDaysOfWeekTagged) GetSaturday() bool {
+ return bool(m.GetPayload().GetData()[5])
+}
+
+func (m *BACnetDaysOfWeekTagged) GetSunday() bool {
+ return bool(m.GetPayload().GetData()[6])
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetDaysOfWeekTagged factory function for BACnetDaysOfWeekTagged
+func NewBACnetDaysOfWeekTagged(header *BACnetTagHeader, payload *BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *BACnetDaysOfWeekTagged {
+ return &BACnetDaysOfWeekTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass}
+}
+
+func CastBACnetDaysOfWeekTagged(structType interface{}) *BACnetDaysOfWeekTagged {
+ if casted, ok := structType.(BACnetDaysOfWeekTagged); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetDaysOfWeekTagged); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetDaysOfWeekTagged) GetTypeName() string {
+ return "BACnetDaysOfWeekTagged"
+}
+
+func (m *BACnetDaysOfWeekTagged) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetDaysOfWeekTagged) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (header)
+ lengthInBits += m.Header.GetLengthInBits()
+
+ // Simple field (payload)
+ lengthInBits += m.Payload.GetLengthInBits()
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *BACnetDaysOfWeekTagged) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetDaysOfWeekTaggedParse(readBuffer utils.ReadBuffer, tagNumber uint8, tagClass TagClass) (*BACnetDaysOfWeekTagged, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetDaysOfWeekTagged"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (header)
+ if pullErr := readBuffer.PullContext("header"); pullErr != nil {
+ return nil, pullErr
+ }
+ _header, _headerErr := BACnetTagHeaderParse(readBuffer)
+ if _headerErr != nil {
+ return nil, errors.Wrap(_headerErr, "Error parsing 'header' field")
+ }
+ header := CastBACnetTagHeader(_header)
+ if closeErr := readBuffer.CloseContext("header"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Validation
+ if !(bool((header.GetTagClass()) == (tagClass))) {
+ return nil, utils.ParseValidationError{"tag class doesn't match"}
+ }
+
+ // Validation
+ if !(bool(bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool(bool(bool((header.GetActualTagNumber()) == (tagNumber))))) {
+ return nil, utils.ParseAssertError{"tagnumber doesn't match"}
+ }
+
+ // Simple Field (payload)
+ if pullErr := readBuffer.PullContext("payload"); pullErr != nil {
+ return nil, pullErr
+ }
+ _payload, _payloadErr := BACnetTagPayloadBitStringParse(readBuffer, uint32(header.GetActualLength()))
+ if _payloadErr != nil {
+ return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field")
+ }
+ payload := CastBACnetTagPayloadBitString(_payload)
+ if closeErr := readBuffer.CloseContext("payload"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Virtual field
+ _monday := payload.GetData()[0]
+ monday := bool(_monday)
+ _ = monday
+
+ // Virtual field
+ _tuesday := payload.GetData()[1]
+ tuesday := bool(_tuesday)
+ _ = tuesday
+
+ // Virtual field
+ _wednesday := payload.GetData()[2]
+ wednesday := bool(_wednesday)
+ _ = wednesday
+
+ // Virtual field
+ _thursday := payload.GetData()[3]
+ thursday := bool(_thursday)
+ _ = thursday
+
+ // Virtual field
+ _friday := payload.GetData()[4]
+ friday := bool(_friday)
+ _ = friday
+
+ // Virtual field
+ _saturday := payload.GetData()[5]
+ saturday := bool(_saturday)
+ _ = saturday
+
+ // Virtual field
+ _sunday := payload.GetData()[6]
+ sunday := bool(_sunday)
+ _ = sunday
+
+ if closeErr := readBuffer.CloseContext("BACnetDaysOfWeekTagged"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetDaysOfWeekTagged(header, payload, tagNumber, tagClass), nil
+}
+
+func (m *BACnetDaysOfWeekTagged) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetDaysOfWeekTagged"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (header)
+ if pushErr := writeBuffer.PushContext("header"); pushErr != nil {
+ return pushErr
+ }
+ _headerErr := m.Header.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("header"); popErr != nil {
+ return popErr
+ }
+ if _headerErr != nil {
+ return errors.Wrap(_headerErr, "Error serializing 'header' field")
+ }
+
+ // Simple Field (payload)
+ if pushErr := writeBuffer.PushContext("payload"); pushErr != nil {
+ return pushErr
+ }
+ _payloadErr := m.Payload.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("payload"); popErr != nil {
+ return popErr
+ }
+ if _payloadErr != nil {
+ return errors.Wrap(_payloadErr, "Error serializing 'payload' field")
+ }
+ // Virtual field
+ if _mondayErr := writeBuffer.WriteVirtual("monday", m.GetMonday()); _mondayErr != nil {
+ return errors.Wrap(_mondayErr, "Error serializing 'monday' field")
+ }
+ // Virtual field
+ if _tuesdayErr := writeBuffer.WriteVirtual("tuesday", m.GetTuesday()); _tuesdayErr != nil {
+ return errors.Wrap(_tuesdayErr, "Error serializing 'tuesday' field")
+ }
+ // Virtual field
+ if _wednesdayErr := writeBuffer.WriteVirtual("wednesday", m.GetWednesday()); _wednesdayErr != nil {
+ return errors.Wrap(_wednesdayErr, "Error serializing 'wednesday' field")
+ }
+ // Virtual field
+ if _thursdayErr := writeBuffer.WriteVirtual("thursday", m.GetThursday()); _thursdayErr != nil {
+ return errors.Wrap(_thursdayErr, "Error serializing 'thursday' field")
+ }
+ // Virtual field
+ if _fridayErr := writeBuffer.WriteVirtual("friday", m.GetFriday()); _fridayErr != nil {
+ return errors.Wrap(_fridayErr, "Error serializing 'friday' field")
+ }
+ // Virtual field
+ if _saturdayErr := writeBuffer.WriteVirtual("saturday", m.GetSaturday()); _saturdayErr != nil {
+ return errors.Wrap(_saturdayErr, "Error serializing 'saturday' field")
+ }
+ // Virtual field
+ if _sundayErr := writeBuffer.WriteVirtual("sunday", m.GetSunday()); _sundayErr != nil {
+ return errors.Wrap(_sundayErr, "Error serializing 'sunday' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetDaysOfWeekTagged"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetDaysOfWeekTagged) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go
index 2fe6c8bb2d..7dd25ff777 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventSummary.go
@@ -30,10 +30,10 @@ import (
type BACnetEventSummary struct {
ObjectIdentifier *BACnetContextTagObjectIdentifier
EventState *BACnetEventStateTagged
- AcknowledgedTransitions *BACnetEventTransitionBits
+ AcknowledgedTransitions *BACnetEventTransitionBitsTagged
EventTimestamps *BACnetEventTimestamps
NotifyType *BACnetNotifyTypeTagged
- EventEnable *BACnetEventTransitionBits
+ EventEnable *BACnetEventTransitionBitsTagged
EventPriorities *BACnetEventPriorities
}
@@ -44,13 +44,13 @@ type IBACnetEventSummary interface {
// GetEventState returns EventState (property field)
GetEventState() *BACnetEventStateTagged
// GetAcknowledgedTransitions returns AcknowledgedTransitions (property field)
- GetAcknowledgedTransitions() *BACnetEventTransitionBits
+ GetAcknowledgedTransitions() *BACnetEventTransitionBitsTagged
// GetEventTimestamps returns EventTimestamps (property field)
GetEventTimestamps() *BACnetEventTimestamps
// GetNotifyType returns NotifyType (property field)
GetNotifyType() *BACnetNotifyTypeTagged
// GetEventEnable returns EventEnable (property field)
- GetEventEnable() *BACnetEventTransitionBits
+ GetEventEnable() *BACnetEventTransitionBitsTagged
// GetEventPriorities returns EventPriorities (property field)
GetEventPriorities() *BACnetEventPriorities
// GetLengthInBytes returns the length in bytes
@@ -74,7 +74,7 @@ func (m *BACnetEventSummary) GetEventState() *BACnetEventStateTagged {
return m.EventState
}
-func (m *BACnetEventSummary) GetAcknowledgedTransitions() *BACnetEventTransitionBits {
+func (m *BACnetEventSummary) GetAcknowledgedTransitions() *BACnetEventTransitionBitsTagged {
return m.AcknowledgedTransitions
}
@@ -86,7 +86,7 @@ func (m *BACnetEventSummary) GetNotifyType() *BACnetNotifyTypeTagged {
return m.NotifyType
}
-func (m *BACnetEventSummary) GetEventEnable() *BACnetEventTransitionBits {
+func (m *BACnetEventSummary) GetEventEnable() *BACnetEventTransitionBitsTagged {
return m.EventEnable
}
@@ -100,7 +100,7 @@ func (m *BACnetEventSummary) GetEventPriorities() *BACnetEventPriorities {
///////////////////////////////////////////////////////////
// NewBACnetEventSummary factory function for BACnetEventSummary
-func NewBACnetEventSummary(objectIdentifier *BACnetContextTagObjectIdentifier, eventState *BACnetEventStateTagged, acknowledgedTransitions *BACnetEventTransitionBits, eventTimestamps *BACnetEventTimestamps, notifyType *BACnetNotifyTypeTagged, eventEnable *BACnetEventTransitionBits, eventPriorities *BACnetEventPriorities) *BACnetEventSummary {
+func NewBACnetEventSummary(objectIdentifier *BACnetContextTagObjectIdentifier, eventState *BACnetEventStateTagged, acknowledgedTransitions *BACnetEventTransitionBitsTagged, eventTimestamps *BACnetEventTimestamps, notifyType *BACnetNotifyTypeTagged, eventEnable *BACnetEventTransitionBitsTagged, eventPriorities *BACnetEventPriorities) *BACnetEventSummary {
return &BACnetEventSummary{ObjectIdentifier: objectIdentifier, EventState: eventState, AcknowledgedTransitions: acknowledgedTransitions, EventTimestamps: eventTimestamps, NotifyType: notifyType, EventEnable: eventEnable, EventPriorities: eventPriorities}
}
@@ -192,11 +192,11 @@ func BACnetEventSummaryParse(readBuffer utils.ReadBuffer) (*BACnetEventSummary,
if pullErr := readBuffer.PullContext("acknowledgedTransitions"); pullErr != nil {
return nil, pullErr
}
- _acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsParse(readBuffer, uint8(uint8(2)))
+ _acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsTaggedParse(readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _acknowledgedTransitionsErr != nil {
return nil, errors.Wrap(_acknowledgedTransitionsErr, "Error parsing 'acknowledgedTransitions' field")
}
- acknowledgedTransitions := CastBACnetEventTransitionBits(_acknowledgedTransitions)
+ acknowledgedTransitions := CastBACnetEventTransitionBitsTagged(_acknowledgedTransitions)
if closeErr := readBuffer.CloseContext("acknowledgedTransitions"); closeErr != nil {
return nil, closeErr
}
@@ -231,11 +231,11 @@ func BACnetEventSummaryParse(readBuffer utils.ReadBuffer) (*BACnetEventSummary,
if pullErr := readBuffer.PullContext("eventEnable"); pullErr != nil {
return nil, pullErr
}
- _eventEnable, _eventEnableErr := BACnetEventTransitionBitsParse(readBuffer, uint8(uint8(5)))
+ _eventEnable, _eventEnableErr := BACnetEventTransitionBitsTaggedParse(readBuffer, uint8(uint8(5)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _eventEnableErr != nil {
return nil, errors.Wrap(_eventEnableErr, "Error parsing 'eventEnable' field")
}
- eventEnable := CastBACnetEventTransitionBits(_eventEnable)
+ eventEnable := CastBACnetEventTransitionBitsTagged(_eventEnable)
if closeErr := readBuffer.CloseContext("eventEnable"); closeErr != nil {
return nil, closeErr
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go
index 74e794e7fc..67d930837b 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBits.go
@@ -26,198 +26,105 @@ import (
// Code generated by code-generation. DO NOT EDIT.
-// BACnetEventTransitionBits is the data-structure of this message
-type BACnetEventTransitionBits struct {
- RawBits *BACnetContextTagBitString
+// BACnetEventTransitionBits is an enum
+type BACnetEventTransitionBits uint8
- // Arguments.
- TagNumber uint8
-}
-
-// IBACnetEventTransitionBits is the corresponding interface of BACnetEventTransitionBits
type IBACnetEventTransitionBits interface {
- // GetRawBits returns RawBits (property field)
- GetRawBits() *BACnetContextTagBitString
- // GetToOffnormal returns ToOffnormal (virtual field)
- GetToOffnormal() bool
- // GetToFault returns ToFault (virtual field)
- GetToFault() bool
- // GetToNormal returns ToNormal (virtual field)
- GetToNormal() bool
- // GetLengthInBytes returns the length in bytes
- GetLengthInBytes() uint16
- // GetLengthInBits returns the length in bits
- GetLengthInBits() uint16
- // Serialize serializes this type
Serialize(writeBuffer utils.WriteBuffer) error
}
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *BACnetEventTransitionBits) GetRawBits() *BACnetContextTagBitString {
- return m.RawBits
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for virtual fields.
-///////////////////////
-
-func (m *BACnetEventTransitionBits) GetToOffnormal() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[0])
-}
+const (
+ BACnetEventTransitionBits_TO_OFFNORMAL BACnetEventTransitionBits = 0
+ BACnetEventTransitionBits_TO_FAULT BACnetEventTransitionBits = 1
+ BACnetEventTransitionBits_TO_NORMAL BACnetEventTransitionBits = 2
+)
-func (m *BACnetEventTransitionBits) GetToFault() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[1])
-}
+var BACnetEventTransitionBitsValues []BACnetEventTransitionBits
-func (m *BACnetEventTransitionBits) GetToNormal() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[2])
+func init() {
+ _ = errors.New
+ BACnetEventTransitionBitsValues = []BACnetEventTransitionBits{
+ BACnetEventTransitionBits_TO_OFFNORMAL,
+ BACnetEventTransitionBits_TO_FAULT,
+ BACnetEventTransitionBits_TO_NORMAL,
+ }
}
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewBACnetEventTransitionBits factory function for BACnetEventTransitionBits
-func NewBACnetEventTransitionBits(rawBits *BACnetContextTagBitString, tagNumber uint8) *BACnetEventTransitionBits {
- return &BACnetEventTransitionBits{RawBits: rawBits, TagNumber: tagNumber}
+func BACnetEventTransitionBitsByValue(value uint8) BACnetEventTransitionBits {
+ switch value {
+ case 0:
+ return BACnetEventTransitionBits_TO_OFFNORMAL
+ case 1:
+ return BACnetEventTransitionBits_TO_FAULT
+ case 2:
+ return BACnetEventTransitionBits_TO_NORMAL
+ }
+ return 0
}
-func CastBACnetEventTransitionBits(structType interface{}) *BACnetEventTransitionBits {
- if casted, ok := structType.(BACnetEventTransitionBits); ok {
- return &casted
- }
- if casted, ok := structType.(*BACnetEventTransitionBits); ok {
- return casted
+func BACnetEventTransitionBitsByName(value string) BACnetEventTransitionBits {
+ switch value {
+ case "TO_OFFNORMAL":
+ return BACnetEventTransitionBits_TO_OFFNORMAL
+ case "TO_FAULT":
+ return BACnetEventTransitionBits_TO_FAULT
+ case "TO_NORMAL":
+ return BACnetEventTransitionBits_TO_NORMAL
}
- return nil
+ return 0
}
-func (m *BACnetEventTransitionBits) GetTypeName() string {
- return "BACnetEventTransitionBits"
+func BACnetEventTransitionBitsKnows(value uint8) bool {
+ for _, typeValue := range BACnetEventTransitionBitsValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
}
-func (m *BACnetEventTransitionBits) GetLengthInBits() uint16 {
- return m.GetLengthInBitsConditional(false)
+func CastBACnetEventTransitionBits(structType interface{}) BACnetEventTransitionBits {
+ castFunc := func(typ interface{}) BACnetEventTransitionBits {
+ if sBACnetEventTransitionBits, ok := typ.(BACnetEventTransitionBits); ok {
+ return sBACnetEventTransitionBits
+ }
+ return 0
+ }
+ return castFunc(structType)
}
-func (m *BACnetEventTransitionBits) GetLengthInBitsConditional(lastItem bool) uint16 {
- lengthInBits := uint16(0)
-
- // Simple field (rawBits)
- lengthInBits += m.RawBits.GetLengthInBits()
-
- // A virtual field doesn't have any in- or output.
-
- // A virtual field doesn't have any in- or output.
-
- // A virtual field doesn't have any in- or output.
-
- return lengthInBits
+func (m BACnetEventTransitionBits) GetLengthInBits() uint16 {
+ return 8
}
-func (m *BACnetEventTransitionBits) GetLengthInBytes() uint16 {
+func (m BACnetEventTransitionBits) GetLengthInBytes() uint16 {
return m.GetLengthInBits() / 8
}
-func BACnetEventTransitionBitsParse(readBuffer utils.ReadBuffer, tagNumber uint8) (*BACnetEventTransitionBits, error) {
- positionAware := readBuffer
- _ = positionAware
- if pullErr := readBuffer.PullContext("BACnetEventTransitionBits"); pullErr != nil {
- return nil, pullErr
- }
- currentPos := positionAware.GetPos()
- _ = currentPos
-
- // Simple Field (rawBits)
- if pullErr := readBuffer.PullContext("rawBits"); pullErr != nil {
- return nil, pullErr
- }
- _rawBits, _rawBitsErr := BACnetContextTagParse(readBuffer, uint8(tagNumber), BACnetDataType(BACnetDataType_BIT_STRING))
- if _rawBitsErr != nil {
- return nil, errors.Wrap(_rawBitsErr, "Error parsing 'rawBits' field")
- }
- rawBits := CastBACnetContextTagBitString(_rawBits)
- if closeErr := readBuffer.CloseContext("rawBits"); closeErr != nil {
- return nil, closeErr
- }
-
- // Virtual field
- _toOffnormal := rawBits.GetPayload().GetData()[0]
- toOffnormal := bool(_toOffnormal)
- _ = toOffnormal
-
- // Virtual field
- _toFault := rawBits.GetPayload().GetData()[1]
- toFault := bool(_toFault)
- _ = toFault
-
- // Virtual field
- _toNormal := rawBits.GetPayload().GetData()[2]
- toNormal := bool(_toNormal)
- _ = toNormal
-
- if closeErr := readBuffer.CloseContext("BACnetEventTransitionBits"); closeErr != nil {
- return nil, closeErr
+func BACnetEventTransitionBitsParse(readBuffer utils.ReadBuffer) (BACnetEventTransitionBits, error) {
+ val, err := readBuffer.ReadUint8("BACnetEventTransitionBits", 8)
+ if err != nil {
+ return 0, nil
}
-
- // Create the instance
- return NewBACnetEventTransitionBits(rawBits, tagNumber), nil
+ return BACnetEventTransitionBitsByValue(val), nil
}
-func (m *BACnetEventTransitionBits) Serialize(writeBuffer utils.WriteBuffer) error {
- positionAware := writeBuffer
- _ = positionAware
- if pushErr := writeBuffer.PushContext("BACnetEventTransitionBits"); pushErr != nil {
- return pushErr
- }
-
- // Simple Field (rawBits)
- if pushErr := writeBuffer.PushContext("rawBits"); pushErr != nil {
- return pushErr
- }
- _rawBitsErr := m.RawBits.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("rawBits"); popErr != nil {
- return popErr
- }
- if _rawBitsErr != nil {
- return errors.Wrap(_rawBitsErr, "Error serializing 'rawBits' field")
- }
- // Virtual field
- if _toOffnormalErr := writeBuffer.WriteVirtual("toOffnormal", m.GetToOffnormal()); _toOffnormalErr != nil {
- return errors.Wrap(_toOffnormalErr, "Error serializing 'toOffnormal' field")
- }
- // Virtual field
- if _toFaultErr := writeBuffer.WriteVirtual("toFault", m.GetToFault()); _toFaultErr != nil {
- return errors.Wrap(_toFaultErr, "Error serializing 'toFault' field")
- }
- // Virtual field
- if _toNormalErr := writeBuffer.WriteVirtual("toNormal", m.GetToNormal()); _toNormalErr != nil {
- return errors.Wrap(_toNormalErr, "Error serializing 'toNormal' field")
- }
+func (e BACnetEventTransitionBits) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetEventTransitionBits", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
- if popErr := writeBuffer.PopContext("BACnetEventTransitionBits"); popErr != nil {
- return popErr
+func (e BACnetEventTransitionBits) name() string {
+ switch e {
+ case BACnetEventTransitionBits_TO_OFFNORMAL:
+ return "TO_OFFNORMAL"
+ case BACnetEventTransitionBits_TO_FAULT:
+ return "TO_FAULT"
+ case BACnetEventTransitionBits_TO_NORMAL:
+ return "TO_NORMAL"
}
- return nil
+ return ""
}
-func (m *BACnetEventTransitionBits) String() string {
- if m == nil {
- return "<nil>"
- }
- buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
- if err := m.Serialize(buffer); err != nil {
- return err.Error()
- }
- return buffer.GetBox().String()
+func (e BACnetEventTransitionBits) String() string {
+ return e.name()
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go
new file mode 100644
index 0000000000..2a0b3c7b45
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetEventTransitionBitsTagged.go
@@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetEventTransitionBitsTagged is the data-structure of this message
+type BACnetEventTransitionBitsTagged struct {
+ Header *BACnetTagHeader
+ Payload *BACnetTagPayloadBitString
+
+ // Arguments.
+ TagNumber uint8
+ TagClass TagClass
+}
+
+// IBACnetEventTransitionBitsTagged is the corresponding interface of BACnetEventTransitionBitsTagged
+type IBACnetEventTransitionBitsTagged interface {
+ // GetHeader returns Header (property field)
+ GetHeader() *BACnetTagHeader
+ // GetPayload returns Payload (property field)
+ GetPayload() *BACnetTagPayloadBitString
+ // GetToOffnormal returns ToOffnormal (virtual field)
+ GetToOffnormal() bool
+ // GetToFault returns ToFault (virtual field)
+ GetToFault() bool
+ // GetToNormal returns ToNormal (virtual field)
+ GetToNormal() bool
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetEventTransitionBitsTagged) GetHeader() *BACnetTagHeader {
+ return m.Header
+}
+
+func (m *BACnetEventTransitionBitsTagged) GetPayload() *BACnetTagPayloadBitString {
+ return m.Payload
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetEventTransitionBitsTagged) GetToOffnormal() bool {
+ return bool(m.GetPayload().GetData()[0])
+}
+
+func (m *BACnetEventTransitionBitsTagged) GetToFault() bool {
+ return bool(m.GetPayload().GetData()[1])
+}
+
+func (m *BACnetEventTransitionBitsTagged) GetToNormal() bool {
+ return bool(m.GetPayload().GetData()[2])
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetEventTransitionBitsTagged factory function for BACnetEventTransitionBitsTagged
+func NewBACnetEventTransitionBitsTagged(header *BACnetTagHeader, payload *BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *BACnetEventTransitionBitsTagged {
+ return &BACnetEventTransitionBitsTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass}
+}
+
+func CastBACnetEventTransitionBitsTagged(structType interface{}) *BACnetEventTransitionBitsTagged {
+ if casted, ok := structType.(BACnetEventTransitionBitsTagged); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetEventTransitionBitsTagged); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetEventTransitionBitsTagged) GetTypeName() string {
+ return "BACnetEventTransitionBitsTagged"
+}
+
+func (m *BACnetEventTransitionBitsTagged) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetEventTransitionBitsTagged) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (header)
+ lengthInBits += m.Header.GetLengthInBits()
+
+ // Simple field (payload)
+ lengthInBits += m.Payload.GetLengthInBits()
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *BACnetEventTransitionBitsTagged) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetEventTransitionBitsTaggedParse(readBuffer utils.ReadBuffer, tagNumber uint8, tagClass TagClass) (*BACnetEventTransitionBitsTagged, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetEventTransitionBitsTagged"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (header)
+ if pullErr := readBuffer.PullContext("header"); pullErr != nil {
+ return nil, pullErr
+ }
+ _header, _headerErr := BACnetTagHeaderParse(readBuffer)
+ if _headerErr != nil {
+ return nil, errors.Wrap(_headerErr, "Error parsing 'header' field")
+ }
+ header := CastBACnetTagHeader(_header)
+ if closeErr := readBuffer.CloseContext("header"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Validation
+ if !(bool((header.GetTagClass()) == (tagClass))) {
+ return nil, utils.ParseValidationError{"tag class doesn't match"}
+ }
+
+ // Validation
+ if !(bool(bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool(bool(bool((header.GetActualTagNumber()) == (tagNumber))))) {
+ return nil, utils.ParseAssertError{"tagnumber doesn't match"}
+ }
+
+ // Simple Field (payload)
+ if pullErr := readBuffer.PullContext("payload"); pullErr != nil {
+ return nil, pullErr
+ }
+ _payload, _payloadErr := BACnetTagPayloadBitStringParse(readBuffer, uint32(header.GetActualLength()))
+ if _payloadErr != nil {
+ return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field")
+ }
+ payload := CastBACnetTagPayloadBitString(_payload)
+ if closeErr := readBuffer.CloseContext("payload"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Virtual field
+ _toOffnormal := payload.GetData()[0]
+ toOffnormal := bool(_toOffnormal)
+ _ = toOffnormal
+
+ // Virtual field
+ _toFault := payload.GetData()[1]
+ toFault := bool(_toFault)
+ _ = toFault
+
+ // Virtual field
+ _toNormal := payload.GetData()[2]
+ toNormal := bool(_toNormal)
+ _ = toNormal
+
+ if closeErr := readBuffer.CloseContext("BACnetEventTransitionBitsTagged"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetEventTransitionBitsTagged(header, payload, tagNumber, tagClass), nil
+}
+
+func (m *BACnetEventTransitionBitsTagged) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetEventTransitionBitsTagged"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (header)
+ if pushErr := writeBuffer.PushContext("header"); pushErr != nil {
+ return pushErr
+ }
+ _headerErr := m.Header.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("header"); popErr != nil {
+ return popErr
+ }
+ if _headerErr != nil {
+ return errors.Wrap(_headerErr, "Error serializing 'header' field")
+ }
+
+ // Simple Field (payload)
+ if pushErr := writeBuffer.PushContext("payload"); pushErr != nil {
+ return pushErr
+ }
+ _payloadErr := m.Payload.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("payload"); popErr != nil {
+ return popErr
+ }
+ if _payloadErr != nil {
+ return errors.Wrap(_payloadErr, "Error serializing 'payload' field")
+ }
+ // Virtual field
+ if _toOffnormalErr := writeBuffer.WriteVirtual("toOffnormal", m.GetToOffnormal()); _toOffnormalErr != nil {
+ return errors.Wrap(_toOffnormalErr, "Error serializing 'toOffnormal' field")
+ }
+ // Virtual field
+ if _toFaultErr := writeBuffer.WriteVirtual("toFault", m.GetToFault()); _toFaultErr != nil {
+ return errors.Wrap(_toFaultErr, "Error serializing 'toFault' field")
+ }
+ // Virtual field
+ if _toNormalErr := writeBuffer.WriteVirtual("toNormal", m.GetToNormal()); _toNormalErr != nil {
+ return errors.Wrap(_toNormalErr, "Error serializing 'toNormal' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetEventTransitionBitsTagged"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetEventTransitionBitsTagged) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go
new file mode 100644
index 0000000000..bbc99168b7
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnable.go
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetLimitEnable is an enum
+type BACnetLimitEnable uint8
+
+type IBACnetLimitEnable interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ BACnetLimitEnable_LOW_LIMIT_ENABLE BACnetLimitEnable = 0
+ BACnetLimitEnable_HIGH_LIMIT_ENABLE BACnetLimitEnable = 1
+)
+
+var BACnetLimitEnableValues []BACnetLimitEnable
+
+func init() {
+ _ = errors.New
+ BACnetLimitEnableValues = []BACnetLimitEnable{
+ BACnetLimitEnable_LOW_LIMIT_ENABLE,
+ BACnetLimitEnable_HIGH_LIMIT_ENABLE,
+ }
+}
+
+func BACnetLimitEnableByValue(value uint8) BACnetLimitEnable {
+ switch value {
+ case 0:
+ return BACnetLimitEnable_LOW_LIMIT_ENABLE
+ case 1:
+ return BACnetLimitEnable_HIGH_LIMIT_ENABLE
+ }
+ return 0
+}
+
+func BACnetLimitEnableByName(value string) BACnetLimitEnable {
+ switch value {
+ case "LOW_LIMIT_ENABLE":
+ return BACnetLimitEnable_LOW_LIMIT_ENABLE
+ case "HIGH_LIMIT_ENABLE":
+ return BACnetLimitEnable_HIGH_LIMIT_ENABLE
+ }
+ return 0
+}
+
+func BACnetLimitEnableKnows(value uint8) bool {
+ for _, typeValue := range BACnetLimitEnableValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastBACnetLimitEnable(structType interface{}) BACnetLimitEnable {
+ castFunc := func(typ interface{}) BACnetLimitEnable {
+ if sBACnetLimitEnable, ok := typ.(BACnetLimitEnable); ok {
+ return sBACnetLimitEnable
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m BACnetLimitEnable) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m BACnetLimitEnable) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetLimitEnableParse(readBuffer utils.ReadBuffer) (BACnetLimitEnable, error) {
+ val, err := readBuffer.ReadUint8("BACnetLimitEnable", 8)
+ if err != nil {
+ return 0, nil
+ }
+ return BACnetLimitEnableByValue(val), nil
+}
+
+func (e BACnetLimitEnable) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetLimitEnable", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
+
+func (e BACnetLimitEnable) name() string {
+ switch e {
+ case BACnetLimitEnable_LOW_LIMIT_ENABLE:
+ return "LOW_LIMIT_ENABLE"
+ case BACnetLimitEnable_HIGH_LIMIT_ENABLE:
+ return "HIGH_LIMIT_ENABLE"
+ }
+ return ""
+}
+
+func (e BACnetLimitEnable) String() string {
+ return e.name()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go
new file mode 100644
index 0000000000..102f00422f
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLimitEnableTagged.go
@@ -0,0 +1,252 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetLimitEnableTagged is the data-structure of this message
+type BACnetLimitEnableTagged struct {
+ Header *BACnetTagHeader
+ Payload *BACnetTagPayloadBitString
+
+ // Arguments.
+ TagNumber uint8
+ TagClass TagClass
+}
+
+// IBACnetLimitEnableTagged is the corresponding interface of BACnetLimitEnableTagged
+type IBACnetLimitEnableTagged interface {
+ // GetHeader returns Header (property field)
+ GetHeader() *BACnetTagHeader
+ // GetPayload returns Payload (property field)
+ GetPayload() *BACnetTagPayloadBitString
+ // GetLowLimitEnable returns LowLimitEnable (virtual field)
+ GetLowLimitEnable() bool
+ // GetHighLimitEnable returns HighLimitEnable (virtual field)
+ GetHighLimitEnable() bool
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetLimitEnableTagged) GetHeader() *BACnetTagHeader {
+ return m.Header
+}
+
+func (m *BACnetLimitEnableTagged) GetPayload() *BACnetTagPayloadBitString {
+ return m.Payload
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetLimitEnableTagged) GetLowLimitEnable() bool {
+ return bool(m.GetPayload().GetData()[0])
+}
+
+func (m *BACnetLimitEnableTagged) GetHighLimitEnable() bool {
+ return bool(m.GetPayload().GetData()[1])
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetLimitEnableTagged factory function for BACnetLimitEnableTagged
+func NewBACnetLimitEnableTagged(header *BACnetTagHeader, payload *BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *BACnetLimitEnableTagged {
+ return &BACnetLimitEnableTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass}
+}
+
+func CastBACnetLimitEnableTagged(structType interface{}) *BACnetLimitEnableTagged {
+ if casted, ok := structType.(BACnetLimitEnableTagged); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetLimitEnableTagged); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetLimitEnableTagged) GetTypeName() string {
+ return "BACnetLimitEnableTagged"
+}
+
+func (m *BACnetLimitEnableTagged) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetLimitEnableTagged) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (header)
+ lengthInBits += m.Header.GetLengthInBits()
+
+ // Simple field (payload)
+ lengthInBits += m.Payload.GetLengthInBits()
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *BACnetLimitEnableTagged) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetLimitEnableTaggedParse(readBuffer utils.ReadBuffer, tagNumber uint8, tagClass TagClass) (*BACnetLimitEnableTagged, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetLimitEnableTagged"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (header)
+ if pullErr := readBuffer.PullContext("header"); pullErr != nil {
+ return nil, pullErr
+ }
+ _header, _headerErr := BACnetTagHeaderParse(readBuffer)
+ if _headerErr != nil {
+ return nil, errors.Wrap(_headerErr, "Error parsing 'header' field")
+ }
+ header := CastBACnetTagHeader(_header)
+ if closeErr := readBuffer.CloseContext("header"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Validation
+ if !(bool((header.GetTagClass()) == (tagClass))) {
+ return nil, utils.ParseValidationError{"tag class doesn't match"}
+ }
+
+ // Validation
+ if !(bool(bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool(bool(bool((header.GetActualTagNumber()) == (tagNumber))))) {
+ return nil, utils.ParseAssertError{"tagnumber doesn't match"}
+ }
+
+ // Simple Field (payload)
+ if pullErr := readBuffer.PullContext("payload"); pullErr != nil {
+ return nil, pullErr
+ }
+ _payload, _payloadErr := BACnetTagPayloadBitStringParse(readBuffer, uint32(header.GetActualLength()))
+ if _payloadErr != nil {
+ return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field")
+ }
+ payload := CastBACnetTagPayloadBitString(_payload)
+ if closeErr := readBuffer.CloseContext("payload"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Virtual field
+ _lowLimitEnable := payload.GetData()[0]
+ lowLimitEnable := bool(_lowLimitEnable)
+ _ = lowLimitEnable
+
+ // Virtual field
+ _highLimitEnable := payload.GetData()[1]
+ highLimitEnable := bool(_highLimitEnable)
+ _ = highLimitEnable
+
+ if closeErr := readBuffer.CloseContext("BACnetLimitEnableTagged"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetLimitEnableTagged(header, payload, tagNumber, tagClass), nil
+}
+
+func (m *BACnetLimitEnableTagged) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetLimitEnableTagged"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (header)
+ if pushErr := writeBuffer.PushContext("header"); pushErr != nil {
+ return pushErr
+ }
+ _headerErr := m.Header.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("header"); popErr != nil {
+ return popErr
+ }
+ if _headerErr != nil {
+ return errors.Wrap(_headerErr, "Error serializing 'header' field")
+ }
+
+ // Simple Field (payload)
+ if pushErr := writeBuffer.PushContext("payload"); pushErr != nil {
+ return pushErr
+ }
+ _payloadErr := m.Payload.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("payload"); popErr != nil {
+ return popErr
+ }
+ if _payloadErr != nil {
+ return errors.Wrap(_payloadErr, "Error serializing 'payload' field")
+ }
+ // Virtual field
+ if _lowLimitEnableErr := writeBuffer.WriteVirtual("lowLimitEnable", m.GetLowLimitEnable()); _lowLimitEnableErr != nil {
+ return errors.Wrap(_lowLimitEnableErr, "Error serializing 'lowLimitEnable' field")
+ }
+ // Virtual field
+ if _highLimitEnableErr := writeBuffer.WriteVirtual("highLimitEnable", m.GetHighLimitEnable()); _highLimitEnableErr != nil {
+ return errors.Wrap(_highLimitEnableErr, "Error serializing 'highLimitEnable' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetLimitEnableTagged"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetLimitEnableTagged) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go
new file mode 100644
index 0000000000..50740575e8
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatus.go
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetLogStatus is an enum
+type BACnetLogStatus uint8
+
+type IBACnetLogStatus interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ BACnetLogStatus_LOG_DISABLED BACnetLogStatus = 0
+ BACnetLogStatus_BUFFER_PURGED BACnetLogStatus = 1
+ BACnetLogStatus_LOG_INTERRUPTED BACnetLogStatus = 2
+)
+
+var BACnetLogStatusValues []BACnetLogStatus
+
+func init() {
+ _ = errors.New
+ BACnetLogStatusValues = []BACnetLogStatus{
+ BACnetLogStatus_LOG_DISABLED,
+ BACnetLogStatus_BUFFER_PURGED,
+ BACnetLogStatus_LOG_INTERRUPTED,
+ }
+}
+
+func BACnetLogStatusByValue(value uint8) BACnetLogStatus {
+ switch value {
+ case 0:
+ return BACnetLogStatus_LOG_DISABLED
+ case 1:
+ return BACnetLogStatus_BUFFER_PURGED
+ case 2:
+ return BACnetLogStatus_LOG_INTERRUPTED
+ }
+ return 0
+}
+
+func BACnetLogStatusByName(value string) BACnetLogStatus {
+ switch value {
+ case "LOG_DISABLED":
+ return BACnetLogStatus_LOG_DISABLED
+ case "BUFFER_PURGED":
+ return BACnetLogStatus_BUFFER_PURGED
+ case "LOG_INTERRUPTED":
+ return BACnetLogStatus_LOG_INTERRUPTED
+ }
+ return 0
+}
+
+func BACnetLogStatusKnows(value uint8) bool {
+ for _, typeValue := range BACnetLogStatusValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastBACnetLogStatus(structType interface{}) BACnetLogStatus {
+ castFunc := func(typ interface{}) BACnetLogStatus {
+ if sBACnetLogStatus, ok := typ.(BACnetLogStatus); ok {
+ return sBACnetLogStatus
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m BACnetLogStatus) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m BACnetLogStatus) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetLogStatusParse(readBuffer utils.ReadBuffer) (BACnetLogStatus, error) {
+ val, err := readBuffer.ReadUint8("BACnetLogStatus", 8)
+ if err != nil {
+ return 0, nil
+ }
+ return BACnetLogStatusByValue(val), nil
+}
+
+func (e BACnetLogStatus) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetLogStatus", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
+
+func (e BACnetLogStatus) name() string {
+ switch e {
+ case BACnetLogStatus_LOG_DISABLED:
+ return "LOG_DISABLED"
+ case BACnetLogStatus_BUFFER_PURGED:
+ return "BUFFER_PURGED"
+ case BACnetLogStatus_LOG_INTERRUPTED:
+ return "LOG_INTERRUPTED"
+ }
+ return ""
+}
+
+func (e BACnetLogStatus) String() string {
+ return e.name()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go
new file mode 100644
index 0000000000..2eb83e1913
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetLogStatusTagged.go
@@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetLogStatusTagged is the data-structure of this message
+type BACnetLogStatusTagged struct {
+ Header *BACnetTagHeader
+ Payload *BACnetTagPayloadBitString
+
+ // Arguments.
+ TagNumber uint8
+ TagClass TagClass
+}
+
+// IBACnetLogStatusTagged is the corresponding interface of BACnetLogStatusTagged
+type IBACnetLogStatusTagged interface {
+ // GetHeader returns Header (property field)
+ GetHeader() *BACnetTagHeader
+ // GetPayload returns Payload (property field)
+ GetPayload() *BACnetTagPayloadBitString
+ // GetLogDisabled returns LogDisabled (virtual field)
+ GetLogDisabled() bool
+ // GetBufferPurged returns BufferPurged (virtual field)
+ GetBufferPurged() bool
+ // GetLogInterrupted returns LogInterrupted (virtual field)
+ GetLogInterrupted() bool
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetLogStatusTagged) GetHeader() *BACnetTagHeader {
+ return m.Header
+}
+
+func (m *BACnetLogStatusTagged) GetPayload() *BACnetTagPayloadBitString {
+ return m.Payload
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetLogStatusTagged) GetLogDisabled() bool {
+ return bool(m.GetPayload().GetData()[0])
+}
+
+func (m *BACnetLogStatusTagged) GetBufferPurged() bool {
+ return bool(m.GetPayload().GetData()[1])
+}
+
+func (m *BACnetLogStatusTagged) GetLogInterrupted() bool {
+ return bool(m.GetPayload().GetData()[2])
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetLogStatusTagged factory function for BACnetLogStatusTagged
+func NewBACnetLogStatusTagged(header *BACnetTagHeader, payload *BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *BACnetLogStatusTagged {
+ return &BACnetLogStatusTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass}
+}
+
+func CastBACnetLogStatusTagged(structType interface{}) *BACnetLogStatusTagged {
+ if casted, ok := structType.(BACnetLogStatusTagged); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetLogStatusTagged); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetLogStatusTagged) GetTypeName() string {
+ return "BACnetLogStatusTagged"
+}
+
+func (m *BACnetLogStatusTagged) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetLogStatusTagged) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (header)
+ lengthInBits += m.Header.GetLengthInBits()
+
+ // Simple field (payload)
+ lengthInBits += m.Payload.GetLengthInBits()
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *BACnetLogStatusTagged) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetLogStatusTaggedParse(readBuffer utils.ReadBuffer, tagNumber uint8, tagClass TagClass) (*BACnetLogStatusTagged, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetLogStatusTagged"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (header)
+ if pullErr := readBuffer.PullContext("header"); pullErr != nil {
+ return nil, pullErr
+ }
+ _header, _headerErr := BACnetTagHeaderParse(readBuffer)
+ if _headerErr != nil {
+ return nil, errors.Wrap(_headerErr, "Error parsing 'header' field")
+ }
+ header := CastBACnetTagHeader(_header)
+ if closeErr := readBuffer.CloseContext("header"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Validation
+ if !(bool((header.GetTagClass()) == (tagClass))) {
+ return nil, utils.ParseValidationError{"tag class doesn't match"}
+ }
+
+ // Validation
+ if !(bool(bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool(bool(bool((header.GetActualTagNumber()) == (tagNumber))))) {
+ return nil, utils.ParseAssertError{"tagnumber doesn't match"}
+ }
+
+ // Simple Field (payload)
+ if pullErr := readBuffer.PullContext("payload"); pullErr != nil {
+ return nil, pullErr
+ }
+ _payload, _payloadErr := BACnetTagPayloadBitStringParse(readBuffer, uint32(header.GetActualLength()))
+ if _payloadErr != nil {
+ return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field")
+ }
+ payload := CastBACnetTagPayloadBitString(_payload)
+ if closeErr := readBuffer.CloseContext("payload"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Virtual field
+ _logDisabled := payload.GetData()[0]
+ logDisabled := bool(_logDisabled)
+ _ = logDisabled
+
+ // Virtual field
+ _bufferPurged := payload.GetData()[1]
+ bufferPurged := bool(_bufferPurged)
+ _ = bufferPurged
+
+ // Virtual field
+ _logInterrupted := payload.GetData()[2]
+ logInterrupted := bool(_logInterrupted)
+ _ = logInterrupted
+
+ if closeErr := readBuffer.CloseContext("BACnetLogStatusTagged"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetLogStatusTagged(header, payload, tagNumber, tagClass), nil
+}
+
+func (m *BACnetLogStatusTagged) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetLogStatusTagged"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (header)
+ if pushErr := writeBuffer.PushContext("header"); pushErr != nil {
+ return pushErr
+ }
+ _headerErr := m.Header.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("header"); popErr != nil {
+ return popErr
+ }
+ if _headerErr != nil {
+ return errors.Wrap(_headerErr, "Error serializing 'header' field")
+ }
+
+ // Simple Field (payload)
+ if pushErr := writeBuffer.PushContext("payload"); pushErr != nil {
+ return pushErr
+ }
+ _payloadErr := m.Payload.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("payload"); popErr != nil {
+ return popErr
+ }
+ if _payloadErr != nil {
+ return errors.Wrap(_payloadErr, "Error serializing 'payload' field")
+ }
+ // Virtual field
+ if _logDisabledErr := writeBuffer.WriteVirtual("logDisabled", m.GetLogDisabled()); _logDisabledErr != nil {
+ return errors.Wrap(_logDisabledErr, "Error serializing 'logDisabled' field")
+ }
+ // Virtual field
+ if _bufferPurgedErr := writeBuffer.WriteVirtual("bufferPurged", m.GetBufferPurged()); _bufferPurgedErr != nil {
+ return errors.Wrap(_bufferPurgedErr, "Error serializing 'bufferPurged' field")
+ }
+ // Virtual field
+ if _logInterruptedErr := writeBuffer.WriteVirtual("logInterrupted", m.GetLogInterrupted()); _logInterruptedErr != nil {
+ return errors.Wrap(_logInterruptedErr, "Error serializing 'logInterrupted' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetLogStatusTagged"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetLogStatusTagged) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go
index 77d3e77e75..8918f9ba6e 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersAccessEvent.go
@@ -32,7 +32,7 @@ type BACnetNotificationParametersAccessEvent struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
AccessEvent *BACnetAccessEventTagged
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
AccessEventTag *BACnetContextTagUnsignedInteger
AccessEventTime *BACnetTimeStampEnclosed
AccessCredential *BACnetDeviceObjectReferenceEnclosed
@@ -52,7 +52,7 @@ type IBACnetNotificationParametersAccessEvent interface {
// GetAccessEvent returns AccessEvent (property field)
GetAccessEvent() *BACnetAccessEventTagged
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetAccessEventTag returns AccessEventTag (property field)
GetAccessEventTag() *BACnetContextTagUnsignedInteger
// GetAccessEventTime returns AccessEventTime (property field)
@@ -104,7 +104,7 @@ func (m *BACnetNotificationParametersAccessEvent) GetAccessEvent() *BACnetAccess
return m.AccessEvent
}
-func (m *BACnetNotificationParametersAccessEvent) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersAccessEvent) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -134,7 +134,7 @@ func (m *BACnetNotificationParametersAccessEvent) GetInnerClosingTag() *BACnetCl
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersAccessEvent factory function for BACnetNotificationParametersAccessEvent
-func NewBACnetNotificationParametersAccessEvent(innerOpeningTag *BACnetOpeningTag, accessEvent *BACnetAccessEventTagged, statusFlags *BACnetStatusFlags, accessEventTag *BACnetContextTagUnsignedInteger, accessEventTime *BACnetTimeStampEnclosed, accessCredential *BACnetDeviceObjectReferenceEnclosed, authenticationFactor *BACnetAuthenticationFactorTypeTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagN [...]
+func NewBACnetNotificationParametersAccessEvent(innerOpeningTag *BACnetOpeningTag, accessEvent *BACnetAccessEventTagged, statusFlags *BACnetStatusFlagsTagged, accessEventTag *BACnetContextTagUnsignedInteger, accessEventTime *BACnetTimeStampEnclosed, accessCredential *BACnetDeviceObjectReferenceEnclosed, authenticationFactor *BACnetAuthenticationFactorTypeTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag [...]
_result := &BACnetNotificationParametersAccessEvent{
InnerOpeningTag: innerOpeningTag,
AccessEvent: accessEvent,
@@ -249,11 +249,11 @@ func BACnetNotificationParametersAccessEventParse(readBuffer utils.ReadBuffer, t
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -339,7 +339,7 @@ func BACnetNotificationParametersAccessEventParse(readBuffer utils.ReadBuffer, t
_child := &BACnetNotificationParametersAccessEvent{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
AccessEvent: CastBACnetAccessEventTagged(accessEvent),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
AccessEventTag: CastBACnetContextTagUnsignedInteger(accessEventTag),
AccessEventTime: CastBACnetTimeStampEnclosed(accessEventTime),
AccessCredential: CastBACnetDeviceObjectReferenceEnclosed(accessCredential),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go
index 991d44c3af..162acc182d 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfBitString.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersChangeOfBitString struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ChangeOfBitString *BACnetContextTagBitString
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
InnerClosingTag *BACnetClosingTag
// Arguments.
@@ -47,7 +47,7 @@ type IBACnetNotificationParametersChangeOfBitString interface {
// GetChangeOfBitString returns ChangeOfBitString (property field)
GetChangeOfBitString() *BACnetContextTagBitString
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetInnerClosingTag returns InnerClosingTag (property field)
GetInnerClosingTag() *BACnetClosingTag
// GetLengthInBytes returns the length in bytes
@@ -91,7 +91,7 @@ func (m *BACnetNotificationParametersChangeOfBitString) GetChangeOfBitString() *
return m.ChangeOfBitString
}
-func (m *BACnetNotificationParametersChangeOfBitString) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfBitString) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -105,7 +105,7 @@ func (m *BACnetNotificationParametersChangeOfBitString) GetInnerClosingTag() *BA
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfBitString factory function for BACnetNotificationParametersChangeOfBitString
-func NewBACnetNotificationParametersChangeOfBitString(innerOpeningTag *BACnetOpeningTag, changeOfBitString *BACnetContextTagBitString, statusFlags *BACnetStatusFlags, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfBitString {
+func NewBACnetNotificationParametersChangeOfBitString(innerOpeningTag *BACnetOpeningTag, changeOfBitString *BACnetContextTagBitString, statusFlags *BACnetStatusFlagsTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfBitString {
_result := &BACnetNotificationParametersChangeOfBitString{
InnerOpeningTag: innerOpeningTag,
ChangeOfBitString: changeOfBitString,
@@ -202,11 +202,11 @@ func BACnetNotificationParametersChangeOfBitStringParse(readBuffer utils.ReadBuf
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -232,7 +232,7 @@ func BACnetNotificationParametersChangeOfBitStringParse(readBuffer utils.ReadBuf
_child := &BACnetNotificationParametersChangeOfBitString{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ChangeOfBitString: CastBACnetContextTagBitString(changeOfBitString),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go
index 77f84049bf..d6b84ab511 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfCharacterString.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersChangeOfCharacterString struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ChangedValue *BACnetContextTagCharacterString
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
AlarmValue *BACnetContextTagCharacterString
InnerClosingTag *BACnetClosingTag
@@ -48,7 +48,7 @@ type IBACnetNotificationParametersChangeOfCharacterString interface {
// GetChangedValue returns ChangedValue (property field)
GetChangedValue() *BACnetContextTagCharacterString
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetAlarmValue returns AlarmValue (property field)
GetAlarmValue() *BACnetContextTagCharacterString
// GetInnerClosingTag returns InnerClosingTag (property field)
@@ -94,7 +94,7 @@ func (m *BACnetNotificationParametersChangeOfCharacterString) GetChangedValue()
return m.ChangedValue
}
-func (m *BACnetNotificationParametersChangeOfCharacterString) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfCharacterString) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -112,7 +112,7 @@ func (m *BACnetNotificationParametersChangeOfCharacterString) GetInnerClosingTag
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfCharacterString factory function for BACnetNotificationParametersChangeOfCharacterString
-func NewBACnetNotificationParametersChangeOfCharacterString(innerOpeningTag *BACnetOpeningTag, changedValue *BACnetContextTagCharacterString, statusFlags *BACnetStatusFlags, alarmValue *BACnetContextTagCharacterString, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfCharacterString {
+func NewBACnetNotificationParametersChangeOfCharacterString(innerOpeningTag *BACnetOpeningTag, changedValue *BACnetContextTagCharacterString, statusFlags *BACnetStatusFlagsTagged, alarmValue *BACnetContextTagCharacterString, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfCharacterString {
_result := &BACnetNotificationParametersChangeOfCharacterString{
InnerOpeningTag: innerOpeningTag,
ChangedValue: changedValue,
@@ -213,11 +213,11 @@ func BACnetNotificationParametersChangeOfCharacterStringParse(readBuffer utils.R
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -256,7 +256,7 @@ func BACnetNotificationParametersChangeOfCharacterStringParse(readBuffer utils.R
_child := &BACnetNotificationParametersChangeOfCharacterString{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ChangedValue: CastBACnetContextTagCharacterString(changedValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
AlarmValue: CastBACnetContextTagCharacterString(alarmValue),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go
index 196073e744..d309acaa36 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfDiscreteValue.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersChangeOfDiscreteValue struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
NewValue *BACnetNotificationParametersChangeOfDiscreteValueNewValue
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
InnerClosingTag *BACnetClosingTag
// Arguments.
@@ -47,7 +47,7 @@ type IBACnetNotificationParametersChangeOfDiscreteValue interface {
// GetNewValue returns NewValue (property field)
GetNewValue() *BACnetNotificationParametersChangeOfDiscreteValueNewValue
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetInnerClosingTag returns InnerClosingTag (property field)
GetInnerClosingTag() *BACnetClosingTag
// GetLengthInBytes returns the length in bytes
@@ -91,7 +91,7 @@ func (m *BACnetNotificationParametersChangeOfDiscreteValue) GetNewValue() *BACne
return m.NewValue
}
-func (m *BACnetNotificationParametersChangeOfDiscreteValue) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfDiscreteValue) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -105,7 +105,7 @@ func (m *BACnetNotificationParametersChangeOfDiscreteValue) GetInnerClosingTag()
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfDiscreteValue factory function for BACnetNotificationParametersChangeOfDiscreteValue
-func NewBACnetNotificationParametersChangeOfDiscreteValue(innerOpeningTag *BACnetOpeningTag, newValue *BACnetNotificationParametersChangeOfDiscreteValueNewValue, statusFlags *BACnetStatusFlags, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfDiscreteValue {
+func NewBACnetNotificationParametersChangeOfDiscreteValue(innerOpeningTag *BACnetOpeningTag, newValue *BACnetNotificationParametersChangeOfDiscreteValueNewValue, statusFlags *BACnetStatusFlagsTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfDiscreteValue {
_result := &BACnetNotificationParametersChangeOfDiscreteValue{
InnerOpeningTag: innerOpeningTag,
NewValue: newValue,
@@ -202,11 +202,11 @@ func BACnetNotificationParametersChangeOfDiscreteValueParse(readBuffer utils.Rea
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -232,7 +232,7 @@ func BACnetNotificationParametersChangeOfDiscreteValueParse(readBuffer utils.Rea
_child := &BACnetNotificationParametersChangeOfDiscreteValue{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
NewValue: CastBACnetNotificationParametersChangeOfDiscreteValueNewValue(newValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go
index ec6ef882cd..fac8d058cc 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfLifeSafety.go
@@ -32,7 +32,7 @@ type BACnetNotificationParametersChangeOfLifeSafety struct {
InnerOpeningTag *BACnetOpeningTag
NewState *BACnetLifeSafetyStateTagged
NewMode *BACnetLifeSafetyModeTagged
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
OperationExpected *BACnetLifeSafetyOperationTagged
InnerClosingTag *BACnetClosingTag
@@ -51,7 +51,7 @@ type IBACnetNotificationParametersChangeOfLifeSafety interface {
// GetNewMode returns NewMode (property field)
GetNewMode() *BACnetLifeSafetyModeTagged
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetOperationExpected returns OperationExpected (property field)
GetOperationExpected() *BACnetLifeSafetyOperationTagged
// GetInnerClosingTag returns InnerClosingTag (property field)
@@ -101,7 +101,7 @@ func (m *BACnetNotificationParametersChangeOfLifeSafety) GetNewMode() *BACnetLif
return m.NewMode
}
-func (m *BACnetNotificationParametersChangeOfLifeSafety) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfLifeSafety) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -119,7 +119,7 @@ func (m *BACnetNotificationParametersChangeOfLifeSafety) GetInnerClosingTag() *B
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfLifeSafety factory function for BACnetNotificationParametersChangeOfLifeSafety
-func NewBACnetNotificationParametersChangeOfLifeSafety(innerOpeningTag *BACnetOpeningTag, newState *BACnetLifeSafetyStateTagged, newMode *BACnetLifeSafetyModeTagged, statusFlags *BACnetStatusFlags, operationExpected *BACnetLifeSafetyOperationTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfLifeSafety {
+func NewBACnetNotificationParametersChangeOfLifeSafety(innerOpeningTag *BACnetOpeningTag, newState *BACnetLifeSafetyStateTagged, newMode *BACnetLifeSafetyModeTagged, statusFlags *BACnetStatusFlagsTagged, operationExpected *BACnetLifeSafetyOperationTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfLifeSafety {
_result := &BACnetNotificationParametersChangeOfLifeSafety{
InnerOpeningTag: innerOpeningTag,
NewState: newState,
@@ -237,11 +237,11 @@ func BACnetNotificationParametersChangeOfLifeSafetyParse(readBuffer utils.ReadBu
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(2)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(2)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -281,7 +281,7 @@ func BACnetNotificationParametersChangeOfLifeSafetyParse(readBuffer utils.ReadBu
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
NewState: CastBACnetLifeSafetyStateTagged(newState),
NewMode: CastBACnetLifeSafetyModeTagged(newMode),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
OperationExpected: CastBACnetLifeSafetyOperationTagged(operationExpected),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go
index 163c7b8942..b67995beaf 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfReliability.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersChangeOfReliability struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
Reliability *BACnetReliabilityTagged
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
PropertyValues *BACnetPropertyValues
InnerClosingTag *BACnetClosingTag
@@ -48,7 +48,7 @@ type IBACnetNotificationParametersChangeOfReliability interface {
// GetReliability returns Reliability (property field)
GetReliability() *BACnetReliabilityTagged
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetPropertyValues returns PropertyValues (property field)
GetPropertyValues() *BACnetPropertyValues
// GetInnerClosingTag returns InnerClosingTag (property field)
@@ -94,7 +94,7 @@ func (m *BACnetNotificationParametersChangeOfReliability) GetReliability() *BACn
return m.Reliability
}
-func (m *BACnetNotificationParametersChangeOfReliability) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfReliability) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -112,7 +112,7 @@ func (m *BACnetNotificationParametersChangeOfReliability) GetInnerClosingTag() *
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfReliability factory function for BACnetNotificationParametersChangeOfReliability
-func NewBACnetNotificationParametersChangeOfReliability(innerOpeningTag *BACnetOpeningTag, reliability *BACnetReliabilityTagged, statusFlags *BACnetStatusFlags, propertyValues *BACnetPropertyValues, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfReliability {
+func NewBACnetNotificationParametersChangeOfReliability(innerOpeningTag *BACnetOpeningTag, reliability *BACnetReliabilityTagged, statusFlags *BACnetStatusFlagsTagged, propertyValues *BACnetPropertyValues, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfReliability {
_result := &BACnetNotificationParametersChangeOfReliability{
InnerOpeningTag: innerOpeningTag,
Reliability: reliability,
@@ -213,11 +213,11 @@ func BACnetNotificationParametersChangeOfReliabilityParse(readBuffer utils.ReadB
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -256,7 +256,7 @@ func BACnetNotificationParametersChangeOfReliabilityParse(readBuffer utils.ReadB
_child := &BACnetNotificationParametersChangeOfReliability{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
Reliability: CastBACnetReliabilityTagged(reliability),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
PropertyValues: CastBACnetPropertyValues(propertyValues),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go
index af3380d233..f807591738 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfState.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersChangeOfState struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ChangeOfState *BACnetPropertyStatesEnclosed
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
InnerClosingTag *BACnetClosingTag
// Arguments.
@@ -47,7 +47,7 @@ type IBACnetNotificationParametersChangeOfState interface {
// GetChangeOfState returns ChangeOfState (property field)
GetChangeOfState() *BACnetPropertyStatesEnclosed
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetInnerClosingTag returns InnerClosingTag (property field)
GetInnerClosingTag() *BACnetClosingTag
// GetLengthInBytes returns the length in bytes
@@ -91,7 +91,7 @@ func (m *BACnetNotificationParametersChangeOfState) GetChangeOfState() *BACnetPr
return m.ChangeOfState
}
-func (m *BACnetNotificationParametersChangeOfState) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfState) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -105,7 +105,7 @@ func (m *BACnetNotificationParametersChangeOfState) GetInnerClosingTag() *BACnet
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfState factory function for BACnetNotificationParametersChangeOfState
-func NewBACnetNotificationParametersChangeOfState(innerOpeningTag *BACnetOpeningTag, changeOfState *BACnetPropertyStatesEnclosed, statusFlags *BACnetStatusFlags, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfState {
+func NewBACnetNotificationParametersChangeOfState(innerOpeningTag *BACnetOpeningTag, changeOfState *BACnetPropertyStatesEnclosed, statusFlags *BACnetStatusFlagsTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfState {
_result := &BACnetNotificationParametersChangeOfState{
InnerOpeningTag: innerOpeningTag,
ChangeOfState: changeOfState,
@@ -202,11 +202,11 @@ func BACnetNotificationParametersChangeOfStateParse(readBuffer utils.ReadBuffer,
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -232,7 +232,7 @@ func BACnetNotificationParametersChangeOfStateParse(readBuffer utils.ReadBuffer,
_child := &BACnetNotificationParametersChangeOfState{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ChangeOfState: CastBACnetPropertyStatesEnclosed(changeOfState),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go
index 0553f05236..5146f03be3 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfStatusFlags.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersChangeOfStatusFlags struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
PresentValue *BACnetConstructedData
- ReferencedFlags *BACnetStatusFlags
+ ReferencedFlags *BACnetStatusFlagsTagged
InnerClosingTag *BACnetClosingTag
// Arguments.
@@ -47,7 +47,7 @@ type IBACnetNotificationParametersChangeOfStatusFlags interface {
// GetPresentValue returns PresentValue (property field)
GetPresentValue() *BACnetConstructedData
// GetReferencedFlags returns ReferencedFlags (property field)
- GetReferencedFlags() *BACnetStatusFlags
+ GetReferencedFlags() *BACnetStatusFlagsTagged
// GetInnerClosingTag returns InnerClosingTag (property field)
GetInnerClosingTag() *BACnetClosingTag
// GetLengthInBytes returns the length in bytes
@@ -91,7 +91,7 @@ func (m *BACnetNotificationParametersChangeOfStatusFlags) GetPresentValue() *BAC
return m.PresentValue
}
-func (m *BACnetNotificationParametersChangeOfStatusFlags) GetReferencedFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfStatusFlags) GetReferencedFlags() *BACnetStatusFlagsTagged {
return m.ReferencedFlags
}
@@ -105,7 +105,7 @@ func (m *BACnetNotificationParametersChangeOfStatusFlags) GetInnerClosingTag() *
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfStatusFlags factory function for BACnetNotificationParametersChangeOfStatusFlags
-func NewBACnetNotificationParametersChangeOfStatusFlags(innerOpeningTag *BACnetOpeningTag, presentValue *BACnetConstructedData, referencedFlags *BACnetStatusFlags, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfStatusFlags {
+func NewBACnetNotificationParametersChangeOfStatusFlags(innerOpeningTag *BACnetOpeningTag, presentValue *BACnetConstructedData, referencedFlags *BACnetStatusFlagsTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfStatusFlags {
_result := &BACnetNotificationParametersChangeOfStatusFlags{
InnerOpeningTag: innerOpeningTag,
PresentValue: presentValue,
@@ -202,11 +202,11 @@ func BACnetNotificationParametersChangeOfStatusFlagsParse(readBuffer utils.ReadB
if pullErr := readBuffer.PullContext("referencedFlags"); pullErr != nil {
return nil, pullErr
}
- _referencedFlags, _referencedFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _referencedFlags, _referencedFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _referencedFlagsErr != nil {
return nil, errors.Wrap(_referencedFlagsErr, "Error parsing 'referencedFlags' field")
}
- referencedFlags := CastBACnetStatusFlags(_referencedFlags)
+ referencedFlags := CastBACnetStatusFlagsTagged(_referencedFlags)
if closeErr := readBuffer.CloseContext("referencedFlags"); closeErr != nil {
return nil, closeErr
}
@@ -232,7 +232,7 @@ func BACnetNotificationParametersChangeOfStatusFlagsParse(readBuffer utils.ReadB
_child := &BACnetNotificationParametersChangeOfStatusFlags{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
PresentValue: CastBACnetConstructedData(presentValue),
- ReferencedFlags: CastBACnetStatusFlags(referencedFlags),
+ ReferencedFlags: CastBACnetStatusFlagsTagged(referencedFlags),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go
index 3b4c99de74..80dc2ef21e 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfTimer.go
@@ -32,7 +32,7 @@ type BACnetNotificationParametersChangeOfTimer struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
NewValue *BACnetTimerStateTagged
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
UpdateTime *BACnetDateTimeEnclosed
LastStateChange *BACnetTimerTransitionTagged
InitialTimeout *BACnetContextTagUnsignedInteger
@@ -52,7 +52,7 @@ type IBACnetNotificationParametersChangeOfTimer interface {
// GetNewValue returns NewValue (property field)
GetNewValue() *BACnetTimerStateTagged
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetUpdateTime returns UpdateTime (property field)
GetUpdateTime() *BACnetDateTimeEnclosed
// GetLastStateChange returns LastStateChange (property field)
@@ -104,7 +104,7 @@ func (m *BACnetNotificationParametersChangeOfTimer) GetNewValue() *BACnetTimerSt
return m.NewValue
}
-func (m *BACnetNotificationParametersChangeOfTimer) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfTimer) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -134,7 +134,7 @@ func (m *BACnetNotificationParametersChangeOfTimer) GetInnerClosingTag() *BACnet
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfTimer factory function for BACnetNotificationParametersChangeOfTimer
-func NewBACnetNotificationParametersChangeOfTimer(innerOpeningTag *BACnetOpeningTag, newValue *BACnetTimerStateTagged, statusFlags *BACnetStatusFlags, updateTime *BACnetDateTimeEnclosed, lastStateChange *BACnetTimerTransitionTagged, initialTimeout *BACnetContextTagUnsignedInteger, expirationTime *BACnetDateTimeEnclosed, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectT [...]
+func NewBACnetNotificationParametersChangeOfTimer(innerOpeningTag *BACnetOpeningTag, newValue *BACnetTimerStateTagged, statusFlags *BACnetStatusFlagsTagged, updateTime *BACnetDateTimeEnclosed, lastStateChange *BACnetTimerTransitionTagged, initialTimeout *BACnetContextTagUnsignedInteger, expirationTime *BACnetDateTimeEnclosed, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetO [...]
_result := &BACnetNotificationParametersChangeOfTimer{
InnerOpeningTag: innerOpeningTag,
NewValue: newValue,
@@ -253,11 +253,11 @@ func BACnetNotificationParametersChangeOfTimerParse(readBuffer utils.ReadBuffer,
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -359,7 +359,7 @@ func BACnetNotificationParametersChangeOfTimerParse(readBuffer utils.ReadBuffer,
_child := &BACnetNotificationParametersChangeOfTimer{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
NewValue: CastBACnetTimerStateTagged(newValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
UpdateTime: CastBACnetDateTimeEnclosed(updateTime),
LastStateChange: CastBACnetTimerTransitionTagged(lastStateChange),
InitialTimeout: CastBACnetContextTagUnsignedInteger(initialTimeout),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go
index e83d18343c..c78ba4f4e8 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersChangeOfValue.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersChangeOfValue struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
NewValue *BACnetNotificationParametersChangeOfValueNewValue
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
InnerClosingTag *BACnetClosingTag
// Arguments.
@@ -47,7 +47,7 @@ type IBACnetNotificationParametersChangeOfValue interface {
// GetNewValue returns NewValue (property field)
GetNewValue() *BACnetNotificationParametersChangeOfValueNewValue
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetInnerClosingTag returns InnerClosingTag (property field)
GetInnerClosingTag() *BACnetClosingTag
// GetLengthInBytes returns the length in bytes
@@ -91,7 +91,7 @@ func (m *BACnetNotificationParametersChangeOfValue) GetNewValue() *BACnetNotific
return m.NewValue
}
-func (m *BACnetNotificationParametersChangeOfValue) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersChangeOfValue) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -105,7 +105,7 @@ func (m *BACnetNotificationParametersChangeOfValue) GetInnerClosingTag() *BACnet
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersChangeOfValue factory function for BACnetNotificationParametersChangeOfValue
-func NewBACnetNotificationParametersChangeOfValue(innerOpeningTag *BACnetOpeningTag, newValue *BACnetNotificationParametersChangeOfValueNewValue, statusFlags *BACnetStatusFlags, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfValue {
+func NewBACnetNotificationParametersChangeOfValue(innerOpeningTag *BACnetOpeningTag, newValue *BACnetNotificationParametersChangeOfValueNewValue, statusFlags *BACnetStatusFlagsTagged, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersChangeOfValue {
_result := &BACnetNotificationParametersChangeOfValue{
InnerOpeningTag: innerOpeningTag,
NewValue: newValue,
@@ -202,11 +202,11 @@ func BACnetNotificationParametersChangeOfValueParse(readBuffer utils.ReadBuffer,
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -232,7 +232,7 @@ func BACnetNotificationParametersChangeOfValueParse(readBuffer utils.ReadBuffer,
_child := &BACnetNotificationParametersChangeOfValue{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
NewValue: CastBACnetNotificationParametersChangeOfValueNewValue(newValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go
index 6984e91c68..05188f1554 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersCommandFailure.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersCommandFailure struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
CommandValue *BACnetConstructedData
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
FeedbackValue *BACnetConstructedData
InnerClosingTag *BACnetClosingTag
@@ -48,7 +48,7 @@ type IBACnetNotificationParametersCommandFailure interface {
// GetCommandValue returns CommandValue (property field)
GetCommandValue() *BACnetConstructedData
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetFeedbackValue returns FeedbackValue (property field)
GetFeedbackValue() *BACnetConstructedData
// GetInnerClosingTag returns InnerClosingTag (property field)
@@ -94,7 +94,7 @@ func (m *BACnetNotificationParametersCommandFailure) GetCommandValue() *BACnetCo
return m.CommandValue
}
-func (m *BACnetNotificationParametersCommandFailure) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersCommandFailure) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -112,7 +112,7 @@ func (m *BACnetNotificationParametersCommandFailure) GetInnerClosingTag() *BACne
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersCommandFailure factory function for BACnetNotificationParametersCommandFailure
-func NewBACnetNotificationParametersCommandFailure(innerOpeningTag *BACnetOpeningTag, commandValue *BACnetConstructedData, statusFlags *BACnetStatusFlags, feedbackValue *BACnetConstructedData, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersCommandFailure {
+func NewBACnetNotificationParametersCommandFailure(innerOpeningTag *BACnetOpeningTag, commandValue *BACnetConstructedData, statusFlags *BACnetStatusFlagsTagged, feedbackValue *BACnetConstructedData, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersCommandFailure {
_result := &BACnetNotificationParametersCommandFailure{
InnerOpeningTag: innerOpeningTag,
CommandValue: commandValue,
@@ -213,11 +213,11 @@ func BACnetNotificationParametersCommandFailureParse(readBuffer utils.ReadBuffer
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -256,7 +256,7 @@ func BACnetNotificationParametersCommandFailureParse(readBuffer utils.ReadBuffer
_child := &BACnetNotificationParametersCommandFailure{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
CommandValue: CastBACnetConstructedData(commandValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
FeedbackValue: CastBACnetConstructedData(feedbackValue),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go
index 32691e9321..f57e33a5d5 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersDoubleOutOfRange.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersDoubleOutOfRange struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ExceedingValue *BACnetContextTagDouble
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
Deadband *BACnetContextTagDouble
ExceededLimit *BACnetContextTagDouble
InnerClosingTag *BACnetClosingTag
@@ -49,7 +49,7 @@ type IBACnetNotificationParametersDoubleOutOfRange interface {
// GetExceedingValue returns ExceedingValue (property field)
GetExceedingValue() *BACnetContextTagDouble
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetDeadband returns Deadband (property field)
GetDeadband() *BACnetContextTagDouble
// GetExceededLimit returns ExceededLimit (property field)
@@ -97,7 +97,7 @@ func (m *BACnetNotificationParametersDoubleOutOfRange) GetExceedingValue() *BACn
return m.ExceedingValue
}
-func (m *BACnetNotificationParametersDoubleOutOfRange) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersDoubleOutOfRange) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -119,7 +119,7 @@ func (m *BACnetNotificationParametersDoubleOutOfRange) GetInnerClosingTag() *BAC
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersDoubleOutOfRange factory function for BACnetNotificationParametersDoubleOutOfRange
-func NewBACnetNotificationParametersDoubleOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagDouble, statusFlags *BACnetStatusFlags, deadband *BACnetContextTagDouble, exceededLimit *BACnetContextTagDouble, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersDoubleOutOfRange {
+func NewBACnetNotificationParametersDoubleOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagDouble, statusFlags *BACnetStatusFlagsTagged, deadband *BACnetContextTagDouble, exceededLimit *BACnetContextTagDouble, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersDoubleOutOfRange {
_result := &BACnetNotificationParametersDoubleOutOfRange{
InnerOpeningTag: innerOpeningTag,
ExceedingValue: exceedingValue,
@@ -224,11 +224,11 @@ func BACnetNotificationParametersDoubleOutOfRangeParse(readBuffer utils.ReadBuff
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -280,7 +280,7 @@ func BACnetNotificationParametersDoubleOutOfRangeParse(readBuffer utils.ReadBuff
_child := &BACnetNotificationParametersDoubleOutOfRange{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ExceedingValue: CastBACnetContextTagDouble(exceedingValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
Deadband: CastBACnetContextTagDouble(deadband),
ExceededLimit: CastBACnetContextTagDouble(exceededLimit),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go
index 2f865ffaa6..fa1f239375 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersFloatingLimit.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersFloatingLimit struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ReferenceValue *BACnetContextTagReal
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
SetPointValue *BACnetContextTagReal
ErrorLimit *BACnetContextTagReal
InnerClosingTag *BACnetClosingTag
@@ -49,7 +49,7 @@ type IBACnetNotificationParametersFloatingLimit interface {
// GetReferenceValue returns ReferenceValue (property field)
GetReferenceValue() *BACnetContextTagReal
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetSetPointValue returns SetPointValue (property field)
GetSetPointValue() *BACnetContextTagReal
// GetErrorLimit returns ErrorLimit (property field)
@@ -97,7 +97,7 @@ func (m *BACnetNotificationParametersFloatingLimit) GetReferenceValue() *BACnetC
return m.ReferenceValue
}
-func (m *BACnetNotificationParametersFloatingLimit) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersFloatingLimit) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -119,7 +119,7 @@ func (m *BACnetNotificationParametersFloatingLimit) GetInnerClosingTag() *BACnet
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersFloatingLimit factory function for BACnetNotificationParametersFloatingLimit
-func NewBACnetNotificationParametersFloatingLimit(innerOpeningTag *BACnetOpeningTag, referenceValue *BACnetContextTagReal, statusFlags *BACnetStatusFlags, setPointValue *BACnetContextTagReal, errorLimit *BACnetContextTagReal, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersFloatingLimit {
+func NewBACnetNotificationParametersFloatingLimit(innerOpeningTag *BACnetOpeningTag, referenceValue *BACnetContextTagReal, statusFlags *BACnetStatusFlagsTagged, setPointValue *BACnetContextTagReal, errorLimit *BACnetContextTagReal, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersFloatingLimit {
_result := &BACnetNotificationParametersFloatingLimit{
InnerOpeningTag: innerOpeningTag,
ReferenceValue: referenceValue,
@@ -224,11 +224,11 @@ func BACnetNotificationParametersFloatingLimitParse(readBuffer utils.ReadBuffer,
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -280,7 +280,7 @@ func BACnetNotificationParametersFloatingLimitParse(readBuffer utils.ReadBuffer,
_child := &BACnetNotificationParametersFloatingLimit{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ReferenceValue: CastBACnetContextTagReal(referenceValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
SetPointValue: CastBACnetContextTagReal(setPointValue),
ErrorLimit: CastBACnetContextTagReal(errorLimit),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go
index a3fa898a80..c11af19898 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersOutOfRange.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersOutOfRange struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ExceedingValue *BACnetContextTagReal
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
Deadband *BACnetContextTagReal
ExceededLimit *BACnetContextTagReal
InnerClosingTag *BACnetClosingTag
@@ -49,7 +49,7 @@ type IBACnetNotificationParametersOutOfRange interface {
// GetExceedingValue returns ExceedingValue (property field)
GetExceedingValue() *BACnetContextTagReal
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetDeadband returns Deadband (property field)
GetDeadband() *BACnetContextTagReal
// GetExceededLimit returns ExceededLimit (property field)
@@ -97,7 +97,7 @@ func (m *BACnetNotificationParametersOutOfRange) GetExceedingValue() *BACnetCont
return m.ExceedingValue
}
-func (m *BACnetNotificationParametersOutOfRange) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersOutOfRange) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -119,7 +119,7 @@ func (m *BACnetNotificationParametersOutOfRange) GetInnerClosingTag() *BACnetClo
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersOutOfRange factory function for BACnetNotificationParametersOutOfRange
-func NewBACnetNotificationParametersOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagReal, statusFlags *BACnetStatusFlags, deadband *BACnetContextTagReal, exceededLimit *BACnetContextTagReal, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersOutOfRange {
+func NewBACnetNotificationParametersOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagReal, statusFlags *BACnetStatusFlagsTagged, deadband *BACnetContextTagReal, exceededLimit *BACnetContextTagReal, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersOutOfRange {
_result := &BACnetNotificationParametersOutOfRange{
InnerOpeningTag: innerOpeningTag,
ExceedingValue: exceedingValue,
@@ -224,11 +224,11 @@ func BACnetNotificationParametersOutOfRangeParse(readBuffer utils.ReadBuffer, ta
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -280,7 +280,7 @@ func BACnetNotificationParametersOutOfRangeParse(readBuffer utils.ReadBuffer, ta
_child := &BACnetNotificationParametersOutOfRange{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ExceedingValue: CastBACnetContextTagReal(exceedingValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
Deadband: CastBACnetContextTagReal(deadband),
ExceededLimit: CastBACnetContextTagReal(exceededLimit),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go
index 93add6bf91..87b276b683 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersSignedOutOfRange.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersSignedOutOfRange struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ExceedingValue *BACnetContextTagSignedInteger
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
Deadband *BACnetContextTagUnsignedInteger
ExceededLimit *BACnetContextTagSignedInteger
InnerClosingTag *BACnetClosingTag
@@ -49,7 +49,7 @@ type IBACnetNotificationParametersSignedOutOfRange interface {
// GetExceedingValue returns ExceedingValue (property field)
GetExceedingValue() *BACnetContextTagSignedInteger
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetDeadband returns Deadband (property field)
GetDeadband() *BACnetContextTagUnsignedInteger
// GetExceededLimit returns ExceededLimit (property field)
@@ -97,7 +97,7 @@ func (m *BACnetNotificationParametersSignedOutOfRange) GetExceedingValue() *BACn
return m.ExceedingValue
}
-func (m *BACnetNotificationParametersSignedOutOfRange) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersSignedOutOfRange) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -119,7 +119,7 @@ func (m *BACnetNotificationParametersSignedOutOfRange) GetInnerClosingTag() *BAC
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersSignedOutOfRange factory function for BACnetNotificationParametersSignedOutOfRange
-func NewBACnetNotificationParametersSignedOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagSignedInteger, statusFlags *BACnetStatusFlags, deadband *BACnetContextTagUnsignedInteger, exceededLimit *BACnetContextTagSignedInteger, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersSignedOutOfRange {
+func NewBACnetNotificationParametersSignedOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagSignedInteger, statusFlags *BACnetStatusFlagsTagged, deadband *BACnetContextTagUnsignedInteger, exceededLimit *BACnetContextTagSignedInteger, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersSignedOutOfRange {
_result := &BACnetNotificationParametersSignedOutOfRange{
InnerOpeningTag: innerOpeningTag,
ExceedingValue: exceedingValue,
@@ -224,11 +224,11 @@ func BACnetNotificationParametersSignedOutOfRangeParse(readBuffer utils.ReadBuff
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -280,7 +280,7 @@ func BACnetNotificationParametersSignedOutOfRangeParse(readBuffer utils.ReadBuff
_child := &BACnetNotificationParametersSignedOutOfRange{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ExceedingValue: CastBACnetContextTagSignedInteger(exceedingValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
Deadband: CastBACnetContextTagUnsignedInteger(deadband),
ExceededLimit: CastBACnetContextTagSignedInteger(exceededLimit),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go
index 2e14b23f94..c65cfe5ed4 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedOutOfRange.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersUnsignedOutOfRange struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
ExceedingValue *BACnetContextTagUnsignedInteger
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
Deadband *BACnetContextTagUnsignedInteger
ExceededLimit *BACnetContextTagUnsignedInteger
InnerClosingTag *BACnetClosingTag
@@ -49,7 +49,7 @@ type IBACnetNotificationParametersUnsignedOutOfRange interface {
// GetExceedingValue returns ExceedingValue (property field)
GetExceedingValue() *BACnetContextTagUnsignedInteger
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetDeadband returns Deadband (property field)
GetDeadband() *BACnetContextTagUnsignedInteger
// GetExceededLimit returns ExceededLimit (property field)
@@ -97,7 +97,7 @@ func (m *BACnetNotificationParametersUnsignedOutOfRange) GetExceedingValue() *BA
return m.ExceedingValue
}
-func (m *BACnetNotificationParametersUnsignedOutOfRange) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersUnsignedOutOfRange) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -119,7 +119,7 @@ func (m *BACnetNotificationParametersUnsignedOutOfRange) GetInnerClosingTag() *B
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersUnsignedOutOfRange factory function for BACnetNotificationParametersUnsignedOutOfRange
-func NewBACnetNotificationParametersUnsignedOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagUnsignedInteger, statusFlags *BACnetStatusFlags, deadband *BACnetContextTagUnsignedInteger, exceededLimit *BACnetContextTagUnsignedInteger, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersUnsignedOutOfRange {
+func NewBACnetNotificationParametersUnsignedOutOfRange(innerOpeningTag *BACnetOpeningTag, exceedingValue *BACnetContextTagUnsignedInteger, statusFlags *BACnetStatusFlagsTagged, deadband *BACnetContextTagUnsignedInteger, exceededLimit *BACnetContextTagUnsignedInteger, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersUnsignedOutOfRange {
_result := &BACnetNotificationParametersUnsignedOutOfRange{
InnerOpeningTag: innerOpeningTag,
ExceedingValue: exceedingValue,
@@ -224,11 +224,11 @@ func BACnetNotificationParametersUnsignedOutOfRangeParse(readBuffer utils.ReadBu
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -280,7 +280,7 @@ func BACnetNotificationParametersUnsignedOutOfRangeParse(readBuffer utils.ReadBu
_child := &BACnetNotificationParametersUnsignedOutOfRange{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
ExceedingValue: CastBACnetContextTagUnsignedInteger(exceedingValue),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
Deadband: CastBACnetContextTagUnsignedInteger(deadband),
ExceededLimit: CastBACnetContextTagUnsignedInteger(exceededLimit),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go
index 9b28a84a4c..dc70ba349d 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetNotificationParametersUnsignedRange.go
@@ -31,7 +31,7 @@ type BACnetNotificationParametersUnsignedRange struct {
*BACnetNotificationParameters
InnerOpeningTag *BACnetOpeningTag
SequenceNumber *BACnetContextTagUnsignedInteger
- StatusFlags *BACnetStatusFlags
+ StatusFlags *BACnetStatusFlagsTagged
ExceededLimit *BACnetContextTagUnsignedInteger
InnerClosingTag *BACnetClosingTag
@@ -48,7 +48,7 @@ type IBACnetNotificationParametersUnsignedRange interface {
// GetSequenceNumber returns SequenceNumber (property field)
GetSequenceNumber() *BACnetContextTagUnsignedInteger
// GetStatusFlags returns StatusFlags (property field)
- GetStatusFlags() *BACnetStatusFlags
+ GetStatusFlags() *BACnetStatusFlagsTagged
// GetExceededLimit returns ExceededLimit (property field)
GetExceededLimit() *BACnetContextTagUnsignedInteger
// GetInnerClosingTag returns InnerClosingTag (property field)
@@ -94,7 +94,7 @@ func (m *BACnetNotificationParametersUnsignedRange) GetSequenceNumber() *BACnetC
return m.SequenceNumber
}
-func (m *BACnetNotificationParametersUnsignedRange) GetStatusFlags() *BACnetStatusFlags {
+func (m *BACnetNotificationParametersUnsignedRange) GetStatusFlags() *BACnetStatusFlagsTagged {
return m.StatusFlags
}
@@ -112,7 +112,7 @@ func (m *BACnetNotificationParametersUnsignedRange) GetInnerClosingTag() *BACnet
///////////////////////////////////////////////////////////
// NewBACnetNotificationParametersUnsignedRange factory function for BACnetNotificationParametersUnsignedRange
-func NewBACnetNotificationParametersUnsignedRange(innerOpeningTag *BACnetOpeningTag, sequenceNumber *BACnetContextTagUnsignedInteger, statusFlags *BACnetStatusFlags, exceededLimit *BACnetContextTagUnsignedInteger, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersUnsignedRange {
+func NewBACnetNotificationParametersUnsignedRange(innerOpeningTag *BACnetOpeningTag, sequenceNumber *BACnetContextTagUnsignedInteger, statusFlags *BACnetStatusFlagsTagged, exceededLimit *BACnetContextTagUnsignedInteger, innerClosingTag *BACnetClosingTag, openingTag *BACnetOpeningTag, peekedTagHeader *BACnetTagHeader, closingTag *BACnetClosingTag, tagNumber uint8, objectType BACnetObjectType) *BACnetNotificationParametersUnsignedRange {
_result := &BACnetNotificationParametersUnsignedRange{
InnerOpeningTag: innerOpeningTag,
SequenceNumber: sequenceNumber,
@@ -213,11 +213,11 @@ func BACnetNotificationParametersUnsignedRangeParse(readBuffer utils.ReadBuffer,
if pullErr := readBuffer.PullContext("statusFlags"); pullErr != nil {
return nil, pullErr
}
- _statusFlags, _statusFlagsErr := BACnetStatusFlagsParse(readBuffer, uint8(uint8(1)))
+ _statusFlags, _statusFlagsErr := BACnetStatusFlagsTaggedParse(readBuffer, uint8(uint8(1)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _statusFlagsErr != nil {
return nil, errors.Wrap(_statusFlagsErr, "Error parsing 'statusFlags' field")
}
- statusFlags := CastBACnetStatusFlags(_statusFlags)
+ statusFlags := CastBACnetStatusFlagsTagged(_statusFlags)
if closeErr := readBuffer.CloseContext("statusFlags"); closeErr != nil {
return nil, closeErr
}
@@ -256,7 +256,7 @@ func BACnetNotificationParametersUnsignedRangeParse(readBuffer utils.ReadBuffer,
_child := &BACnetNotificationParametersUnsignedRange{
InnerOpeningTag: CastBACnetOpeningTag(innerOpeningTag),
SequenceNumber: CastBACnetContextTagUnsignedInteger(sequenceNumber),
- StatusFlags: CastBACnetStatusFlags(statusFlags),
+ StatusFlags: CastBACnetStatusFlagsTagged(statusFlags),
ExceededLimit: CastBACnetContextTagUnsignedInteger(exceededLimit),
InnerClosingTag: CastBACnetClosingTag(innerClosingTag),
BACnetNotificationParameters: &BACnetNotificationParameters{},
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go
new file mode 100644
index 0000000000..cbf315cf7e
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetObjectTypesSupported.go
@@ -0,0 +1,586 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetObjectTypesSupported is an enum
+type BACnetObjectTypesSupported uint8
+
+type IBACnetObjectTypesSupported interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ BACnetObjectTypesSupported_ANALOG_INPUT BACnetObjectTypesSupported = 0
+ BACnetObjectTypesSupported_ANALOG_OUTPUT BACnetObjectTypesSupported = 1
+ BACnetObjectTypesSupported_ANALOG_VALUE BACnetObjectTypesSupported = 2
+ BACnetObjectTypesSupported_BINARY_INPUT BACnetObjectTypesSupported = 3
+ BACnetObjectTypesSupported_BINARY_OUTPUT BACnetObjectTypesSupported = 4
+ BACnetObjectTypesSupported_BINARY_VALUE BACnetObjectTypesSupported = 5
+ BACnetObjectTypesSupported_CALENDAR BACnetObjectTypesSupported = 6
+ BACnetObjectTypesSupported_COMMAND BACnetObjectTypesSupported = 7
+ BACnetObjectTypesSupported_DEVICE BACnetObjectTypesSupported = 8
+ BACnetObjectTypesSupported_EVENT_ENROLLMENT BACnetObjectTypesSupported = 9
+ BACnetObjectTypesSupported_FILE BACnetObjectTypesSupported = 10
+ BACnetObjectTypesSupported_GROUP BACnetObjectTypesSupported = 11
+ BACnetObjectTypesSupported_LOOP BACnetObjectTypesSupported = 12
+ BACnetObjectTypesSupported_MULTI_STATE_INPUT BACnetObjectTypesSupported = 13
+ BACnetObjectTypesSupported_MULTI_STATE_OUTPUT BACnetObjectTypesSupported = 14
+ BACnetObjectTypesSupported_NOTIFICATION_CLASS BACnetObjectTypesSupported = 15
+ BACnetObjectTypesSupported_PROGRAM BACnetObjectTypesSupported = 16
+ BACnetObjectTypesSupported_SCHEDULE BACnetObjectTypesSupported = 17
+ BACnetObjectTypesSupported_AVERAGING BACnetObjectTypesSupported = 18
+ BACnetObjectTypesSupported_MULTI_STATE_VALUE BACnetObjectTypesSupported = 19
+ BACnetObjectTypesSupported_TREND_LOG BACnetObjectTypesSupported = 20
+ BACnetObjectTypesSupported_LIFE_SAFETY_POINT BACnetObjectTypesSupported = 21
+ BACnetObjectTypesSupported_LIFE_SAFETY_ZONE BACnetObjectTypesSupported = 22
+ BACnetObjectTypesSupported_ACCUMULATOR BACnetObjectTypesSupported = 23
+ BACnetObjectTypesSupported_PULSE_CONVERTER BACnetObjectTypesSupported = 24
+ BACnetObjectTypesSupported_EVENT_LOG BACnetObjectTypesSupported = 25
+ BACnetObjectTypesSupported_GLOBAL_GROUP BACnetObjectTypesSupported = 26
+ BACnetObjectTypesSupported_TREND_LOG_MULTIPLE BACnetObjectTypesSupported = 27
+ BACnetObjectTypesSupported_LOAD_CONTROL BACnetObjectTypesSupported = 28
+ BACnetObjectTypesSupported_STRUCTURED_VIEW BACnetObjectTypesSupported = 29
+ BACnetObjectTypesSupported_ACCESS_DOOR BACnetObjectTypesSupported = 30
+ BACnetObjectTypesSupported_TIMER BACnetObjectTypesSupported = 31
+ BACnetObjectTypesSupported_ACCESS_CREDENTIAL BACnetObjectTypesSupported = 32
+ BACnetObjectTypesSupported_ACCESS_POINT BACnetObjectTypesSupported = 33
+ BACnetObjectTypesSupported_ACCESS_RIGHTS BACnetObjectTypesSupported = 34
+ BACnetObjectTypesSupported_ACCESS_USER BACnetObjectTypesSupported = 35
+ BACnetObjectTypesSupported_ACCESS_ZONE BACnetObjectTypesSupported = 36
+ BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT BACnetObjectTypesSupported = 37
+ BACnetObjectTypesSupported_NETWORK_SECURITY BACnetObjectTypesSupported = 38
+ BACnetObjectTypesSupported_BITSTRING_VALUE BACnetObjectTypesSupported = 39
+ BACnetObjectTypesSupported_CHARACTERSTRING_VALUE BACnetObjectTypesSupported = 40
+ BACnetObjectTypesSupported_DATEPATTERN_VALUE BACnetObjectTypesSupported = 41
+ BACnetObjectTypesSupported_DATE_VALUE BACnetObjectTypesSupported = 42
+ BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE BACnetObjectTypesSupported = 43
+ BACnetObjectTypesSupported_DATETIME_VALUE BACnetObjectTypesSupported = 44
+ BACnetObjectTypesSupported_INTEGER_VALUE BACnetObjectTypesSupported = 45
+ BACnetObjectTypesSupported_LARGE_ANALOG_VALUE BACnetObjectTypesSupported = 46
+ BACnetObjectTypesSupported_OCTETSTRING_VALUE BACnetObjectTypesSupported = 47
+ BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE BACnetObjectTypesSupported = 48
+ BACnetObjectTypesSupported_TIMEPATTERN_VALUE BACnetObjectTypesSupported = 49
+ BACnetObjectTypesSupported_TIME_VALUE BACnetObjectTypesSupported = 50
+ BACnetObjectTypesSupported_NOTIFICATION_FORWARDER BACnetObjectTypesSupported = 51
+ BACnetObjectTypesSupported_ALERT_ENROLLMENT BACnetObjectTypesSupported = 52
+ BACnetObjectTypesSupported_CHANNEL BACnetObjectTypesSupported = 53
+ BACnetObjectTypesSupported_LIGHTING_OUTPUT BACnetObjectTypesSupported = 54
+ BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT BACnetObjectTypesSupported = 55
+ BACnetObjectTypesSupported_NETWORK_PORT BACnetObjectTypesSupported = 56
+ BACnetObjectTypesSupported_ELEVATOR_GROUP BACnetObjectTypesSupported = 57
+ BACnetObjectTypesSupported_ESCALATOR BACnetObjectTypesSupported = 58
+ BACnetObjectTypesSupported_LIFT BACnetObjectTypesSupported = 59
+)
+
+var BACnetObjectTypesSupportedValues []BACnetObjectTypesSupported
+
+func init() {
+ _ = errors.New
+ BACnetObjectTypesSupportedValues = []BACnetObjectTypesSupported{
+ BACnetObjectTypesSupported_ANALOG_INPUT,
+ BACnetObjectTypesSupported_ANALOG_OUTPUT,
+ BACnetObjectTypesSupported_ANALOG_VALUE,
+ BACnetObjectTypesSupported_BINARY_INPUT,
+ BACnetObjectTypesSupported_BINARY_OUTPUT,
+ BACnetObjectTypesSupported_BINARY_VALUE,
+ BACnetObjectTypesSupported_CALENDAR,
+ BACnetObjectTypesSupported_COMMAND,
+ BACnetObjectTypesSupported_DEVICE,
+ BACnetObjectTypesSupported_EVENT_ENROLLMENT,
+ BACnetObjectTypesSupported_FILE,
+ BACnetObjectTypesSupported_GROUP,
+ BACnetObjectTypesSupported_LOOP,
+ BACnetObjectTypesSupported_MULTI_STATE_INPUT,
+ BACnetObjectTypesSupported_MULTI_STATE_OUTPUT,
+ BACnetObjectTypesSupported_NOTIFICATION_CLASS,
+ BACnetObjectTypesSupported_PROGRAM,
+ BACnetObjectTypesSupported_SCHEDULE,
+ BACnetObjectTypesSupported_AVERAGING,
+ BACnetObjectTypesSupported_MULTI_STATE_VALUE,
+ BACnetObjectTypesSupported_TREND_LOG,
+ BACnetObjectTypesSupported_LIFE_SAFETY_POINT,
+ BACnetObjectTypesSupported_LIFE_SAFETY_ZONE,
+ BACnetObjectTypesSupported_ACCUMULATOR,
+ BACnetObjectTypesSupported_PULSE_CONVERTER,
+ BACnetObjectTypesSupported_EVENT_LOG,
+ BACnetObjectTypesSupported_GLOBAL_GROUP,
+ BACnetObjectTypesSupported_TREND_LOG_MULTIPLE,
+ BACnetObjectTypesSupported_LOAD_CONTROL,
+ BACnetObjectTypesSupported_STRUCTURED_VIEW,
+ BACnetObjectTypesSupported_ACCESS_DOOR,
+ BACnetObjectTypesSupported_TIMER,
+ BACnetObjectTypesSupported_ACCESS_CREDENTIAL,
+ BACnetObjectTypesSupported_ACCESS_POINT,
+ BACnetObjectTypesSupported_ACCESS_RIGHTS,
+ BACnetObjectTypesSupported_ACCESS_USER,
+ BACnetObjectTypesSupported_ACCESS_ZONE,
+ BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT,
+ BACnetObjectTypesSupported_NETWORK_SECURITY,
+ BACnetObjectTypesSupported_BITSTRING_VALUE,
+ BACnetObjectTypesSupported_CHARACTERSTRING_VALUE,
+ BACnetObjectTypesSupported_DATEPATTERN_VALUE,
+ BACnetObjectTypesSupported_DATE_VALUE,
+ BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE,
+ BACnetObjectTypesSupported_DATETIME_VALUE,
+ BACnetObjectTypesSupported_INTEGER_VALUE,
+ BACnetObjectTypesSupported_LARGE_ANALOG_VALUE,
+ BACnetObjectTypesSupported_OCTETSTRING_VALUE,
+ BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE,
+ BACnetObjectTypesSupported_TIMEPATTERN_VALUE,
+ BACnetObjectTypesSupported_TIME_VALUE,
+ BACnetObjectTypesSupported_NOTIFICATION_FORWARDER,
+ BACnetObjectTypesSupported_ALERT_ENROLLMENT,
+ BACnetObjectTypesSupported_CHANNEL,
+ BACnetObjectTypesSupported_LIGHTING_OUTPUT,
+ BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT,
+ BACnetObjectTypesSupported_NETWORK_PORT,
+ BACnetObjectTypesSupported_ELEVATOR_GROUP,
+ BACnetObjectTypesSupported_ESCALATOR,
+ BACnetObjectTypesSupported_LIFT,
+ }
+}
+
+func BACnetObjectTypesSupportedByValue(value uint8) BACnetObjectTypesSupported {
+ switch value {
+ case 0:
+ return BACnetObjectTypesSupported_ANALOG_INPUT
+ case 1:
+ return BACnetObjectTypesSupported_ANALOG_OUTPUT
+ case 10:
+ return BACnetObjectTypesSupported_FILE
+ case 11:
+ return BACnetObjectTypesSupported_GROUP
+ case 12:
+ return BACnetObjectTypesSupported_LOOP
+ case 13:
+ return BACnetObjectTypesSupported_MULTI_STATE_INPUT
+ case 14:
+ return BACnetObjectTypesSupported_MULTI_STATE_OUTPUT
+ case 15:
+ return BACnetObjectTypesSupported_NOTIFICATION_CLASS
+ case 16:
+ return BACnetObjectTypesSupported_PROGRAM
+ case 17:
+ return BACnetObjectTypesSupported_SCHEDULE
+ case 18:
+ return BACnetObjectTypesSupported_AVERAGING
+ case 19:
+ return BACnetObjectTypesSupported_MULTI_STATE_VALUE
+ case 2:
+ return BACnetObjectTypesSupported_ANALOG_VALUE
+ case 20:
+ return BACnetObjectTypesSupported_TREND_LOG
+ case 21:
+ return BACnetObjectTypesSupported_LIFE_SAFETY_POINT
+ case 22:
+ return BACnetObjectTypesSupported_LIFE_SAFETY_ZONE
+ case 23:
+ return BACnetObjectTypesSupported_ACCUMULATOR
+ case 24:
+ return BACnetObjectTypesSupported_PULSE_CONVERTER
+ case 25:
+ return BACnetObjectTypesSupported_EVENT_LOG
+ case 26:
+ return BACnetObjectTypesSupported_GLOBAL_GROUP
+ case 27:
+ return BACnetObjectTypesSupported_TREND_LOG_MULTIPLE
+ case 28:
+ return BACnetObjectTypesSupported_LOAD_CONTROL
+ case 29:
+ return BACnetObjectTypesSupported_STRUCTURED_VIEW
+ case 3:
+ return BACnetObjectTypesSupported_BINARY_INPUT
+ case 30:
+ return BACnetObjectTypesSupported_ACCESS_DOOR
+ case 31:
+ return BACnetObjectTypesSupported_TIMER
+ case 32:
+ return BACnetObjectTypesSupported_ACCESS_CREDENTIAL
+ case 33:
+ return BACnetObjectTypesSupported_ACCESS_POINT
+ case 34:
+ return BACnetObjectTypesSupported_ACCESS_RIGHTS
+ case 35:
+ return BACnetObjectTypesSupported_ACCESS_USER
+ case 36:
+ return BACnetObjectTypesSupported_ACCESS_ZONE
+ case 37:
+ return BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT
+ case 38:
+ return BACnetObjectTypesSupported_NETWORK_SECURITY
+ case 39:
+ return BACnetObjectTypesSupported_BITSTRING_VALUE
+ case 4:
+ return BACnetObjectTypesSupported_BINARY_OUTPUT
+ case 40:
+ return BACnetObjectTypesSupported_CHARACTERSTRING_VALUE
+ case 41:
+ return BACnetObjectTypesSupported_DATEPATTERN_VALUE
+ case 42:
+ return BACnetObjectTypesSupported_DATE_VALUE
+ case 43:
+ return BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE
+ case 44:
+ return BACnetObjectTypesSupported_DATETIME_VALUE
+ case 45:
+ return BACnetObjectTypesSupported_INTEGER_VALUE
+ case 46:
+ return BACnetObjectTypesSupported_LARGE_ANALOG_VALUE
+ case 47:
+ return BACnetObjectTypesSupported_OCTETSTRING_VALUE
+ case 48:
+ return BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE
+ case 49:
+ return BACnetObjectTypesSupported_TIMEPATTERN_VALUE
+ case 5:
+ return BACnetObjectTypesSupported_BINARY_VALUE
+ case 50:
+ return BACnetObjectTypesSupported_TIME_VALUE
+ case 51:
+ return BACnetObjectTypesSupported_NOTIFICATION_FORWARDER
+ case 52:
+ return BACnetObjectTypesSupported_ALERT_ENROLLMENT
+ case 53:
+ return BACnetObjectTypesSupported_CHANNEL
+ case 54:
+ return BACnetObjectTypesSupported_LIGHTING_OUTPUT
+ case 55:
+ return BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT
+ case 56:
+ return BACnetObjectTypesSupported_NETWORK_PORT
+ case 57:
+ return BACnetObjectTypesSupported_ELEVATOR_GROUP
+ case 58:
+ return BACnetObjectTypesSupported_ESCALATOR
+ case 59:
+ return BACnetObjectTypesSupported_LIFT
+ case 6:
+ return BACnetObjectTypesSupported_CALENDAR
+ case 7:
+ return BACnetObjectTypesSupported_COMMAND
+ case 8:
+ return BACnetObjectTypesSupported_DEVICE
+ case 9:
+ return BACnetObjectTypesSupported_EVENT_ENROLLMENT
+ }
+ return 0
+}
+
+func BACnetObjectTypesSupportedByName(value string) BACnetObjectTypesSupported {
+ switch value {
+ case "ANALOG_INPUT":
+ return BACnetObjectTypesSupported_ANALOG_INPUT
+ case "ANALOG_OUTPUT":
+ return BACnetObjectTypesSupported_ANALOG_OUTPUT
+ case "FILE":
+ return BACnetObjectTypesSupported_FILE
+ case "GROUP":
+ return BACnetObjectTypesSupported_GROUP
+ case "LOOP":
+ return BACnetObjectTypesSupported_LOOP
+ case "MULTI_STATE_INPUT":
+ return BACnetObjectTypesSupported_MULTI_STATE_INPUT
+ case "MULTI_STATE_OUTPUT":
+ return BACnetObjectTypesSupported_MULTI_STATE_OUTPUT
+ case "NOTIFICATION_CLASS":
+ return BACnetObjectTypesSupported_NOTIFICATION_CLASS
+ case "PROGRAM":
+ return BACnetObjectTypesSupported_PROGRAM
+ case "SCHEDULE":
+ return BACnetObjectTypesSupported_SCHEDULE
+ case "AVERAGING":
+ return BACnetObjectTypesSupported_AVERAGING
+ case "MULTI_STATE_VALUE":
+ return BACnetObjectTypesSupported_MULTI_STATE_VALUE
+ case "ANALOG_VALUE":
+ return BACnetObjectTypesSupported_ANALOG_VALUE
+ case "TREND_LOG":
+ return BACnetObjectTypesSupported_TREND_LOG
+ case "LIFE_SAFETY_POINT":
+ return BACnetObjectTypesSupported_LIFE_SAFETY_POINT
+ case "LIFE_SAFETY_ZONE":
+ return BACnetObjectTypesSupported_LIFE_SAFETY_ZONE
+ case "ACCUMULATOR":
+ return BACnetObjectTypesSupported_ACCUMULATOR
+ case "PULSE_CONVERTER":
+ return BACnetObjectTypesSupported_PULSE_CONVERTER
+ case "EVENT_LOG":
+ return BACnetObjectTypesSupported_EVENT_LOG
+ case "GLOBAL_GROUP":
+ return BACnetObjectTypesSupported_GLOBAL_GROUP
+ case "TREND_LOG_MULTIPLE":
+ return BACnetObjectTypesSupported_TREND_LOG_MULTIPLE
+ case "LOAD_CONTROL":
+ return BACnetObjectTypesSupported_LOAD_CONTROL
+ case "STRUCTURED_VIEW":
+ return BACnetObjectTypesSupported_STRUCTURED_VIEW
+ case "BINARY_INPUT":
+ return BACnetObjectTypesSupported_BINARY_INPUT
+ case "ACCESS_DOOR":
+ return BACnetObjectTypesSupported_ACCESS_DOOR
+ case "TIMER":
+ return BACnetObjectTypesSupported_TIMER
+ case "ACCESS_CREDENTIAL":
+ return BACnetObjectTypesSupported_ACCESS_CREDENTIAL
+ case "ACCESS_POINT":
+ return BACnetObjectTypesSupported_ACCESS_POINT
+ case "ACCESS_RIGHTS":
+ return BACnetObjectTypesSupported_ACCESS_RIGHTS
+ case "ACCESS_USER":
+ return BACnetObjectTypesSupported_ACCESS_USER
+ case "ACCESS_ZONE":
+ return BACnetObjectTypesSupported_ACCESS_ZONE
+ case "CREDENTIAL_DATA_INPUT":
+ return BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT
+ case "NETWORK_SECURITY":
+ return BACnetObjectTypesSupported_NETWORK_SECURITY
+ case "BITSTRING_VALUE":
+ return BACnetObjectTypesSupported_BITSTRING_VALUE
+ case "BINARY_OUTPUT":
+ return BACnetObjectTypesSupported_BINARY_OUTPUT
+ case "CHARACTERSTRING_VALUE":
+ return BACnetObjectTypesSupported_CHARACTERSTRING_VALUE
+ case "DATEPATTERN_VALUE":
+ return BACnetObjectTypesSupported_DATEPATTERN_VALUE
+ case "DATE_VALUE":
+ return BACnetObjectTypesSupported_DATE_VALUE
+ case "DATETIMEPATTERN_VALUE":
+ return BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE
+ case "DATETIME_VALUE":
+ return BACnetObjectTypesSupported_DATETIME_VALUE
+ case "INTEGER_VALUE":
+ return BACnetObjectTypesSupported_INTEGER_VALUE
+ case "LARGE_ANALOG_VALUE":
+ return BACnetObjectTypesSupported_LARGE_ANALOG_VALUE
+ case "OCTETSTRING_VALUE":
+ return BACnetObjectTypesSupported_OCTETSTRING_VALUE
+ case "POSITIVE_INTEGER_VALUE":
+ return BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE
+ case "TIMEPATTERN_VALUE":
+ return BACnetObjectTypesSupported_TIMEPATTERN_VALUE
+ case "BINARY_VALUE":
+ return BACnetObjectTypesSupported_BINARY_VALUE
+ case "TIME_VALUE":
+ return BACnetObjectTypesSupported_TIME_VALUE
+ case "NOTIFICATION_FORWARDER":
+ return BACnetObjectTypesSupported_NOTIFICATION_FORWARDER
+ case "ALERT_ENROLLMENT":
+ return BACnetObjectTypesSupported_ALERT_ENROLLMENT
+ case "CHANNEL":
+ return BACnetObjectTypesSupported_CHANNEL
+ case "LIGHTING_OUTPUT":
+ return BACnetObjectTypesSupported_LIGHTING_OUTPUT
+ case "BINARY_LIGHTING_OUTPUT":
+ return BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT
+ case "NETWORK_PORT":
+ return BACnetObjectTypesSupported_NETWORK_PORT
+ case "ELEVATOR_GROUP":
+ return BACnetObjectTypesSupported_ELEVATOR_GROUP
+ case "ESCALATOR":
+ return BACnetObjectTypesSupported_ESCALATOR
+ case "LIFT":
+ return BACnetObjectTypesSupported_LIFT
+ case "CALENDAR":
+ return BACnetObjectTypesSupported_CALENDAR
+ case "COMMAND":
+ return BACnetObjectTypesSupported_COMMAND
+ case "DEVICE":
+ return BACnetObjectTypesSupported_DEVICE
+ case "EVENT_ENROLLMENT":
+ return BACnetObjectTypesSupported_EVENT_ENROLLMENT
+ }
+ return 0
+}
+
+func BACnetObjectTypesSupportedKnows(value uint8) bool {
+ for _, typeValue := range BACnetObjectTypesSupportedValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastBACnetObjectTypesSupported(structType interface{}) BACnetObjectTypesSupported {
+ castFunc := func(typ interface{}) BACnetObjectTypesSupported {
+ if sBACnetObjectTypesSupported, ok := typ.(BACnetObjectTypesSupported); ok {
+ return sBACnetObjectTypesSupported
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m BACnetObjectTypesSupported) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m BACnetObjectTypesSupported) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetObjectTypesSupportedParse(readBuffer utils.ReadBuffer) (BACnetObjectTypesSupported, error) {
+ val, err := readBuffer.ReadUint8("BACnetObjectTypesSupported", 8)
+ if err != nil {
+ return 0, nil
+ }
+ return BACnetObjectTypesSupportedByValue(val), nil
+}
+
+func (e BACnetObjectTypesSupported) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetObjectTypesSupported", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
+
+func (e BACnetObjectTypesSupported) name() string {
+ switch e {
+ case BACnetObjectTypesSupported_ANALOG_INPUT:
+ return "ANALOG_INPUT"
+ case BACnetObjectTypesSupported_ANALOG_OUTPUT:
+ return "ANALOG_OUTPUT"
+ case BACnetObjectTypesSupported_FILE:
+ return "FILE"
+ case BACnetObjectTypesSupported_GROUP:
+ return "GROUP"
+ case BACnetObjectTypesSupported_LOOP:
+ return "LOOP"
+ case BACnetObjectTypesSupported_MULTI_STATE_INPUT:
+ return "MULTI_STATE_INPUT"
+ case BACnetObjectTypesSupported_MULTI_STATE_OUTPUT:
+ return "MULTI_STATE_OUTPUT"
+ case BACnetObjectTypesSupported_NOTIFICATION_CLASS:
+ return "NOTIFICATION_CLASS"
+ case BACnetObjectTypesSupported_PROGRAM:
+ return "PROGRAM"
+ case BACnetObjectTypesSupported_SCHEDULE:
+ return "SCHEDULE"
+ case BACnetObjectTypesSupported_AVERAGING:
+ return "AVERAGING"
+ case BACnetObjectTypesSupported_MULTI_STATE_VALUE:
+ return "MULTI_STATE_VALUE"
+ case BACnetObjectTypesSupported_ANALOG_VALUE:
+ return "ANALOG_VALUE"
+ case BACnetObjectTypesSupported_TREND_LOG:
+ return "TREND_LOG"
+ case BACnetObjectTypesSupported_LIFE_SAFETY_POINT:
+ return "LIFE_SAFETY_POINT"
+ case BACnetObjectTypesSupported_LIFE_SAFETY_ZONE:
+ return "LIFE_SAFETY_ZONE"
+ case BACnetObjectTypesSupported_ACCUMULATOR:
+ return "ACCUMULATOR"
+ case BACnetObjectTypesSupported_PULSE_CONVERTER:
+ return "PULSE_CONVERTER"
+ case BACnetObjectTypesSupported_EVENT_LOG:
+ return "EVENT_LOG"
+ case BACnetObjectTypesSupported_GLOBAL_GROUP:
+ return "GLOBAL_GROUP"
+ case BACnetObjectTypesSupported_TREND_LOG_MULTIPLE:
+ return "TREND_LOG_MULTIPLE"
+ case BACnetObjectTypesSupported_LOAD_CONTROL:
+ return "LOAD_CONTROL"
+ case BACnetObjectTypesSupported_STRUCTURED_VIEW:
+ return "STRUCTURED_VIEW"
+ case BACnetObjectTypesSupported_BINARY_INPUT:
+ return "BINARY_INPUT"
+ case BACnetObjectTypesSupported_ACCESS_DOOR:
+ return "ACCESS_DOOR"
+ case BACnetObjectTypesSupported_TIMER:
+ return "TIMER"
+ case BACnetObjectTypesSupported_ACCESS_CREDENTIAL:
+ return "ACCESS_CREDENTIAL"
+ case BACnetObjectTypesSupported_ACCESS_POINT:
+ return "ACCESS_POINT"
+ case BACnetObjectTypesSupported_ACCESS_RIGHTS:
+ return "ACCESS_RIGHTS"
+ case BACnetObjectTypesSupported_ACCESS_USER:
+ return "ACCESS_USER"
+ case BACnetObjectTypesSupported_ACCESS_ZONE:
+ return "ACCESS_ZONE"
+ case BACnetObjectTypesSupported_CREDENTIAL_DATA_INPUT:
+ return "CREDENTIAL_DATA_INPUT"
+ case BACnetObjectTypesSupported_NETWORK_SECURITY:
+ return "NETWORK_SECURITY"
+ case BACnetObjectTypesSupported_BITSTRING_VALUE:
+ return "BITSTRING_VALUE"
+ case BACnetObjectTypesSupported_BINARY_OUTPUT:
+ return "BINARY_OUTPUT"
+ case BACnetObjectTypesSupported_CHARACTERSTRING_VALUE:
+ return "CHARACTERSTRING_VALUE"
+ case BACnetObjectTypesSupported_DATEPATTERN_VALUE:
+ return "DATEPATTERN_VALUE"
+ case BACnetObjectTypesSupported_DATE_VALUE:
+ return "DATE_VALUE"
+ case BACnetObjectTypesSupported_DATETIMEPATTERN_VALUE:
+ return "DATETIMEPATTERN_VALUE"
+ case BACnetObjectTypesSupported_DATETIME_VALUE:
+ return "DATETIME_VALUE"
+ case BACnetObjectTypesSupported_INTEGER_VALUE:
+ return "INTEGER_VALUE"
+ case BACnetObjectTypesSupported_LARGE_ANALOG_VALUE:
+ return "LARGE_ANALOG_VALUE"
+ case BACnetObjectTypesSupported_OCTETSTRING_VALUE:
+ return "OCTETSTRING_VALUE"
+ case BACnetObjectTypesSupported_POSITIVE_INTEGER_VALUE:
+ return "POSITIVE_INTEGER_VALUE"
+ case BACnetObjectTypesSupported_TIMEPATTERN_VALUE:
+ return "TIMEPATTERN_VALUE"
+ case BACnetObjectTypesSupported_BINARY_VALUE:
+ return "BINARY_VALUE"
+ case BACnetObjectTypesSupported_TIME_VALUE:
+ return "TIME_VALUE"
+ case BACnetObjectTypesSupported_NOTIFICATION_FORWARDER:
+ return "NOTIFICATION_FORWARDER"
+ case BACnetObjectTypesSupported_ALERT_ENROLLMENT:
+ return "ALERT_ENROLLMENT"
+ case BACnetObjectTypesSupported_CHANNEL:
+ return "CHANNEL"
+ case BACnetObjectTypesSupported_LIGHTING_OUTPUT:
+ return "LIGHTING_OUTPUT"
+ case BACnetObjectTypesSupported_BINARY_LIGHTING_OUTPUT:
+ return "BINARY_LIGHTING_OUTPUT"
+ case BACnetObjectTypesSupported_NETWORK_PORT:
+ return "NETWORK_PORT"
+ case BACnetObjectTypesSupported_ELEVATOR_GROUP:
+ return "ELEVATOR_GROUP"
+ case BACnetObjectTypesSupported_ESCALATOR:
+ return "ESCALATOR"
+ case BACnetObjectTypesSupported_LIFT:
+ return "LIFT"
+ case BACnetObjectTypesSupported_CALENDAR:
+ return "CALENDAR"
+ case BACnetObjectTypesSupported_COMMAND:
+ return "COMMAND"
+ case BACnetObjectTypesSupported_DEVICE:
+ return "DEVICE"
+ case BACnetObjectTypesSupported_EVENT_ENROLLMENT:
+ return "EVENT_ENROLLMENT"
+ }
+ return ""
+}
+
+func (e BACnetObjectTypesSupported) String() string {
+ return e.name()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go
index b8e3e5c28e..f6164ede17 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlags.go
@@ -26,198 +26,105 @@ import (
// Code generated by code-generation. DO NOT EDIT.
-// BACnetResultFlags is the data-structure of this message
-type BACnetResultFlags struct {
- RawBits *BACnetContextTagBitString
+// BACnetResultFlags is an enum
+type BACnetResultFlags uint8
- // Arguments.
- TagNumber uint8
-}
-
-// IBACnetResultFlags is the corresponding interface of BACnetResultFlags
type IBACnetResultFlags interface {
- // GetRawBits returns RawBits (property field)
- GetRawBits() *BACnetContextTagBitString
- // GetFirstItem returns FirstItem (virtual field)
- GetFirstItem() bool
- // GetLastItem returns LastItem (virtual field)
- GetLastItem() bool
- // GetMoreItems returns MoreItems (virtual field)
- GetMoreItems() bool
- // GetLengthInBytes returns the length in bytes
- GetLengthInBytes() uint16
- // GetLengthInBits returns the length in bits
- GetLengthInBits() uint16
- // Serialize serializes this type
Serialize(writeBuffer utils.WriteBuffer) error
}
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *BACnetResultFlags) GetRawBits() *BACnetContextTagBitString {
- return m.RawBits
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for virtual fields.
-///////////////////////
-
-func (m *BACnetResultFlags) GetFirstItem() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[0])
-}
+const (
+ BACnetResultFlags_FIRST_ITEM BACnetResultFlags = 0
+ BACnetResultFlags_LAST_ITEM BACnetResultFlags = 1
+ BACnetResultFlags_MORE_ITEMS BACnetResultFlags = 2
+)
-func (m *BACnetResultFlags) GetLastItem() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[1])
-}
+var BACnetResultFlagsValues []BACnetResultFlags
-func (m *BACnetResultFlags) GetMoreItems() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[2])
+func init() {
+ _ = errors.New
+ BACnetResultFlagsValues = []BACnetResultFlags{
+ BACnetResultFlags_FIRST_ITEM,
+ BACnetResultFlags_LAST_ITEM,
+ BACnetResultFlags_MORE_ITEMS,
+ }
}
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewBACnetResultFlags factory function for BACnetResultFlags
-func NewBACnetResultFlags(rawBits *BACnetContextTagBitString, tagNumber uint8) *BACnetResultFlags {
- return &BACnetResultFlags{RawBits: rawBits, TagNumber: tagNumber}
+func BACnetResultFlagsByValue(value uint8) BACnetResultFlags {
+ switch value {
+ case 0:
+ return BACnetResultFlags_FIRST_ITEM
+ case 1:
+ return BACnetResultFlags_LAST_ITEM
+ case 2:
+ return BACnetResultFlags_MORE_ITEMS
+ }
+ return 0
}
-func CastBACnetResultFlags(structType interface{}) *BACnetResultFlags {
- if casted, ok := structType.(BACnetResultFlags); ok {
- return &casted
- }
- if casted, ok := structType.(*BACnetResultFlags); ok {
- return casted
+func BACnetResultFlagsByName(value string) BACnetResultFlags {
+ switch value {
+ case "FIRST_ITEM":
+ return BACnetResultFlags_FIRST_ITEM
+ case "LAST_ITEM":
+ return BACnetResultFlags_LAST_ITEM
+ case "MORE_ITEMS":
+ return BACnetResultFlags_MORE_ITEMS
}
- return nil
+ return 0
}
-func (m *BACnetResultFlags) GetTypeName() string {
- return "BACnetResultFlags"
+func BACnetResultFlagsKnows(value uint8) bool {
+ for _, typeValue := range BACnetResultFlagsValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
}
-func (m *BACnetResultFlags) GetLengthInBits() uint16 {
- return m.GetLengthInBitsConditional(false)
+func CastBACnetResultFlags(structType interface{}) BACnetResultFlags {
+ castFunc := func(typ interface{}) BACnetResultFlags {
+ if sBACnetResultFlags, ok := typ.(BACnetResultFlags); ok {
+ return sBACnetResultFlags
+ }
+ return 0
+ }
+ return castFunc(structType)
}
-func (m *BACnetResultFlags) GetLengthInBitsConditional(lastItem bool) uint16 {
- lengthInBits := uint16(0)
-
- // Simple field (rawBits)
- lengthInBits += m.RawBits.GetLengthInBits()
-
- // A virtual field doesn't have any in- or output.
-
- // A virtual field doesn't have any in- or output.
-
- // A virtual field doesn't have any in- or output.
-
- return lengthInBits
+func (m BACnetResultFlags) GetLengthInBits() uint16 {
+ return 8
}
-func (m *BACnetResultFlags) GetLengthInBytes() uint16 {
+func (m BACnetResultFlags) GetLengthInBytes() uint16 {
return m.GetLengthInBits() / 8
}
-func BACnetResultFlagsParse(readBuffer utils.ReadBuffer, tagNumber uint8) (*BACnetResultFlags, error) {
- positionAware := readBuffer
- _ = positionAware
- if pullErr := readBuffer.PullContext("BACnetResultFlags"); pullErr != nil {
- return nil, pullErr
- }
- currentPos := positionAware.GetPos()
- _ = currentPos
-
- // Simple Field (rawBits)
- if pullErr := readBuffer.PullContext("rawBits"); pullErr != nil {
- return nil, pullErr
- }
- _rawBits, _rawBitsErr := BACnetContextTagParse(readBuffer, uint8(tagNumber), BACnetDataType(BACnetDataType_BIT_STRING))
- if _rawBitsErr != nil {
- return nil, errors.Wrap(_rawBitsErr, "Error parsing 'rawBits' field")
- }
- rawBits := CastBACnetContextTagBitString(_rawBits)
- if closeErr := readBuffer.CloseContext("rawBits"); closeErr != nil {
- return nil, closeErr
- }
-
- // Virtual field
- _firstItem := rawBits.GetPayload().GetData()[0]
- firstItem := bool(_firstItem)
- _ = firstItem
-
- // Virtual field
- _lastItem := rawBits.GetPayload().GetData()[1]
- lastItem := bool(_lastItem)
- _ = lastItem
-
- // Virtual field
- _moreItems := rawBits.GetPayload().GetData()[2]
- moreItems := bool(_moreItems)
- _ = moreItems
-
- if closeErr := readBuffer.CloseContext("BACnetResultFlags"); closeErr != nil {
- return nil, closeErr
+func BACnetResultFlagsParse(readBuffer utils.ReadBuffer) (BACnetResultFlags, error) {
+ val, err := readBuffer.ReadUint8("BACnetResultFlags", 8)
+ if err != nil {
+ return 0, nil
}
-
- // Create the instance
- return NewBACnetResultFlags(rawBits, tagNumber), nil
+ return BACnetResultFlagsByValue(val), nil
}
-func (m *BACnetResultFlags) Serialize(writeBuffer utils.WriteBuffer) error {
- positionAware := writeBuffer
- _ = positionAware
- if pushErr := writeBuffer.PushContext("BACnetResultFlags"); pushErr != nil {
- return pushErr
- }
-
- // Simple Field (rawBits)
- if pushErr := writeBuffer.PushContext("rawBits"); pushErr != nil {
- return pushErr
- }
- _rawBitsErr := m.RawBits.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("rawBits"); popErr != nil {
- return popErr
- }
- if _rawBitsErr != nil {
- return errors.Wrap(_rawBitsErr, "Error serializing 'rawBits' field")
- }
- // Virtual field
- if _firstItemErr := writeBuffer.WriteVirtual("firstItem", m.GetFirstItem()); _firstItemErr != nil {
- return errors.Wrap(_firstItemErr, "Error serializing 'firstItem' field")
- }
- // Virtual field
- if _lastItemErr := writeBuffer.WriteVirtual("lastItem", m.GetLastItem()); _lastItemErr != nil {
- return errors.Wrap(_lastItemErr, "Error serializing 'lastItem' field")
- }
- // Virtual field
- if _moreItemsErr := writeBuffer.WriteVirtual("moreItems", m.GetMoreItems()); _moreItemsErr != nil {
- return errors.Wrap(_moreItemsErr, "Error serializing 'moreItems' field")
- }
+func (e BACnetResultFlags) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetResultFlags", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
- if popErr := writeBuffer.PopContext("BACnetResultFlags"); popErr != nil {
- return popErr
+func (e BACnetResultFlags) name() string {
+ switch e {
+ case BACnetResultFlags_FIRST_ITEM:
+ return "FIRST_ITEM"
+ case BACnetResultFlags_LAST_ITEM:
+ return "LAST_ITEM"
+ case BACnetResultFlags_MORE_ITEMS:
+ return "MORE_ITEMS"
}
- return nil
+ return ""
}
-func (m *BACnetResultFlags) String() string {
- if m == nil {
- return "<nil>"
- }
- buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
- if err := m.Serialize(buffer); err != nil {
- return err.Error()
- }
- return buffer.GetBox().String()
+func (e BACnetResultFlags) String() string {
+ return e.name()
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go
new file mode 100644
index 0000000000..76ca846a27
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetResultFlagsTagged.go
@@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetResultFlagsTagged is the data-structure of this message
+type BACnetResultFlagsTagged struct {
+ Header *BACnetTagHeader
+ Payload *BACnetTagPayloadBitString
+
+ // Arguments.
+ TagNumber uint8
+ TagClass TagClass
+}
+
+// IBACnetResultFlagsTagged is the corresponding interface of BACnetResultFlagsTagged
+type IBACnetResultFlagsTagged interface {
+ // GetHeader returns Header (property field)
+ GetHeader() *BACnetTagHeader
+ // GetPayload returns Payload (property field)
+ GetPayload() *BACnetTagPayloadBitString
+ // GetFirstItem returns FirstItem (virtual field)
+ GetFirstItem() bool
+ // GetLastItem returns LastItem (virtual field)
+ GetLastItem() bool
+ // GetMoreItems returns MoreItems (virtual field)
+ GetMoreItems() bool
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetResultFlagsTagged) GetHeader() *BACnetTagHeader {
+ return m.Header
+}
+
+func (m *BACnetResultFlagsTagged) GetPayload() *BACnetTagPayloadBitString {
+ return m.Payload
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetResultFlagsTagged) GetFirstItem() bool {
+ return bool(m.GetPayload().GetData()[0])
+}
+
+func (m *BACnetResultFlagsTagged) GetLastItem() bool {
+ return bool(m.GetPayload().GetData()[1])
+}
+
+func (m *BACnetResultFlagsTagged) GetMoreItems() bool {
+ return bool(m.GetPayload().GetData()[2])
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetResultFlagsTagged factory function for BACnetResultFlagsTagged
+func NewBACnetResultFlagsTagged(header *BACnetTagHeader, payload *BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *BACnetResultFlagsTagged {
+ return &BACnetResultFlagsTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass}
+}
+
+func CastBACnetResultFlagsTagged(structType interface{}) *BACnetResultFlagsTagged {
+ if casted, ok := structType.(BACnetResultFlagsTagged); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetResultFlagsTagged); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetResultFlagsTagged) GetTypeName() string {
+ return "BACnetResultFlagsTagged"
+}
+
+func (m *BACnetResultFlagsTagged) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetResultFlagsTagged) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (header)
+ lengthInBits += m.Header.GetLengthInBits()
+
+ // Simple field (payload)
+ lengthInBits += m.Payload.GetLengthInBits()
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *BACnetResultFlagsTagged) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetResultFlagsTaggedParse(readBuffer utils.ReadBuffer, tagNumber uint8, tagClass TagClass) (*BACnetResultFlagsTagged, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetResultFlagsTagged"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (header)
+ if pullErr := readBuffer.PullContext("header"); pullErr != nil {
+ return nil, pullErr
+ }
+ _header, _headerErr := BACnetTagHeaderParse(readBuffer)
+ if _headerErr != nil {
+ return nil, errors.Wrap(_headerErr, "Error parsing 'header' field")
+ }
+ header := CastBACnetTagHeader(_header)
+ if closeErr := readBuffer.CloseContext("header"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Validation
+ if !(bool((header.GetTagClass()) == (tagClass))) {
+ return nil, utils.ParseValidationError{"tag class doesn't match"}
+ }
+
+ // Validation
+ if !(bool(bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool(bool(bool((header.GetActualTagNumber()) == (tagNumber))))) {
+ return nil, utils.ParseAssertError{"tagnumber doesn't match"}
+ }
+
+ // Simple Field (payload)
+ if pullErr := readBuffer.PullContext("payload"); pullErr != nil {
+ return nil, pullErr
+ }
+ _payload, _payloadErr := BACnetTagPayloadBitStringParse(readBuffer, uint32(header.GetActualLength()))
+ if _payloadErr != nil {
+ return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field")
+ }
+ payload := CastBACnetTagPayloadBitString(_payload)
+ if closeErr := readBuffer.CloseContext("payload"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Virtual field
+ _firstItem := payload.GetData()[0]
+ firstItem := bool(_firstItem)
+ _ = firstItem
+
+ // Virtual field
+ _lastItem := payload.GetData()[1]
+ lastItem := bool(_lastItem)
+ _ = lastItem
+
+ // Virtual field
+ _moreItems := payload.GetData()[2]
+ moreItems := bool(_moreItems)
+ _ = moreItems
+
+ if closeErr := readBuffer.CloseContext("BACnetResultFlagsTagged"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetResultFlagsTagged(header, payload, tagNumber, tagClass), nil
+}
+
+func (m *BACnetResultFlagsTagged) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetResultFlagsTagged"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (header)
+ if pushErr := writeBuffer.PushContext("header"); pushErr != nil {
+ return pushErr
+ }
+ _headerErr := m.Header.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("header"); popErr != nil {
+ return popErr
+ }
+ if _headerErr != nil {
+ return errors.Wrap(_headerErr, "Error serializing 'header' field")
+ }
+
+ // Simple Field (payload)
+ if pushErr := writeBuffer.PushContext("payload"); pushErr != nil {
+ return pushErr
+ }
+ _payloadErr := m.Payload.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("payload"); popErr != nil {
+ return popErr
+ }
+ if _payloadErr != nil {
+ return errors.Wrap(_payloadErr, "Error serializing 'payload' field")
+ }
+ // Virtual field
+ if _firstItemErr := writeBuffer.WriteVirtual("firstItem", m.GetFirstItem()); _firstItemErr != nil {
+ return errors.Wrap(_firstItemErr, "Error serializing 'firstItem' field")
+ }
+ // Virtual field
+ if _lastItemErr := writeBuffer.WriteVirtual("lastItem", m.GetLastItem()); _lastItemErr != nil {
+ return errors.Wrap(_lastItemErr, "Error serializing 'lastItem' field")
+ }
+ // Virtual field
+ if _moreItemsErr := writeBuffer.WriteVirtual("moreItems", m.GetMoreItems()); _moreItemsErr != nil {
+ return errors.Wrap(_moreItemsErr, "Error serializing 'moreItems' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetResultFlagsTagged"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetResultFlagsTagged) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go
index 272e764aa1..f60fb9d564 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckGetAlarmSummary.go
@@ -31,7 +31,7 @@ type BACnetServiceAckGetAlarmSummary struct {
*BACnetServiceAck
ObjectIdentifier *BACnetApplicationTagObjectIdentifier
EventState *BACnetEventStateTagged
- AcknowledgedTransitions *BACnetEventTransitionBitsApplication
+ AcknowledgedTransitions *BACnetEventTransitionBitsTagged
// Arguments.
ServiceAckLength uint16
@@ -45,7 +45,7 @@ type IBACnetServiceAckGetAlarmSummary interface {
// GetEventState returns EventState (property field)
GetEventState() *BACnetEventStateTagged
// GetAcknowledgedTransitions returns AcknowledgedTransitions (property field)
- GetAcknowledgedTransitions() *BACnetEventTransitionBitsApplication
+ GetAcknowledgedTransitions() *BACnetEventTransitionBitsTagged
// GetLengthInBytes returns the length in bytes
GetLengthInBytes() uint16
// GetLengthInBits returns the length in bits
@@ -87,7 +87,7 @@ func (m *BACnetServiceAckGetAlarmSummary) GetEventState() *BACnetEventStateTagge
return m.EventState
}
-func (m *BACnetServiceAckGetAlarmSummary) GetAcknowledgedTransitions() *BACnetEventTransitionBitsApplication {
+func (m *BACnetServiceAckGetAlarmSummary) GetAcknowledgedTransitions() *BACnetEventTransitionBitsTagged {
return m.AcknowledgedTransitions
}
@@ -97,7 +97,7 @@ func (m *BACnetServiceAckGetAlarmSummary) GetAcknowledgedTransitions() *BACnetEv
///////////////////////////////////////////////////////////
// NewBACnetServiceAckGetAlarmSummary factory function for BACnetServiceAckGetAlarmSummary
-func NewBACnetServiceAckGetAlarmSummary(objectIdentifier *BACnetApplicationTagObjectIdentifier, eventState *BACnetEventStateTagged, acknowledgedTransitions *BACnetEventTransitionBitsApplication, serviceAckLength uint16) *BACnetServiceAckGetAlarmSummary {
+func NewBACnetServiceAckGetAlarmSummary(objectIdentifier *BACnetApplicationTagObjectIdentifier, eventState *BACnetEventStateTagged, acknowledgedTransitions *BACnetEventTransitionBitsTagged, serviceAckLength uint16) *BACnetServiceAckGetAlarmSummary {
_result := &BACnetServiceAckGetAlarmSummary{
ObjectIdentifier: objectIdentifier,
EventState: eventState,
@@ -190,11 +190,11 @@ func BACnetServiceAckGetAlarmSummaryParse(readBuffer utils.ReadBuffer, serviceAc
if pullErr := readBuffer.PullContext("acknowledgedTransitions"); pullErr != nil {
return nil, pullErr
}
- _acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsApplicationParse(readBuffer)
+ _acknowledgedTransitions, _acknowledgedTransitionsErr := BACnetEventTransitionBitsTaggedParse(readBuffer, uint8(uint8(0)), TagClass(TagClass_APPLICATION_TAGS))
if _acknowledgedTransitionsErr != nil {
return nil, errors.Wrap(_acknowledgedTransitionsErr, "Error parsing 'acknowledgedTransitions' field")
}
- acknowledgedTransitions := CastBACnetEventTransitionBitsApplication(_acknowledgedTransitions)
+ acknowledgedTransitions := CastBACnetEventTransitionBitsTagged(_acknowledgedTransitions)
if closeErr := readBuffer.CloseContext("acknowledgedTransitions"); closeErr != nil {
return nil, closeErr
}
@@ -207,7 +207,7 @@ func BACnetServiceAckGetAlarmSummaryParse(readBuffer utils.ReadBuffer, serviceAc
_child := &BACnetServiceAckGetAlarmSummary{
ObjectIdentifier: CastBACnetApplicationTagObjectIdentifier(objectIdentifier),
EventState: CastBACnetEventStateTagged(eventState),
- AcknowledgedTransitions: CastBACnetEventTransitionBitsApplication(acknowledgedTransitions),
+ AcknowledgedTransitions: CastBACnetEventTransitionBitsTagged(acknowledgedTransitions),
BACnetServiceAck: &BACnetServiceAck{},
}
_child.BACnetServiceAck.Child = _child
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go
index 3075e62211..c97e3c2177 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServiceAckReadRange.go
@@ -33,7 +33,7 @@ type BACnetServiceAckReadRange struct {
ObjectIdentifier *BACnetContextTagObjectIdentifier
PropertyIdentifier *BACnetPropertyIdentifierTagged
PropertyArrayIndex *BACnetContextTagUnsignedInteger
- ResultFlags *BACnetResultFlags
+ ResultFlags *BACnetResultFlagsTagged
ItemCount *BACnetContextTagUnsignedInteger
ItemData *BACnetConstructedData
FirstSequenceNumber *BACnetContextTagUnsignedInteger
@@ -52,7 +52,7 @@ type IBACnetServiceAckReadRange interface {
// GetPropertyArrayIndex returns PropertyArrayIndex (property field)
GetPropertyArrayIndex() *BACnetContextTagUnsignedInteger
// GetResultFlags returns ResultFlags (property field)
- GetResultFlags() *BACnetResultFlags
+ GetResultFlags() *BACnetResultFlagsTagged
// GetItemCount returns ItemCount (property field)
GetItemCount() *BACnetContextTagUnsignedInteger
// GetItemData returns ItemData (property field)
@@ -104,7 +104,7 @@ func (m *BACnetServiceAckReadRange) GetPropertyArrayIndex() *BACnetContextTagUns
return m.PropertyArrayIndex
}
-func (m *BACnetServiceAckReadRange) GetResultFlags() *BACnetResultFlags {
+func (m *BACnetServiceAckReadRange) GetResultFlags() *BACnetResultFlagsTagged {
return m.ResultFlags
}
@@ -126,7 +126,7 @@ func (m *BACnetServiceAckReadRange) GetFirstSequenceNumber() *BACnetContextTagUn
///////////////////////////////////////////////////////////
// NewBACnetServiceAckReadRange factory function for BACnetServiceAckReadRange
-func NewBACnetServiceAckReadRange(objectIdentifier *BACnetContextTagObjectIdentifier, propertyIdentifier *BACnetPropertyIdentifierTagged, propertyArrayIndex *BACnetContextTagUnsignedInteger, resultFlags *BACnetResultFlags, itemCount *BACnetContextTagUnsignedInteger, itemData *BACnetConstructedData, firstSequenceNumber *BACnetContextTagUnsignedInteger, serviceAckLength uint16) *BACnetServiceAckReadRange {
+func NewBACnetServiceAckReadRange(objectIdentifier *BACnetContextTagObjectIdentifier, propertyIdentifier *BACnetPropertyIdentifierTagged, propertyArrayIndex *BACnetContextTagUnsignedInteger, resultFlags *BACnetResultFlagsTagged, itemCount *BACnetContextTagUnsignedInteger, itemData *BACnetConstructedData, firstSequenceNumber *BACnetContextTagUnsignedInteger, serviceAckLength uint16) *BACnetServiceAckReadRange {
_result := &BACnetServiceAckReadRange{
ObjectIdentifier: objectIdentifier,
PropertyIdentifier: propertyIdentifier,
@@ -262,11 +262,11 @@ func BACnetServiceAckReadRangeParse(readBuffer utils.ReadBuffer, serviceAckLengt
if pullErr := readBuffer.PullContext("resultFlags"); pullErr != nil {
return nil, pullErr
}
- _resultFlags, _resultFlagsErr := BACnetResultFlagsParse(readBuffer, uint8(uint8(3)))
+ _resultFlags, _resultFlagsErr := BACnetResultFlagsTaggedParse(readBuffer, uint8(uint8(3)), TagClass(TagClass_CONTEXT_SPECIFIC_TAGS))
if _resultFlagsErr != nil {
return nil, errors.Wrap(_resultFlagsErr, "Error parsing 'resultFlags' field")
}
- resultFlags := CastBACnetResultFlags(_resultFlags)
+ resultFlags := CastBACnetResultFlagsTagged(_resultFlags)
if closeErr := readBuffer.CloseContext("resultFlags"); closeErr != nil {
return nil, closeErr
}
@@ -335,7 +335,7 @@ func BACnetServiceAckReadRangeParse(readBuffer utils.ReadBuffer, serviceAckLengt
ObjectIdentifier: CastBACnetContextTagObjectIdentifier(objectIdentifier),
PropertyIdentifier: CastBACnetPropertyIdentifierTagged(propertyIdentifier),
PropertyArrayIndex: CastBACnetContextTagUnsignedInteger(propertyArrayIndex),
- ResultFlags: CastBACnetResultFlags(resultFlags),
+ ResultFlags: CastBACnetResultFlagsTagged(resultFlags),
ItemCount: CastBACnetContextTagUnsignedInteger(itemCount),
ItemData: CastBACnetConstructedData(itemData),
FirstSequenceNumber: CastBACnetContextTagUnsignedInteger(firstSequenceNumber),
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go
new file mode 100644
index 0000000000..951f662caf
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetServicesSupported.go
@@ -0,0 +1,434 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetServicesSupported is an enum
+type BACnetServicesSupported uint8
+
+type IBACnetServicesSupported interface {
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+const (
+ BACnetServicesSupported_ACKNOWLEDGE_ALARM BACnetServicesSupported = 0
+ BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION BACnetServicesSupported = 1
+ BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION BACnetServicesSupported = 2
+ BACnetServicesSupported_GET_ALARM_SUMMARY BACnetServicesSupported = 3
+ BACnetServicesSupported_GET_ENROLLMENT_SUMMARY BACnetServicesSupported = 4
+ BACnetServicesSupported_SUBSCRIBE_COV BACnetServicesSupported = 5
+ BACnetServicesSupported_ATOMIC_READ_FILE BACnetServicesSupported = 6
+ BACnetServicesSupported_ATOMIC_WRITE_FILE BACnetServicesSupported = 7
+ BACnetServicesSupported_ADD_LIST_ELEMENT BACnetServicesSupported = 8
+ BACnetServicesSupported_REMOVE_LIST_ELEMENT BACnetServicesSupported = 9
+ BACnetServicesSupported_CREATE_OBJECT BACnetServicesSupported = 10
+ BACnetServicesSupported_DELETE_OBJECT BACnetServicesSupported = 11
+ BACnetServicesSupported_READ_PROPERTY BACnetServicesSupported = 12
+ BACnetServicesSupported_READ_PROPERTY_MULTIPLE BACnetServicesSupported = 14
+ BACnetServicesSupported_WRITE_PROPERTY BACnetServicesSupported = 15
+ BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE BACnetServicesSupported = 16
+ BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL BACnetServicesSupported = 17
+ BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER BACnetServicesSupported = 18
+ BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE BACnetServicesSupported = 19
+ BACnetServicesSupported_REINITIALIZE_DEVICE BACnetServicesSupported = 20
+ BACnetServicesSupported_VT_OPEN BACnetServicesSupported = 21
+ BACnetServicesSupported_VT_CLOSE BACnetServicesSupported = 22
+ BACnetServicesSupported_VT_DATA BACnetServicesSupported = 23
+ BACnetServicesSupported_I_AM BACnetServicesSupported = 26
+ BACnetServicesSupported_I_HAVE BACnetServicesSupported = 27
+ BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION BACnetServicesSupported = 28
+ BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION BACnetServicesSupported = 29
+ BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER BACnetServicesSupported = 30
+ BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE BACnetServicesSupported = 31
+ BACnetServicesSupported_TIME_SYNCHRONIZATION BACnetServicesSupported = 32
+ BACnetServicesSupported_WHO_HAS BACnetServicesSupported = 33
+ BACnetServicesSupported_WHO_IS BACnetServicesSupported = 34
+ BACnetServicesSupported_READ_RANGE BACnetServicesSupported = 35
+ BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION BACnetServicesSupported = 36
+ BACnetServicesSupported_LIFE_SAFETY_OPERATION BACnetServicesSupported = 37
+ BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY BACnetServicesSupported = 38
+ BACnetServicesSupported_GET_EVENT_INFORMATION BACnetServicesSupported = 39
+ BACnetServicesSupported_WRITE_GROUP BACnetServicesSupported = 40
+ BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE BACnetServicesSupported = 41
+ BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE BACnetServicesSupported = 42
+ BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE BACnetServicesSupported = 43
+)
+
+var BACnetServicesSupportedValues []BACnetServicesSupported
+
+func init() {
+ _ = errors.New
+ BACnetServicesSupportedValues = []BACnetServicesSupported{
+ BACnetServicesSupported_ACKNOWLEDGE_ALARM,
+ BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION,
+ BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION,
+ BACnetServicesSupported_GET_ALARM_SUMMARY,
+ BACnetServicesSupported_GET_ENROLLMENT_SUMMARY,
+ BACnetServicesSupported_SUBSCRIBE_COV,
+ BACnetServicesSupported_ATOMIC_READ_FILE,
+ BACnetServicesSupported_ATOMIC_WRITE_FILE,
+ BACnetServicesSupported_ADD_LIST_ELEMENT,
+ BACnetServicesSupported_REMOVE_LIST_ELEMENT,
+ BACnetServicesSupported_CREATE_OBJECT,
+ BACnetServicesSupported_DELETE_OBJECT,
+ BACnetServicesSupported_READ_PROPERTY,
+ BACnetServicesSupported_READ_PROPERTY_MULTIPLE,
+ BACnetServicesSupported_WRITE_PROPERTY,
+ BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE,
+ BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL,
+ BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER,
+ BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE,
+ BACnetServicesSupported_REINITIALIZE_DEVICE,
+ BACnetServicesSupported_VT_OPEN,
+ BACnetServicesSupported_VT_CLOSE,
+ BACnetServicesSupported_VT_DATA,
+ BACnetServicesSupported_I_AM,
+ BACnetServicesSupported_I_HAVE,
+ BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION,
+ BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION,
+ BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER,
+ BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE,
+ BACnetServicesSupported_TIME_SYNCHRONIZATION,
+ BACnetServicesSupported_WHO_HAS,
+ BACnetServicesSupported_WHO_IS,
+ BACnetServicesSupported_READ_RANGE,
+ BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION,
+ BACnetServicesSupported_LIFE_SAFETY_OPERATION,
+ BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY,
+ BACnetServicesSupported_GET_EVENT_INFORMATION,
+ BACnetServicesSupported_WRITE_GROUP,
+ BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE,
+ BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE,
+ BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE,
+ }
+}
+
+func BACnetServicesSupportedByValue(value uint8) BACnetServicesSupported {
+ switch value {
+ case 0:
+ return BACnetServicesSupported_ACKNOWLEDGE_ALARM
+ case 1:
+ return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION
+ case 10:
+ return BACnetServicesSupported_CREATE_OBJECT
+ case 11:
+ return BACnetServicesSupported_DELETE_OBJECT
+ case 12:
+ return BACnetServicesSupported_READ_PROPERTY
+ case 14:
+ return BACnetServicesSupported_READ_PROPERTY_MULTIPLE
+ case 15:
+ return BACnetServicesSupported_WRITE_PROPERTY
+ case 16:
+ return BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE
+ case 17:
+ return BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL
+ case 18:
+ return BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER
+ case 19:
+ return BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE
+ case 2:
+ return BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION
+ case 20:
+ return BACnetServicesSupported_REINITIALIZE_DEVICE
+ case 21:
+ return BACnetServicesSupported_VT_OPEN
+ case 22:
+ return BACnetServicesSupported_VT_CLOSE
+ case 23:
+ return BACnetServicesSupported_VT_DATA
+ case 26:
+ return BACnetServicesSupported_I_AM
+ case 27:
+ return BACnetServicesSupported_I_HAVE
+ case 28:
+ return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION
+ case 29:
+ return BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION
+ case 3:
+ return BACnetServicesSupported_GET_ALARM_SUMMARY
+ case 30:
+ return BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER
+ case 31:
+ return BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE
+ case 32:
+ return BACnetServicesSupported_TIME_SYNCHRONIZATION
+ case 33:
+ return BACnetServicesSupported_WHO_HAS
+ case 34:
+ return BACnetServicesSupported_WHO_IS
+ case 35:
+ return BACnetServicesSupported_READ_RANGE
+ case 36:
+ return BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION
+ case 37:
+ return BACnetServicesSupported_LIFE_SAFETY_OPERATION
+ case 38:
+ return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY
+ case 39:
+ return BACnetServicesSupported_GET_EVENT_INFORMATION
+ case 4:
+ return BACnetServicesSupported_GET_ENROLLMENT_SUMMARY
+ case 40:
+ return BACnetServicesSupported_WRITE_GROUP
+ case 41:
+ return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE
+ case 42:
+ return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE
+ case 43:
+ return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE
+ case 5:
+ return BACnetServicesSupported_SUBSCRIBE_COV
+ case 6:
+ return BACnetServicesSupported_ATOMIC_READ_FILE
+ case 7:
+ return BACnetServicesSupported_ATOMIC_WRITE_FILE
+ case 8:
+ return BACnetServicesSupported_ADD_LIST_ELEMENT
+ case 9:
+ return BACnetServicesSupported_REMOVE_LIST_ELEMENT
+ }
+ return 0
+}
+
+func BACnetServicesSupportedByName(value string) BACnetServicesSupported {
+ switch value {
+ case "ACKNOWLEDGE_ALARM":
+ return BACnetServicesSupported_ACKNOWLEDGE_ALARM
+ case "CONFIRMED_COV_NOTIFICATION":
+ return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION
+ case "CREATE_OBJECT":
+ return BACnetServicesSupported_CREATE_OBJECT
+ case "DELETE_OBJECT":
+ return BACnetServicesSupported_DELETE_OBJECT
+ case "READ_PROPERTY":
+ return BACnetServicesSupported_READ_PROPERTY
+ case "READ_PROPERTY_MULTIPLE":
+ return BACnetServicesSupported_READ_PROPERTY_MULTIPLE
+ case "WRITE_PROPERTY":
+ return BACnetServicesSupported_WRITE_PROPERTY
+ case "WRITE_PROPERTY_MULTIPLE":
+ return BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE
+ case "DEVICE_COMMUNICATION_CONTROL":
+ return BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL
+ case "CONFIRMED_PRIVATE_TRANSFER":
+ return BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER
+ case "CONFIRMED_TEXT_MESSAGE":
+ return BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE
+ case "CONFIRMED_EVENT_NOTIFICATION":
+ return BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION
+ case "REINITIALIZE_DEVICE":
+ return BACnetServicesSupported_REINITIALIZE_DEVICE
+ case "VT_OPEN":
+ return BACnetServicesSupported_VT_OPEN
+ case "VT_CLOSE":
+ return BACnetServicesSupported_VT_CLOSE
+ case "VT_DATA":
+ return BACnetServicesSupported_VT_DATA
+ case "I_AM":
+ return BACnetServicesSupported_I_AM
+ case "I_HAVE":
+ return BACnetServicesSupported_I_HAVE
+ case "UNCONFIRMED_COV_NOTIFICATION":
+ return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION
+ case "UNCONFIRMED_EVENT_NOTIFICATION":
+ return BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION
+ case "GET_ALARM_SUMMARY":
+ return BACnetServicesSupported_GET_ALARM_SUMMARY
+ case "UNCONFIRMED_PRIVATE_TRANSFER":
+ return BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER
+ case "UNCONFIRMED_TEXT_MESSAGE":
+ return BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE
+ case "TIME_SYNCHRONIZATION":
+ return BACnetServicesSupported_TIME_SYNCHRONIZATION
+ case "WHO_HAS":
+ return BACnetServicesSupported_WHO_HAS
+ case "WHO_IS":
+ return BACnetServicesSupported_WHO_IS
+ case "READ_RANGE":
+ return BACnetServicesSupported_READ_RANGE
+ case "UTC_TIME_SYNCHRONIZATION":
+ return BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION
+ case "LIFE_SAFETY_OPERATION":
+ return BACnetServicesSupported_LIFE_SAFETY_OPERATION
+ case "SUBSCRIBE_COV_PROPERTY":
+ return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY
+ case "GET_EVENT_INFORMATION":
+ return BACnetServicesSupported_GET_EVENT_INFORMATION
+ case "GET_ENROLLMENT_SUMMARY":
+ return BACnetServicesSupported_GET_ENROLLMENT_SUMMARY
+ case "WRITE_GROUP":
+ return BACnetServicesSupported_WRITE_GROUP
+ case "SUBSCRIBE_COV_PROPERTY_MULTIPLE":
+ return BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE
+ case "CONFIRMED_COV_NOTIFICATION_MULTIPLE":
+ return BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE
+ case "UNCONFIRMED_COV_NOTIFICATION_MULTIPLE":
+ return BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE
+ case "SUBSCRIBE_COV":
+ return BACnetServicesSupported_SUBSCRIBE_COV
+ case "ATOMIC_READ_FILE":
+ return BACnetServicesSupported_ATOMIC_READ_FILE
+ case "ATOMIC_WRITE_FILE":
+ return BACnetServicesSupported_ATOMIC_WRITE_FILE
+ case "ADD_LIST_ELEMENT":
+ return BACnetServicesSupported_ADD_LIST_ELEMENT
+ case "REMOVE_LIST_ELEMENT":
+ return BACnetServicesSupported_REMOVE_LIST_ELEMENT
+ }
+ return 0
+}
+
+func BACnetServicesSupportedKnows(value uint8) bool {
+ for _, typeValue := range BACnetServicesSupportedValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
+}
+
+func CastBACnetServicesSupported(structType interface{}) BACnetServicesSupported {
+ castFunc := func(typ interface{}) BACnetServicesSupported {
+ if sBACnetServicesSupported, ok := typ.(BACnetServicesSupported); ok {
+ return sBACnetServicesSupported
+ }
+ return 0
+ }
+ return castFunc(structType)
+}
+
+func (m BACnetServicesSupported) GetLengthInBits() uint16 {
+ return 8
+}
+
+func (m BACnetServicesSupported) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetServicesSupportedParse(readBuffer utils.ReadBuffer) (BACnetServicesSupported, error) {
+ val, err := readBuffer.ReadUint8("BACnetServicesSupported", 8)
+ if err != nil {
+ return 0, nil
+ }
+ return BACnetServicesSupportedByValue(val), nil
+}
+
+func (e BACnetServicesSupported) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetServicesSupported", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
+
+func (e BACnetServicesSupported) name() string {
+ switch e {
+ case BACnetServicesSupported_ACKNOWLEDGE_ALARM:
+ return "ACKNOWLEDGE_ALARM"
+ case BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION:
+ return "CONFIRMED_COV_NOTIFICATION"
+ case BACnetServicesSupported_CREATE_OBJECT:
+ return "CREATE_OBJECT"
+ case BACnetServicesSupported_DELETE_OBJECT:
+ return "DELETE_OBJECT"
+ case BACnetServicesSupported_READ_PROPERTY:
+ return "READ_PROPERTY"
+ case BACnetServicesSupported_READ_PROPERTY_MULTIPLE:
+ return "READ_PROPERTY_MULTIPLE"
+ case BACnetServicesSupported_WRITE_PROPERTY:
+ return "WRITE_PROPERTY"
+ case BACnetServicesSupported_WRITE_PROPERTY_MULTIPLE:
+ return "WRITE_PROPERTY_MULTIPLE"
+ case BACnetServicesSupported_DEVICE_COMMUNICATION_CONTROL:
+ return "DEVICE_COMMUNICATION_CONTROL"
+ case BACnetServicesSupported_CONFIRMED_PRIVATE_TRANSFER:
+ return "CONFIRMED_PRIVATE_TRANSFER"
+ case BACnetServicesSupported_CONFIRMED_TEXT_MESSAGE:
+ return "CONFIRMED_TEXT_MESSAGE"
+ case BACnetServicesSupported_CONFIRMED_EVENT_NOTIFICATION:
+ return "CONFIRMED_EVENT_NOTIFICATION"
+ case BACnetServicesSupported_REINITIALIZE_DEVICE:
+ return "REINITIALIZE_DEVICE"
+ case BACnetServicesSupported_VT_OPEN:
+ return "VT_OPEN"
+ case BACnetServicesSupported_VT_CLOSE:
+ return "VT_CLOSE"
+ case BACnetServicesSupported_VT_DATA:
+ return "VT_DATA"
+ case BACnetServicesSupported_I_AM:
+ return "I_AM"
+ case BACnetServicesSupported_I_HAVE:
+ return "I_HAVE"
+ case BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION:
+ return "UNCONFIRMED_COV_NOTIFICATION"
+ case BACnetServicesSupported_UNCONFIRMED_EVENT_NOTIFICATION:
+ return "UNCONFIRMED_EVENT_NOTIFICATION"
+ case BACnetServicesSupported_GET_ALARM_SUMMARY:
+ return "GET_ALARM_SUMMARY"
+ case BACnetServicesSupported_UNCONFIRMED_PRIVATE_TRANSFER:
+ return "UNCONFIRMED_PRIVATE_TRANSFER"
+ case BACnetServicesSupported_UNCONFIRMED_TEXT_MESSAGE:
+ return "UNCONFIRMED_TEXT_MESSAGE"
+ case BACnetServicesSupported_TIME_SYNCHRONIZATION:
+ return "TIME_SYNCHRONIZATION"
+ case BACnetServicesSupported_WHO_HAS:
+ return "WHO_HAS"
+ case BACnetServicesSupported_WHO_IS:
+ return "WHO_IS"
+ case BACnetServicesSupported_READ_RANGE:
+ return "READ_RANGE"
+ case BACnetServicesSupported_UTC_TIME_SYNCHRONIZATION:
+ return "UTC_TIME_SYNCHRONIZATION"
+ case BACnetServicesSupported_LIFE_SAFETY_OPERATION:
+ return "LIFE_SAFETY_OPERATION"
+ case BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY:
+ return "SUBSCRIBE_COV_PROPERTY"
+ case BACnetServicesSupported_GET_EVENT_INFORMATION:
+ return "GET_EVENT_INFORMATION"
+ case BACnetServicesSupported_GET_ENROLLMENT_SUMMARY:
+ return "GET_ENROLLMENT_SUMMARY"
+ case BACnetServicesSupported_WRITE_GROUP:
+ return "WRITE_GROUP"
+ case BACnetServicesSupported_SUBSCRIBE_COV_PROPERTY_MULTIPLE:
+ return "SUBSCRIBE_COV_PROPERTY_MULTIPLE"
+ case BACnetServicesSupported_CONFIRMED_COV_NOTIFICATION_MULTIPLE:
+ return "CONFIRMED_COV_NOTIFICATION_MULTIPLE"
+ case BACnetServicesSupported_UNCONFIRMED_COV_NOTIFICATION_MULTIPLE:
+ return "UNCONFIRMED_COV_NOTIFICATION_MULTIPLE"
+ case BACnetServicesSupported_SUBSCRIBE_COV:
+ return "SUBSCRIBE_COV"
+ case BACnetServicesSupported_ATOMIC_READ_FILE:
+ return "ATOMIC_READ_FILE"
+ case BACnetServicesSupported_ATOMIC_WRITE_FILE:
+ return "ATOMIC_WRITE_FILE"
+ case BACnetServicesSupported_ADD_LIST_ELEMENT:
+ return "ADD_LIST_ELEMENT"
+ case BACnetServicesSupported_REMOVE_LIST_ELEMENT:
+ return "REMOVE_LIST_ELEMENT"
+ }
+ return ""
+}
+
+func (e BACnetServicesSupported) String() string {
+ return e.name()
+}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go
index f95d16eace..e164e5a6b5 100644
--- a/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlags.go
@@ -26,215 +26,113 @@ import (
// Code generated by code-generation. DO NOT EDIT.
-// BACnetStatusFlags is the data-structure of this message
-type BACnetStatusFlags struct {
- RawBits *BACnetContextTagBitString
+// BACnetStatusFlags is an enum
+type BACnetStatusFlags uint8
- // Arguments.
- TagNumber uint8
-}
-
-// IBACnetStatusFlags is the corresponding interface of BACnetStatusFlags
type IBACnetStatusFlags interface {
- // GetRawBits returns RawBits (property field)
- GetRawBits() *BACnetContextTagBitString
- // GetInAlarm returns InAlarm (virtual field)
- GetInAlarm() bool
- // GetFault returns Fault (virtual field)
- GetFault() bool
- // GetOverriden returns Overriden (virtual field)
- GetOverriden() bool
- // GetOutOfService returns OutOfService (virtual field)
- GetOutOfService() bool
- // GetLengthInBytes returns the length in bytes
- GetLengthInBytes() uint16
- // GetLengthInBits returns the length in bits
- GetLengthInBits() uint16
- // Serialize serializes this type
Serialize(writeBuffer utils.WriteBuffer) error
}
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for property fields.
-///////////////////////
-
-func (m *BACnetStatusFlags) GetRawBits() *BACnetContextTagBitString {
- return m.RawBits
-}
-
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-/////////////////////// Accessors for virtual fields.
-///////////////////////
-
-func (m *BACnetStatusFlags) GetInAlarm() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[0])
-}
-
-func (m *BACnetStatusFlags) GetFault() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[1])
-}
+const (
+ BACnetStatusFlags_IN_ALARM BACnetStatusFlags = 0
+ BACnetStatusFlags_FAULT BACnetStatusFlags = 1
+ BACnetStatusFlags_OVERRIDDEN BACnetStatusFlags = 2
+ BACnetStatusFlags_OUT_OF_SERVICE BACnetStatusFlags = 3
+)
-func (m *BACnetStatusFlags) GetOverriden() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[2])
-}
+var BACnetStatusFlagsValues []BACnetStatusFlags
-func (m *BACnetStatusFlags) GetOutOfService() bool {
- return bool(m.GetRawBits().GetPayload().GetData()[3])
+func init() {
+ _ = errors.New
+ BACnetStatusFlagsValues = []BACnetStatusFlags{
+ BACnetStatusFlags_IN_ALARM,
+ BACnetStatusFlags_FAULT,
+ BACnetStatusFlags_OVERRIDDEN,
+ BACnetStatusFlags_OUT_OF_SERVICE,
+ }
}
-///////////////////////
-///////////////////////
-///////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////
-
-// NewBACnetStatusFlags factory function for BACnetStatusFlags
-func NewBACnetStatusFlags(rawBits *BACnetContextTagBitString, tagNumber uint8) *BACnetStatusFlags {
- return &BACnetStatusFlags{RawBits: rawBits, TagNumber: tagNumber}
+func BACnetStatusFlagsByValue(value uint8) BACnetStatusFlags {
+ switch value {
+ case 0:
+ return BACnetStatusFlags_IN_ALARM
+ case 1:
+ return BACnetStatusFlags_FAULT
+ case 2:
+ return BACnetStatusFlags_OVERRIDDEN
+ case 3:
+ return BACnetStatusFlags_OUT_OF_SERVICE
+ }
+ return 0
}
-func CastBACnetStatusFlags(structType interface{}) *BACnetStatusFlags {
- if casted, ok := structType.(BACnetStatusFlags); ok {
- return &casted
- }
- if casted, ok := structType.(*BACnetStatusFlags); ok {
- return casted
+func BACnetStatusFlagsByName(value string) BACnetStatusFlags {
+ switch value {
+ case "IN_ALARM":
+ return BACnetStatusFlags_IN_ALARM
+ case "FAULT":
+ return BACnetStatusFlags_FAULT
+ case "OVERRIDDEN":
+ return BACnetStatusFlags_OVERRIDDEN
+ case "OUT_OF_SERVICE":
+ return BACnetStatusFlags_OUT_OF_SERVICE
}
- return nil
+ return 0
}
-func (m *BACnetStatusFlags) GetTypeName() string {
- return "BACnetStatusFlags"
+func BACnetStatusFlagsKnows(value uint8) bool {
+ for _, typeValue := range BACnetStatusFlagsValues {
+ if uint8(typeValue) == value {
+ return true
+ }
+ }
+ return false
}
-func (m *BACnetStatusFlags) GetLengthInBits() uint16 {
- return m.GetLengthInBitsConditional(false)
+func CastBACnetStatusFlags(structType interface{}) BACnetStatusFlags {
+ castFunc := func(typ interface{}) BACnetStatusFlags {
+ if sBACnetStatusFlags, ok := typ.(BACnetStatusFlags); ok {
+ return sBACnetStatusFlags
+ }
+ return 0
+ }
+ return castFunc(structType)
}
-func (m *BACnetStatusFlags) GetLengthInBitsConditional(lastItem bool) uint16 {
- lengthInBits := uint16(0)
-
- // Simple field (rawBits)
- lengthInBits += m.RawBits.GetLengthInBits()
-
- // A virtual field doesn't have any in- or output.
-
- // A virtual field doesn't have any in- or output.
-
- // A virtual field doesn't have any in- or output.
-
- // A virtual field doesn't have any in- or output.
-
- return lengthInBits
+func (m BACnetStatusFlags) GetLengthInBits() uint16 {
+ return 8
}
-func (m *BACnetStatusFlags) GetLengthInBytes() uint16 {
+func (m BACnetStatusFlags) GetLengthInBytes() uint16 {
return m.GetLengthInBits() / 8
}
-func BACnetStatusFlagsParse(readBuffer utils.ReadBuffer, tagNumber uint8) (*BACnetStatusFlags, error) {
- positionAware := readBuffer
- _ = positionAware
- if pullErr := readBuffer.PullContext("BACnetStatusFlags"); pullErr != nil {
- return nil, pullErr
+func BACnetStatusFlagsParse(readBuffer utils.ReadBuffer) (BACnetStatusFlags, error) {
+ val, err := readBuffer.ReadUint8("BACnetStatusFlags", 8)
+ if err != nil {
+ return 0, nil
}
- currentPos := positionAware.GetPos()
- _ = currentPos
-
- // Simple Field (rawBits)
- if pullErr := readBuffer.PullContext("rawBits"); pullErr != nil {
- return nil, pullErr
- }
- _rawBits, _rawBitsErr := BACnetContextTagParse(readBuffer, uint8(tagNumber), BACnetDataType(BACnetDataType_BIT_STRING))
- if _rawBitsErr != nil {
- return nil, errors.Wrap(_rawBitsErr, "Error parsing 'rawBits' field")
- }
- rawBits := CastBACnetContextTagBitString(_rawBits)
- if closeErr := readBuffer.CloseContext("rawBits"); closeErr != nil {
- return nil, closeErr
- }
-
- // Virtual field
- _inAlarm := rawBits.GetPayload().GetData()[0]
- inAlarm := bool(_inAlarm)
- _ = inAlarm
-
- // Virtual field
- _fault := rawBits.GetPayload().GetData()[1]
- fault := bool(_fault)
- _ = fault
-
- // Virtual field
- _overriden := rawBits.GetPayload().GetData()[2]
- overriden := bool(_overriden)
- _ = overriden
-
- // Virtual field
- _outOfService := rawBits.GetPayload().GetData()[3]
- outOfService := bool(_outOfService)
- _ = outOfService
-
- if closeErr := readBuffer.CloseContext("BACnetStatusFlags"); closeErr != nil {
- return nil, closeErr
- }
-
- // Create the instance
- return NewBACnetStatusFlags(rawBits, tagNumber), nil
+ return BACnetStatusFlagsByValue(val), nil
}
-func (m *BACnetStatusFlags) Serialize(writeBuffer utils.WriteBuffer) error {
- positionAware := writeBuffer
- _ = positionAware
- if pushErr := writeBuffer.PushContext("BACnetStatusFlags"); pushErr != nil {
- return pushErr
- }
-
- // Simple Field (rawBits)
- if pushErr := writeBuffer.PushContext("rawBits"); pushErr != nil {
- return pushErr
- }
- _rawBitsErr := m.RawBits.Serialize(writeBuffer)
- if popErr := writeBuffer.PopContext("rawBits"); popErr != nil {
- return popErr
- }
- if _rawBitsErr != nil {
- return errors.Wrap(_rawBitsErr, "Error serializing 'rawBits' field")
- }
- // Virtual field
- if _inAlarmErr := writeBuffer.WriteVirtual("inAlarm", m.GetInAlarm()); _inAlarmErr != nil {
- return errors.Wrap(_inAlarmErr, "Error serializing 'inAlarm' field")
- }
- // Virtual field
- if _faultErr := writeBuffer.WriteVirtual("fault", m.GetFault()); _faultErr != nil {
- return errors.Wrap(_faultErr, "Error serializing 'fault' field")
- }
- // Virtual field
- if _overridenErr := writeBuffer.WriteVirtual("overriden", m.GetOverriden()); _overridenErr != nil {
- return errors.Wrap(_overridenErr, "Error serializing 'overriden' field")
- }
- // Virtual field
- if _outOfServiceErr := writeBuffer.WriteVirtual("outOfService", m.GetOutOfService()); _outOfServiceErr != nil {
- return errors.Wrap(_outOfServiceErr, "Error serializing 'outOfService' field")
- }
+func (e BACnetStatusFlags) Serialize(writeBuffer utils.WriteBuffer) error {
+ return writeBuffer.WriteUint8("BACnetStatusFlags", 8, uint8(e), utils.WithAdditionalStringRepresentation(e.name()))
+}
- if popErr := writeBuffer.PopContext("BACnetStatusFlags"); popErr != nil {
- return popErr
+func (e BACnetStatusFlags) name() string {
+ switch e {
+ case BACnetStatusFlags_IN_ALARM:
+ return "IN_ALARM"
+ case BACnetStatusFlags_FAULT:
+ return "FAULT"
+ case BACnetStatusFlags_OVERRIDDEN:
+ return "OVERRIDDEN"
+ case BACnetStatusFlags_OUT_OF_SERVICE:
+ return "OUT_OF_SERVICE"
}
- return nil
+ return ""
}
-func (m *BACnetStatusFlags) String() string {
- if m == nil {
- return "<nil>"
- }
- buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
- if err := m.Serialize(buffer); err != nil {
- return err.Error()
- }
- return buffer.GetBox().String()
+func (e BACnetStatusFlags) String() string {
+ return e.name()
}
diff --git a/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go
new file mode 100644
index 0000000000..d1917c442d
--- /dev/null
+++ b/plc4go/protocols/bacnetip/readwrite/model/BACnetStatusFlagsTagged.go
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package model
+
+import (
+ "github.com/apache/plc4x/plc4go/internal/spi/utils"
+ "github.com/pkg/errors"
+)
+
+// Code generated by code-generation. DO NOT EDIT.
+
+// BACnetStatusFlagsTagged is the data-structure of this message
+type BACnetStatusFlagsTagged struct {
+ Header *BACnetTagHeader
+ Payload *BACnetTagPayloadBitString
+
+ // Arguments.
+ TagNumber uint8
+ TagClass TagClass
+}
+
+// IBACnetStatusFlagsTagged is the corresponding interface of BACnetStatusFlagsTagged
+type IBACnetStatusFlagsTagged interface {
+ // GetHeader returns Header (property field)
+ GetHeader() *BACnetTagHeader
+ // GetPayload returns Payload (property field)
+ GetPayload() *BACnetTagPayloadBitString
+ // GetInAlarm returns InAlarm (virtual field)
+ GetInAlarm() bool
+ // GetFault returns Fault (virtual field)
+ GetFault() bool
+ // GetOverridden returns Overridden (virtual field)
+ GetOverridden() bool
+ // GetOutOfService returns OutOfService (virtual field)
+ GetOutOfService() bool
+ // GetLengthInBytes returns the length in bytes
+ GetLengthInBytes() uint16
+ // GetLengthInBits returns the length in bits
+ GetLengthInBits() uint16
+ // Serialize serializes this type
+ Serialize(writeBuffer utils.WriteBuffer) error
+}
+
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for property fields.
+///////////////////////
+
+func (m *BACnetStatusFlagsTagged) GetHeader() *BACnetTagHeader {
+ return m.Header
+}
+
+func (m *BACnetStatusFlagsTagged) GetPayload() *BACnetTagPayloadBitString {
+ return m.Payload
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+/////////////////////// Accessors for virtual fields.
+///////////////////////
+
+func (m *BACnetStatusFlagsTagged) GetInAlarm() bool {
+ return bool(m.GetPayload().GetData()[0])
+}
+
+func (m *BACnetStatusFlagsTagged) GetFault() bool {
+ return bool(m.GetPayload().GetData()[1])
+}
+
+func (m *BACnetStatusFlagsTagged) GetOverridden() bool {
+ return bool(m.GetPayload().GetData()[2])
+}
+
+func (m *BACnetStatusFlagsTagged) GetOutOfService() bool {
+ return bool(m.GetPayload().GetData()[3])
+}
+
+///////////////////////
+///////////////////////
+///////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////
+
+// NewBACnetStatusFlagsTagged factory function for BACnetStatusFlagsTagged
+func NewBACnetStatusFlagsTagged(header *BACnetTagHeader, payload *BACnetTagPayloadBitString, tagNumber uint8, tagClass TagClass) *BACnetStatusFlagsTagged {
+ return &BACnetStatusFlagsTagged{Header: header, Payload: payload, TagNumber: tagNumber, TagClass: tagClass}
+}
+
+func CastBACnetStatusFlagsTagged(structType interface{}) *BACnetStatusFlagsTagged {
+ if casted, ok := structType.(BACnetStatusFlagsTagged); ok {
+ return &casted
+ }
+ if casted, ok := structType.(*BACnetStatusFlagsTagged); ok {
+ return casted
+ }
+ return nil
+}
+
+func (m *BACnetStatusFlagsTagged) GetTypeName() string {
+ return "BACnetStatusFlagsTagged"
+}
+
+func (m *BACnetStatusFlagsTagged) GetLengthInBits() uint16 {
+ return m.GetLengthInBitsConditional(false)
+}
+
+func (m *BACnetStatusFlagsTagged) GetLengthInBitsConditional(lastItem bool) uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (header)
+ lengthInBits += m.Header.GetLengthInBits()
+
+ // Simple field (payload)
+ lengthInBits += m.Payload.GetLengthInBits()
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ // A virtual field doesn't have any in- or output.
+
+ return lengthInBits
+}
+
+func (m *BACnetStatusFlagsTagged) GetLengthInBytes() uint16 {
+ return m.GetLengthInBits() / 8
+}
+
+func BACnetStatusFlagsTaggedParse(readBuffer utils.ReadBuffer, tagNumber uint8, tagClass TagClass) (*BACnetStatusFlagsTagged, error) {
+ positionAware := readBuffer
+ _ = positionAware
+ if pullErr := readBuffer.PullContext("BACnetStatusFlagsTagged"); pullErr != nil {
+ return nil, pullErr
+ }
+ currentPos := positionAware.GetPos()
+ _ = currentPos
+
+ // Simple Field (header)
+ if pullErr := readBuffer.PullContext("header"); pullErr != nil {
+ return nil, pullErr
+ }
+ _header, _headerErr := BACnetTagHeaderParse(readBuffer)
+ if _headerErr != nil {
+ return nil, errors.Wrap(_headerErr, "Error parsing 'header' field")
+ }
+ header := CastBACnetTagHeader(_header)
+ if closeErr := readBuffer.CloseContext("header"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Validation
+ if !(bool((header.GetTagClass()) == (tagClass))) {
+ return nil, utils.ParseValidationError{"tag class doesn't match"}
+ }
+
+ // Validation
+ if !(bool(bool(bool((header.GetTagClass()) == (TagClass_APPLICATION_TAGS)))) || bool(bool(bool((header.GetActualTagNumber()) == (tagNumber))))) {
+ return nil, utils.ParseAssertError{"tagnumber doesn't match"}
+ }
+
+ // Simple Field (payload)
+ if pullErr := readBuffer.PullContext("payload"); pullErr != nil {
+ return nil, pullErr
+ }
+ _payload, _payloadErr := BACnetTagPayloadBitStringParse(readBuffer, uint32(header.GetActualLength()))
+ if _payloadErr != nil {
+ return nil, errors.Wrap(_payloadErr, "Error parsing 'payload' field")
+ }
+ payload := CastBACnetTagPayloadBitString(_payload)
+ if closeErr := readBuffer.CloseContext("payload"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Virtual field
+ _inAlarm := payload.GetData()[0]
+ inAlarm := bool(_inAlarm)
+ _ = inAlarm
+
+ // Virtual field
+ _fault := payload.GetData()[1]
+ fault := bool(_fault)
+ _ = fault
+
+ // Virtual field
+ _overridden := payload.GetData()[2]
+ overridden := bool(_overridden)
+ _ = overridden
+
+ // Virtual field
+ _outOfService := payload.GetData()[3]
+ outOfService := bool(_outOfService)
+ _ = outOfService
+
+ if closeErr := readBuffer.CloseContext("BACnetStatusFlagsTagged"); closeErr != nil {
+ return nil, closeErr
+ }
+
+ // Create the instance
+ return NewBACnetStatusFlagsTagged(header, payload, tagNumber, tagClass), nil
+}
+
+func (m *BACnetStatusFlagsTagged) Serialize(writeBuffer utils.WriteBuffer) error {
+ positionAware := writeBuffer
+ _ = positionAware
+ if pushErr := writeBuffer.PushContext("BACnetStatusFlagsTagged"); pushErr != nil {
+ return pushErr
+ }
+
+ // Simple Field (header)
+ if pushErr := writeBuffer.PushContext("header"); pushErr != nil {
+ return pushErr
+ }
+ _headerErr := m.Header.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("header"); popErr != nil {
+ return popErr
+ }
+ if _headerErr != nil {
+ return errors.Wrap(_headerErr, "Error serializing 'header' field")
+ }
+
+ // Simple Field (payload)
+ if pushErr := writeBuffer.PushContext("payload"); pushErr != nil {
+ return pushErr
+ }
+ _payloadErr := m.Payload.Serialize(writeBuffer)
+ if popErr := writeBuffer.PopContext("payload"); popErr != nil {
+ return popErr
+ }
+ if _payloadErr != nil {
+ return errors.Wrap(_payloadErr, "Error serializing 'payload' field")
+ }
+ // Virtual field
+ if _inAlarmErr := writeBuffer.WriteVirtual("inAlarm", m.GetInAlarm()); _inAlarmErr != nil {
+ return errors.Wrap(_inAlarmErr, "Error serializing 'inAlarm' field")
+ }
+ // Virtual field
+ if _faultErr := writeBuffer.WriteVirtual("fault", m.GetFault()); _faultErr != nil {
+ return errors.Wrap(_faultErr, "Error serializing 'fault' field")
+ }
+ // Virtual field
+ if _overriddenErr := writeBuffer.WriteVirtual("overridden", m.GetOverridden()); _overriddenErr != nil {
+ return errors.Wrap(_overriddenErr, "Error serializing 'overridden' field")
+ }
+ // Virtual field
+ if _outOfServiceErr := writeBuffer.WriteVirtual("outOfService", m.GetOutOfService()); _outOfServiceErr != nil {
+ return errors.Wrap(_outOfServiceErr, "Error serializing 'outOfService' field")
+ }
+
+ if popErr := writeBuffer.PopContext("BACnetStatusFlagsTagged"); popErr != nil {
+ return popErr
+ }
+ return nil
+}
+
+func (m *BACnetStatusFlagsTagged) String() string {
+ if m == nil {
+ return "<nil>"
+ }
+ buffer := utils.NewBoxedWriteBufferWithOptions(true, true)
+ if err := m.Serialize(buffer); err != nil {
+ return err.Error()
+ }
+ return buffer.GetBox().String()
+}
diff --git a/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java b/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
index 92573945e7..6ee6e7d452 100644
--- a/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
+++ b/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
@@ -725,7 +725,7 @@ public class RandomPackagesTest {
assertEquals(50, baCnetNotificationParametersUnsignedRange.getSequenceNumber().getPayload().getActualValue().longValue());
assertTrue(baCnetNotificationParametersUnsignedRange.getStatusFlags().getInAlarm());
assertFalse(baCnetNotificationParametersUnsignedRange.getStatusFlags().getFault());
- assertFalse(baCnetNotificationParametersUnsignedRange.getStatusFlags().getOverriden());
+ assertFalse(baCnetNotificationParametersUnsignedRange.getStatusFlags().getOverridden());
assertFalse(baCnetNotificationParametersUnsignedRange.getStatusFlags().getOutOfService());
assertEquals(40, baCnetNotificationParametersUnsignedRange.getExceededLimit().getPayload().getActualValue().longValue());
}
@@ -1017,7 +1017,7 @@ public class RandomPackagesTest {
BACnetNotificationParametersChangeOfState baCnetNotificationParametersChangeOfState = (BACnetNotificationParametersChangeOfState) baCnetConfirmedServiceRequestConfirmedEventNotification.getEventValues();
assertTrue(baCnetNotificationParametersChangeOfState.getStatusFlags().getInAlarm());
assertFalse(baCnetNotificationParametersChangeOfState.getStatusFlags().getFault());
- assertFalse(baCnetNotificationParametersChangeOfState.getStatusFlags().getOverriden());
+ assertFalse(baCnetNotificationParametersChangeOfState.getStatusFlags().getOverridden());
assertFalse(baCnetNotificationParametersChangeOfState.getStatusFlags().getOutOfService());
}
})
@@ -2719,7 +2719,7 @@ public class RandomPackagesTest {
);
assertThat(baCnetNotificationParametersCommandFailure)
.extracting(BACnetNotificationParametersCommandFailure::getStatusFlags)
- .extracting(BACnetStatusFlags::getInAlarm)
+ .extracting(BACnetStatusFlagsTagged::getInAlarm)
.isEqualTo(true);
assertThat(baCnetNotificationParametersCommandFailure)
.extracting(BACnetNotificationParametersCommandFailure::getFeedbackValue)
diff --git a/protocols/bacnetip/pom.xml b/protocols/bacnetip/pom.xml
index 9b20ca5618..a128942a3c 100644
--- a/protocols/bacnetip/pom.xml
+++ b/protocols/bacnetip/pom.xml
@@ -92,6 +92,16 @@
<source>${project.basedir}/src/main/script/produceTaggedPrivateEnums.groovy</source>
</configuration>
</execution>
+ <execution>
+ <id>generate-tagged-bit-strings</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${project.basedir}/src/main/script/produceTaggedBitStrings.groovy</source>
+ </configuration>
+ </execution>
</executions>
<dependencies>
<dependency>
diff --git a/protocols/bacnetip/src/main/java/org/apache/plc4x/protocol/bacnetip/BacNetIpProtocol.java b/protocols/bacnetip/src/main/java/org/apache/plc4x/protocol/bacnetip/BacNetIpProtocol.java
index e566342b53..b852ae14b6 100644
--- a/protocols/bacnetip/src/main/java/org/apache/plc4x/protocol/bacnetip/BacNetIpProtocol.java
+++ b/protocols/bacnetip/src/main/java/org/apache/plc4x/protocol/bacnetip/BacNetIpProtocol.java
@@ -49,6 +49,9 @@ public class BacNetIpProtocol implements Protocol, ProtocolHelpers {
LOGGER.info("Parsing: bacnet-enums.mspec");
typeContext = new MessageFormatParser().parse(getMspecStream("bacnet-enums"), typeContext);
+ LOGGER.info("Parsing: bacnet-bit-strings.mspec");
+ typeContext = new MessageFormatParser().parse(getMspecStream("bacnet-bit-strings"), typeContext);
+
LOGGER.info("Parsing: bacnetip.mspec");
typeContext = new MessageFormatParser().parse(getMspecStream(), typeContext);
@@ -62,6 +65,9 @@ public class BacNetIpProtocol implements Protocol, ProtocolHelpers {
LOGGER.info("Parsing: bacnet-enums-tagged.mspec");
typeContext = new MessageFormatParser().parse(getMspecStream("bacnet-enums-tagged"), typeContext);
+ LOGGER.info("Parsing: bacnet-enums-tagged.mspec");
+ typeContext = new MessageFormatParser().parse(getMspecStream("bacnet-bit-strings-tagged"), typeContext);
+
typeContext.validate();
return typeContext;
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnet-bit-strings.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnet-bit-strings.mspec
new file mode 100644
index 0000000000..14f24da746
--- /dev/null
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnet-bit-strings.mspec
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+[enum uint 8 BACnetDaysOfWeek
+ ['0' MONDAY ]
+ ['1' TUESDAY ]
+ ['2' WEDNESDAY ]
+ ['3' THURSDAY ]
+ ['4' FRIDAY ]
+ ['5' SATURDAY ]
+ ['6' SUNDAY ]
+]
+
+[enum uint 8 BACnetEventTransitionBits
+ ['0' TO_OFFNORMAL ]
+ ['1' TO_FAULT ]
+ ['2' TO_NORMAL ]
+]
+
+[enum uint 8 BACnetLimitEnable
+ ['0' LOW_LIMIT_ENABLE ]
+ ['1' HIGH_LIMIT_ENABLE ]
+]
+
+[enum uint 8 BACnetLogStatus
+ ['0' LOG_DISABLED ]
+ ['1' BUFFER_PURGED ]
+ ['2' LOG_INTERRUPTED ]
+]
+
+[enum uint 8 BACnetObjectTypesSupported
+ ['0' ANALOG_INPUT ]
+ ['1' ANALOG_OUTPUT ]
+ ['2' ANALOG_VALUE ]
+ ['3' BINARY_INPUT ]
+ ['4' BINARY_OUTPUT ]
+ ['5' BINARY_VALUE ]
+ ['6' CALENDAR ]
+ ['7' COMMAND ]
+ ['8' DEVICE ]
+ ['9' EVENT_ENROLLMENT ]
+ ['10' FILE ]
+ ['11' GROUP ]
+ ['12' LOOP ]
+ ['13' MULTI_STATE_INPUT ]
+ ['14' MULTI_STATE_OUTPUT ]
+ ['15' NOTIFICATION_CLASS ]
+ ['16' PROGRAM ]
+ ['17' SCHEDULE ]
+ ['18' AVERAGING ]
+ ['19' MULTI_STATE_VALUE ]
+ ['20' TREND_LOG ]
+ ['21' LIFE_SAFETY_POINT ]
+ ['22' LIFE_SAFETY_ZONE ]
+ ['23' ACCUMULATOR ]
+ ['24' PULSE_CONVERTER ]
+ ['25' EVENT_LOG ]
+ ['26' GLOBAL_GROUP ]
+ ['27' TREND_LOG_MULTIPLE ]
+ ['28' LOAD_CONTROL ]
+ ['29' STRUCTURED_VIEW ]
+ ['30' ACCESS_DOOR ]
+ ['31' TIMER ]
+ ['32' ACCESS_CREDENTIAL ]
+ ['33' ACCESS_POINT ]
+ ['34' ACCESS_RIGHTS ]
+ ['35' ACCESS_USER ]
+ ['36' ACCESS_ZONE ]
+ ['37' CREDENTIAL_DATA_INPUT ]
+ ['38' NETWORK_SECURITY ]
+ ['39' BITSTRING_VALUE ]
+ ['40' CHARACTERSTRING_VALUE ]
+ ['41' DATEPATTERN_VALUE ]
+ ['42' DATE_VALUE ]
+ ['43' DATETIMEPATTERN_VALUE ]
+ ['44' DATETIME_VALUE ]
+ ['45' INTEGER_VALUE ]
+ ['46' LARGE_ANALOG_VALUE ]
+ ['47' OCTETSTRING_VALUE ]
+ ['48' POSITIVE_INTEGER_VALUE ]
+ ['49' TIMEPATTERN_VALUE ]
+ ['50' TIME_VALUE ]
+ ['51' NOTIFICATION_FORWARDER ]
+ ['52' ALERT_ENROLLMENT ]
+ ['53' CHANNEL ]
+ ['54' LIGHTING_OUTPUT ]
+ ['55' BINARY_LIGHTING_OUTPUT ]
+ ['56' NETWORK_PORT ]
+ ['57' ELEVATOR_GROUP ]
+ ['58' ESCALATOR ]
+ ['59' LIFT ]
+]
+
+[enum uint 8 BACnetResultFlags
+ ['0' FIRST_ITEM ]
+ ['1' LAST_ITEM ]
+ ['2' MORE_ITEMS ]
+]
+
+[enum uint 8 BACnetServicesSupported
+// Alarm and Event Services
+ ['0' ACKNOWLEDGE_ALARM ]
+ ['1' CONFIRMED_COV_NOTIFICATION ]
+ //['42' CONFIRMED_COV_NOTIFICATION_MULTIPLE]
+ ['2' CONFIRMED_EVENT_NOTIFICATION ]
+ ['3' GET_ALARM_SUMMARY ]
+ ['4' GET_ENROLLMENT_SUMMARY ]
+ //['39' GET_EVENT_INFORMATION ]
+ //['37' LIFE_SAFETY_OPERATION ]
+ ['5' SUBSCRIBE_COV ]
+ //['38' SUBSCRIBE_COV_PROPERTY ]
+ //['41' SUBSCRIBE_COV_PROPERTY_MULTIPLE ]
+// File Access Services
+ ['6' ATOMIC_READ_FILE ]
+ ['7' ATOMIC_WRITE_FILE ]
+// Object Access Services
+ ['8' ADD_LIST_ELEMENT ]
+ ['9' REMOVE_LIST_ELEMENT ]
+ ['10' CREATE_OBJECT ]
+ ['11' DELETE_OBJECT ]
+ ['12' READ_PROPERTY ]
+ ['14' READ_PROPERTY_MULTIPLE ]
+ //['35' READ_RANGE ]
+ //['40' WRITE_GROUP ]
+ ['15' WRITE_PROPERTY ]
+ ['16' WRITE_PROPERTY_MULTIPLE ]
+// Remote Device Management Services
+ ['17' DEVICE_COMMUNICATION_CONTROL ]
+ ['18' CONFIRMED_PRIVATE_TRANSFER ]
+ ['19' CONFIRMED_TEXT_MESSAGE ]
+ ['20' REINITIALIZE_DEVICE ]
+// Virtual Terminal Services
+ ['21' VT_OPEN ]
+ ['22' VT_CLOSE ]
+ ['23' VT_DATA ]
+// Removed Services
+ // formerly: ['13' READ_PROPERTY_CONDITIONAL ] removed in version 1 revision 12
+ // formerly: ['24' AUTHENTICATE ]removed in version 1 revision 11
+ // formerly: ['25' REQUEST_KEY ] removed in version 1 revision 11
+// Unconfirmed Services
+ ['26' I_AM ]
+ ['27' I_HAVE ]
+ ['28' UNCONFIRMED_COV_NOTIFICATION ]
+ // ['43' UNCONFIRMED_COV_NOTIFICATION_MULTIPLE]
+ ['29' UNCONFIRMED_EVENT_NOTIFICATION ]
+ ['30' UNCONFIRMED_PRIVATE_TRANSFER ]
+ ['31' UNCONFIRMED_TEXT_MESSAGE ]
+ ['32' TIME_SYNCHRONIZATION ]
+ // ['36' UTC_TIME_SYNCHRONIZATION ]
+ ['33' WHO_HAS ]
+ ['34' WHO_IS ]
+// Services added after 1995
+ ['35' READ_RANGE ] // Object Access Service
+ ['36' UTC_TIME_SYNCHRONIZATION ] // Remote Device Management Service
+ ['37' LIFE_SAFETY_OPERATION ] // Alarm and Event Service
+ ['38' SUBSCRIBE_COV_PROPERTY ] // Alarm and Event Service
+ ['39' GET_EVENT_INFORMATION ] // Alarm and Event Service
+ ['40' WRITE_GROUP ] // Object Access Services
+// Services added after 2012
+ ['41' SUBSCRIBE_COV_PROPERTY_MULTIPLE ] // Alarm and Event Service
+ ['42' CONFIRMED_COV_NOTIFICATION_MULTIPLE ] // Alarm and Event Service
+ ['43' UNCONFIRMED_COV_NOTIFICATION_MULTIPLE]// Alarm and Event Service
+]
+
+[enum uint 8 BACnetStatusFlags
+ ['0' IN_ALARM ]
+ ['1' FAULT ]
+ ['2' OVERRIDDEN ]
+ ['3' OUT_OF_SERVICE ]
+]
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index 7a39771e1a..e43a8b32b9 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -199,16 +199,18 @@
[optional uint 8 proposedWindowSize 'segmentedMessage' ]
[virtual uint 16 apduHeaderReduction
// apduType(4bit)+bits(3bit)+reserved(2bits)+maxSegmentsAccepted(3bit)+maxApduLengthAccepted(4bit)+originalInvokeId(8bit)+(sequenceNumber(8bit)+proposedWindowSize(8bit))?
- '3 + (segmentedMessage ? 2 : 0)' ]
+ '3 + (segmentedMessage ? 2 : 0)' ]
[optional BACnetConfirmedServiceRequest('apduLength - apduHeaderReduction')
- serviceRequest '!segmentedMessage' ]
- [validation '(!segmentedMessage && serviceRequest != null) || segmentedMessage' "service request should be set" ]
+ serviceRequest '!segmentedMessage' ]
+ [validation '(!segmentedMessage && serviceRequest != null) || segmentedMessage'
+ "service request should be set" ]
// When we read the first segment we want the service choice to be part of the bytes so we only read it > 0
[optional uint 8 segmentServiceChoice 'segmentedMessage && sequenceNumber != 0']
- [virtual uint 16 segmentReduction '(segmentServiceChoice != null)?(apduHeaderReduction+1):(apduHeaderReduction))'
+ [virtual uint 16 segmentReduction
+ '(segmentServiceChoice != null)?(apduHeaderReduction+1):apduHeaderReduction' ]
[array byte segment
length
- 'segmentedMessage?((apduLength>0)?(apduLength - segmentReduction):0):0']
+ 'segmentedMessage?((apduLength>0)?(apduLength - segmentReduction):0):0' ]
]
['UNCONFIRMED_REQUEST_PDU' APDUUnconfirmedRequest
[reserved uint 4 '0' ]
@@ -232,10 +234,13 @@
'2 + (segmentedMessage ? 2 : 0)' ]
[optional BACnetServiceAck('apduLength - apduHeaderReduction')
serviceAck '!segmentedMessage' ]
- [validation '(!segmentedMessage && serviceAck != null) || segmentedMessage' "service ack should be set" ]
+ [validation '(!segmentedMessage && serviceAck != null) || segmentedMessage'
+ "service ack should be set" ]
// When we read the first segment we want the service choice to be part of the bytes so we only read it > 0
[optional uint 8 segmentServiceChoice 'segmentedMessage && sequenceNumber != 0']
- [virtual uint 16 segmentReduction '(segmentServiceChoice != null)?(apduHeaderReduction+1):(apduHeaderReduction))'
+ [virtual uint 16 segmentReduction
+ '(segmentServiceChoice != null)?(apduHeaderReduction+1):apduHeaderReduction'
+ ]
[array byte segment
length
'segmentedMessage?((apduLength>0)?(apduLength - segmentReduction):0):0'
@@ -934,7 +939,8 @@
['GET_ALARM_SUMMARY' BACnetServiceAckGetAlarmSummary
[simple BACnetApplicationTagObjectIdentifier objectIdentifier ]
[simple BACnetEventStateTagged('0', 'TagClass.APPLICATION_TAGS') eventState ]
- [simple BACnetEventTransitionBitsApplication acknowledgedTransitions ]
+ [simple BACnetEventTransitionBitsTagged('0', 'TagClass.APPLICATION_TAGS')
+ acknowledgedTransitions ]
]
['GET_ENROLLMENT_SUMMARY' BACnetServiceAckGetEnrollmentSummary
[simple BACnetApplicationTagObjectIdentifier objectIdentifier ]
@@ -986,7 +992,7 @@
[simple BACnetContextTagObjectIdentifier('0', 'BACnetDataType.BACNET_OBJECT_IDENTIFIER') objectIdentifier ]
[simple BACnetPropertyIdentifierTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS') propertyIdentifier ]
[optional BACnetContextTagUnsignedInteger('2', 'BACnetDataType.UNSIGNED_INTEGER') propertyArrayIndex ]
- [simple BACnetResultFlags('3') resultFlags ]
+ [simple BACnetResultFlagsTagged('3', 'TagClass.CONTEXT_SPECIFIC_TAGS') resultFlags ]
[simple BACnetContextTagUnsignedInteger('4', 'BACnetDataType.UNSIGNED_INTEGER') itemCount ]
[optional BACnetConstructedData('5', 'objectIdentifier.objectType', 'propertyIdentifier.value') itemData ]
[optional BACnetContextTagUnsignedInteger('6', 'BACnetDataType.UNSIGNED_INTEGER') firstSequenceNumber ]
@@ -1058,13 +1064,13 @@
objectIdentifier ]
[simple BACnetEventStateTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
eventState ]
- [simple BACnetEventTransitionBits('2')
+ [simple BACnetEventTransitionBitsTagged('2', 'TagClass.CONTEXT_SPECIFIC_TAGS')
acknowledgedTransitions ]
[simple BACnetEventTimestamps('3')
eventTimestamps ]
[simple BACnetNotifyTypeTagged('4', 'TagClass.CONTEXT_SPECIFIC_TAGS')
notifyType ]
- [simple BACnetEventTransitionBits('5')
+ [simple BACnetEventTransitionBitsTagged('5', 'TagClass.CONTEXT_SPECIFIC_TAGS')
eventEnable ]
[simple BACnetEventPriorities('6')
eventPriorities ]
@@ -1100,23 +1106,6 @@
]
]
-[type BACnetEventTransitionBits(uint 8 tagNumber)
- [simple BACnetContextTagBitString('tagNumber', 'BACnetDataType.BIT_STRING')
- rawBits ]
- [virtual bit toOffnormal 'rawBits.payload.data[0]']
- [virtual bit toFault 'rawBits.payload.data[1]']
- [virtual bit toNormal 'rawBits.payload.data[2]']
-]
-
-// TODO: check if we can do that a bit smarter
-[type BACnetEventTransitionBitsApplication
- [simple BACnetApplicationTagBitString
- rawBits ]
- [virtual bit toOffnormal 'rawBits.payload.data[0]']
- [virtual bit toFault 'rawBits.payload.data[1]']
- [virtual bit toNormal 'rawBits.payload.data[2]']
-]
-
[type BACnetGroupChannelValueList(uint 8 tagNumber)
[simple BACnetOpeningTag('tagNumber')
openingTag ]
@@ -1270,15 +1259,6 @@
shouldFail=false ]
]
-[type BACnetResultFlags(uint 8 tagNumber)
- [simple BACnetContextTagBitString('tagNumber', 'BACnetDataType.BIT_STRING')
- rawBits
- ]
- [virtual bit firstItem 'rawBits.payload.data[0]']
- [virtual bit lastItem 'rawBits.payload.data[1]']
- [virtual bit moreItems 'rawBits.payload.data[2]']
-]
-
[type BACnetServiceAckAtomicReadFileStreamOrRecord
[peek BACnetTagHeader
peekedTagHeader
@@ -1416,7 +1396,7 @@
innerOpeningTag ]
[simple BACnetContextTagBitString('0', 'BACnetDataType.BIT_STRING')
changeOfBitString ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetClosingTag('peekedTagNumber')
innerClosingTag ]
@@ -1426,7 +1406,7 @@
innerOpeningTag ]
[simple BACnetPropertyStatesEnclosed('0')
changeOfState ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetClosingTag('peekedTagNumber')
innerClosingTag ]
@@ -1436,7 +1416,7 @@
innerOpeningTag ]
[simple BACnetNotificationParametersChangeOfValueNewValue('0')
newValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetClosingTag('peekedTagNumber')
innerClosingTag ]
@@ -1446,7 +1426,7 @@
innerOpeningTag ]
[simple BACnetConstructedData('0', 'objectType', 'BACnetPropertyIdentifier.VENDOR_PROPRIETARY_VALUE')
commandValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetConstructedData('2', 'objectType', 'BACnetPropertyIdentifier.VENDOR_PROPRIETARY_VALUE')
feedbackValue ]
@@ -1458,7 +1438,7 @@
innerOpeningTag ]
[simple BACnetContextTagReal('0', 'BACnetDataType.REAL')
referenceValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagReal('2', 'BACnetDataType.REAL')
setPointValue ]
@@ -1472,7 +1452,7 @@
innerOpeningTag ]
[simple BACnetContextTagReal('0', 'BACnetDataType.REAL')
exceedingValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagReal('2', 'BACnetDataType.REAL')
deadband ]
@@ -1493,7 +1473,7 @@
newState ]
[simple BACnetLifeSafetyModeTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
newMode ]
- [simple BACnetStatusFlags('2')
+ [simple BACnetStatusFlagsTagged('2', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetLifeSafetyOperationTagged('3', 'TagClass.CONTEXT_SPECIFIC_TAGS')
operationExpected ]
@@ -1529,7 +1509,7 @@
innerOpeningTag ]
[simple BACnetContextTagUnsignedInteger('0', 'BACnetDataType.UNSIGNED_INTEGER')
sequenceNumber ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagUnsignedInteger('2', 'BACnetDataType.UNSIGNED_INTEGER')
exceededLimit ]
@@ -1542,7 +1522,7 @@
innerOpeningTag ]
[simple BACnetAccessEventTagged('0', 'TagClass.CONTEXT_SPECIFIC_TAGS')
accessEvent ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagUnsignedInteger('2', 'BACnetDataType.UNSIGNED_INTEGER')
accessEventTag ]
@@ -1560,7 +1540,7 @@
innerOpeningTag ]
[simple BACnetContextTagDouble('0', 'BACnetDataType.DOUBLE')
exceedingValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagDouble('2', 'BACnetDataType.DOUBLE')
deadband ]
@@ -1574,7 +1554,7 @@
innerOpeningTag ]
[simple BACnetContextTagSignedInteger('0', 'BACnetDataType.SIGNED_INTEGER')
exceedingValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagUnsignedInteger('2', 'BACnetDataType.UNSIGNED_INTEGER')
deadband ]
@@ -1588,7 +1568,7 @@
innerOpeningTag ]
[simple BACnetContextTagUnsignedInteger('0', 'BACnetDataType.UNSIGNED_INTEGER')
exceedingValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagUnsignedInteger('2', 'BACnetDataType.UNSIGNED_INTEGER')
deadband ]
@@ -1602,7 +1582,7 @@
innerOpeningTag ]
[simple BACnetContextTagCharacterString('0', 'BACnetDataType.CHARACTER_STRING')
changedValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetContextTagCharacterString('2', 'BACnetDataType.CHARACTER_STRING')
alarmValue ]
@@ -1614,7 +1594,7 @@
innerOpeningTag ]
[simple BACnetConstructedData('0', 'objectType', 'BACnetPropertyIdentifier.VENDOR_PROPRIETARY_VALUE')
presentValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
referencedFlags ]
[simple BACnetClosingTag('peekedTagNumber')
innerClosingTag ]
@@ -1624,7 +1604,7 @@
innerOpeningTag ]
[simple BACnetReliabilityTagged('0', 'TagClass.CONTEXT_SPECIFIC_TAGS')
reliability ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetPropertyValues('2', 'objectType')
propertyValues ]
@@ -1637,7 +1617,7 @@
innerOpeningTag ]
[simple BACnetNotificationParametersChangeOfDiscreteValueNewValue('0')
newValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetClosingTag('peekedTagNumber')
innerClosingTag ]
@@ -1647,7 +1627,7 @@
innerOpeningTag ]
[simple BACnetTimerStateTagged('0', 'TagClass.CONTEXT_SPECIFIC_TAGS')
newValue ]
- [simple BACnetStatusFlags('1')
+ [simple BACnetStatusFlagsTagged('1', 'TagClass.CONTEXT_SPECIFIC_TAGS')
statusFlags ]
[simple BACnetDateTimeEnclosed('2')
updateTime ]
@@ -1765,16 +1745,6 @@
[simple BACnetClosingTag('tagNumber') closingTag ]
]
-[type BACnetStatusFlags(uint 8 tagNumber)
- [simple BACnetContextTagBitString('tagNumber', 'BACnetDataType.BIT_STRING')
- rawBits
- ]
- [virtual bit inAlarm 'rawBits.payload.data[0]']
- [virtual bit fault 'rawBits.payload.data[1]']
- [virtual bit overriden 'rawBits.payload.data[2]']
- [virtual bit outOfService 'rawBits.payload.data[3]']
-]
-
[type BACnetNotificationParametersChangeOfDiscreteValueNewValue(uint 8 tagNumber)
[simple BACnetOpeningTag('tagNumber')
openingTag ]
@@ -2395,9 +2365,9 @@
[optional REAL highLimit ]
[optional REAL lowLimit ]
[optional REAL deadband ]
- [optional BACnetLimitEnable limitEnable ]
- [optional BACnetEventTransitionBits eventEnable ]
- [optional BACnetEventTransitionBits ackedTransitions ]
+ [optional BACnetLimitEnableTagged('0', 'TagClass.APPLICATION_TAGS') limitEnable ]
+ [optional BACnetEventTransitionBitsTagged('0', 'TagClass.APPLICATION_TAGS') eventEnable ]
+ [optional BACnetEventTransitionBitsTagged('0', 'TagClass.APPLICATION_TAGS') ackedTransitions ]
[optional BACnetNotifyType notifyType ]
[optional BACnetARRAY[3] of BACnetTimeStamp eventTime_stamps ]
[optional BACnetARRAY[3] of CharacterString eventMessageTexts ]
@@ -2668,7 +2638,7 @@
//[*, 'DERIVATIVE_CONSTANT' BACnetConstructedDataDerivativeConstant [validation '1 == 2' "TODO: implement me DERIVATIVE_CONSTANT BACnetConstructedDataDerivativeConstant"]]
[*, 'DERIVATIVE_CONSTANT_UNITS' BACnetConstructedDataDerivativeConstantUnits
[simple BACnetEngineeringUnitsTagged('0', 'TagClass.APPLICATION_TAGS') units ]
-
+ ]
//[*, 'DESCRIPTION' BACnetConstructedDataDescription [validation '1 == 2' "TODO: implement me DESCRIPTION BACnetConstructedDataDescription"]]
//[*, 'DESCRIPTION_OF_HALT' BACnetConstructedDataDescriptionOfHalt [validation '1 == 2' "TODO: implement me DESCRIPTION_OF_HALT BACnetConstructedDataDescriptionOfHalt"]]
//[*, 'DEVICE_ADDRESS_BINDING' BACnetConstructedDataDeviceAddressBinding [validation '1 == 2' "TODO: implement me DEVICE_ADDRESS_BINDING BACnetConstructedDataDeviceAddressBinding"]]
@@ -2758,7 +2728,7 @@
//[*, 'INTEGRAL_CONSTANT' BACnetConstructedDataIntegralConstant [validation '1 == 2' "TODO: implement me INTEGRAL_CONSTANT BACnetConstructedDataIntegralConstant"]]
[*, 'INTEGRAL_CONSTANT_UNITS' BACnetConstructedDataIntegralConstantUnits
[simple BACnetEngineeringUnitsTagged('0', 'TagClass.APPLICATION_TAGS') units ]
-
+ ]
//[*, 'INTERFACE_VALUE' BACnetConstructedDataInterfaceValue [validation '1 == 2' "TODO: implement me INTERFACE_VALUE BACnetConstructedDataInterfaceValue"]]
//[*, 'INTERVAL_OFFSET' BACnetConstructedDataIntervalOffset [validation '1 == 2' "TODO: implement me INTERVAL_OFFSET BACnetConstructedDataIntervalOffset"]]
//[*, 'IP_ADDRESS' BACnetConstructedDataIpAddress [validation '1 == 2' "TODO: implement me IP_ADDRESS BACnetConstructedDataIpAddress"]]
@@ -2903,7 +2873,7 @@
]
[*, 'OUTPUT_UNITS' BACnetConstructedDataOutputUnits
[simple BACnetEngineeringUnitsTagged('0', 'TagClass.APPLICATION_TAGS') units ]
-
+ ]
//[*, 'PACKET_REORDER_TIME' BACnetConstructedDataPacketReorderTime [validation '1 == 2' "TODO: implement me PACKET_REORDER_TIME BACnetConstructedDataPacketReorderTime"]]
//[*, 'PASSBACK_MODE' BACnetConstructedDataPassbackMode [validation '1 == 2' "TODO: implement me PASSBACK_MODE BACnetConstructedDataPassbackMode"]]
//[*, 'PASSBACK_TIMEOUT' BACnetConstructedDataPassbackTimeout [validation '1 == 2' "TODO: implement me PASSBACK_TIMEOUT BACnetConstructedDataPassbackTimeout"]]
@@ -2931,7 +2901,7 @@
//[*, 'PROPORTIONAL_CONSTANT' BACnetConstructedDataProportionalConstant [validation '1 == 2' "TODO: implement me PROPORTIONAL_CONSTANT BACnetConstructedDataProportionalConstant"]]
[*, 'PROPORTIONAL_CONSTANT_UNITS' BACnetConstructedDataProportionalConstantUnits
[simple BACnetEngineeringUnitsTagged('0', 'TagClass.APPLICATION_TAGS') units ]
-
+ ]
//[*, 'PROTOCOL_LEVEL' BACnetConstructedDataProtocolLevel [validation '1 == 2' "TODO: implement me PROTOCOL_LEVEL BACnetConstructedDataProtocolLevel"]]
//[*, 'PROTOCOL_CONFORMANCE_CLASS' BACnetConstructedDataProtocolConformanceClass [validation '1 == 2' "TODO: implement me PROTOCOL_CONFORMANCE_CLASS BACnetConstructedDataProtocolConformanceClass"]]
//[*, 'PROTOCOL_OBJECT_TYPES_SUPPORTED' BACnetConstructedDataProtocolObjectTypesSupported [validation '1 == 2' "TODO: implement me PROTOCOL_OBJECT_TYPES_SUPPORTED BACnetConstructedDataProtocolObjectTypesSupported"]]
@@ -3023,7 +2993,7 @@
//[*, 'TRIGGER' BACnetConstructedDataTrigger [validation '1 == 2' "TODO: implement me TRIGGER BACnetConstructedDataTrigger"]]
[*, 'UNITS' BACnetConstructedDataUnits
[simple BACnetEngineeringUnitsTagged('0', 'TagClass.APPLICATION_TAGS') units ]
-
+ ]
//[*, 'UPDATE_INTERVAL' BACnetConstructedDataUpdateInterval [validation '1 == 2' "TODO: implement me UPDATE_INTERVAL BACnetConstructedDataUpdateInterval"]]
//[*, 'UPDATE_KEY_SET_TIMEOUT' BACnetConstructedDataUpdateKeySetTimeout [validation '1 == 2' "TODO: implement me UPDATE_KEY_SET_TIMEOUT BACnetConstructedDataUpdateKeySetTimeout"]]
//[*, 'UPDATE_TIME' BACnetConstructedDataUpdateTime [validation '1 == 2' "TODO: implement me UPDATE_TIME BACnetConstructedDataUpdateTime"]]
diff --git a/protocols/bacnetip/src/main/script/produceTaggedBitStrings.groovy b/protocols/bacnetip/src/main/script/produceTaggedBitStrings.groovy
new file mode 100644
index 0000000000..3cbde17c9d
--- /dev/null
+++ b/protocols/bacnetip/src/main/script/produceTaggedBitStrings.groovy
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import groovy.text.SimpleTemplateEngine
+import org.apache.maven.project.MavenProject
+
+project = (MavenProject) project
+def bacnetEnumsFile = new File(project.basedir, "src/main/resources/protocols/bacnetip/bacnet-bit-strings.mspec")
+foundEnums = []
+enumPattern = ~/\[enum \w+ \d+ (\w+)\r?\n((?: *\[.*]\r?\n)*)]/
+enumEntryPattern = ~/ *\['(\d)+' *([\w_]+).*]/
+matcher = bacnetEnumsFile.text =~ enumPattern
+if (matcher.find()) {
+ matcher.each {
+ def enumName = it[1]
+ def enumContent = it[2]
+ entryMatcher = enumContent =~ enumEntryPattern
+ if (!entryMatcher.find()) {
+ throw new IllegalStateException("$enumName has no entries")
+ }
+ def enumEntries = [:]
+ entryMatcher.each {
+ def enumId = it[1]
+ def enumInstanceName = it[2]
+ def enumCamelCase = enumInstanceName.toLowerCase().replaceAll("(_)([A-Za-z0-9])", { it[2].toUpperCase() })
+ enumEntries[enumId] = [enumId: enumId, enumInstanceName: enumInstanceName, enumCamelCase: enumCamelCase]
+ }
+ log.info("Generating type for {} with {} entries", enumName, enumEntries.size())
+ foundEnums << [name: enumName, enumContent: enumContent, enumEntries: enumEntries]
+ }
+}
+
+taggedEnumsTemplate = """
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+<% for (item in values) { %>
+[type <%= item.name %>Tagged(uint 8 tagNumber, TagClass tagClass)
+ [simple BACnetTagHeader
+ header ]
+ [validation 'header.tagClass == tagClass' "tag class doesn't match" ]
+ [validation '(header.tagClass == TagClass.APPLICATION_TAGS) || (header.actualTagNumber == tagNumber)'
+ "tagnumber doesn't match" shouldFail=false ]
+ [simple BACnetTagPayloadBitString('header.actualLength')
+ payload ]
+
+<% for (enumIndex in item.enumEntries.keySet().sort()) { %> [virtual bit <%= item.enumEntries[enumIndex].enumCamelCase %> 'payload.data[<%= enumIndex %>]' ]\n<% } %>
+]
+<% } %>
+"""
+SimpleTemplateEngine templateEngine = new SimpleTemplateEngine()
+def template = templateEngine.createTemplate(taggedEnumsTemplate).make([values: foundEnums])
+
+def mspecTargetDir = new File(project.build.getOutputDirectory(), "/protocols/bacnetip")
+if (!mspecTargetDir.exists()) {
+ mspecTargetDir.mkdirs()
+}
+def vendorIdMspec = new File(mspecTargetDir, "bacnet-bit-strings-tagged.mspec")
+
+template.writeTo(vendorIdMspec.newWriter())