Commit bcbcaab4 authored by ankraft's avatar ankraft

Changed examples to latest changes of the SDT

parent 8ec88ed1
......@@ -15,14 +15,18 @@
<Actions>
<Action name="get">
<Doc>Obtain the current associated state.</Doc>
<DataType>
<SimpleType type="boolean" />
</DataType>
</Action>
<Action name="setTarget">
<Doc>Set the associated state to the specified value.</Doc>
<Args>
<Arg name="value">
<Doc>The desired value of the associated state.</Doc>
<DataType>
<SimpleType type="boolean" />
</DataType>
</Arg>
</Args>
</Action>
......
......@@ -8,9 +8,6 @@
<xi:include href="./dal-core.xml" parse="xml" />
</Imports>
<Modules>
</Modules>
<Devices>
<Device id="switch.power">
......@@ -56,7 +53,9 @@
</Action>
<Action name="state">
<Doc>Query the state of the switch. Returns the string "<tt>on</tt>" or "<tt>off</tt>".</Doc>
<DataType>
<SimpleType type="string" />
</DataType>
</Action>
</Actions>
......@@ -66,7 +65,9 @@
</Doc>
<Data>
<DataPoint name="state" writable="false">
<DataType>
<SimpleType type="boolean" />
</DataType>
</DataPoint>
</Data>
</Event>
......
......@@ -81,7 +81,9 @@
<Doc>
Obtain the current associated state.
</Doc>
<DataType>
<SimpleType type="boolean" />
</DataType>
</Action>
<Action name="setTarget">
<Doc>
......@@ -92,7 +94,9 @@
<Doc>
The desired value of the associated state.
</Doc>
<DataType>
<SimpleType type="boolean" />
</DataType>
</Arg>
</Args>
</Action>
......@@ -101,7 +105,9 @@
<Event name="stateChanged" optional="true">
<Data>
<DataPoint name="state" readable="true">
<DataType>
<SimpleType type="boolean" />
</DataType>
</DataPoint>
</Data>
</Event>
......@@ -165,14 +171,30 @@
<Actions>
<Action name="getPowerConsumption">
<Doc>Get the power consumption.</Doc>
<Struct name="values">
<Array name="consumption">
<DataType name="consumption">
<Struct>
<DataType name="values">
<Array>
<DataType>
<Doc>This is an example simple data type with a minimum-value constraint.</Doc>
<SimpleType type="float" />
<Constraints>
<Constraint name="minValue" type="float" value="0.0">
<Doc>The value must be equal or greater 0.0</Doc>
</Constraint>
</Constraints>
</DataType>
</Array>
<Array name="timeFrame">
</DataType>
<DataType name="timeFrame">
<Array>
<DataType>
<SimpleType type="datetime" />
</DataType>
</Array>
</DataType>
</Struct>
</DataType>
</Action>
</Actions>
</Module>
......@@ -180,9 +202,13 @@
<Module name="extensionBlockDataPoints">
<Actions>
<Action name="getNames">
<Array name="names">
<DataType name="names">
<Array>
<DataType>
<SimpleType type="string" />
</DataType>
</Array>
</DataType>
</Action>
</Actions>
<Data>
......@@ -192,7 +218,9 @@
<Doc>
This datapoint represents the firmware version of the extension block.
</Doc>
<DataType>
<SimpleType type="string" />
</DataType>
</DataPoint>
<DataPoint name="powerSwitchNames"
......@@ -201,9 +229,13 @@
<Doc>
This datapoint is an array of strings with the names of the contained devices.
</Doc>
<DataType>
<Array>
<DataType>
<SimpleType type="string" />
</DataType>
</Array>
</DataType>
</DataPoint>
</Data>
</Module>
......@@ -221,12 +253,10 @@
This sub device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em> domain.
</Doc>
<Characteristics>
<Characteristic name="Name">
<Doc>Original value: PowerSwitch 1</Doc>
<Characteristic name="Name" value="PowerSwitch 1">
<SimpleType type="string" />
</Characteristic>
<Characteristic name="Vendor">
<Doc>Original value: HGI</Doc>
<Characteristic name="Vendor" value="HGI">
<SimpleType type="string" />
</Characteristic>
</Characteristics>
......@@ -244,16 +274,13 @@
This sub device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em> domain.
</Doc>
<Characteristics>
<Characteristic name="Name">
<Doc>Original value: PowerSwitch 2</Doc>
<Characteristic name="Name" value="PowerSwitch 2">
<SimpleType type="string" />
</Characteristic>
<Characteristic name="Vendor">
<Doc>Original value: HGI</Doc>
<Characteristic name="Vendor" value="HGI">
<SimpleType type="string" />
</Characteristic>
<Characteristic name="VendorURL" value="http://homegatwaysinitiative.org">
<Doc>Original value: http://homegatwaysinitiative.org</Doc>
<SimpleType type="uri" />
</Characteristic>
<Characteristic name="maximumAltitude" value="2800">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment