mseeb.xml 13.4 KB
Newer Older
ankraft's avatar
ankraft committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
<?xml version="1.0" encoding="iso-8859-1"?>

<!--tabstop: 4 -->

<!--

+................................................+
:Domain:org.homegatewayinitiative                                  :
:                                                :
:  +..........................................+  :
:  :Module:BooleanState                       :  :
:  :                                          :  :
:  :  +....................................+  :  :
:  :  :Action:get                          :  :  :
:  :  +....................................+  :  :
:  :                                          :  :
:  :  +....................................+  :  :
:  :  :Action:setTarget                    :  :  :
:  :  +....................................+  :  :
:  +..........................................+  :
:                                                :
:  +..........................................+  :
:  :Device:MSEEB.root                         :  :
:  :                                          :  :
:  :  +....................................+  :  :
:  :  :Module<REF>:BooleanState            :  :  :
:  :  +....................................+  :  :
:  :                                          :  :
:  :  +....................................+  :  :
:  :  :Module:extensionBlockDataPoints     :  :  :
:  :  :                                    :  :  :
:  :  :  +..............................+  :  :  :
:  :  :  :DataPoint:firmwareVersion     :  :  :  :
:  :  :  +..............................+  :  :  :
:  :  :                                    :  :  :
:  :  :  +..............................+  :  :  :
:  :  :  :DataPoint:powerSwitchNames    :  :  :  :
:  :  :  +..............................+  :  :  :
:  :  +....................................+  :  :
:  :                                          :  :
:  :  +....................................+  :  :
:  :  :SubDevices                          :  :  :
:  :  :                                    :  :  :
:  :  :  +..............................+  :  :  :
:  :  :  :SubDevice:switch.power.1      :  :  :  :
:  :  :  :                              :  :  :  :
:  :  :  :+...........................+ :  :  :  :
:  :  :  ::Module<REF>:BooleanState   : :  :  :  :
:  :  :  :+...........................+ :  :  :  :
:  :  :  +..............................+  :  :  :
:  :  :                                    :  :  :
:  :  :  +..............................+  :  :  :
:  :  :  :SubDevice:switch.power.2      :  :  :  :
:  :  :  :                              :  :  :  :
:  :  :  :+...........................+ :  :  :  :
:  :  :  ::Module<REF>:BooleanState   : :  :  :  :
:  :  :  :+...........................+ :  :  :  :
:  :  :  +..............................+  :  :  :
:  :  +....................................+  :  :
:  +..........................................+  :
+................................................+

-->
<Domain xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns="http://homegatewayinitiative.org/xml/dal/3.0" 
    id="org.homegatewayinitiative">

<!-- The following import statements include ModuleClasses from HGI -->

    <Imports>
        <xi:include href="./dal-core.xml" parse="xml" />
    </Imports>

    <Modules>
        <ModuleClass name="BooleanState">
            <Doc>
                <tt>BooleanState</tt> is the preferred module for modelling a functionality corresponding to an underlying binary state.This module should be used to abstract away from the actual datatype and values in question. Note that the module does not define whether the execution mode is blocking or non-blocking.
            </Doc>
            <Actions>
ankraft's avatar
ankraft committed
80
                <Action name="get" optional="true">
ankraft's avatar
ankraft committed
81 82 83
                    <Doc>
                        Obtain the current associated state.
                    </Doc>
84 85 86
                    <DataType>
                        <SimpleType type="boolean" />
                    </DataType>
ankraft's avatar
ankraft committed
87 88 89 90 91
                </Action>
                <Action name="setTarget">
                    <Doc>
                        Set the associated state to the specified value.
                    </Doc>
92 93 94 95 96
                    <Args>
                        <Arg name="value">
                            <Doc>
                            The desired value of the associated state.
                            </Doc>
97 98 99
                            <DataType>
                                <SimpleType type="boolean" />
                            </DataType>
100 101
                        </Arg>
                    </Args>
ankraft's avatar
ankraft committed
102 103 104 105 106
                </Action>
          </Actions>
          <Events>
                <Event name="stateChanged" optional="true">
                    <Data>
107
                        <DataPoint name="state" readable="true">
108 109 110
                            <DataType>
                        		<SimpleType type="boolean" />
                            </DataType>
ankraft's avatar
ankraft committed
111 112 113 114 115 116 117 118 119 120 121 122 123 124
                        </DataPoint>
                    </Data>
                </Event>      
          </Events>
        </ModuleClass>
    </Modules>

<!-- Definition of the Device starts here. -->

    <Devices>

<!-- The Device contains several sub-devices and offers one action on its own. -->

        <Device id="MSEEB.root">
ankraft's avatar
ankraft committed
125 126 127
            <Doc>
                This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
            </Doc>
128 129
            <Properties>
                <Property name="Name">
130 131
                    <Doc>Original value: Multi Socket Electrical-Extension-Block</Doc>
                    <SimpleType type="string" />
132 133
                </Property>
                <Property name="Vendor">
134 135
                    <Doc>Original value: HGI</Doc>
                    <SimpleType type="string" />
136 137
                </Property>
                <Property name="FirmwareVersion">
138 139
                  <Doc>Original value: 1.0</Doc>
                  <SimpleType type="string" />
140 141
                </Property>
                <Property name="VendorURL">
142 143
                  <Doc>Original value: http://www.homegatewayinitative.org</Doc>
                  <SimpleType type="uri" />
144 145
                </Property>
                <Property name="SerialNumber">
