bjoern.butzin created page: home authored by Björn Butzin's avatar Björn Butzin
...@@ -177,10 +177,12 @@ public class Client implements CoapClient { ...@@ -177,10 +177,12 @@ public class Client implements CoapClient {
2. Let the server notify clients every 5 seconds about a changed TemperatureResource 2. Let the server notify clients every 5 seconds about a changed TemperatureResource
3. Implement an Air Conditioner Resource with the path “/ACControl”, that can be set to “high”, 3. Implement an Air Conditioner Resource with the path “/ACControl”, that can be set to “high”,
“medium”, “low” or “off” “medium”, “low” or “off”
* 28 <= Temperature -> high
* 25 <= Temperature < 28 -> medium | 28 <= Temperature | -> high |
* 21 <= Temperature < 25 -> low | 25 <= Temperature < 28 | -> medium |
* Temperature < 21 -> off | 21 <= Temperature < 25 | -> low |
| Temperature < 21 | -> off |
1. Use the eventing mechanism CoAP-Observe (Server.java, TODO 10): 1. Use the eventing mechanism CoAP-Observe (Server.java, TODO 10):
• Mark the TemperatureResource as observable • Mark the TemperatureResource as observable
`resource.setObservable(true);` `resource.setObservable(true);`
... ...
......