6.7 Generic Guidelines for Mapping LwM2M Objects to oneM2M <mgmtObj> Resources

Since there are several LwM2M defined objects and vendor defined LwM2M Objects that currently do not have a corresponding <mgmtObj> specialization defined in this document, the following guidelines have been defined. These guidelines provide interoperability and extensibility between the two standards and ensure seamless interworking of LwM2M clients and servers with oneM2M CSEs and AEs.

Below are the guidelines for generically mapping LwM2M Objects to oneM2M <mgmtObj> resources.

  1. For a given LwM2M object that is to be mapped to oneM2M, there shall exist a definition file where information about the LwM2M object is defined. An example of such a definition file is found in [20] and is shown in Annex A for convenience. Using a template oneM2M schema file as shown in Annex B, a corresponding oneM2M <mgmtObj> XSD file shall be created that is compliant with existing oneM2M XSD conventions as defined in [2].
  2. The new XSD shall have a base of "m2m:mgmtResource" and inherit all oneM2M defined <mgmtObj> common attributes. In addition, the new mgmtObj resource shall include the oneM2M common types and subscription schema files. The name of both the resource and the schema file shall be the concatenation of the LwM2M Object name. For example, the LwM2M Cellular connectivity object (object ID 10) shall be given the name cellularConnectivity in oneM2M.
  3. For each LwM2M resource supported by the LwM2M object to be mapped, the XSD shall support a corresponding oneM2M [objectAttribute] element. The name of the LwM2M resource shall be used for the name of the oneM2M [objectAttribute] but the convention of the name shall follow oneM2M naming conventions, e.g. LwM2M resource name "SMSC address" shall be "smscAddress".
  4. The order of the [objectAttribute] attributes shall match the order of the LwM2M resources as specified by the LwM2M object's resource definition file. This order matching is important as it provides an ordered mapping between LwM2M resources and oneM2M attributes. This allows for easier translation of oneM2M [objectAttribute] attributes to the corresponding LwM2M resources whenever a request is made to manage a LwM2M device. The ordering will also help ensure that <mgmtObj> XSD files generated by different developers and for the same LwM2M object are the same.
  5. For each [objectAttribute] attribute, the following guidelines shall be followed. a) The type definition shall be based on the mapping of basic data types defined in Section 6.1. b) The minOccurs and maxOccurs settings shall be based on the multiplicity (i.e. Single vs. Multiple) and the optionality (i.e. Mandatory vs. Optional) of the corresponding LwM2M resource. A mandatory attribute shall have a minOccurs=1, while an optional attribute shall have a minOccurs=0. An attribute with single multiplicity shall have a maxOccurs=1, while an attribute with multiplicity greater than one shall have a maxOccurs set to the specified limit or to unbounded if no limit is specified.
  6. An example of a oneM2M schema file that is mapped from a LwM2M resource definition file is shown in Annex C. Note the order of the oneM2M resource specific attributes match that of the LwM2M definition file, e.g. activatedProfileNames is mapped to Activated Profile Names even though the LwM2M resource ID is not sequential. As long as the order of the oneM2M attributes match the order of the LwM2M resources, a mapping can be performed provided that both the oneM2M schema file and the LwM2M resource definition are available. This applies to cases where the LwM2M resource ID are out of sequence or even if there is a gap in the sequence of the resource IDs.
  7. When creating the <mgmtObj> associated with a LwM2M Object defined by these guidelines, the following rules shall be followed as shown in Table 6.7-1. a) mgmtDefinitions shall be set to the value "Unspecified". b) mgmtSchema shall be set to the URI of where the XSD file created in Step 1 is located c) objectIDs shall be set to the URN of the corresponding LwM2M Object.
    d) objectPaths may be included and configured with the prefix of the local path where the LwM2M Object resides on the LwM2M device. e) mgmtLink may be included if the <mgmtObj> resource links to another <mgmtObj> resource to form a hierarchy of <mgmtObj> resources. f) The inclusion of at least one [objectAttribute]. Note the order of the [objectAttribute] must follow the same order as specified by the LwM2M Object's resource definition file. g) The description attribute may be included to provide more specific information about the functionality of the <mgmtObj>. An example is the string "LwM2M:<object_ID>" to identify the <mgmtObj> is associated with LwM2M and to what Object ID.

Table6.7-1: <mgmtObj> Resource Specific Attributes

<mgmtObj> Attributes Create
M/O
Description of Value During <mgmtObj> Create
mgmtDefinitions M Contains the value corresponding to "Unspecified"
mgmtSchema O URI of an XSD file that provides the resource definitions for this <mgmtObj> resource
objectIDs M URN of the corresponding LwM2M object
objectPaths O Contains the prefix of the local path the LwM2M Object resides at on the LwM2M device. The path will include the LwM2M object instance associated with this <mgmtObj> resource, e.g. /9/2 - this <mgmtObj> maps to software object instance 2.
mgmtLink O Contains a link to other <mgmtObj> resources to support a hierarchy of <mgmtObj> resources
[objectAttribute] M List of LwM2M resources mapped to oneM2M attributes one for one and in the order specified by the LwM2M Object's resource definitions file.
Description O A text description that contains information about the LwM2M Object

These generic guidelines allow for the specification of a new <mgmtObj> schema definitions that may be referenced by the mgmtSchema attribute. The new schema definition (e.g. XSD) of the <mgmtObj> specialization shall correspond to a LwM2M Object definition. The mgmtSchema shall be configured during the creation of the specialized <mgmtObj> resource. The option to specify a URI in the mgmtSchema attribute allows the CSE to support interworking with new LwM2M Objects (e.g., those that were not available at the time of initial deployment of the CSE). This is especially true in the case of vendor specific LwM2M Objects. The URI will point to a location where the schema definition of the new <mgmtObj> specialization can be found and retrieved by the CSE to use.