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

Issue 450. Inverse bounded range support. #452

Merged
merged 5 commits into from
May 3, 2022
Merged

Conversation

UlfBj
Copy link
Contributor

@UlfBj UlfBj commented Apr 7, 2022

No description provided.

@UlfBj
Copy link
Contributor Author

UlfBj commented Apr 7, 2022

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"},
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.
Copy link
Contributor

@erikbosch erikbosch Apr 14, 2022

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tguild tguild merged commit 34a9b4d into w3c:gh-pages May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants