-
Notifications
You must be signed in to change notification settings - Fork 68
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
Issue 450. Inverse bounded range support. #452
Conversation
spec/VISSv2_Core.html
Outdated
3. Inverse of bounded range<br> | ||
The range operation issues notifications to the client when the logical expression defined in the "value" key-value pair evaluation is true, and the signal is updated.<br> | ||
For the unbounded range, the "value" consists of one JSON object that contains the range boundary, and the logical operator for the boundary, | ||
{"boundary-op":"X", "boundary": "Y"}, |
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.
It shall be logic-op
right? At least that is what we use in all examples in transport:
{
"action": "subscribe",
"path": "Vehicle/Drivetrain/FuelSystem/Level",
"filter": "filter":{"type":"range","value":[{"logic-op":"gt","boundary":"50"},{"logic-op":"lt","boundary":"55"}]},
"requestId": "6578"
}
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.
With this PR there will now be two different "logic-op", therefore I renamed them to "boundary-op" and "combination-op", respectively. If we go with that, the examples need to be updated. Thanks for catching that.
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.
As long as we use use the same term in core and transport I am happy :-)
For boolean values the following expressions shall be supported:<br> | ||
"value":{"logic-op":"gt", "diff": "0"} This leads to a trigger event when the value goes false->true.<br> | ||
"value":{"logic-op":"lt", "diff": "0"} This leads to a trigger event when the value goes true->false.<br> | ||
"value":{"logic-op":"ne", "diff": "0"} This leads to a trigger event when the value goes true->false OR false->true. | ||
<br><br> | ||
(**)The supported logical operators are ["eq", "ne", "gt", "gte", "lt", "lte"], | ||
(**)The supported logic operands are ["eq", "ne", "gt", "gte", "lt", "lte"], | ||
where "eq" is "equal", "ne" is "not equal", "gt" is "greater than", "gte" is "greater than or equal", | ||
"lt" is "less than", "lte" is "less than or equal".<br> | ||
Examples can be found in the [[viss2-transport]] specification. |
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.
Changes looks good, but when I reviewed them I noticed that we say that examples on logic-op
(with diff) exists in Transport-section. But it doesn't, right`? Remove line or add example?
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.
Good catch. Example added in the Transport doc.
https://rawcdn.githack.com/UlfBj/automotive/e68eb41ec4036d036f9172d73a15f4a74eef781d/spec/VISSv2_Transport.html
No description provided.