Request for an Example of Assertion Usage in Device Service Development #322
Unanswered
bighb69738
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@bighb69738 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am currently developing a device service and would like to implement Assertions to validate the readings of device resources. According to the official documentation, Assertions are used to check if the device readings meet certain conditions, and if they fail, an error is returned, and the device's state is set to DISABLED.
However, I am having trouble finding a comprehensive example on how to properly set up Assertions, specifically in the following areas:
How to set up range checks (e.g., checking if temperature is within a certain range).
How to handle error messages and statuses when an Assertion fails.
A full example of configuring Assertion in the PropertyValue of a device resource.
I noticed that the documentation doesn't provide full examples, and I would appreciate it if you could share some concrete examples of how to apply Assertions in real-world device service development.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions