... | ... | @@ -191,7 +191,8 @@ You can find the required files in our repository at [file](ws4d/jcoap/tree/mast |
|
|
`}`
|
|
|
3. Implement an Air Conditioner Resource with the path “/ACControl”, that can be set to “high”, “medium”, “low” or “off” (Client.java & Server.java, TODO 12-15):
|
|
|
* Change exitAfterResponse to false (Client.java, TODO 12)
|
|
|
* Add the observe-option to your CoAP-GET request (Client.java, TODO 13) `request.setObserveOption(0);`
|
|
|
* Add the observe-option to your CoAP-GET request (Client.java, TODO 13)
|
|
|
`request.setObserveOption(0);`
|
|
|
* add a BasicCoapResource to the ResourceServer (Server.java, TODO 14) `resourceServer.createResource(newBasicCoapResource(“/ACControl”,”off”,CoapMediaType.text_plain));`
|
|
|
* send PUT request (Client.java, TODO 15)
|
|
|
`CoapRequest request = clientChannel.createRequest(true, CoapRequestCode.PUT);`
|
... | ... | |