Open Data Format (O-DF), an Open Group Internet of Things (IoT) Standard – Example O-DF Structures

 

This appendix shows example messages for some basic cases. More examples are normally available at the website(s) where this specification is published.

Object->Object->InfoItem->Value(s)

<?xml version="1.0" encoding="UTF-8"?> <!-- Example of Object->Object->InfoItem->value(s).  --> <Objects  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="odf.xsd">     <Object type="someType">         <id>UniqueTargetID_1</id>         <InfoItem name="InfoItem1">             <value>Value1</value>             <value>Value2</value>             <value>Value3</value>         </InfoItem>         <InfoItem name="InfoItem2">             <value>Value</value>         </InfoItem>         <Object type="someType">             <id>SubTarget1</id>             <InfoItem name="SubInfoItem1">             </InfoItem>             <Object type="someType">                 <id>SubSubTarget1</id>                 <InfoItem name="SubSubTarget1InfoItem1">                     <value>22.5</value>                 </InfoItem>             </Object>         </Object>         <Object type="someType">             <id>SubTarget2</id>             <InfoItem name="SubTarget2InfoItem1">                 <value>34.6</value>             </InfoItem>         </Object>     </Object> </Objects>

Metadata about Refrigerator Power Consumption InfoItem

<?xml version="1.0" encoding="UTF-8"?> <!-- Example of a simple “odf” structure for a refrigerator. --> <Objects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="odf.xsd">     <Object>         <id>SmartFridge22334411</id>         <InfoItem name="PowerConsumption">             <MetaData>                 <InfoItem name="format"><value type="xs:string">xs:double</value></InfoItem>                 <InfoItem name="latency"><value type="xs:int">5</value></InfoItem>                 <InfoItem name="readable"><value type="xs:boolean">true</value></InfoItem>                 <InfoItem name="writable"><value type="xs:boolean">false</value></InfoItem>                 <InfoItem name="unit"><value type="xs:string">Watts</value></InfoItem>                 <InfoItem name="accuracy"><value type="xs:double">1</value></InfoItem>             </MetaData>         </InfoItem>     </Object> </Objects>

Measurement Values for Refrigerator Power Consumption

<?xml version="1.0" encoding="UTF-8"?> <!-- Example of a simple “odf” structure for a refrigerator. --> <Objects xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="odf.xsd">     <Object type="Refrigerator Assembly Product">         <id>SmartFridge22334411</id>         <InfoItem name="Consumed Electrical Power Measure">             <description>Power consumption values with timestamp.</description>             <value dateTime="2001-10-26T15:33:21">15.5</value>             <value dateTime="2001-10-26T15:33:50">15.7</value>             <value dateTime="2001-10-26T15:34:15">1.3</value>             <value dateTime="2001-10-26T15:34:35">1.5</value>             <value dateTime="2001-10-26T15:34:52">15.3</value>         </InfoItem>     </Object> </Objects>