eclipse-sparkplug / sparkplug

Sparkplug
Eclipse Public License 2.0
109 stars 39 forks source link

Question: Should the Property Value Type field use the Basic Datatype Enum #459

Closed luke-shields closed 11 months ago

luke-shields commented 1 year ago

What do you want to know?

I would like to know if the 'type' field of a property value should use a value from the Basic DataTypes enum in section 6.4.16 of the spec. So would this be a correctly formatted Property Value: { "type": 12, "value": "This is a String" }

I ask as test SendComplexDataTest.checkPropertiesValidType() in the TCK instead expects the 'type' to correspond with the numbers outlined below (Under message Property Value in section 6.4.1.)

oneof value { uint32 int_value = 3; uint64 long_value = 4; float float_value = 5; double double_value = 6; bool boolean_value = 7; string string_value = 8; PropertySet propertyset_value = 9; PropertySetList propertysets_value = 10; // List of Property Values PropertyValueExtension extension_value = 11; }

Meaning that the below Property Value would be correct: { "type": 8, "value": "This is a String" }

This seems to contradict the spec requirement: [tck-id-payloads-propertyset-quality-value-type] The type of the Property Value MUST be a value of 3 which represents a Signed 32-bit Integer.

This question also applies to 'datatype' in Metric, 'types' in DataSet and 'type' in Template.

Thanks!

Is this related to a Sparkplug Listing request? If so, link the issue from https://github.com/eclipse-sparkplug/sparkplug.listings here.

No response

Version

3.0.0 (Default)

Accept EFTL Terms

luke-shields commented 1 year ago

I am still looking for an answer for this

luke-shields commented 11 months ago

For anyone else with this query, I have confirmed it should be the basic Datatype, i.e { "type": 12, "value": "This is a String" }