Changes
Page history
formatting of eclipse import tutorial
authored
May 30, 2017
by
Björn Butzin
Show whitespace changes
Inline
Side-by-side
home.markdown
View page @
82ef1348
...
...
@@ -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
*
Test it with Copper:
`coap://127.0.0.1`
*
Stretch goal:
*
Create another resource type e.g.: humidity or current
T
ime, use real sensor values if possible
*
Create another resource type e.g.: humidity or current
t
ime, use real sensor values if possible
*
Tip: make a copy of
`TemperatureResource.java`
### Client
...
...
@@ -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)
```
java
resourceServer
.
createResource
(
newBasicCoapResource
(
“
/
ACControl
”
,
”
off
”
,
CoapMediaType
.
text_plain
));
resourceServer
.
createResource
(
newBasicCoapResource
(
"
/ACControl
"
,
"
off
"
,
CoapMediaType
.
text_plain
));
```
*
send PUT request (Client.java, TODO 15)
```
java
CoapRequest
request
=
clientChannel
.
createRequest
(
true
,
CoapRequestCode
.
PUT
);
request
.
setUriPath
(
“
/
ACControl
”
);
request
.
setUriPath
(
"
/ACControl
"
);
request
.
setContentType
(
CoapMediaType
.
text_plain
);
```
Depending on the received temperature, set the payload to high, medium, low or off
...
...
...
...