... | ... | @@ -108,14 +108,13 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn |
|
|
```
|
|
|
|
|
|
#### 3. Instantiate a new TemperatureResource (Server.java, FIXME 2):
|
|
|
* Resources are created like normal objects and added to the server
|
|
|
* Resources are created like normal objects
|
|
|
|
|
|
```java
|
|
|
CoapResource resource = new CoapResource();
|
|
|
```
|
|
|
|
|
|
#### 4. Add the TemperatureResource to the ResourceServer (Server.java, FIXME 3):
|
|
|
* Resources are created like normal objects and added to the server
|
|
|
|
|
|
```java
|
|
|
resourceServer.createResource(resource);
|
... | ... | @@ -238,10 +237,10 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn |
|
|
Depending on the received temperature, set the payload to high, medium, low or off
|
|
|
|
|
|
```
|
|
|
high 28 <= Temperature
|
|
|
medium 25 <= Temperature < 28
|
|
|
low 21 <= Temperature < 25
|
|
|
off Temperature < 21
|
|
|
high 28 <= Temperature
|
|
|
medium 25 <= Temperature < 28
|
|
|
low 21 <= Temperature < 25
|
|
|
off Temperature < 21
|
|
|
```
|
|
|
|
|
|
```java
|
... | ... | |