5.5 Binding message convention

In HTTP/CoAP/MQTT binding messages, the present document defines the convention for <variable>:

  • <resourceType> represents a resource name (i.e. resourceName attribute) of a resource instance in that resourceType. For example, <CSEBase>/<AE> can represent "CSE1base/AE1" in structured resource ID format.
  • <parameter> represents a value of a oneM2M request/response parameter. For example, <Request ID> can represent "0001" value of the Request ID parameter. Parameter names are case sensitive and in long names as specified in oneM2M TS-0004 [2].
  • <ID> represents an AE-ID or CSE-ID in MQTT Topic names.

The value will be given at an interoperability test event.

In oneM2M TS-0010 [5], all oneM2M request/response parameters are carried in the MQTT message payload since it has no message header concept. Therefore, the MQTT message payload needs to be described more than HTTP and CoAP messages to describe those parameters in clause 8. In HTTP and CoAP binding messages, payloads are described as "empty" or "<container> resource to be created" in a very abstract way.

Since the representation can be XML or JSON, payload should be abstract to support XML and JSON. The following example is an XML representation and its abstraction for creating a <container> resource.

XML payload example for MQTT binding
<?xml version="1.0" encoding="UTF-8"?>
<m2m:req xmlns:m2m="http://www.onem2m.org/xml/protocols" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onem2m.org/xml/protocols CDT-requestPrimitive-v1_0_0.xsd">
<op>1</op>
<to>CSE1Base</to>
<fr>/CSE1/C_AE1</fr>
<rqi>2001</rqi>
<ty>3</ty>
<nm>cont1</nm>
<rti><rt>3</rt></rti>
<pc>
<cnt>
<lbl>SmartMeter</lbl>
<et>20141003T112033</et>
</cnt>
</pc>
</m2m:req>
Abstracted payload example for MQTT binding
op = 1
to = CSE1Base
fr = /CSE1/C_AE01
rqi = 3001
ty = 3
name = cont1
rti.rt = 3
pc.cnt.lbl = SmartMeter
pc.cnt.et = 20141003T112033
Abstracted payload example for MQTT binding adopting the payload convention
op = 1
to = <CSEBase>
fr = <From>
rqi = <Request ID>
ty = 3
name = <Name>
rti.rt = 3
pc = <Content>