From 074dca1f08b3c5e9e418a023a2ae05e5623473f8 Mon Sep 17 00:00:00 2001 From: wes-johnson Date: Tue, 24 Nov 2026 19:07:58 +0000 Subject: [PATCH 1/3] [#495] Remove the Text DataType Text was never distinguishable from String. Both were defined as "String value (UTF-8)", both map to Protocol Buffers string, both ride in ValueArray's string_values, and nothing anywhere in the specification said what made one different from the other. Inductive Automation, whose tag types Sparkplug's are modelled on, deprecated Text in Ignition 8.1.8 and documents no difference between the two either. Ignition also has a String Array and no Text array, which is the same asymmetry #495 reported here. So this removes Text rather than defining it or adding the TextArray that would complete the set, since a second array type whose elements are indistinguishable from StringArray's would duplicate the ambiguity rather than resolve it. Sparkplug 4 is unreleased, so the type can go now at no cost to anyone. Enum value 14 is left unused, with a comment recording what it was. Renumbering the types above it would churn every implementation already tracking v4 drafts for no benefit. On the TCK side: Text is removed from the four vendored DataType model enums and from the switch arms that folded it in with String, the Basic Types upper bound in SendComplexDataTest becomes DateTime, and the utility Edge Node drops its Text metrics and the Texts column of its DataSet fixture. Nothing referenced those by name. The large-value use Text was informally put to is the subject of #444, which proposes a type for generic JSON. --- .../asciidoc/chapters/Sparkplug_6_Payloads.adoc | 13 +++++-------- .../impl/exception/json/DataSetDeserializer.java | 1 - .../exception/message/SparkplugBPayloadEncoder.java | 5 ----- .../impl/exception/model/DataSetDataType.java | 3 --- .../impl/exception/model/MetricDataType.java | 3 --- .../impl/exception/model/ParameterDataType.java | 3 --- .../impl/exception/model/PropertyDataType.java | 3 --- .../eclipse/sparkplug/tck/test/common/Utils.java | 1 - .../tck/test/edge/SendComplexDataTest.java | 2 +- .../org/eclipse/sparkplug/tck/utility/EdgeNode.java | 12 +++--------- 10 files changed, 9 insertions(+), 37 deletions(-) diff --git a/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc b/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc index 06fe94a0..d847b4cc 100644 --- a/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc +++ b/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc @@ -160,7 +160,8 @@ enum DataType { Boolean = 11; String = 12; DateTime = 13; - Text = 14; + // 14 was Text in Sparkplug B. It is not used in this version: it was never distinguishable + // from String, and the platform the type came from has deprecated it. // Additional Metric Types UUID = 15; @@ -265,7 +266,7 @@ message Payload { repeated float float_values = 6; // Float repeated double double_values = 7; // Double repeated bool boolean_values = 8; // Boolean - repeated string string_values = 9; // String, Text + repeated string string_values = 9; // String // The indexes of the elements that are null. Omitted entirely when none are. repeated uint32 null_indexes = 10; @@ -1674,7 +1675,8 @@ enum DataType { Boolean = 11; String = 12; DateTime = 13; - Text = 14; + // 14 was Text in Sparkplug B. It is not used in this version: it was never distinguishable + // from String, and the platform the type came from has deprecated it. // Additional Metric Types UUID = 15; @@ -1772,11 +1774,6 @@ representation it interoperates with is signed, so the ceiling is 2262-04-11 as link:#operational_behavior_timestamps[Timestamps] section. A DateTime carried in an array or a DataSet.Column uses the int64_values array of the ValueArray, as the link:#payloads_p_datatype_array[Array Types] section describes. -* _Text_ -** String value (UTF-8) -** Google Protocol Buffer Type: string -** Sparkplug enum value: 14 - [[payloads_p_datatype_additional]] * *Additional Types* ** _UUID_ diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/json/DataSetDeserializer.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/json/DataSetDeserializer.java index 2298ae66..c89cdb8d 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/json/DataSetDeserializer.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/json/DataSetDeserializer.java @@ -117,7 +117,6 @@ private Value getValueFromNode(JsonNode nodeValue, DataSetDataType type) { case UInt32: case Int64: return new Value(type, (long) nodeValue.asLong()); - case Text: case String: return new Value(type, nodeValue.asText()); case UInt64: diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/message/SparkplugBPayloadEncoder.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/message/SparkplugBPayloadEncoder.java index a1157a5c..30d648ea 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/message/SparkplugBPayloadEncoder.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/message/SparkplugBPayloadEncoder.java @@ -215,7 +215,6 @@ private SparkplugBProto.Payload.PropertySet.Builder convertPropertySet(PropertyS builder.setUint64Value(bigIntegerToUnsignedLong((BigInteger) value.getValue())); break; case String: - case Text: builder.setStringValue((String) value.getValue()); break; case PropertySet: @@ -288,7 +287,6 @@ private SparkplugBProto.Payload.Template.Parameter.Builder setParameterValue( case UInt64: builder.getTypedValueBuilder().setUint64Value(bigIntegerToUnsignedLong((BigInteger) value)); break; - case Text: case String: builder.getTypedValueBuilder().setStringValue((String) value); break; @@ -356,7 +354,6 @@ private SparkplugBProto.Payload.Metric.Builder setMetricValue(SparkplugBProto.Pa metricBuilder.getValueBuilder().setUint64Value(bigIntegerToUnsignedLong((BigInteger) metric.getValue())); break; case String: - case Text: case UUID: metricBuilder.getValueBuilder().setStringValue((String) metric.getValue()); break; @@ -741,7 +738,6 @@ private void addDataSetValue(SparkplugBProto.Payload.DataSet.Column.Builder colu va.addBooleanValues(toBoolean(raw)); break; case String: - case Text: va.addStringValues((String) raw); break; default: @@ -813,7 +809,6 @@ private void addDataSetPlaceholder(SparkplugBProto.Payload.DataSet.Column.Builde va.addBooleanValues(false); break; case String: - case Text: va.addStringValues(""); break; default: diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/DataSetDataType.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/DataSetDataType.java index 407a755d..abd588e3 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/DataSetDataType.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/DataSetDataType.java @@ -37,7 +37,6 @@ public enum DataSetDataType { Boolean(11, Boolean.class), String(12, String.class), DateTime(13, Date.class), - Text(14, String.class), // Unknown Unknown(0, Object.class); @@ -99,8 +98,6 @@ public static DataSetDataType fromInteger(int i) { return String; case 13: return DateTime; - case 14: - return Text; default: return Unknown; } diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java index 7e1e5f7d..e1ddfb62 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java @@ -40,7 +40,6 @@ public enum MetricDataType { Boolean(11, Boolean.class), String(12, String.class), DateTime(13, Date.class), - Text(14, String.class), // Custom Types for Metrics UUID(15, String.class), @@ -130,8 +129,6 @@ public static MetricDataType fromInteger(int i) { return String; case 13: return DateTime; - case 14: - return Text; case 15: return UUID; case 16: diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/ParameterDataType.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/ParameterDataType.java index 38022663..3f7bbd3e 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/ParameterDataType.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/ParameterDataType.java @@ -39,7 +39,6 @@ public enum ParameterDataType { Boolean(11, Boolean.class), String(12, String.class), DateTime(13, Date.class), - Text(14, String.class), // Unknown Unknown(0, Object.class); @@ -104,8 +103,6 @@ public static ParameterDataType fromInteger(int i) { return String; case 13: return DateTime; - case 14: - return Text; default: return Unknown; } diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java index afe91f9d..6bdc5548 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java @@ -40,7 +40,6 @@ public enum PropertyDataType { Boolean(11, Boolean.class), String(12, String.class), DateTime(13, Date.class), - Text(14, String.class), // Custom Types for PropertySets PropertySet(20, PropertySet.class), @@ -113,8 +112,6 @@ public static PropertyDataType fromInteger(int i) { return String; case 13: return DateTime; - case 14: - return Text; case 20: return PropertySet; case 21: diff --git a/tck/src/main/java/org/eclipse/sparkplug/tck/test/common/Utils.java b/tck/src/main/java/org/eclipse/sparkplug/tck/test/common/Utils.java index b9ec84d1..79962c91 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/tck/test/common/Utils.java +++ b/tck/src/main/java/org/eclipse/sparkplug/tck/test/common/Utils.java @@ -226,7 +226,6 @@ private static Payload.TypedValue.ValueCase expectedValueCase(DataType datatype) case Boolean: return Payload.TypedValue.ValueCase.BOOLEAN_VALUE; case String: - case Text: case UUID: return Payload.TypedValue.ValueCase.STRING_VALUE; case Bytes: diff --git a/tck/src/main/java/org/eclipse/sparkplug/tck/test/edge/SendComplexDataTest.java b/tck/src/main/java/org/eclipse/sparkplug/tck/test/edge/SendComplexDataTest.java index 969a526b..191832cb 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/tck/test/edge/SendComplexDataTest.java +++ b/tck/src/main/java/org/eclipse/sparkplug/tck/test/edge/SendComplexDataTest.java @@ -658,7 +658,7 @@ public boolean checkTemplate(final @NotNull PublishPacket packet) { if (p.getTypedValue().hasDatatype()) { int curtype = p.getTypedValue().getDatatype().getNumber(); // -type-value asks the narrower question: is it a Basic Data Type - boolean isBasicType = curtype >= 0 && curtype <= DataType.Text.getNumber(); + boolean isBasicType = curtype >= 0 && curtype <= DataType.DateTime.getNumber(); if (!isBasicType) { logger.info("FOR {} the TYPE is: {} AND {}", p.getName(), curtype, p); } diff --git a/tck/src/main/java/org/eclipse/sparkplug/tck/utility/EdgeNode.java b/tck/src/main/java/org/eclipse/sparkplug/tck/utility/EdgeNode.java index 793a19e2..81a1ed4f 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/tck/utility/EdgeNode.java +++ b/tck/src/main/java/org/eclipse/sparkplug/tck/utility/EdgeNode.java @@ -25,7 +25,6 @@ import static org.eclipse.sparkplug.impl.exception.model.MetricDataType.Int8; import static org.eclipse.sparkplug.impl.exception.model.MetricDataType.String; import static org.eclipse.sparkplug.impl.exception.model.MetricDataType.Template; -import static org.eclipse.sparkplug.impl.exception.model.MetricDataType.Text; import static org.eclipse.sparkplug.impl.exception.model.MetricDataType.UInt16; import static org.eclipse.sparkplug.impl.exception.model.MetricDataType.UInt32; import static org.eclipse.sparkplug.impl.exception.model.MetricDataType.UInt64; @@ -414,7 +413,6 @@ private List newMetrics(boolean isBirth) throws SparkplugException { metrics.add(new MetricBuilder("Boolean", Boolean, random.nextBoolean()).createMetric()); metrics.add(new MetricBuilder("String", String, newUUID()).createMetric()); metrics.add(new MetricBuilder("DateTime", DateTime, new Date()).createMetric()); - metrics.add(new MetricBuilder("Text", Text, newUUID()).createMetric()); metrics.add(new MetricBuilder("UUID", UUID, newUUID()).createMetric()); // metrics.add(new MetricBuilder("Bytes", Bytes, // randomBytes(20)).createMetric()); @@ -512,7 +510,6 @@ private Template newTemplate(boolean isDef, String templatRef) throws SparkplugE metrics.add(new MetricBuilder("MyBoolean", Boolean, random.nextBoolean()).createMetric()); metrics.add(new MetricBuilder("MyString", String, newUUID()).createMetric()); metrics.add(new MetricBuilder("MyDateTime", DateTime, new Date()).createMetric()); - metrics.add(new MetricBuilder("MyText", Text, newUUID()).createMetric()); metrics.add(new MetricBuilder("MyUUID", UUID, newUUID()).createMetric()); return new TemplateBuilder().version("v1.0").templateRef(templatRef).definition(isDef) @@ -524,12 +521,11 @@ private DataSet newDataSet() throws SparkplugException { return new DataSetBuilder(14).addColumnName("Int8s").addColumnName("Int16s").addColumnName("Int32s") .addColumnName("Int64s").addColumnName("UInt8s").addColumnName("UInt16s").addColumnName("UInt32s") .addColumnName("UInt64s").addColumnName("Floats").addColumnName("Doubles").addColumnName("Booleans") - .addColumnName("Strings").addColumnName("Dates").addColumnName("Texts").addType(DataSetDataType.Int8) + .addColumnName("Strings").addColumnName("Dates").addType(DataSetDataType.Int8) .addType(DataSetDataType.Int16).addType(DataSetDataType.Int32).addType(DataSetDataType.Int64) .addType(DataSetDataType.UInt8).addType(DataSetDataType.UInt16).addType(DataSetDataType.UInt32) .addType(DataSetDataType.UInt64).addType(DataSetDataType.Float).addType(DataSetDataType.Double) .addType(DataSetDataType.Boolean).addType(DataSetDataType.String).addType(DataSetDataType.DateTime) - .addType(DataSetDataType.Text) .addRow(new RowBuilder().addValue(new Value(DataSetDataType.Int8, (byte) random.nextInt())) .addValue(new Value(DataSetDataType.Int16, (short) random.nextInt())) .addValue(new Value(DataSetDataType.Int32, random.nextInt())) @@ -542,8 +538,7 @@ private DataSet newDataSet() throws SparkplugException { .addValue(new Value(DataSetDataType.Double, random.nextDouble())) .addValue(new Value(DataSetDataType.Boolean, random.nextBoolean())) .addValue(new Value(DataSetDataType.String, newUUID())) - .addValue(new Value(DataSetDataType.DateTime, new Date())) - .addValue(new Value(DataSetDataType.Text, newUUID())).createRow()) + .addValue(new Value(DataSetDataType.DateTime, new Date())).createRow()) .addRow(new RowBuilder().addValue(new Value(DataSetDataType.Int8, (byte) random.nextInt())) .addValue(new Value(DataSetDataType.Int16, (short) random.nextInt())) .addValue(new Value(DataSetDataType.Int32, random.nextInt())) @@ -556,8 +551,7 @@ private DataSet newDataSet() throws SparkplugException { .addValue(new Value(DataSetDataType.Double, random.nextDouble())) .addValue(new Value(DataSetDataType.Boolean, random.nextBoolean())) .addValue(new Value(DataSetDataType.String, newUUID())) - .addValue(new Value(DataSetDataType.DateTime, new Date())) - .addValue(new Value(DataSetDataType.Text, newUUID())).createRow()) + .addValue(new Value(DataSetDataType.DateTime, new Date())).createRow()) .createDataSet(); } From 5ee309ed00cb86f7b29b0ca576d009ff91e883d0 Mon Sep 17 00:00:00 2001 From: wes-johnson Date: Wed, 25 Nov 2026 17:45:15 +0000 Subject: [PATCH 2/3] [#495] Close the gap Text left in the DataType enum Removing Text left 14 unused. Sparkplug 4 is unreleased and no implementation depends on these numbers yet, so the gap is closed rather than documented: every value above it moves down by one, and the enum runs 0 to 34 with nothing missing. UUID becomes 14, DataSet 15, Bytes 16, File 17, Template 18, PropertySet 19, PropertySetList 20, the array types 21 to 33, and Command 34. Shifted in both copies of the enum in the chapter, in the "Sparkplug enum value" line of every affected type's definition, and in the four vendored DataType model enums in the TCK, including the case labels that map an integer back to a type. Verified by executing the regenerated classes rather than by reading the diff: DateTime is still 13, UUID is 14, DataSet 15, Template 18, Int8Array 21, DateTimeArray 33, Command 34, nothing is declared at 35, and the TCK model enums agree with the schema. A cross-check of all 35 documented "Sparkplug enum value" lines against the enum finds no mismatch. --- .../chapters/Sparkplug_6_Payloads.adoc | 130 +++++++++--------- .../impl/exception/model/MetricDataType.java | 72 +++++----- .../exception/model/PropertyDataType.java | 8 +- 3 files changed, 103 insertions(+), 107 deletions(-) diff --git a/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc b/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc index d847b4cc..133cbfe8 100644 --- a/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc +++ b/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc @@ -160,37 +160,35 @@ enum DataType { Boolean = 11; String = 12; DateTime = 13; - // 14 was Text in Sparkplug B. It is not used in this version: it was never distinguishable - // from String, and the platform the type came from has deprecated it. // Additional Metric Types - UUID = 15; - DataSet = 16; - Bytes = 17; - File = 18; - Template = 19; + UUID = 14; + DataSet = 15; + Bytes = 16; + File = 17; + Template = 18; // Additional PropertyValue Types - PropertySet = 20; - PropertySetList = 21; + PropertySet = 19; + PropertySetList = 20; // Array Types - Int8Array = 22; - Int16Array = 23; - Int32Array = 24; - Int64Array = 25; - UInt8Array = 26; - UInt16Array = 27; - UInt32Array = 28; - UInt64Array = 29; - FloatArray = 30; - DoubleArray = 31; - BooleanArray = 32; - StringArray = 33; - DateTimeArray = 34; + Int8Array = 21; + Int16Array = 22; + Int32Array = 23; + Int64Array = 24; + UInt8Array = 25; + UInt16Array = 26; + UInt32Array = 27; + UInt64Array = 28; + FloatArray = 29; + DoubleArray = 30; + BooleanArray = 31; + StringArray = 32; + DateTimeArray = 33; // Command Type - Command = 35; // A callable command/function metric - the value is carried in the Metric 'command' field + Command = 34; // A callable command/function metric - the value is carried in the Metric 'command' field } // Per-metric operation, used only within NMMETA/DMMETA (modified metadata) messages to denote a @@ -1675,37 +1673,35 @@ enum DataType { Boolean = 11; String = 12; DateTime = 13; - // 14 was Text in Sparkplug B. It is not used in this version: it was never distinguishable - // from String, and the platform the type came from has deprecated it. // Additional Metric Types - UUID = 15; - DataSet = 16; - Bytes = 17; - File = 18; - Template = 19; + UUID = 14; + DataSet = 15; + Bytes = 16; + File = 17; + Template = 18; // Additional PropertyValue Types - PropertySet = 20; - PropertySetList = 21; + PropertySet = 19; + PropertySetList = 20; // Array Types - Int8Array = 22; - Int16Array = 23; - Int32Array = 24; - Int64Array = 25; - UInt8Array = 26; - UInt16Array = 27; - UInt32Array = 28; - UInt64Array = 29; - FloatArray = 30; - DoubleArray = 31; - BooleanArray = 32; - StringArray = 33; - DateTimeArray = 34; + Int8Array = 21; + Int16Array = 22; + Int32Array = 23; + Int64Array = 24; + UInt8Array = 25; + UInt16Array = 26; + UInt32Array = 27; + UInt64Array = 28; + FloatArray = 29; + DoubleArray = 30; + BooleanArray = 31; + StringArray = 32; + DateTimeArray = 33; // Command Type - Command = 35; // A callable command/function metric - the value is carried in the Metric 'command' field + Command = 34; // A callable command/function metric - the value is carried in the Metric 'command' field } ---- @@ -1779,34 +1775,34 @@ link:#payloads_p_datatype_array[Array Types] section describes. ** _UUID_ *** UUID value as a UTF-8 string *** Google Protocol Buffer Type: string -*** Sparkplug enum value: 15 +*** Sparkplug enum value: 14 ** _DataSet_ *** DataSet as defined link:#payloads_p_dataset[here] *** Google Protocol Buffer Type: none – defined in Sparkplug -*** Sparkplug enum value: 16 +*** Sparkplug enum value: 15 ** _Bytes_ *** Array of bytes *** Google Protocol Buffer Type: bytes -*** Sparkplug enum value: 17 +*** Sparkplug enum value: 16 ** _File_ *** Array of bytes representing a file *** Google Protocol Buffer Type: bytes -*** Sparkplug enum value: 18 +*** Sparkplug enum value: 17 ** _Template_ *** Template as defined link:#payloads_p_template[here] *** Google Protocol Buffer Type: none – defined in Sparkplug -*** Sparkplug enum value: 19 +*** Sparkplug enum value: 18 [[payloads_p_datatype_propertyvalue]] * *Additional PropertyValue Types* ** _PropertySet_ *** PropertySet as defined link:#payloads_p_propertyset[here] *** Google Protocol Buffer Type: none – defined in Sparkplug -*** Sparkplug enum value: 20 +*** Sparkplug enum value: 19 ** _PropertySetList_ *** PropertySetList as defined link:#payloads_p_propertysetlist[here] *** Google Protocol Buffer Type: none – defined in Sparkplug -*** Sparkplug enum value: 21 +*** Sparkplug enum value: 20 [[payloads_p_datatype_array]] * *Array Types* @@ -1845,43 +1841,43 @@ null_indexes to [1]. ** _Int8Array_ *** Elements are carried in the sint32_values field of the ValueArray -*** Sparkplug enum value: 22 +*** Sparkplug enum value: 21 ** _Int16Array_ *** Elements are carried in the sint32_values field of the ValueArray -*** Sparkplug enum value: 23 +*** Sparkplug enum value: 22 ** _Int32Array_ *** Elements are carried in the sint32_values field of the ValueArray -*** Sparkplug enum value: 24 +*** Sparkplug enum value: 23 ** _Int64Array_ *** Elements are carried in the sint64_values field of the ValueArray -*** Sparkplug enum value: 25 +*** Sparkplug enum value: 24 ** _UInt8Array_ *** Elements are carried in the uint32_values field of the ValueArray -*** Sparkplug enum value: 26 +*** Sparkplug enum value: 25 ** _UInt16Array_ *** Elements are carried in the uint32_values field of the ValueArray -*** Sparkplug enum value: 27 +*** Sparkplug enum value: 26 ** _UInt32Array_ *** Elements are carried in the uint32_values field of the ValueArray -*** Sparkplug enum value: 28 +*** Sparkplug enum value: 27 ** _UInt64Array_ *** Elements are carried in the uint64_values field of the ValueArray -*** Sparkplug enum value: 29 +*** Sparkplug enum value: 28 ** _FloatArray_ *** Elements are carried in the float_values field of the ValueArray -*** Sparkplug enum value: 30 +*** Sparkplug enum value: 29 ** _DoubleArray_ *** Elements are carried in the double_values field of the ValueArray -*** Sparkplug enum value: 31 +*** Sparkplug enum value: 30 ** _BooleanArray_ *** Elements are carried in the boolean_values field of the ValueArray -*** Sparkplug enum value: 32 +*** Sparkplug enum value: 31 ** _StringArray_ *** Elements are carried in the string_values field of the ValueArray -*** Sparkplug enum value: 33 +*** Sparkplug enum value: 32 ** _DateTimeArray_ *** Elements are carried in the int64_values field of the ValueArray -*** Sparkplug enum value: 34 +*** Sparkplug enum value: 33 [[payloads_p_datatype_command]] * *Command Type* @@ -1890,7 +1886,7 @@ null_indexes to [1]. object as defined link:#payloads_p_command[here]. A Command metric carries its content in the Metric _command_ field rather than the _value_ field. *** Google Protocol Buffer Type: none – defined in Sparkplug -*** Sparkplug enum value: 35 +*** Sparkplug enum value: 34 [[payloads_payload_representation_on_host_applications]] ==== Payload Representation on Host Applications diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java index e1ddfb62..390dc7fd 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/MetricDataType.java @@ -42,28 +42,28 @@ public enum MetricDataType { DateTime(13, Date.class), // Custom Types for Metrics - UUID(15, String.class), - DataSet(16, DataSet.class), - Bytes(17, byte[].class), - File(18, File.class), - Template(19, Template.class), + UUID(14, String.class), + DataSet(15, DataSet.class), + Bytes(16, byte[].class), + File(17, File.class), + Template(18, Template.class), // PropertyValue Types (20 and 21) are NOT metric datatypes // Array Types - Int8Array(22, Byte[].class), - Int16Array(23, Short[].class), - Int32Array(24, Integer[].class), - Int64Array(25, Long[].class), - UInt8Array(26, Short[].class), - UInt16Array(27, Integer[].class), - UInt32Array(28, Long[].class), - UInt64Array(29, BigInteger[].class), - FloatArray(30, Float[].class), - DoubleArray(31, Double[].class), - BooleanArray(32, Boolean[].class), - StringArray(33, String[].class), - DateTimeArray(34, Date[].class), + Int8Array(21, Byte[].class), + Int16Array(22, Short[].class), + Int32Array(23, Integer[].class), + Int64Array(24, Long[].class), + UInt8Array(25, Short[].class), + UInt16Array(26, Integer[].class), + UInt32Array(27, Long[].class), + UInt64Array(28, BigInteger[].class), + FloatArray(29, Float[].class), + DoubleArray(30, Double[].class), + BooleanArray(31, Boolean[].class), + StringArray(32, String[].class), + DateTimeArray(33, Date[].class), // Unknown Unknown(0, Object.class); @@ -129,41 +129,41 @@ public static MetricDataType fromInteger(int i) { return String; case 13: return DateTime; - case 15: + case 14: return UUID; - case 16: + case 15: return DataSet; - case 17: + case 16: return Bytes; - case 18: + case 17: return File; - case 19: + case 18: return Template; - case 22: + case 21: return Int8Array; - case 23: + case 22: return Int16Array; - case 24: + case 23: return Int32Array; - case 25: + case 24: return Int64Array; - case 26: + case 25: return UInt8Array; - case 27: + case 26: return UInt16Array; - case 28: + case 27: return UInt32Array; - case 29: + case 28: return UInt64Array; - case 30: + case 29: return FloatArray; - case 31: + case 30: return DoubleArray; - case 32: + case 31: return BooleanArray; - case 33: + case 32: return StringArray; - case 34: + case 33: return DateTimeArray; default: return Unknown; diff --git a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java index 6bdc5548..3edf3833 100644 --- a/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java +++ b/tck/src/main/java/org/eclipse/sparkplug/impl/exception/model/PropertyDataType.java @@ -42,8 +42,8 @@ public enum PropertyDataType { DateTime(13, Date.class), // Custom Types for PropertySets - PropertySet(20, PropertySet.class), - PropertySetList(21, List.class), + PropertySet(19, PropertySet.class), + PropertySetList(20, List.class), // Unknown Unknown(0, Object.class); @@ -112,9 +112,9 @@ public static PropertyDataType fromInteger(int i) { return String; case 13: return DateTime; - case 20: + case 19: return PropertySet; - case 21: + case 20: return PropertySetList; default: return Unknown; From 53db58c40a0f4e00b630c8c6eca9fc59ea501533 Mon Sep 17 00:00:00 2001 From: wes-johnson Date: Wed, 25 Nov 2026 18:51:32 +0000 Subject: [PATCH 3/3] [#495] Restore the blank line before the Additional Types anchor Removing the Text block took the blank line that separated it from [[payloads_p_datatype_additional]] with it, so Asciidoctor read the anchor as part of the preceding DateTime paragraph and the id did not appear in the rendered HTML at all. Nothing in the specification links to it, but a deep link from outside would have broken. Confirmed by building the HTML: the id is absent before this change and present after, alongside payloads_p_datatype_basic and payloads_p_datatype_array. A sweep of every chapter for an anchor with no blank line above it finds one other, inside a //// comment block in Sparkplug_8_HA.adoc, which is identical on develop and inert. --- .../src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc b/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc index 133cbfe8..ead1c438 100644 --- a/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc +++ b/specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc @@ -1770,6 +1770,7 @@ representation it interoperates with is signed, so the ceiling is 2262-04-11 as link:#operational_behavior_timestamps[Timestamps] section. A DateTime carried in an array or a DataSet.Column uses the int64_values array of the ValueArray, as the link:#payloads_p_datatype_array[Array Types] section describes. + [[payloads_p_datatype_additional]] * *Additional Types* ** _UUID_