6.5 LWM2M Object Subscription and Notification
6.5.1 Introduction
The LWM2M Server uses the Information Reporting Interface to provide the capabilities for a LWM2M Server to subscribe to changes to the LWM2M Objects, LWM2M Object instances and the associated LWM2M Object's resources. Likewise the LWM2M Client uses the Information Reporting Interface to notify subscribed LWM2M Server's when the LWM2M Object, LWM2M Object instance and/or LWM2M Object's resources change and to cancel the subscription on LWM2M Objects, LWM2M Object instances and the associated LWM2M Object's resources.
The LWM2M Server uses the Device Management & Service Enablement Interface to set the notification criteria for a subscription.
The oneM2M Subscription capabilities permit subscription changes to an oneM2M resource's attributes and its direct child resources. Likewise, the oneM2M Notification capabilities include a rich set of criteria for when a subscribed-to oneM2M resource is notified of a change.
6.5.2 LWM2M Subscription Procedure
The LWM2M IPE interworks the oneM2M resource's <subscription> child resource with the corresponding LWM2M Object using the oneM2M <subscription> resource's attributes and the corresponding LWM2M Object resource's Notification class Attributes.
Note
Each LWM2M Object resource has an associated set of Notification class Attributes that are used for defining the applicable subscription and notification criteria.
When the LWM2M IPE creates a oneM2M Content Sharing Resource, the LWM2M IPE creates a subscription on the Content Sharing Resource to be notified whenever the oneM2M resource's subscription attribute is changed by setting the <subscription> resource's attributes as follows.
Table 6.5.2-1: LWM2M Subscription Procedure - <subscription> resource
Attributes of <subscription> | Description |
---|---|
accessControlPolicyIDs | Link a <accessControlPolicy> resource with the privileges: accessControlOriginator originatorID set to the LWM2M IPE AE's AE-ID accessControlOperations: Set to RETRIEVE, CREATE, UPDATE, DELETE, DISCOVER, NOTIFY |
pendingNotification | Set to "sendLatest" |
latestNotify | Set to "latest". |
notificationContentType | Set to "resource" |
<schedule> | Set to immediate notification |
Whenever another AE or CSE creates or deletes a subscription to the <container> resource, the LWM2M IPE shall be notified of the change and shall perform the following steps:
Step 001: Find the associated LWM2M Object or Object Instance for notification's subscriptionReference.
Step 002: If the oneM2M notification indicates a subscription deletion:
- Step 002a: If the associated LWM2M Object or Object Instance has an outstanding Observation request from the LWM2M IPE then issue the LWM2M Cancel Observation operation.
Step 003: If the oneM2M notification indicates a subscription creation:
-
Step 003a: If the associated LWM2M Object or Object Instance does not have an outstanding Observation request from the LWM2M IPE then:
- Step 003a001: Retrieve the Parent resource of the <subscription> resource from the notification's subscriptionReference.
- Step 003a002: Determine the LWM2M Notification class Attributes to set from the set of subscriptions of the Parent resource using the <schedule> resource associated with each of the Parent resource's subscriptions.
- Step 003a003: Issue the LWM2M Observe operation with the LWM2M Notification class attributes.
General Exceptions: The processing for recovery of a failed LWM2M Cancel Observation or Observation operation is vendor specific.
Table 6.5.2-2: LWM2M Subscription Procedure - Information Reporting Interface
LWM2M Operation Information Reporting Interface |
oneM2M Resource and Operation |
---|---|
Observe | NOTIFY (m2m:notification subscriptionDeletion=false) |
Cancel Observation | NOTIFY (m2m:notification subscriptionDeletion=true) |
Table 6.5.2-3: LWM2M Subscription Procedure Attribute Translation
LWM2M Operation DM and SE Interface Notification class Attributes |
oneM2M <subscription> Attribute |
---|---|
Minimum Period | <schedule> resource |
Maximum Period | <schedule> resource |
Greater Than | Not Applicable |
Less Than | Not Applicable |
Step | Not Applicable |
6.5.3 LWM2M Notification Procedure
When the LWM2M IPE is notified by the LWM2M Client of a change in a LWM2M Object or Object Instance the LWM2M IPE creates a new <contentInstance> for the associated <container> resource according to the procedures for the type of interworking (e.g. Transparent, Semantic) as described in clause 7 or 8.
For the case where LWM2M Objects are represented as <mgmtObj> resources in the M2M Service Layer and when the LWM2M IPE is notified by the LWM2M Client of a change in a LWM2M Object or Object Instance, the LWM2M IPE updates the corresponding <mgmtObj> resource according to the procedures described in clause 9.