Skip to content

6.3 Function service

6.3.1 Introduction

An OSGi function service maps to a specialized <flexContainer> resource that correspond to a moduleClass specified in oneM2M TS-0023 [1]. An OSGi function service may be mapped to different <flexContainer> s that correspond to different moduleClasses depending on the OSGi device service that the OSGi function service belongs to.

Table 6.3.1-1: Mapping of OSGi function to oneM2M resources

OSGi oneM2M Description
OSGi function service moduleClass <flexContainer> resource The function service is mapped to moduleClass <flexContainer> .
SERVICE_UID property See description Maps to resourceID of <flexContainer> resource. The resourceID is allocated by Hosting CSE. The mapping relationship is maintained by IPE internally.
SERVICE_TYPE property See description Maps to containerDefinition of <flexContainer> resource and is maintained by IPE.
SERVICE_VERSION property labels attribute of the <flexContainer> resource Versioning information of the OSGi service is mapped to labels attribute of the <flexContainer> resource.
SERVICE_DEVICE_UID property See description Maintained by the parent-child relationship of device model <flexContainer> and moduleClass <flexContainer>
SERVICE_REFERENCE_UIDS property labels attribute of the <flexContainer> resource Mappes to the labels attribute of the <flexContainer> resource.
SERVICE_DESCRIPTION property labels attribute of <flexContainer> resource The description of the service maps to the labels attribute of <flexContainer> resource.
SERVICE_OPERATION_NAMES property <flexContainer> resource for action
SERVICE_PROPERTY_NAMES property <flexContainer> resource for property

6.3.2 BooleanControl Function

BooleanControl function is used for switch-type of device functions like a light, door, window or power socket. It maps to the binarySwitch <flexContainer> that is a moduleClass.

Table 6.3.2-1: Mapping of BooleanControl function to binarySwitch moduleClass

OSGi oneM2M Description
inverse toggle Toggle the switch.
setTrue Update the powerState to true
setFalse Update the powerState to false
data powerState The current state of the switch

6.3.3 BooleanSensor Function

BooleanSensor function is used to report the data of a device function such as a light, door, window or power socket. It maps to several different <flexContainer> resources that are moduleClass. It is based on the device type which determines the specialization of <flexContainer> to be mapped to.

Table 6.3.3-1: Mapping of BooleanSensor function to binarySwitch moduleClass

OSGi oneM2M Description
data powerState

Table 6.3.3-2: Mapping of BooleanSensor function to doorLock moduleClass

OSGi oneM2M Description
data doorLock

Table 6.3.3-3: Mapping of BooleanSensor function to boiler moduleClass

OSGi oneM2M Description
data status

Table 6.3.3-4: Mapping of BooleanSensor function to waterSensor moduleClass

OSGi oneM2M Description
data alarm

6.3.4 MultiLevelControl Function

The MultiLevelControl Function maps to different moduleClass depending on the device type.

Table 6.3.4-1: Mapping of MultiLevelControl function to brightness moduleClass

OSGi oneM2M Description
data brightness

Table 6.3.4-2: Mapping of MultiLevelControl function to foaming moduleClass

OSGi oneM2M Description
data foamingStrength

6.3.5 MultiLevelSensor Function

The MultiLevelSensor Function maps to different moduleClass depending on the device type.

Table 6.3.5-1: Mapping of MultiLevelControl function to height moduleClass

OSGi oneM2M Description
data height

Table 6.3.5-2: Mapping of MultiLevelControl function to weight moduleClass

OSGi oneM2M Description
data weight

Table 6.3.5-3: Mapping of MultiLevelControl function to liquidRemaining moduleClass

OSGi oneM2M Description
data liquidRemaining

Table 6.3.5-4: Mapping of MultiLevelControl function to brightness moduleClass

OSGi oneM2M Description
data brightness

Table 6.3.5-5: Mapping of MultiLevelControl function to foaming moduleClass

OSGi oneM2M Description
data foamingStrength

6.3.6 Meter Function

The Meter Function maps to different moduleClass depending on the device type.

Table 6.3.6-1: Mapping of Meter function to energyConsuption moduleClass

OSGi oneM2M Description
current roundingEnergyConsumption
total absoluteEnergyConsumption

6.3.7 Alarm Function

The Alarm Function maps to different moduleClass depending on the device type.

Table 6.3.7-1: Mapping of Alarm function to motionSensor moduleClass

OSGi oneM2M Description
alarm alarm

Table 6.3.7-2: Mapping of Alarm function to smokeSensor moduleClass

OSGi oneM2M Description
alarm alarm

Table 6.3.7-3: Mapping of Alarm function to temperatureAlarm moduleClass

OSGi oneM2M Description
alarm alarm

Table 6.3.7-4: Mapping of Alarm function to waterSensor moduleClass

OSGi oneM2M Description
alarm alarm

6.3.8 Keypad Function

The Keypad Function maps to keypad moduleClass of oneM2M.

Table 6.3.8-1: Mapping of Keypad function to keypad moduleClass

OSGi oneM2M Description
key keyNumber

6.3.9 WakeUp Function

This Function currently has no corresponding moduleClass in oneM2M.