146 147
                  <Doc>Original value: 1234.5</Doc>
                  <SimpleType type="string" />
148 149
                </Property>
            </Properties>
ankraft's avatar
ankraft committed
150 151 152 153 154 155 156 157 158 159 160 161 162

<!-- These are the modules for the device:
    - Switch on/off all contained switches. It inherits from hgi.dal.core.BooleanState.
    - A module with some data points for the firmware version of the whole device and a list of names of the containted power switches.
-->

            <Modules>
                <Module name="rootPowerOnOff" optional="true">
                    <extends domain="hgi.dal.core" class="BooleanState"/>
                    <Doc>
                        The proprietry interface for turning all switches of the extension block on and off. 
                        The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false".
                    </Doc>
163 164
                    <Properties>
                        <Property name="version" value="1.0.0">
165 166
                            <Doc>Version for this ModuleClass</Doc>
                            <SimpleType type="string" />
167 168
                        </Property>
                    </Properties>
ankraft's avatar
ankraft committed
169
                </Module>
ankraft's avatar
ankraft committed
170 171 172 173
                <Module name="power">
                    <Actions>
                    	<Action name="getPowerConsumption">
                            <Doc>Get the power consumption.</Doc>
174 175 176 177 178 179 180 181 182 183 184
                            <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>
185 186 187
                                                      <Constraint name="step" type="float" value="0.1">
                                                        <Doc>Steps are 0.1</Doc>
                                                    </Constraint>
188 189 190 191 192 193 194 195 196 197 198 199 200
                                                </Constraints>
                                            </DataType>
                				        </Array>
                                    </DataType>
                                    <DataType name="timeFrame">
                        				<Array>
                                            <DataType>
                            					<SimpleType type="datetime" />
                                            </DataType>
                				        </Array>
                                    </DataType>
                                </Struct>
                            </DataType>
ankraft's avatar
ankraft committed
201 202 203
                    	</Action>
                    </Actions>
                </Module>
ankraft's avatar
ankraft committed
204 205

                <Module name="extensionBlockDataPoints">
206 207
                    <Actions>
                        <Action name="getNames">
208 209 210 211 212 213 214
                            <DataType name="names">
                                <Array>
                                    <DataType>
                                        <SimpleType type="string" />
                                    </DataType>
                                </Array>
                            </DataType>
215 216
                        </Action>
                    </Actions>
ankraft's avatar
ankraft committed
217 218
                    <Data>
                        <DataPoint  name="firmwareVersion" 
219 220
                                    writable="false"
                                    readable="true">
ankraft's avatar
ankraft committed
221 222 223
                            <Doc>
                                This datapoint represents the firmware version of the extension block.
                            </Doc>
224 225 226
                            <DataType>
                                <SimpleType type="string" />
                            </DataType>
ankraft's avatar
ankraft committed
227 228 229
                        </DataPoint>
                        
                        <DataPoint  name="powerSwitchNames"
230 231
                                    writable="false"
                                    readable="true">
ankraft's avatar
ankraft committed
232 233 234
                            <Doc>
                                This datapoint is an array of strings with the names of the contained devices.
                            </Doc>
235 236 237 238 239 240 241
                            <DataType>
                                <Array>
                                    <DataType>
                                        <SimpleType type="string" />
                                    </DataType>
                                </Array>
                            </DataType>
ankraft's avatar
ankraft committed
242 243 244 245 246 247 248 249 250 251 252 253 254
                        </DataPoint>
                    </Data>
                </Module>
            </Modules>

<!-- Definition of sub-devices starts here. -->

            <SubDevices>

<!-- This is the first power switch of the extension block. For sake of simplicity no new ModuleClasses are defined, but only referenced.
-->

                <SubDevice id="switch.power.1">
ankraft's avatar
ankraft committed
255 256 257
                    <Doc>
                        This sub device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em> domain.
                    </Doc>
258 259
                    <Properties>
                        <Property name="Name" value="PowerSwitch 1">
260
                            <SimpleType type="string" />
261 262
                        </Property>
                        <Property name="Vendor" value="HGI">
263
                            <SimpleType type="string" />
264 265
                        </Property>
                    </Properties>
ankraft's avatar
ankraft committed
266 267 268 269 270 271 272 273 274 275
                    <Modules>
                        <Module name="power">
                            <extends domain="hgi.dal.core" class="BooleanState"/>
                        </Module>
                    </Modules>
                </SubDevice>

<!-- This is the second power switch of the extension block. -->

                <SubDevice id="switch.power.2">
ankraft's avatar
ankraft committed
276 277 278
                    <Doc>
                        This sub device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em> domain.
                    </Doc>
279 280
                    <Properties>
                        <Property name="Name" value="PowerSwitch 2">
281
                            <SimpleType type="string" />
282 283
                        </Property>
                        <Property name="Vendor" value="HGI">
284
                            <SimpleType type="string" />
285 286
                        </Property>
                        <Property name="VendorURL" value="http://homegatwaysinitiative.org">
287
                            <SimpleType type="uri" />
288 289
                        </Property>
                        <Property name="maximumAltitude" value="2800">
290
                            <SimpleType type="integer" />
291 292
                        </Property>
                    </Properties>
ankraft's avatar
ankraft committed
293 294 295 296 297 298 299 300 301 302 303 304
                    <Modules>
                        <Module name="power">
                            <extends domain="hgi.dal.core" class="BooleanState"/>
                        </Module>
                    </Modules>
                </SubDevice>

            </SubDevices>

        </Device>
    </Devices>
</Domain>