diff --git a/python/fledge/plugins/south/mqtt_sparkplug/mqtt_sparkplug.py b/python/fledge/plugins/south/mqtt_sparkplug/mqtt_sparkplug.py index a0b9961..bc3cee1 100644 --- a/python/fledge/plugins/south/mqtt_sparkplug/mqtt_sparkplug.py +++ b/python/fledge/plugins/south/mqtt_sparkplug/mqtt_sparkplug.py @@ -305,7 +305,11 @@ def on_message(self, client, userdata, msg): elif metric.HasField("double_value"): value = metric.double_value elif metric.HasField("int_value"): - value = metric.int_value + # Ensure that the value fits within the range of int32 + if -2147483648 <= metric.int_value <= 2147483647: + value = metric.int_value + else: + _LOGGER.warning(f"Ignoring metric '{metric.name}' due to value is out of range for int32.") elif metric.HasField("long_value"): value = metric.long_value elif metric.HasField("string_value"): @@ -313,7 +317,7 @@ def on_message(self, client, userdata, msg): # TODO: FOGL-9302, FOGL-9198 - Handle other data types if value == "Unknown": _LOGGER.warning("Ignoring metric '{}' due to unknown type. Only supported types are: " - "float, double, unsigned integer's, string, bool.".format(metric.name)) + "float, double, integer, string, bool.".format(metric.name)) continue if self.datapoints == "Per metric": self.save({metric.name: value}, datetime.fromtimestamp( diff --git a/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b.proto b/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b.proto index 8d5a31d..13f1952 100644 --- a/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b.proto +++ b/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b.proto @@ -153,7 +153,7 @@ message Payload { optional MetaData metadata = 8; // Metadata for the payload optional PropertySet properties = 9; oneof value { - uint32 int_value = 10; + int32 int_value = 10; uint64 long_value = 11; float float_value = 12; double double_value = 13; diff --git a/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b_pb2.py b/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b_pb2.py index 78ccb3a..816ddfc 100644 --- a/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b_pb2.py +++ b/python/fledge/plugins/south/mqtt_sparkplug/sparkplug_b/sparkplug_b_pb2.py @@ -19,7 +19,7 @@ package='sparkplug', syntax='proto2', serialized_options=None, - serialized_pb=_b('\n\x11sparkplug_b.proto\x12\tsparkplug\"\xde\x13\n\x07Payload\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x0b\n\x03seq\x18\x03 \x01(\x04\x12\x0c\n\x04uuid\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a\xf6\x03\n\x08Template\x12\x0f\n\x07version\x18\x01 \x01(\t\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x39\n\nparameters\x18\x03 \x03(\x0b\x32%.sparkplug.Payload.Template.Parameter\x12\x14\n\x0ctemplate_ref\x18\x04 \x01(\t\x12\x15\n\ris_definition\x18\x05 \x01(\x08\x1a\xba\x02\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\r\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\t \x01(\x0b\x32=.sparkplug.Payload.Template.Parameter.ParameterValueExtensionH\x00\x1a#\n\x17ParameterValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02\x1a\xe7\x03\n\x07\x44\x61taSet\x12\x16\n\x0enum_of_columns\x18\x01 \x01(\x04\x12\x0f\n\x07\x63olumns\x18\x02 \x03(\t\x12\r\n\x05types\x18\x03 \x03(\r\x12,\n\x04rows\x18\x04 \x03(\x0b\x32\x1e.sparkplug.Payload.DataSet.Row\x1a\x9f\x02\n\x0c\x44\x61taSetValue\x12\x13\n\tint_value\x18\x01 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x02 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x03 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x05 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x06 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\x07 \x01(\x0b\x32=.sparkplug.Payload.DataSet.DataSetValue.DataSetValueExtensionH\x00\x1a!\n\x15\x44\x61taSetValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aJ\n\x03Row\x12\x39\n\x08\x65lements\x18\x01 \x03(\x0b\x32\'.sparkplug.Payload.DataSet.DataSetValue*\x08\x08\x02\x10\x80\x80\x80\x80\x02*\x08\x08\x05\x10\x80\x80\x80\x80\x02\x1a\xb9\x03\n\rPropertyValue\x12\x0c\n\x04type\x18\x01 \x01(\r\x12\x0f\n\x07is_null\x18\x02 \x01(\x08\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12;\n\x11propertyset_value\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySetH\x00\x12@\n\x12propertysets_value\x18\n \x01(\x0b\x32\".sparkplug.Payload.PropertySetListH\x00\x12R\n\x0f\x65xtension_value\x18\x0b \x01(\x0b\x32\x37.sparkplug.Payload.PropertyValue.PropertyValueExtensionH\x00\x1a\"\n\x16PropertyValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aW\n\x0bPropertySet\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x30\n\x06values\x18\x02 \x03(\x0b\x32 .sparkplug.Payload.PropertyValue*\x08\x08\x03\x10\x80\x80\x80\x80\x02\x1aP\n\x0fPropertySetList\x12\x33\n\x0bpropertyset\x18\x01 \x03(\x0b\x32\x1e.sparkplug.Payload.PropertySet*\x08\x08\x02\x10\x80\x80\x80\x80\x02\x1a\xa4\x01\n\x08MetaData\x12\x15\n\ris_multi_part\x18\x01 \x01(\x08\x12\x14\n\x0c\x63ontent_type\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x0b\n\x03seq\x18\x04 \x01(\x04\x12\x11\n\tfile_name\x18\x05 \x01(\t\x12\x11\n\tfile_type\x18\x06 \x01(\t\x12\x0b\n\x03md5\x18\x07 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t*\x08\x08\t\x10\x80\x80\x80\x80\x02\x1a\xef\x04\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\x04\x12\x11\n\ttimestamp\x18\x03 \x01(\x04\x12\x10\n\x08\x64\x61tatype\x18\x04 \x01(\r\x12\x15\n\ris_historical\x18\x05 \x01(\x08\x12\x14\n\x0cis_transient\x18\x06 \x01(\x08\x12\x0f\n\x07is_null\x18\x07 \x01(\x08\x12-\n\x08metadata\x18\x08 \x01(\x0b\x32\x1b.sparkplug.Payload.MetaData\x12\x32\n\nproperties\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySet\x12\x13\n\tint_value\x18\n \x01(\rH\x00\x12\x14\n\nlong_value\x18\x0b \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x0c \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\r \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x0e \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x0f \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x10 \x01(\x0cH\x00\x12\x33\n\rdataset_value\x18\x11 \x01(\x0b\x32\x1a.sparkplug.Payload.DataSetH\x00\x12\x35\n\x0etemplate_value\x18\x12 \x01(\x0b\x32\x1b.sparkplug.Payload.TemplateH\x00\x12I\n\x0f\x65xtension_value\x18\x13 \x01(\x0b\x32..sparkplug.Payload.Metric.MetricValueExtensionH\x00\x1a \n\x14MetricValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02') + serialized_pb=_b('\n\x11sparkplug_b.proto\x12\tsparkplug\"\xde\x13\n\x07Payload\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x0b\n\x03seq\x18\x03 \x01(\x04\x12\x0c\n\x04uuid\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a\xf6\x03\n\x08Template\x12\x0f\n\x07version\x18\x01 \x01(\t\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x39\n\nparameters\x18\x03 \x03(\x0b\x32%.sparkplug.Payload.Template.Parameter\x12\x14\n\x0ctemplate_ref\x18\x04 \x01(\t\x12\x15\n\ris_definition\x18\x05 \x01(\x08\x1a\xba\x02\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\r\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\t \x01(\x0b\x32=.sparkplug.Payload.Template.Parameter.ParameterValueExtensionH\x00\x1a#\n\x17ParameterValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02\x1a\xe7\x03\n\x07\x44\x61taSet\x12\x16\n\x0enum_of_columns\x18\x01 \x01(\x04\x12\x0f\n\x07\x63olumns\x18\x02 \x03(\t\x12\r\n\x05types\x18\x03 \x03(\r\x12,\n\x04rows\x18\x04 \x03(\x0b\x32\x1e.sparkplug.Payload.DataSet.Row\x1a\x9f\x02\n\x0c\x44\x61taSetValue\x12\x13\n\tint_value\x18\x01 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x02 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x03 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x05 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x06 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\x07 \x01(\x0b\x32=.sparkplug.Payload.DataSet.DataSetValue.DataSetValueExtensionH\x00\x1a!\n\x15\x44\x61taSetValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aJ\n\x03Row\x12\x39\n\x08\x65lements\x18\x01 \x03(\x0b\x32\'.sparkplug.Payload.DataSet.DataSetValue*\x08\x08\x02\x10\x80\x80\x80\x80\x02*\x08\x08\x05\x10\x80\x80\x80\x80\x02\x1a\xb9\x03\n\rPropertyValue\x12\x0c\n\x04type\x18\x01 \x01(\r\x12\x0f\n\x07is_null\x18\x02 \x01(\x08\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12;\n\x11propertyset_value\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySetH\x00\x12@\n\x12propertysets_value\x18\n \x01(\x0b\x32\".sparkplug.Payload.PropertySetListH\x00\x12R\n\x0f\x65xtension_value\x18\x0b \x01(\x0b\x32\x37.sparkplug.Payload.PropertyValue.PropertyValueExtensionH\x00\x1a\"\n\x16PropertyValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aW\n\x0bPropertySet\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x30\n\x06values\x18\x02 \x03(\x0b\x32 .sparkplug.Payload.PropertyValue*\x08\x08\x03\x10\x80\x80\x80\x80\x02\x1aP\n\x0fPropertySetList\x12\x33\n\x0bpropertyset\x18\x01 \x03(\x0b\x32\x1e.sparkplug.Payload.PropertySet*\x08\x08\x02\x10\x80\x80\x80\x80\x02\x1a\xa4\x01\n\x08MetaData\x12\x15\n\ris_multi_part\x18\x01 \x01(\x08\x12\x14\n\x0c\x63ontent_type\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x0b\n\x03seq\x18\x04 \x01(\x04\x12\x11\n\tfile_name\x18\x05 \x01(\t\x12\x11\n\tfile_type\x18\x06 \x01(\t\x12\x0b\n\x03md5\x18\x07 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t*\x08\x08\t\x10\x80\x80\x80\x80\x02\x1a\xef\x04\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\x04\x12\x11\n\ttimestamp\x18\x03 \x01(\x04\x12\x10\n\x08\x64\x61tatype\x18\x04 \x01(\r\x12\x15\n\ris_historical\x18\x05 \x01(\x08\x12\x14\n\x0cis_transient\x18\x06 \x01(\x08\x12\x0f\n\x07is_null\x18\x07 \x01(\x08\x12-\n\x08metadata\x18\x08 \x01(\x0b\x32\x1b.sparkplug.Payload.MetaData\x12\x32\n\nproperties\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySet\x12\x13\n\tint_value\x18\n \x01(\x05H\x00\x12\x14\n\nlong_value\x18\x0b \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x0c \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\r \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x0e \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x0f \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x10 \x01(\x0cH\x00\x12\x33\n\rdataset_value\x18\x11 \x01(\x0b\x32\x1a.sparkplug.Payload.DataSetH\x00\x12\x35\n\x0etemplate_value\x18\x12 \x01(\x0b\x32\x1b.sparkplug.Payload.TemplateH\x00\x12I\n\x0f\x65xtension_value\x18\x13 \x01(\x0b\x32..sparkplug.Payload.Metric.MetricValueExtensionH\x00\x1a \n\x14MetricValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02') ) @@ -741,7 +741,7 @@ serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='int_value', full_name='sparkplug.Payload.Metric.int_value', index=9, - number=10, type=13, cpp_type=3, label=1, + number=10, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, diff --git a/tests/mqtt-pub/__main__.py b/tests/mqtt-pub/__main__.py index f4345c3..fb5bb44 100644 --- a/tests/mqtt-pub/__main__.py +++ b/tests/mqtt-pub/__main__.py @@ -28,6 +28,7 @@ # Define your device ID device_id = "your_device_id" + # Sparkplug payload example for DBIRTH def create_dbirth_payload(): message = { @@ -51,6 +52,7 @@ def create_dbirth_payload(): binary_data = payload.SerializeToString() return binary_data + # Create DDATA payload def create_ddata_payload(): bool_values = [True, False] @@ -58,7 +60,7 @@ def create_ddata_payload(): "metrics": [ { "name": "Temperature Sensor", - "value": random.uniform(22.0, 32.0), # Float + "value": random.uniform(-22.0, 32.0), # Float "timestamp": int(time.time()), "type": "float" }, @@ -70,7 +72,7 @@ def create_ddata_payload(): }, { "name": "Humidity Sensor", - "value": random.randint(45, 175), # Integer + "value": random.randint(-45, 175), # Integer "timestamp": int(time.time()), "type": "integer" }, @@ -91,7 +93,6 @@ def create_ddata_payload(): # Create a Payload instance payload = sparkplug_b_pb2.Payload() - # Populate the Payload with Metric instances for metric in message["metrics"]: m = payload.metrics.add() # Add a new Metric to the Payload @@ -104,9 +105,8 @@ def create_ddata_payload(): elif metric["type"] == "double": m.double_value = metric["value"] elif metric["type"] == "integer": - # TODO: FOGL-9302 to handle signed integers - # value within the range of uint32 - if metric["value"] <= 2147483647: + # Ensure that the value fits within the range of int32 + if -2147483648 <= metric["value"] <= 2147483647: m.int_value = metric["value"] else: # value within the range of uint64 @@ -122,10 +122,12 @@ def create_ddata_payload(): f"Timestamp: {m.timestamp}") except Exception as ex: print(f"Error in metric name: '{m.name}' due to '{ex}'") + # Now you can serialize the payload or use it as needed binary_data = payload.SerializeToString() return binary_data + # Create DDEATH payload def create_ddeath_payload(): message = { @@ -149,6 +151,7 @@ def create_ddeath_payload(): binary_data = payload.SerializeToString() return binary_data + # Callback for when the client connects def on_connect(client, userdata, flags, rc): print("Connected with result code " + str(rc)) @@ -157,6 +160,7 @@ def on_connect(client, userdata, flags, rc): client.publish(DBIRTH_TOPIC, dbirth) print("Published DBIRTH message") + # Initialize MQTT Client mqtt_client = mqtt.Client() mqtt_client.on_connect = on_connect diff --git a/tests/mqtt-pub/sparkplug_b_pb2.py b/tests/mqtt-pub/sparkplug_b_pb2.py index 78ccb3a..816ddfc 100644 --- a/tests/mqtt-pub/sparkplug_b_pb2.py +++ b/tests/mqtt-pub/sparkplug_b_pb2.py @@ -19,7 +19,7 @@ package='sparkplug', syntax='proto2', serialized_options=None, - serialized_pb=_b('\n\x11sparkplug_b.proto\x12\tsparkplug\"\xde\x13\n\x07Payload\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x0b\n\x03seq\x18\x03 \x01(\x04\x12\x0c\n\x04uuid\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a\xf6\x03\n\x08Template\x12\x0f\n\x07version\x18\x01 \x01(\t\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x39\n\nparameters\x18\x03 \x03(\x0b\x32%.sparkplug.Payload.Template.Parameter\x12\x14\n\x0ctemplate_ref\x18\x04 \x01(\t\x12\x15\n\ris_definition\x18\x05 \x01(\x08\x1a\xba\x02\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\r\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\t \x01(\x0b\x32=.sparkplug.Payload.Template.Parameter.ParameterValueExtensionH\x00\x1a#\n\x17ParameterValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02\x1a\xe7\x03\n\x07\x44\x61taSet\x12\x16\n\x0enum_of_columns\x18\x01 \x01(\x04\x12\x0f\n\x07\x63olumns\x18\x02 \x03(\t\x12\r\n\x05types\x18\x03 \x03(\r\x12,\n\x04rows\x18\x04 \x03(\x0b\x32\x1e.sparkplug.Payload.DataSet.Row\x1a\x9f\x02\n\x0c\x44\x61taSetValue\x12\x13\n\tint_value\x18\x01 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x02 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x03 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x05 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x06 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\x07 \x01(\x0b\x32=.sparkplug.Payload.DataSet.DataSetValue.DataSetValueExtensionH\x00\x1a!\n\x15\x44\x61taSetValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aJ\n\x03Row\x12\x39\n\x08\x65lements\x18\x01 \x03(\x0b\x32\'.sparkplug.Payload.DataSet.DataSetValue*\x08\x08\x02\x10\x80\x80\x80\x80\x02*\x08\x08\x05\x10\x80\x80\x80\x80\x02\x1a\xb9\x03\n\rPropertyValue\x12\x0c\n\x04type\x18\x01 \x01(\r\x12\x0f\n\x07is_null\x18\x02 \x01(\x08\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12;\n\x11propertyset_value\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySetH\x00\x12@\n\x12propertysets_value\x18\n \x01(\x0b\x32\".sparkplug.Payload.PropertySetListH\x00\x12R\n\x0f\x65xtension_value\x18\x0b \x01(\x0b\x32\x37.sparkplug.Payload.PropertyValue.PropertyValueExtensionH\x00\x1a\"\n\x16PropertyValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aW\n\x0bPropertySet\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x30\n\x06values\x18\x02 \x03(\x0b\x32 .sparkplug.Payload.PropertyValue*\x08\x08\x03\x10\x80\x80\x80\x80\x02\x1aP\n\x0fPropertySetList\x12\x33\n\x0bpropertyset\x18\x01 \x03(\x0b\x32\x1e.sparkplug.Payload.PropertySet*\x08\x08\x02\x10\x80\x80\x80\x80\x02\x1a\xa4\x01\n\x08MetaData\x12\x15\n\ris_multi_part\x18\x01 \x01(\x08\x12\x14\n\x0c\x63ontent_type\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x0b\n\x03seq\x18\x04 \x01(\x04\x12\x11\n\tfile_name\x18\x05 \x01(\t\x12\x11\n\tfile_type\x18\x06 \x01(\t\x12\x0b\n\x03md5\x18\x07 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t*\x08\x08\t\x10\x80\x80\x80\x80\x02\x1a\xef\x04\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\x04\x12\x11\n\ttimestamp\x18\x03 \x01(\x04\x12\x10\n\x08\x64\x61tatype\x18\x04 \x01(\r\x12\x15\n\ris_historical\x18\x05 \x01(\x08\x12\x14\n\x0cis_transient\x18\x06 \x01(\x08\x12\x0f\n\x07is_null\x18\x07 \x01(\x08\x12-\n\x08metadata\x18\x08 \x01(\x0b\x32\x1b.sparkplug.Payload.MetaData\x12\x32\n\nproperties\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySet\x12\x13\n\tint_value\x18\n \x01(\rH\x00\x12\x14\n\nlong_value\x18\x0b \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x0c \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\r \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x0e \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x0f \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x10 \x01(\x0cH\x00\x12\x33\n\rdataset_value\x18\x11 \x01(\x0b\x32\x1a.sparkplug.Payload.DataSetH\x00\x12\x35\n\x0etemplate_value\x18\x12 \x01(\x0b\x32\x1b.sparkplug.Payload.TemplateH\x00\x12I\n\x0f\x65xtension_value\x18\x13 \x01(\x0b\x32..sparkplug.Payload.Metric.MetricValueExtensionH\x00\x1a \n\x14MetricValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02') + serialized_pb=_b('\n\x11sparkplug_b.proto\x12\tsparkplug\"\xde\x13\n\x07Payload\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x0b\n\x03seq\x18\x03 \x01(\x04\x12\x0c\n\x04uuid\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a\xf6\x03\n\x08Template\x12\x0f\n\x07version\x18\x01 \x01(\t\x12*\n\x07metrics\x18\x02 \x03(\x0b\x32\x19.sparkplug.Payload.Metric\x12\x39\n\nparameters\x18\x03 \x03(\x0b\x32%.sparkplug.Payload.Template.Parameter\x12\x14\n\x0ctemplate_ref\x18\x04 \x01(\t\x12\x15\n\ris_definition\x18\x05 \x01(\x08\x1a\xba\x02\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\r\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\t \x01(\x0b\x32=.sparkplug.Payload.Template.Parameter.ParameterValueExtensionH\x00\x1a#\n\x17ParameterValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02\x1a\xe7\x03\n\x07\x44\x61taSet\x12\x16\n\x0enum_of_columns\x18\x01 \x01(\x04\x12\x0f\n\x07\x63olumns\x18\x02 \x03(\t\x12\r\n\x05types\x18\x03 \x03(\r\x12,\n\x04rows\x18\x04 \x03(\x0b\x32\x1e.sparkplug.Payload.DataSet.Row\x1a\x9f\x02\n\x0c\x44\x61taSetValue\x12\x13\n\tint_value\x18\x01 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x02 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x03 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x05 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x06 \x01(\tH\x00\x12X\n\x0f\x65xtension_value\x18\x07 \x01(\x0b\x32=.sparkplug.Payload.DataSet.DataSetValue.DataSetValueExtensionH\x00\x1a!\n\x15\x44\x61taSetValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aJ\n\x03Row\x12\x39\n\x08\x65lements\x18\x01 \x03(\x0b\x32\'.sparkplug.Payload.DataSet.DataSetValue*\x08\x08\x02\x10\x80\x80\x80\x80\x02*\x08\x08\x05\x10\x80\x80\x80\x80\x02\x1a\xb9\x03\n\rPropertyValue\x12\x0c\n\x04type\x18\x01 \x01(\r\x12\x0f\n\x07is_null\x18\x02 \x01(\x08\x12\x13\n\tint_value\x18\x03 \x01(\rH\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x05 \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x07 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x08 \x01(\tH\x00\x12;\n\x11propertyset_value\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySetH\x00\x12@\n\x12propertysets_value\x18\n \x01(\x0b\x32\".sparkplug.Payload.PropertySetListH\x00\x12R\n\x0f\x65xtension_value\x18\x0b \x01(\x0b\x32\x37.sparkplug.Payload.PropertyValue.PropertyValueExtensionH\x00\x1a\"\n\x16PropertyValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value\x1aW\n\x0bPropertySet\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x30\n\x06values\x18\x02 \x03(\x0b\x32 .sparkplug.Payload.PropertyValue*\x08\x08\x03\x10\x80\x80\x80\x80\x02\x1aP\n\x0fPropertySetList\x12\x33\n\x0bpropertyset\x18\x01 \x03(\x0b\x32\x1e.sparkplug.Payload.PropertySet*\x08\x08\x02\x10\x80\x80\x80\x80\x02\x1a\xa4\x01\n\x08MetaData\x12\x15\n\ris_multi_part\x18\x01 \x01(\x08\x12\x14\n\x0c\x63ontent_type\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x0b\n\x03seq\x18\x04 \x01(\x04\x12\x11\n\tfile_name\x18\x05 \x01(\t\x12\x11\n\tfile_type\x18\x06 \x01(\t\x12\x0b\n\x03md5\x18\x07 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t*\x08\x08\t\x10\x80\x80\x80\x80\x02\x1a\xef\x04\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\x04\x12\x11\n\ttimestamp\x18\x03 \x01(\x04\x12\x10\n\x08\x64\x61tatype\x18\x04 \x01(\r\x12\x15\n\ris_historical\x18\x05 \x01(\x08\x12\x14\n\x0cis_transient\x18\x06 \x01(\x08\x12\x0f\n\x07is_null\x18\x07 \x01(\x08\x12-\n\x08metadata\x18\x08 \x01(\x0b\x32\x1b.sparkplug.Payload.MetaData\x12\x32\n\nproperties\x18\t \x01(\x0b\x32\x1e.sparkplug.Payload.PropertySet\x12\x13\n\tint_value\x18\n \x01(\x05H\x00\x12\x14\n\nlong_value\x18\x0b \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x0c \x01(\x02H\x00\x12\x16\n\x0c\x64ouble_value\x18\r \x01(\x01H\x00\x12\x17\n\rboolean_value\x18\x0e \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x0f \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x10 \x01(\x0cH\x00\x12\x33\n\rdataset_value\x18\x11 \x01(\x0b\x32\x1a.sparkplug.Payload.DataSetH\x00\x12\x35\n\x0etemplate_value\x18\x12 \x01(\x0b\x32\x1b.sparkplug.Payload.TemplateH\x00\x12I\n\x0f\x65xtension_value\x18\x13 \x01(\x0b\x32..sparkplug.Payload.Metric.MetricValueExtensionH\x00\x1a \n\x14MetricValueExtension*\x08\x08\x01\x10\x80\x80\x80\x80\x02\x42\x07\n\x05value*\x08\x08\x06\x10\x80\x80\x80\x80\x02') ) @@ -741,7 +741,7 @@ serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='int_value', full_name='sparkplug.Payload.Metric.int_value', index=9, - number=10, type=13, cpp_type=3, label=1, + number=10, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None,