bjoern.butzin created page: home authored by Björn Butzin's avatar Björn Butzin
......@@ -17,7 +17,7 @@ The following points will be covered by this tutorial:
* Prepared JAVA project files for Hands-on
## 2. Installation of Copper Plugin for Mozilla Firefox
![Copper logo](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/CopperLogo.jpg)
![Copper logo](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/CopperLogo.jpg)
- https://addons.mozilla.org/de/firefox/addon/copper-270430/
- Click on „add to Firefox“ & Confirm Installation
......@@ -26,7 +26,7 @@ The following points will be covered by this tutorial:
After the installation you can enter coap://host:port/resourcePath/?query=filter.
Copper will allow you to make any CoAP interaction interactively.
![Copper Screenshot](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/CopperScreenshot.jpg)
![Copper Screenshot](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/CopperScreenshot.jpg)
## 3. Introduction of jCoAP
- WS4D-jCoAP: Java implementation of CoAP
......@@ -34,13 +34,13 @@ Copper will allow you to make any CoAP interaction interactively.
- https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap
### Task 1 – Sequence Diagram
![Task 1 – Sequence Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/Task1Sequence.jpg)
![Task 1 – Sequence Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/Task1Sequence.jpg)
Server Side
![Server Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/ServerUML.jpg)
![Server Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/ServerUML.jpg)
Client Side
![Client Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/Client%20UML.jpg)
![Client Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/Client%20UML.jpg)
**Server:** individual implementation of a server application, creates CoapResourceServer and resources
**TemperatureResource:** individual resource, inherits from BasicCoapResource
......@@ -54,7 +54,7 @@ Client Side
**CoapClient (interface):** describes interfaces that must be supported by a client
* ToDo on server side:
![Server Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/ServerUML.jpg)
![Server Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/ServerUML.jpg)
1. Create a new resource class TemperatureResource
2. Instantiate a new ResourceServer
3. Instantiate a new TemperatureResource
......@@ -63,7 +63,7 @@ Client Side
* ToDo on client side:
![Client Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/Client%20UML.jpg)
![Client Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/Client%20UML.jpg)
1. Establish a connection to the Server using the ChannelManager
2. Create a CoapRequest & add some Options
3. Send the CoapRequest
......@@ -75,16 +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
1. File > Import
![Eclipse File Import](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/EclipseImport1.jpg)
![Eclipse File Import](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/EclipseImport1.jpg)
2. General > Existing Projects ...
3. Click ‚Next‘
![Eclipse File Import](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/EclipseImport2.jpg)
![Eclipse File Import](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/EclipseImport2.jpg)
4. Browse <Select Project Folder>
5. Click ‚Finish’
![Eclipse File Import](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/EclipseImport3.jpg)
![Eclipse File Import](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/EclipseImport3.jpg)
* the resulting GUI should look like this:
![Eclipse GUI](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/GUI.jpg)
![Eclipse GUI](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/GUI.jpg)
* We have prepared some FIXME and TODO annotations:
* Just open the „Task“ view
......@@ -98,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
### Server
![Server Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/ServerUML.jpg)
![Server Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/ServerUML.jpg)
1. Create a new resource class TemperatureResource (already done in our example Server)
2. Instantiate a new ResourceServer
3. Instantiate a new TemperatureResource
......@@ -147,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“
### Client
![Client Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/Client%20UML.jpg)
![Client Side UML Diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/Client%20UML.jpg)
1. Establish a connection to the Server using the ChannelManager
2. Create a CoapRequest & add some Options
3. Send the CoapRequest
......@@ -185,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
## 6. Task 2: Implementation of a AC control by using the CoAP-observe mechanism
![Task 2 - Sequence diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/blob/master/ws4d-jcoap-handsOn/img/Task2Sequence.jpg)
![Task 2 - Sequence diagram](https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap/raw/master/ws4d-jcoap-handsOn/img/Task2Sequence.jpg)
1. Use the eventing mechanism CoAP-Observe
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”,
......
......