formatting of eclipse import tutorial authored by Björn Butzin's avatar Björn Butzin
...@@ -131,7 +131,7 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn ...@@ -131,7 +131,7 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn
* To stop the server, press the red terminate button in the console/task area * To stop the server, press the red terminate button in the console/task area
* Test it with Copper: `coap://127.0.0.1` * Test it with Copper: `coap://127.0.0.1`
* Stretch goal: * Stretch goal:
* Create another resource type e.g.: humidity or current Time, use real sensor values if possible * Create another resource type e.g.: humidity or current time, use real sensor values if possible
* Tip: make a copy of `TemperatureResource.java` * Tip: make a copy of `TemperatureResource.java`
### Client ### Client
...@@ -225,13 +225,13 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn ...@@ -225,13 +225,13 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn
* add a BasicCoapResource to the ResourceServer (Server.java, TODO 14) * add a BasicCoapResource to the ResourceServer (Server.java, TODO 14)
```java ```java
resourceServer.createResource(newBasicCoapResource(/ACControl,off,CoapMediaType.text_plain)); resourceServer.createResource(newBasicCoapResource("/ACControl","off",CoapMediaType.text_plain));
``` ```
* send PUT request (Client.java, TODO 15) * send PUT request (Client.java, TODO 15)
```java ```java
CoapRequest request = clientChannel.createRequest(true, CoapRequestCode.PUT); CoapRequest request = clientChannel.createRequest(true, CoapRequestCode.PUT);
request.setUriPath(/ACControl); request.setUriPath("/ACControl");
request.setContentType(CoapMediaType.text_plain); request.setContentType(CoapMediaType.text_plain);
``` ```
Depending on the received temperature, set the payload to high, medium, low or off Depending on the received temperature, set the payload to high, medium, low or off
... ...
......