eclipse-sparkplug / sparkplug

Sparkplug
Eclipse Public License 2.0
114 stars 39 forks source link

Fix data type checks #469

Closed luke-shields closed 1 year ago

luke-shields commented 1 year ago

This PR fixes three bugs and makes some improvement: Bugs

  1. If PAYLOADS_METRIC_PROPERTYVALUE_TYPE_VALUE is found to be invalid for one payload however valid for a subsequent payload, the test is passed. If this test fails once, it should be recorded as a fail.
  2. PAYLOADS_METRIC_PROPERTYVALUE_TYPE_VALUE Checks PropertyValue.Type against the wire values: int_value = 3; uint64 long_value = 4; float float_value = 5; It should be checked against the enum 'DataType'
    1. Metric.hasValue checks for an uint64 when datatype 7 (uint32) is passed in. This should check for a uint32 value

Other changes

Please comment any questions regarding this PR