dal-eg.xml 2.11 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
<?xml version="1.0" encoding="iso-8859-1"?>

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

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

  <Devices>

    <Device id="switch.power">
      
      <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>
22 23
      <Characteristics>
      	<Characteristic name="Name">
24 25
		  <Doc>Original value: PowerSwitch</Doc>
		  <SimpleType type="string" />
26
		</Characteristic>
27

ankraft's avatar
ankraft committed
28
		<!-- The Vendor field should probably be part of the domain -->
29
      	<Characteristic name="Vendor">
30
      	  <Doc>Original value: Telekom Innovation Laboratories</Doc>
31
	  	  <SimpleType type="string" />
32 33
		</Characteristic>
      </Characteristics>
ankraft's avatar
ankraft committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

      <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>
ankraft's avatar
ankraft committed
54 55
	    <Action name="state">
		  	<Doc>Query the state of the switch. Returns the string "<tt>on</tt>" or "<tt>off</tt>".</Doc>
56 57 58
		  	<DataType>
	           	<SimpleType type="string" />
	        </DataType>
ankraft's avatar
ankraft committed
59 60 61 62 63
	    </Action>
	  </Actions>

	  <Events>
	  	<Event name="switchEvent">
ankraft's avatar
ankraft committed
64 65
		  <Doc>An event that indicates the new state of the switch.
		  </Doc>
ankraft's avatar
ankraft committed
66
		  <Data>
ankraft's avatar
ankraft committed
67
		    <DataPoint name="state" writable="false">
68 69 70
		      <DataType>
		          <SimpleType type="boolean" />
		      </DataType>
ankraft's avatar
ankraft committed
71 72 73 74 75 76 77 78 79 80 81 82 83
	 		</DataPoint>
		  </Data>
	  	</Event>
	  </Events>
	</Module>

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