dal-eg.xml 1.78 KB
Newer Older
AS's avatar
AS 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
<?xml version="1.0" encoding="iso-8859-1"?>

<Domain xmlns:xi="http://www.w3.org/2001/XInclude"
	xmlns="http://hgi.org/xml/dal/1.0" 
	id="com.telekom">

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

  <Modules>
  </Modules>

  <Devices>

    <Device id="switch.power">
      <DeviceInfo>
	<Name>PowerSwitch</Name>
	<!-- The Vendor field should probably be part of the domain -->
	<Vendor>Telekom Innovation Laboratories</Vendor>
      </DeviceInfo>
      
      <Doc>
	This device is intended as a demonstration of how to use the
	abstract modules defined in the <em>HGI Core</em> domain. The
	vendor has provided a proprietry module with two operations
	<tt>on</tt> and <tt>off</tt>. This is clearly a candidate for the 
	module class <tt>BooleanState</tt>.
      </Doc>

      <Modules>
	<Module name="proprietaryPower">
	  <Doc>
	    The proprietry interface for turning the switch on and off. 
	    Actions for setting the state to <tt>on</tt> or <tt>off</tt> 
	    and for querying the state.
	  </Doc>

	  <Actions>
	    <Action name="on">
	      <Doc>
		Turn the switch on.
	      </Doc>
	    </Action>
	    <Action name="off">
	      <Doc>
		Turn the switch off.
	      </Doc>
	    </Action>
	    <Action name="state" type="string">
	      <Doc>
		Query the state of the switch. Returns the string "<tt>on</tt>"
		or "<tt>off</tt>".
	      </Doc>
	    </Action>
	  </Actions>
Andreas Kraft's avatar
Andreas Kraft committed
57 58 59 60 61 62 63 64 65 66 67

	  <Events>
	  	<Event name="switchEvent">
		  <Data>
		    <DataPoint name="state" type="boolean" writable="false">
	 		</DataPoint>
		  </Data>
		  <Doc>An event that indicates the new state of the switch.
		  </Doc>
	  	</Event>
	  </Events>
AS's avatar
AS committed
68 69 70 71 72 73 74 75 76
	</Module>

	<Module name="power">
	  <extends domain="hgi.dal.core" class="BooleanState"/>
	</Module>
      </Modules>
    </Device>
  </Devices>
</Domain>