Skip to content
Snippets Groups Projects
Commit bcbcaab4 authored by ankraft's avatar ankraft
Browse files

Changed examples to latest changes of the SDT

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