-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add allowed values to metadata #69
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,16 +143,27 @@ message Datapoint { | |
} | ||
} | ||
|
||
message Allowed { | ||
oneof values { | ||
StringArray string_values = 1; | ||
Int32Array int32_values = 3; | ||
Int64Array int64_values = 4; | ||
Uint32Array uint32_values = 5; | ||
Uint64Array uint64_values = 6; | ||
FloatArray float_values = 7; | ||
DoubleArray double_values = 8; | ||
} | ||
} | ||
|
||
message Metadata { | ||
// Id to be used in "get" and "subscribe" requests. Ids stay valid during | ||
// one power cycle, only. | ||
int32 id = 1; | ||
EntryType entry_type = 2; | ||
string name = 4; | ||
DataType data_type = 5; | ||
ChangeType change_type = 6; // CONTINUOUS or STATIC or ON_CHANGE | ||
string description = 7; | ||
|
||
Allowed allowed = 10; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have we ever used the metadata on the lines below? Even if the lines below are commented I assume it would be better to not have the same number (10) on this line and the line below, or? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They have never been used. I guess it's better to just remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then just remove them I would say |
||
// int32 min_update_hz = 10; // Only for CONTINUOUS | ||
// int32 max_update_hz = 11; // Only for CONTINUOUS | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So for now just creating a placeholder for supporting min/max?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were already defined in
kuksa.val.v1.ValueRestriction
.. this PR doesn't change anything regarding them, it's limited to adding support for allowed values.But maybe it would be better to add support for min / max as well in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong opinion, depends on how much time that would take I think. If it is quick go for it, if not keep the TODOs and do it later.