Admin message
Gitlab Update from 18.6.1 to 18.6.2 runs on 2025-12-17
Changes
Page history
bjoern.butzin created page: home
authored
Sep 08, 2016
by
Björn Butzin
Hide whitespace changes
Inline
Side-by-side
home.markdown
View page @
833cd204
...
...
@@ -53,7 +53,7 @@ Client Side
-
one channel represents a connection to one client
-
Client:
-
individual implementation of a client application, implements CoapClient (interface)
-CoapClient (interface):
-
CoapClient (interface):
-
describes interfaces that must be supported by a client
*
ToDo on server side:
...
...
@@ -63,6 +63,7 @@ Client Side
4.
Add the TemperatureResource to the ResourceServer
5.
Run the ResourceServer
*
ToDo on client side:
1.
Establish a connection to the Server using the ChannelManager
2.
Create a CoapRequest & add some Options
...
...
@@ -70,7 +71,6 @@ Client Side
4.
Wait for CoapResponse
5.
Print the CoapResponse on the console
## 3. Import of prepared project into Eclipse
1.
File > Import
2.
General > Existing Projects ...
...
...
@@ -202,14 +202,14 @@ 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);
`CoapRequest request = clientChannel.createRequest(true, CoapRequestCode.PUT);
request.setUriPath(“/ACControl”);
request.setContentType(CoapMediaType.text_plain);
/*Depending on the received payload high, medium, low, off*/
request.setPayload(“medium”.getBytes());
clientChannel.sendMessage(request);`
*
28
<
=
Temperature
-
>
high
*
25
<
=
Temperature
<
28
-
>
medium
*
21
<
=
Temperature
<
25
-
>
low
*
Temperature
<
21
-
>
off
\ No newline at end of file
28
<
=
Temperature
-
>
high
25
<
=
Temperature
<
28
-
>
medium
21
<
=
Temperature
<
25
-
>
low
Temperature
<
21
-
>
off
\ No newline at end of file