C.4 How to write into content attribute

Any size of the SDT class cluster may be mapped to content attribute. For example, from only the DataPoint class to DataPoint, Action, Module, SubDevice and Device classes may be mapped to one content attribute at once.

Mapping SDT to content attribute

Figure C.4-1: Image of Mapping SDT to content attribute An example that expresses a CREATE request for <contentInstance> serialized into an XML document is shown below. This example is for the Module class and DataPoint class mapping and only content attribute and contentInfo attribute are shown as content parameter (pc).

<?xml version="1.0" encoding="UTF-8"?>
<m2m:rqp xmlns:m2m="http://www.onem2m.org/xml/protocols">
    <op>1</op>
    <to>//example.net/myCSE/-/Cont1</to>
    <fr>/myCSE/C2345</fr>
    <rqi>0002bf63</rqi>
    <ty>4</ty>
    <pc>
        <m2m:cin>
            <cnf>SDT:org.onem2m.home.device/module/temperature</cnf>
            <con>
                <tempe>
                    <curT0>5</curT0>
                    <tarTe>3</tarTe>
                </tempe>
            </con>
        </m2m:cin>
    </pc>
</m2m:rqp>

In content attribute, a value of DataPoint may be written between tags named the certain DataPoint name.

contentInfo attribute is able to be omitted because content attribute has tags named the certain Module class name (<temp></temp>).

An example for only DataPoint class mapping is shown below.:

<?xml version="1.0" encoding="UTF-8"?>
<m2m:rqp xmlns:m2m="http://www.onem2m.org/xml/protocols">
    <op>1</op>
    <to>//example.net/myCSE/-/Cont1</to>
    <fr>/myCSE/C2345</fr>
    <rqi>0002bf63</rqi>
    <ty>4</ty>
    <pc>
        <m2m:cin>
            <cnf>SDT:org.onem2m.home.device/datapoint/temperature/currentTemperature</cnf>
            <con>5</con>
        </m2m:cin>
    </pc>
</m2m:rqp>

In this case, contentInfo attribute can NOT be omitted because we cannot understand which Datapoint is written in content attribute without contentInfo attribute.

If a contentInfo attribute is not used, content attribute may change as follows:

<con>
    <curT0>5</curT0>
</con>