Objects and Resources

LwM2M Resource and Object specifications and 1NCE LWM2M support.

The LwM2M standard defines that a compatible client possesses information sources called Resources. Each of these resources is organized and grouped as Objects. Therefore, each resource must be part of an object and each object group should contain a collection of resources. The definition of these shared data structures helps unifying commonly used data parameters, making the data usage in LwM2M ecosystems more universal.
For more detailed information, please reference the OMA LwM2M Registry.

Illustration of the LwM2M Object and Resource concept.Illustration of the LwM2M Object and Resource concept.

Illustration of the LwM2M Object and Resource concept.


1NCE LwM2M Object Support

Each LwM2M Object and Resource needs to have a fixed definition. Common definitions are outlined in the OMA LwM2M Registry. The 1NCE LwM2M Service supports all objects listed in the OMA Registry. It is recommended to stick to these provided specifications to achieve maximal service compatibility.


Example LwM2M Object

A commonly used data structure in M2M and IoT application cases is the location. Typically parameters like Latitude, Longitude or Speed are combined to form a location object. In the OMA LwM2M Registry, a Location Object is predefined for usage with the LwM2M protocol standard. The following examples shows the Object and Resource definitions and parameters. Note that the shown Location Object only contains Resources that can be read and not written.

Object Definition

Object Key Name

Value

Name

Location

Object ID

6

Object Version

1.0

LwM2M Version

1.0

Object URN

urn:oma:lwm2m:oma:6

Instances

Single

Mandatory

Optional

Resources Definition

ID

Name

OP

Instance

Mandatory

Type

Units

0

Latitude

R

Single

Mandatory

Float

lat

1

Longitude

R

Single

Mandatory

Float

lon

2

Altitude

R

Single

Optional

Float

m

3

Radius

R

Single

Optional

Float

m

4

Velocity

R

Single

Optional

Opaque

5

Timestamp

R

Single

Mandatory

Time

6

Speed

R

Single

Optional

Float

m/s

Device Resource Identification

LwM2M resources are identified in the format: <object id>/<object instance id>/<resource id>.
Therefore, a device with a single Location Object would list the Latitude as 6/0/0 and the Longitude as 6/0/1.


Did this page help you?