... | @@ -3,12 +3,6 @@ |
... | @@ -3,12 +3,6 @@ |
|
In this tutorial we will describe how to develop a simple message exchange between devices using jCoAP.
|
|
In this tutorial we will describe how to develop a simple message exchange between devices using jCoAP.
|
|
Furthermore, we will introduce the observe mechanism.
|
|
Furthermore, we will introduce the observe mechanism.
|
|
|
|
|
|
## 0. The requirements for this tutorial:
|
|
|
|
* JAVA SE JDK 1.6+
|
|
|
|
* Eclipse IDE for JAVA development
|
|
|
|
* Prepared JAVA project files for Hands-on
|
|
|
|
* (Copper plugin for Mozilla Firefox)
|
|
|
|
|
|
|
|
The following points will be covered by this tutorial:
|
|
The following points will be covered by this tutorial:
|
|
|
|
|
|
1. Installation of Copper Plugin for Mozilla Firefox
|
|
1. Installation of Copper Plugin for Mozilla Firefox
|
... | @@ -17,6 +11,12 @@ The following points will be covered by this tutorial: |
... | @@ -17,6 +11,12 @@ The following points will be covered by this tutorial: |
|
4. Task 1: Implementation of client/server and enable simple message exchange
|
|
4. Task 1: Implementation of client/server and enable simple message exchange
|
|
5. Task 2: Implementation of an airconditioner control by using the CoAP-observe mechanism
|
|
5. Task 2: Implementation of an airconditioner control by using the CoAP-observe mechanism
|
|
|
|
|
|
|
|
## 0. The requirements for this tutorial:
|
|
|
|
* JAVA SE JDK 1.6+
|
|
|
|
* Eclipse IDE for JAVA development
|
|
|
|
* Prepared JAVA project files for Hands-on
|
|
|
|
* (Copper plugin for Mozilla Firefox)
|
|
|
|
|
|
## 1. Installation of Copper Plugin for Mozilla Firefox
|
|
## 1. 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
|
... | @@ -33,17 +33,28 @@ Server Side |
... | @@ -33,17 +33,28 @@ Server Side |
|
|
|
|
|
Client Side
|
|
Client Side
|
|
|
|
|
|
- Server:individual implementation of a server application, creates CoapResourceServer and resources
|
|
- Server:
|
|
- TemperatureResource:individual resource, inherits from BasicCoapResource
|
|
- individual implementation of a server application, creates CoapResourceServer and resources
|
|
- BasicCoapResource:already implemented resource with basic functionality, implements CoapResource (interface)
|
|
- TemperatureResource:
|
|
- CoapResource (interface):describes interfaces that must be supported by each resource.
|
|
- individual resource, inherits from BasicCoapResource
|
|
- CoapResourceServer:manages a list of resources, enables access of these resources from outside, implements
|
|
- BasicCoapResource:
|
|
- CoapServer (interface), uses ChannelManager for connection management.
|
|
- already implemented resource with basic functionality, implements CoapResource (interface)
|
|
- CoapServer (interface):describes interfaces that must be supported by a resource server
|
|
- CoapResource (interface):
|
|
- ChannelManager:manages channels
|
|
- describes interfaces that must be supported by each resource.
|
|
- Channel:one channel represents a connection to one client
|
|
- CoapResourceServer:
|
|
- Client:individual implementation of a client application, implements CoapClient (interface)
|
|
- manages a list of resources, enables access of these resources from outside, implements
|
|
-CoapClient (interface):describes interfaces that must be supported by a client
|
|
- CoapServer (interface):
|
|
|
|
- uses ChannelManager for connection management.
|
|
|
|
- CoapServer (interface):
|
|
|
|
- describes interfaces that must be supported by a resource server
|
|
|
|
- ChannelManager:
|
|
|
|
- manages channels
|
|
|
|
- Channel:
|
|
|
|
- one channel represents a connection to one client
|
|
|
|
- Client:
|
|
|
|
- individual implementation of a client application, implements CoapClient (interface)
|
|
|
|
-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
|
... | | ... | |