Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metric Class Integer Property is uint? #56

Closed
Kvargefar opened this issue Aug 7, 2023 · 5 comments
Closed

Metric Class Integer Property is uint? #56

Kvargefar opened this issue Aug 7, 2023 · 5 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@Kvargefar
Copy link

Is there a reason why the integer property is an unsigned integer? I've encountered several exceptions when creating a new instance of a Metric, or using the SetValue method, when the value is a negative integer.

@SeppPenner SeppPenner self-assigned this Nov 27, 2023
@SeppPenner SeppPenner added the question Further information is requested label Nov 28, 2023
@SeppPenner
Copy link
Owner

Good question, I need to check that again. From the first view, uint doesn't make sense...

@SeppPenner
Copy link
Owner

SeppPenner commented Dec 7, 2023

The problem is the Proto file:

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;
}

--> Which value should be set if there is an int value in a metric, not an uint? uint32, uint64 and boolean are clearly bullshit in this case. We could transfer it to float / double or to string. Or to extension maybe? I don't really know the answer here...

I need to ask the Sparkplug guys for advice here, I guess...

@SeppPenner
Copy link
Owner

@SeppPenner SeppPenner added the bug Something isn't working label Dec 7, 2023
@SeppPenner
Copy link
Owner

Should be fixed after 4fdb449 (Version 1.3.0+).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants