Skip to content

6.4 Mapping of procedures for management

6.4.0 Introduction

In this clause, the oneM2M Primitives (i.e. Create, Retrieve, Update, Delete, and Notify) are mapped to logical operations defined in OMA LwM2M. The LwM2M operations involved in that mapping (i.e. Create, Read, Write, Execute, Delete, Observe,Write Attributes and Notify operations ) are mapped on CoAP methods [17]. Create, Read, Write, Execute, Delete, Write Attributes, Observe are all carried as Confirmable CoAP message. In LwM2M the responses to these operations are carried directly in the Acknowledgement message that acknowledges the request.

LwM2M Notify operation can be mapped on either Confirmable or Non Confirmable CoAP message .This operation includes the changed value of the Object Instance or Resource.

6.4.1 Create primitive for <mgmtObj> Resource

Depending on the mgmtDefinition attribute of the <mgmtObj> Resource (i.e. [memory], [battery], [deviceInfo], etc.), an instance of the associated LwM2M Object as specified in the clause 6.3 should be created.

Receiving Create Request primitive does not imply that the LwM2M Create operations shall be always performed since, on receiving the Create Request primitive, the corresponding LwM2M Object Instance may already exist in the device.

In case that the LwM2M Object Instance is successfully created after receiving the Create Request primitive, then the objectID and objectPath attributes should be properly set based on the LwM2M Object.

The Create primitive shall map to the OMA LwM2M Create operation and shall return one of the codes described in table 6.4.1-1.

Table 6.4.1-1 Create Returned Codes Mapping

oneM2M Primitive Status Code Returned Codes Description
success 2.01 Created "Create" operation is completed successfully
error - already exists 4.00 Bad Request Target (i.e. Object) already exists
Mandatory Resources are not specified
error - no privilege 4.01 Unauthorized Access Right Permission Denied
error - not found 4.04 Not Found, URI of "Create" operation is not found
error - not allowed 4.05 Method Not Allowed Target is not allowed for "Create" operation
error - Unsupported data type 4.15 Unsupported content format The specified format is not supported

6.4.2 Retrieve primitive for <mgmtObj> Resource

Depending on the mgmtDefinition attribute of the <mgmtObj> Resource (i.e. [memory], [battery], [deviceInfo], etc.), the associated LwM2M Object resources as specified in the clause 6.3 shall be retrieved.

The Retrieve primitive shall map to the LwM2M Read operation and shall return one of the codes described in table 6.4.2-1.

Table 6.4.2-1 : Retrieve Returned Codes Mapping

oneM2M Primitive Status Code Returned Codes Returned Codes Description
success 2.05 Content 2.05 Content "Retrieve" operation is completed successfully
error - bad request error - bad request 4.00 Bad Request Undetermined error occurred
error - no privilege 4.01 Unauthorized, 4.01 Unauthorized, Access Right Permission Denied
error - not found 4.04 Not Found, 4.04 Not Found, Target of "Retrieve" operation is not found
error - not allowed 4.05 Method Not Allowed 4.05 Method Not Allowed Target is not allowed for "Retrieve" operation
error- Unsupported data type 4.06 Not Acceptable 4.06 Not Acceptable None of the preferred Content-Formats can be returned

6.4.3 Update primitive for <mgmtObj> Resource

6.4.3.0 Introduction

The Update Request Primitive for <mgmtObj> Resource can be used to modify the resources of a LwM2M Object instance or to execute the action related to a resource of a LwM2M Object instance.

The mapping in either case shall be different.

6.4.3.1 Update primitive for replacing data

Depending on the mgmtDefinition attribute of the <mgmtObj> Resource (i.e. [memory], [battery], [deviceInfo], etc.), the associated resource(s) of the LwM2M Object instance as specified in the clause 6.3 shall be updated.

The Update primitive shall map to the LwM2M Write operation and shall return one of the codes described in table 6.4.3.1-1.

Table 6.4.3.1-1 : Update Returned Codes Mapping

oneM2M Primitive Status Code Returned Codes Description
success 2.04 Changed "Update" operation is completed successfully
success 2.31 Continue
error - bad request 4.00 Bad Request, The format of data to be updated is different
error - no privilege 4.01 Unauthorized Access Right Permission Denied
error - not found 4.04 Not Found, Target of "Update" operation is not found
error - not allowed 4.05 Method Not Allowed Target is not allowed for "Update" operation
error - 4.08 Request Entity incomplete
error - 4.13 Request Entity too large
error - 4.15 Unsupported content Format

6.4.3.2 Update primitive for execution operation

This is the case that the Update Primitive targets the attribute that is mapped to a LwM2M resource that supports the Execute operation.

The Update primitive shall map to the LwM2M Execute operation and shall return one of the codes described in table 6.4.3.2-1.

Table 6.4.3.2-1 : Execute Returned Codes Mapping

oneM2M Primitive Status Code Returned Codes Description
success 2.04 Changed "Update" ("Execute") operation is completed successfully
error - bad request 4.00 Bad Request, Some issue with the "Update" argument
error - no privilege 4.01 Unauthorized Access Right Permission Denied
error - not found 4.04 Not Found, Target of "Update" ("Execute") operation is not found
error - not allowed 4.05 Method Not Allowed Target is not allowed for "Update" ("Execute") operation

6.4.4 Delete primitive for <mgmtObj> Resource

Depending on the mgmtDefinition attribute of the <mgmtObj> Resource (i.e. [memory], [battery], [deviceInfo], etc.), the associated LwM2M Object instance as specified in the clause 6.3 should be deleted.

Receiving Delete Request primitive does not imply that the corresponding LwM2M Object Instance shall always be deleted.

The Delete primitive shall map to the LwM2M Delete operation and shall return one of the codes described in table 6.4.4-1.

Table 6.4.4-1: Delete Returned Codes Mapping

oneM2M Primitive Status Code Returned Codes Description
success 2.02 Deleted "Delete" operation is completed successfully
error - not allowed 4.00 Bad Request, Target (i.e. Object Instance) is not allowed for "Delete" operation
error - no privilege 4.01 Unauthorized, Access Right Permission Denied
error - not found 4.04 Not Found, Target of "Delete" operation is not found
error - not allowed 4.05 Method Not Allowed Target is not allowed for "Delete" operation

6.4.5 Notify Primitive for <mgmtObj> Resource

6.4.5.0 Introduction

The Notify primitive permits notifications to Originators that have subscribed to a Resource.

In LwM2M, "subscription for notification" can address: either a specific resource, or all the resources of an Object Instance or all the resources of all the Object Instances of a given Object in the LwM2M Client.

6.4.5.1 Notify Primitive mapping for subscription to Resource attributes

The Notify Primitive for subscription shall map to a combination of OMA LwM2M Write Attributes and Observe operations. Write Attributes allows to set notification parameters, e.g. Notification Periodicity.

According to the parameters provided to the Observe operation, a subscription for change to a specific resource, a subscription for change to an Object instance or a subscription for change to all the Instances of a given Object can be performed.

The LwM2M Observe operation shall return one of the codes described in table 6.4.5.1-1.

Table 6.4.5.1-1: Notify for Subscription Returned Codes Mapping

oneM2M Primitive Status Code Returned Codes Description
success 2.05 Content Subscription successfully registered (token returned)
error - not allowed 4.00 Bad Request Undetermined error occurred
error - no privilege 4.01 Unauthorized Access Right Permission Denied
error - not found 4.04 Not Found Target Not found
error - not allowed 4.05 Method Not Allowed Registration not allowed
error - 4.06 Not Acceptable None of the preferred Content-Formats can be returned

6.4.5.2 Notify Primitive mapping for subscription cancellation to Resource attributes

The Notify Primitive for cancelling subscription shall map to the OMA LwM2M Cancel Observation operation: this LwM2M Cancel Observation operation is sent from the LwM2M Server to the LwM2M client to end an observation relationship for Object Instance or Resource(s). LwM2M enabler provides two ways for the LwM2M Server to cancel observation :

  • At any moment, in specifying in the LwM2M Cancel Observation operation, the Resource,; the Object or the Object Instance(s) for which the Observation has to be un-subscribed. In using the CoAP operation, the un-subscription will be performed on the resource, Object Instance or Object of the LwM2M Notify operation which triggered that response.

6.4.5.3 Notify Primitive mapping for Notification

The Notify Primitive for Notification shall map to the OMA LwM2M Notify operation which carries the changed value(s) of the Object Instance Resource(s) and the code described in table 6.4.5.3-1.

Table 6.4.5.3-1: Notify for Notification Returned Codes Mapping

oneM2M Primitive Status Code Returned Codes Description
success 2.05 An attribute has changed

Note

When an Observance has been subscribed to an Object, the Notification will be performed for each Object Instance individually.

6.4.6 Management Resource Specific Procedure Mapping

6.4.6.1 Resource [firmware]

The generic <mgmtObj> mappings described in the clauses 6.4.1 and 6.4.5 shall apply, and no specific mapping is necessary.

In addition to the status code mapping for the <mgmtObj> CRUD Operations, no [firmware] specific status code is defined in [5].

6.4.6.2 Resource [software]

The generic <mgmtObj> mappings described in the clauses 6.4.1 and 6.4.5 shall apply, and no specific mapping is necessary.

In addition to the status code mapping for the <mgmtObj> CRUD Operations, no [software] specific status code is defined in [5].

6.4.6.3 Resource [memory]

The generic <mgmtObj> mappings described in the clauses 6.4.1 and 6.4.5 shall apply, and no specific mapping is necessary.

In addition to the status code mapping for the <mgmtObj> CRUD Operations, no [memory] specific status codes are defined in [5].

6.4.6.4 Resource [battery]

The generic <mgmtObj> mappings described in the clauses 6.4.1 and 6.4.5 shall apply, and no specific mapping is necessary.

In addition to the status code mapping for the <mgmtObj> CRUD Operations, no [battery] specific status codes are defined in [5].

6.4.6.5 Resource [deviceInfo]

The generic <mgmtObj> mappings described in the clauses 6.4.1 and 6.4.5 shall apply, and no specific mapping is necessary.

In addition to the status code mapping for the <mgmtObj> CRUD Operations, no [deviceInfo] specific status codes are defined in [5].

6.4.6.6 Resource [deviceCapability]

The generic <mgmtObj> mappings described in the clauses 6.4.1 and 6.4.5 shall apply, and no specific mapping is necessary.

In addition to the status code mapping for the <mgmtObj> CRUD Operations, no [deviceCapability] specific status code is defined in [5].

6.4.6.7 Resource [reboot]

The generic <mgmtObj> mappings described in the clauses 6.4.1 and 6.4.5 shall apply, and no specific mapping is necessary.

In addition to the status code mapping for the <mgmtObj> CRUD Operations, no [reboot] specific status codes are defined in [5].