You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During reading, the client expects to read a variable of type Int64 ("datatype": 4), which is incompatible with the "long_value" that the metric is intended to represent at that moment. It seems that LongValue is always represented by an Int64 (rather than also being able to be UInt64).
I hope I have explained the issue clearly, and at this point, I would like to inquire if there are any existing workarounds or if I am overlooking something. Thank you very much!
EDIT:
I just figure out that I can force the dataType after setting the value, as follows:
metric.ValueCase =(uint)DataType.UInt64;
However, I will leave this open in case there is a possibility of incorporating this management directly within the SetValue() method. Thank you again!
The text was updated successfully, but these errors were encountered:
This problem is discussed in eclipse-sparkplug/sparkplug#114. It seems, like we need to cast / convert the values explicitely in V3.0 (Which I don't think makes sense, but will not work else)...
First, I would like to express my gratitude to all contributors for their invaluable work to this library.
I would like to report an issue I am experiencing during the transmission of UInt64 type metrics. When attempting to set the maximum value as follows:
the DataType is instead set to Int64, and I receive a metric of the following type:
During reading, the client expects to read a variable of type Int64 ("datatype": 4), which is incompatible with the "long_value" that the metric is intended to represent at that moment. It seems that LongValue is always represented by an Int64 (rather than also being able to be UInt64).
I hope I have explained the issue clearly, and at this point, I would like to inquire if there are any existing workarounds or if I am overlooking something. Thank you very much!
EDIT:
I just figure out that I can force the dataType after setting the value, as follows:
However, I will leave this open in case there is a possibility of incorporating this management directly within the SetValue() method. Thank you again!
The text was updated successfully, but these errors were encountered: