mseeb.xml 11.8 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>
ankraft's avatar
ankraft committed
84
                    <SimpleType type="boolean" />
ankraft's avatar
ankraft committed
85 86 87 88 89
                </Action>
                <Action name="setTarget">
                    <Doc>
                        Set the associated state to the specified value.
                    </Doc>
90 91 92 93 94 95 96 97
                    <Args>
                        <Arg name="value">
                            <Doc>
                            The desired value of the associated state.
                            </Doc>
                            <SimpleType type="boolean" />
                        </Arg>
                    </Args>
ankraft's avatar
ankraft committed
98 99 100 101 102
                </Action>
          </Actions>
          <Events>
                <Event name="stateChanged" optional="true">
                    <Data>
103
                        <DataPoint name="state" readable="true">
ankraft's avatar
ankraft committed
104
                    		<SimpleType type="boolean" />
ankraft's avatar
ankraft committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118
                        </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
119 120 121
            <Doc>
                This device is intended as a demonstration of how to define a Root Device with multiple sub-devices.
            </Doc>
122 123
            <Characteristics>
                <Characteristic name="Name">
124 125
                    <Doc>Original value: Multi Socket Electrical-Extension-Block</Doc>
                    <SimpleType type="string" />
126 127
                </Characteristic>
                <Characteristic name="Vendor">
128 129
                    <Doc>Original value: HGI</Doc>
                    <SimpleType type="string" />
130 131
                </Characteristic>
                <Characteristic name="FirmwareVersion">
132 133
                  <Doc>Original value: 1.0</Doc>
                  <SimpleType type="string" />
134 135
                </Characteristic>
                <Characteristic name="VendorURL">
136 137
                  <Doc>Original value: http://www.homegatewayinitative.org</Doc>
                  <SimpleType type="uri" />
138 139
                </Characteristic>
                <Characteristic name="SerialNumber">
140 141
                  <Doc>Original value: 1234.5</Doc>
                  <SimpleType type="string" />
142 143
                </Characteristic>
            </Characteristics>
ankraft's avatar
ankraft committed
144 145 146 147 148 149 150 151 152 153 154 155 156

<!-- 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>
157 158 159 160 161 162
                    <Characteristics>
                        <Characteristic name="version" value="1.0.0">
                            <Doc>Version for this ModuleClass</Doc>
                            <SimpleType type="string" />
                        </Characteristic>
                    </Characteristics>
ankraft's avatar
ankraft committed
163
                </Module>
ankraft's avatar
ankraft committed
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
                <Module name="power">
                    <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>
                    	</Action>
                    </Actions>
                </Module>
ankraft's avatar
ankraft committed
179 180

                <Module name="extensionBlockDataPoints">
181 182 183 184 185 186 187
                    <Actions>
                        <Action name="getNames">
                            <Array name="names">
                                <SimpleType type="string" />
                            </Array>
                        </Action>
                    </Actions>
ankraft's avatar
ankraft committed
188 189
                    <Data>
                        <DataPoint  name="firmwareVersion" 
190 191
                                    writable="false"
                                    readable="true">
ankraft's avatar
ankraft committed
192 193 194
                            <Doc>
                                This datapoint represents the firmware version of the extension block.
                            </Doc>
ankraft's avatar
ankraft committed
195
                            <SimpleType type="string" />
ankraft's avatar
ankraft committed
196 197 198
                        </DataPoint>
                        
                        <DataPoint  name="powerSwitchNames"
199 200
                                    writable="false"
                                    readable="true">
ankraft's avatar
ankraft committed
201 202 203
                            <Doc>
                                This datapoint is an array of strings with the names of the contained devices.
                            </Doc>
ankraft's avatar
ankraft committed
204 205 206
                            <Array>
                                <SimpleType type="string" />
                            </Array>
ankraft's avatar
ankraft committed
207 208 209 210 211 212 213 214 215 216 217 218 219
                        </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
220 221 222
                    <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>
223 224
                    <Characteristics>
                        <Characteristic name="Name">
225 226
                            <Doc>Original value: PowerSwitch 1</Doc>
                            <SimpleType type="string" />
227 228
                        </Characteristic>
                        <Characteristic name="Vendor">
229 230
                            <Doc>Original value: HGI</Doc>
                            <SimpleType type="string" />
231 232
                        </Characteristic>
                    </Characteristics>
ankraft's avatar
ankraft committed
233 234 235 236 237 238 239 240 241 242
                    <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
243 244 245
                    <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>
246 247
                    <Characteristics>
                        <Characteristic name="Name">
248 249
                            <Doc>Original value: PowerSwitch 2</Doc>
                            <SimpleType type="string" />
250 251
                        </Characteristic>
                        <Characteristic name="Vendor">
252 253
                            <Doc>Original value: HGI</Doc>
                            <SimpleType type="string" />
254 255 256 257 258 259 260 261 262
                        </Characteristic>
                        <Characteristic name="VendorURL" value="http://homegatwaysinitiative.org">
                            <Doc>Original value: http://homegatwaysinitiative.org</Doc>
                            <SimpleType type="uri" />
                        </Characteristic>
                        <Characteristic name="maximumAltitude" value="2800">
                            <SimpleType type="integer" />
                        </Characteristic>
                    </Characteristics>
ankraft's avatar
ankraft committed
263 264 265 266 267 268 269 270 271 272 273 274
                    <Modules>
                        <Module name="power">
                            <extends domain="hgi.dal.core" class="BooleanState"/>
                        </Module>
                    </Modules>
                </SubDevice>

            </SubDevices>

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