Changes
Page history
bjoern.butzin created page: home
authored
Sep 09, 2016
by
Björn Butzin
Show whitespace changes
Inline
Side-by-side
home.markdown
View page @
e7b24117
...
@@ -17,6 +17,8 @@ The following points will be covered by this tutorial:
...
@@ -17,6 +17,8 @@ The following points will be covered by this tutorial:
*
Prepared JAVA project files for Hands-on
*
Prepared JAVA project files for Hands-on
## 2. Installation of Copper Plugin for Mozilla Firefox
## 2. Installation of Copper Plugin for Mozilla Firefox

-
https://addons.mozilla.org/de/firefox/addon/copper-270430/
-
https://addons.mozilla.org/de/firefox/addon/copper-270430/
-
Click on „add to Firefox“ & Confirm Installation
-
Click on „add to Firefox“ & Confirm Installation
-
Restart Firefox
-
Restart Firefox
...
@@ -24,16 +26,21 @@ The following points will be covered by this tutorial:
...
@@ -24,16 +26,21 @@ The following points will be covered by this tutorial:
After the installation you can enter coap://host:port/resourcePath/?query=filter.
After the installation you can enter coap://host:port/resourcePath/?query=filter.
Copper will allow you to make any CoAP interaction interactively.
Copper will allow you to make any CoAP interaction interactively.

## 3. Introduction of jCoAP
## 3. Introduction of jCoAP
-
WS4D-jCoAP: Java implementation of CoAP
-
WS4D-jCoAP: Java implementation of CoAP
-
http://ws4d.org/
-
http://ws4d.org/
-
https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap
-
https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap
### Task 1 – Sequence Diagram
### Task 1 – Sequence Diagram

Server Side
Server Side

Client Side
Client Side

**Server:**
individual implementation of a server application, creates CoapResourceServer and resources
**Server:**
individual implementation of a server application, creates CoapResourceServer and resources
**TemperatureResource:**
individual resource, inherits from BasicCoapResource
**TemperatureResource:**
individual resource, inherits from BasicCoapResource
...
@@ -47,6 +54,7 @@ Client Side
...
@@ -47,6 +54,7 @@ Client Side
**CoapClient (interface):**
describes interfaces that must be supported by a client
**CoapClient (interface):**
describes interfaces that must be supported by a client
*
ToDo on server side:
*
ToDo on server side:

1.
Create a new resource class TemperatureResource
1.
Create a new resource class TemperatureResource
2.
Instantiate a new ResourceServer
2.
Instantiate a new ResourceServer
3.
Instantiate a new TemperatureResource
3.
Instantiate a new TemperatureResource
...
@@ -55,6 +63,7 @@ Client Side
...
@@ -55,6 +63,7 @@ Client Side
*
ToDo on client side:
*
ToDo on client side:

1.
Establish a connection to the Server using the ChannelManager
1.
Establish a connection to the Server using the ChannelManager
2.
Create a CoapRequest & add some Options
2.
Create a CoapRequest & add some Options
3.
Send the CoapRequest
3.
Send the CoapRequest
...
@@ -66,12 +75,16 @@ Client Side
...
@@ -66,12 +75,16 @@ Client Side
You can find the required files in our repository at https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/tree/master/ws4d-jcoap-handsOn
You can find the required files in our repository at https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/tree/master/ws4d-jcoap-handsOn
1.
File > Import
1.
File > Import

2.
General > Existing Projects ...
2.
General > Existing Projects ...
3.
Click ‚Next‘
3.
Click ‚Next‘

4.
Browse
<Select
Project
Folder
>
4.
Browse
<Select
Project
Folder
>
5.
Click ‚Finish’
5.
Click ‚Finish’

*
the resulting GUI should look like this:
*
the resulting GUI should look like this:

*
We have prepared some FIXME and TODO annotations:
*
We have prepared some FIXME and TODO annotations:
*
Just open the „Task“ view
*
Just open the „Task“ view
...
@@ -85,7 +98,7 @@ You can find the required files in our repository at https://gitlab.amd.e-techni
...
@@ -85,7 +98,7 @@ You can find the required files in our repository at https://gitlab.amd.e-techni
## 5. Task 1: Implementation of client/server and enable simple message exchange
## 5. Task 1: Implementation of client/server and enable simple message exchange
### Server
### Server

1.
Create a new resource class TemperatureResource (already done in our example Server)
1.
Create a new resource class TemperatureResource (already done in our example Server)
2.
Instantiate a new ResourceServer
2.
Instantiate a new ResourceServer
3.
Instantiate a new TemperatureResource
3.
Instantiate a new TemperatureResource
...
@@ -134,7 +147,7 @@ You can find the required files in our repository at https://gitlab.amd.e-techni
...
@@ -134,7 +147,7 @@ You can find the required files in our repository at https://gitlab.amd.e-techni
*
Tip: make a copy of „TemperatureResource.java“
*
Tip: make a copy of „TemperatureResource.java“
### Client
### Client

1.
Establish a connection to the Server using the ChannelManager
1.
Establish a connection to the Server using the ChannelManager
2.
Create a CoapRequest & add some Options
2.
Create a CoapRequest & add some Options
3.
Send the CoapRequest
3.
Send the CoapRequest
...
@@ -172,7 +185,7 @@ You can find the required files in our repository at https://gitlab.amd.e-techni
...
@@ -172,7 +185,7 @@ You can find the required files in our repository at https://gitlab.amd.e-techni
*
If you have written your own resources before: GET them
*
If you have written your own resources before: GET them
## 6. Task 2: Implementation of a AC control by using the CoAP-observe mechanism
## 6. Task 2: Implementation of a AC control by using the CoAP-observe mechanism

1.
Use the eventing mechanism CoAP-Observe
1.
Use the eventing mechanism CoAP-Observe
2.
Let the server notify clients every 5 seconds about a changed TemperatureResource
2.
Let the server notify clients every 5 seconds about a changed TemperatureResource
3.
Implement an Air Conditioner Resource with the path “/ACControl”, that can be set to “high”,
3.
Implement an Air Conditioner Resource with the path “/ACControl”, that can be set to “high”,
...
...
...
...