|
Re: Uniquely identify a device in om2m [message #1402670 is a reply to message #1402385] |
Thu, 17 July 2014 10:19 |
Yassine Banouar Messages: 3 Registered: June 2014 |
Junior Member |
|
|
Hi Hady,
As Implemented in OM2M, the ID can be specified in the XML representation when you want to create your resource (not a collection resource (scls, applications, containers, etc.)), and the identification (for some important resources) is as follow:
- Application resource: the ID is optional in the creation request.
- appId attribute in the XML: if the ID is Unique, the resource is created. Otherwise, you will get a 409 error with "ApplicationId Conflit" message.
- appId attribute not in the XML: the ID will be generated dynamically (APP_RandomNumber)
- Container resource: the ID is optional in the creation request.
- id attribute in the XML: if the ID is Unique, the resource is created. Otherwise, an other ID will be generated (CONT_RandomNumber).
- id attribute not in the XML: the ID will be generated dynamically (CONT_RandomNumber)
- ContentInstance resource: the ID is optional in the creation request.
- id attribute in the XML: if the ID is Unique, the resource is created. Otherwise, an other ID will be generated (CI_RandomNumber).
- id attribute not in the XML: the ID will be generated dynamically (CI_RandomNumber)
Hope that will be helpful.
Regards.
---
Yassine
[Updated on: Thu, 17 July 2014 10:21] Report message to a moderator
|
|
|
|
Re: Uniquely identify a device in om2m [message #1402993 is a reply to message #1402969] |
Sat, 19 July 2014 15:18 |
Yassine Banouar Messages: 3 Registered: June 2014 |
Junior Member |
|
|
Hi Hady,
I will try to give a scenario implemented in OM2M.
In our case for instance, we provided a PhidgetIPU (Interworking Proxy Unit) to allowing interaction with this devices' Technology. It creates all resources for the interfaceKit 8/8/8 (8: Analog Inputs and 8: Digital Inputs (for sensors), 8: Outputs (for actuation)):
- Application resource is related to an Interface.
- Two Containers: DESCRIPTOR, which contains a ContentInstance for all procedures to interact with your devices (switch ON/OFF, get the LastValue from DB or Device, etc.), and DATA container, where your device's values are stored (by default to the last ten values).
All these IDs (for applications, containers) are specified in the PhidgetIPU.
So maybe for your scenario, to interact with your devices, you can create an IPU for them, which will discover and create the corresponding resources for your devices, and specify the corresponding.
The IPU Lamp Sample is also based on the same procedure (that you already know).
Regards
-------
Yassine
|
|
|
|
Powered by
FUDForum. Page generated in 0.04045 seconds