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

Implement Assertions on Readings #7

Closed
iain-anderson opened this issue Sep 25, 2018 · 1 comment
Closed

Implement Assertions on Readings #7

iain-anderson opened this issue Sep 25, 2018 · 1 comment

Comments

@iain-anderson
Copy link
Member

Assertions are an attribute in a device resource's value PropertyValue which specify a string value which the result is compared against. If the comparison fails, then the result is set to a string of the form “Assertion failed for device resource: , with value: ”, this also has a side-effect of setting the device operatingstate to DISABLED. In the case of the single device /command endpoint, a 500 status code is also returned. If the all form of the /command endpoint is used an assertion failure will return a 200 status, and it's the responsibilty of the client to check each reading for assertion failures.

As assertions are operations on results after they've been transformed into the string to be passed in the Reading, assertions cannot as currently defined, be applied to binary readings which result in an array of bytes vs. a string result in the Reading.

@iain-anderson
Copy link
Member Author

Implemented in #54

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

No branches or pull requests

1 participant