From bcbcaab4acaec9ea2c37809cef58da99207ab606 Mon Sep 17 00:00:00 2001 From: ankraft <an.kraft@googlemail.com> Date: Wed, 7 Oct 2015 17:01:08 +0200 Subject: [PATCH] Changed examples to latest changes of the SDT --- SDT/schema3.0/test/dal-core.xml | 8 +++- SDT/schema3.0/test/dal-eg.xml | 13 +++--- SDT/schema3.0/test/mseeb.xml | 81 ++++++++++++++++++++++----------- 3 files changed, 67 insertions(+), 35 deletions(-) diff --git a/SDT/schema3.0/test/dal-core.xml b/SDT/schema3.0/test/dal-core.xml index 729a4ca..65ec652 100644 --- a/SDT/schema3.0/test/dal-core.xml +++ b/SDT/schema3.0/test/dal-core.xml @@ -15,14 +15,18 @@ <Actions> <Action name="get"> <Doc>Obtain the current associated state.</Doc> - <SimpleType type="boolean" /> + <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> - <SimpleType type="boolean" /> + <DataType> + <SimpleType type="boolean" /> + </DataType> </Arg> </Args> </Action> diff --git a/SDT/schema3.0/test/dal-eg.xml b/SDT/schema3.0/test/dal-eg.xml index b340402..8c32446 100644 --- a/SDT/schema3.0/test/dal-eg.xml +++ b/SDT/schema3.0/test/dal-eg.xml @@ -8,9 +8,6 @@ <xi:include href="./dal-core.xml" parse="xml" /> </Imports> - <Modules> - </Modules> - <Devices> <Device id="switch.power"> @@ -31,7 +28,7 @@ <!-- The Vendor field should probably be part of the domain --> <Characteristic name="Vendor"> <Doc>Original value: Telekom Innovation Laboratories</Doc> - <SimpleType type="string" /> + <SimpleType type="string" /> </Characteristic> </Characteristics> @@ -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> - <SimpleType type="string" /> + <DataType> + <SimpleType type="string" /> + </DataType> </Action> </Actions> @@ -66,7 +65,9 @@ </Doc> <Data> <DataPoint name="state" writable="false"> - <SimpleType type="boolean" /> + <DataType> + <SimpleType type="boolean" /> + </DataType> </DataPoint> </Data> </Event> diff --git a/SDT/schema3.0/test/mseeb.xml b/SDT/schema3.0/test/mseeb.xml index 180c0fa..c92aade 100644 --- a/SDT/schema3.0/test/mseeb.xml +++ b/SDT/schema3.0/test/mseeb.xml @@ -81,7 +81,9 @@ <Doc> Obtain the current associated state. </Doc> - <SimpleType type="boolean" /> + <DataType> + <SimpleType type="boolean" /> + </DataType> </Action> <Action name="setTarget"> <Doc> @@ -92,7 +94,9 @@ <Doc> The desired value of the associated state. </Doc> - <SimpleType type="boolean" /> + <DataType> + <SimpleType type="boolean" /> + </DataType> </Arg> </Args> </Action> @@ -101,7 +105,9 @@ <Event name="stateChanged" optional="true"> <Data> <DataPoint name="state" readable="true"> - <SimpleType type="boolean" /> + <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"> - <SimpleType type="float" /> - </Array> - <Array name="timeFrame"> - <SimpleType type="datetime" /> - </Array> - </Struct> + <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> + </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"> - <SimpleType type="string" /> - </Array> + <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> - <SimpleType type="string" /> + <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> - <Array> - <SimpleType type="string" /> - </Array> + <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"> -- GitLab