mseeb.xml 10.6 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>
ankraft's avatar
ankraft committed
103 104
                        <DataPoint name="state" optional="true">
                    		<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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
            <DeviceInfos>
                <DeviceInfo name="Name">
                    <Doc>Original value: Multi Socket Electrical-Extension-Block</Doc>
                    <SimpleType type="string" />
                </DeviceInfo>
                <DeviceInfo name="Vendor">
                    <Doc>Original value: HGI</Doc>
                    <SimpleType type="string" />
                </DeviceInfo>
                <DeviceInfo name="FirmwareVersion">
                  <Doc>Original value: 1.0</Doc>
                  <SimpleType type="string" />
                </DeviceInfo>
                <DeviceInfo name="VendorURL">
                  <Doc>Original value: http://www.homegatewayinitative.org</Doc>
                  <SimpleType type="uri" />
                </DeviceInfo>
                <DeviceInfo name="SerialNumber">
                  <Doc>Original value: 1234.5</Doc>
                  <SimpleType type="string" />
                </DeviceInfo>
            </DeviceInfos>
ankraft's avatar
ankraft committed
144 145 146 147 148 149 150 151 152 153 154 155 156 157

<!-- 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>
                </Module>
ankraft's avatar
ankraft committed
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
                <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
173 174 175 176 177 178 179 180

                <Module name="extensionBlockDataPoints">
                    <Data>
                        <DataPoint  name="firmwareVersion" 
                                    writable="false">
                            <Doc>
                                This datapoint represents the firmware version of the extension block.
                            </Doc>
ankraft's avatar
ankraft committed
181
                            <SimpleType type="string" />
ankraft's avatar
ankraft committed
182 183 184 185 186 187 188
                        </DataPoint>
                        
                        <DataPoint  name="powerSwitchNames"
                                    writable="false">
                            <Doc>
                                This datapoint is an array of strings with the names of the contained devices.
                            </Doc>
ankraft's avatar
ankraft committed
189 190 191
                            <Array>
                                <SimpleType type="string" />
                            </Array>
ankraft's avatar
ankraft committed
192 193 194 195 196 197 198 199 200 201 202 203 204
                        </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
205 206 207
                    <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>
208 209 210 211 212 213 214 215 216 217
                    <DeviceInfos>
                        <DeviceInfo name="Name">
                            <Doc>Original value: PowerSwitch 1</Doc>
                            <SimpleType type="string" />
                        </DeviceInfo>
                        <DeviceInfo name="Vendor">
                            <Doc>Original value: HGI</Doc>
                            <SimpleType type="string" />
                        </DeviceInfo>
                    </DeviceInfos>
ankraft's avatar
ankraft committed
218 219 220 221 222 223 224 225 226 227
                    <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
228 229 230
                    <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>
231 232 233 234 235 236 237 238 239 240
                    <DeviceInfos>
                        <DeviceInfo name="Name">
                            <Doc>Original value: PowerSwitch 2</Doc>
                            <SimpleType type="string" />
                        </DeviceInfo>
                        <DeviceInfo name="Vendor">
                            <Doc>Original value: HGI</Doc>
                            <SimpleType type="string" />
                        </DeviceInfo>
                    </DeviceInfos>
ankraft's avatar
ankraft committed
241 242 243 244 245 246 247 248 249 250 251 252
                    <Modules>
                        <Module name="power">
                            <extends domain="hgi.dal.core" class="BooleanState"/>
                        </Module>
                    </Modules>
                </SubDevice>

            </SubDevices>

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