6.2 Device service
The device service defined by OSGi DAL maps to a oneM2M NoDN and is represented as a specialized <flexContainer> resource and a <node> resource.
The OSGi device service itself shall be mapped to a specialized <flexContainer> resource of a specific device model that the OSGi device service instance represents. The properties of an OSGi device service shall be mapped to the attributes of the <flexContainer> resource, the <node> resource, and its child [deviceInfo] resource.
Once an OSGi device service is registered at the OSGi framework, the IPE shall be responsible for acquiring all OSGi device service properties and other related services (such as OSGi function services) and creating the corresponding resources on the oneM2M CSE.
Upon the registration of an OSGi device service, the IPE should create a <node> resource and a [deviceInfo] specialization as the child resource of the <node> resource. The IPE should also create one_<flexContainer> resource with specialized mandatory [customAttribute] as a 'nodeLink' attribute, which links to a <node> resource that is hosted on the same hosting CSE of the <flexContainer>_ . The mapping between OSGi device and oneM2M resources shall be as follows.
Table 6.2-1: Mapping of OSGi device service to oneM2M resources
| OSGi | oneM2M | Description |
|---|---|---|
| OSGi device service | <node> resource, [deviceInfo] resource, <flexContainer> resource | The <node> , [deviceInfo] and <flexContainer> resources are created upon the available of OSGi device service. |
| SERVICE_UID property | See description | Maps to the resourceID of the <flexContainer> allocated by the Hosting CSE, however the value does not need to be same. The mapping between SERVICE_UID and resourceID is maintained by IPE internally. |
| SERVICE_REFERENCE_UIDS property | See description | Reference device maps to the sub-device defined in oneM2M. Therefore, the reference device in OSGi is mapped to the hierarchical relationship of <flexContainer> resources. |
| SERVICE_DRIVER property | areaNwkType attribute of [areaNwkInfo] resource | Service driver maps to the area network type. |
| SERVICE_NAME property | resourceName attribute of <flexContainer> resource | The SERVICE_NAME is used to request resource name of <flexContainer> resource. |
| SERVICE_STATUS property | See description | Is maintained by lifecycle management of <flexContainer> resources. The <flexContainer> resource should only be created if the SERVICE_STATUS of the OSGi device is STATUS_ONLINE. |
| SERVICE_STATUS_DETAIL property | See description | The status is not visible to oneM2M. The IPE will monitor the status change and reflect the status change in the lifecycle management of the <flexContainer> resource. |
| SERVICE_HARDWARE_VENDOR property | manufacturer attribute of [deviceInfo] resource | - |
| SERVICE_HARDWARE_VERSION property | hwVersion attribute [deviceInfo] resource | - |
| SERVICE_FIRMWARE_VENDOR property | labels attribute of [deviceInfo] resource | - |
| SERVICE_FIRMWARE_VERSION property | fwVersion attribute of [deviceInfo] resource | - |
| SERVICE_TYPES property | deviceType attribute of [deviceInfo] resource | - |
| SERVICE_MODEL property | model attribute of [deviceInfo] resource | - |
| SERVICE_SERIAL_NUMBER property | deviceLabel attribute of [deviceInfo] resource | - |