<?xml version="1.0"?>
<V-Control xmlns:vcontrol="http://www.openv.de/vcontrol">
  <unix>
     <config>
	<serial>
		<tty>192.168.1.112:3000</tty>
	</serial>
	<net>
		<port>3002</port>
	</net>
	<logging>
		<file>/tmp/vcontrold.log</file>
		<syslog>n</syslog>
		<debug>y</debug>
	</logging>
	<device ID="2098"/>
     </config>
  </unix>
  <units>
	<unit name='Temperatur'>
	   <abbrev>UT</abbrev>
	   <calc get='V/10' set='V*10'/>
	   <type>short</type>
	   <entity>Grad Celsius</entity>
	</unit>
	<unit name='Status'>
	   <abbrev>ST</abbrev>
	   <calc get='V' set='V'/>
	   <type>char</type>
	   <entity></entity>
	</unit>
	<unit name='Counter'>
	   <abbrev>CO</abbrev>
	   <calc get='V' set='V'/>
	   <type>int</type>
	   <entity></entity>
	</unit>
	<unit name='Prozent'>
	   <abbrev>PR</abbrev>
	   <calc get='V/2' set='V*2'/>
	   <type>short</type>
	   <entity>%</entity>
	</unit>
	<unit name='CounterS'>
	   <abbrev>CS</abbrev>
	   <calc get='V/3600' set='V*3600'/>
	   <type>int</type>
	   <entity>Stunden</entity>
	</unit>
	<unit name='CycleTime'>
	   <abbrev>CT</abbrev>
	   <type>cycletime</type>
	</unit>
	<unit name='ReturnStatus'>
	   <abbrev>RT</abbrev>
	   <type>enum</type>
	   <enum bytes='00' text='0'/>
	   <enum bytes='01' text='1'/>
	   <enum text='NOT OK'/>
	</unit>
	<unit name='BetriebsArt'>
	   <abbrev>BA</abbrev>
	   <type>enum</type>
	   <enum bytes='00' text='AUS'/>
	   <enum bytes='01' text='WW'/>
	   <enum bytes='02' text='H+WW'/>
	   <enum bytes='03' text='RED'/>
	   <enum bytes='04' text='NORM'/>
	   <enum text='UNKNOWN'/>
	</unit>	   
	 <unit name='SetReturnStatus'>
           <abbrev>SR</abbrev>
           <type>enum</type>
           <enum bytes='00' text='OK'/>
           <enum bytes='05' text='SYNC (NOT OK)'/>
           <enum text='NOT OK'/>
        </unit>
  </units>
  <protocols>
      <protocol name='KW2'>
	  <macros>
		<macro name='SYNC'>
		    <command>SEND 04;WAIT 05</command>
		</macro>
		<macro name='GETADDR'>
		    <command>SEND 01 F7</command>
		</macro>
		<macro name='SETADDR'>
		    <command>SEND 01 F4</command>
		</macro>
	  </macros>
	  <commands>
		<command name="getaddr">
		     <send>SYNC;GETADDR $addr $len;RECV $len $unit</send>
		</command>
		<command name="setaddr">
		     <send>SYNC;SETADDR $addr $len;SEND BYTES $unit;RECV 1 SR</send>
		</command>
	  </commands>
      </protocol>
      <protocol name='GWG'>
	  <macros>
		<macro name='SYNC'>
		    <command>SEND 04;WAIT 05</command>
		</macro>
		<macro name='GETADDR'>
		    <command>SEND 01 CB</command>
		</macro>
	  </macros>
	  <commands>
		<command name="getaddr">
		     <send>SYNC;GETADDR $addr $len;RECV $len $unit</send>
		</command>
		<command name="setaddr">
		     <send>SYNC;RECV 1</send>
		</command>
	  </commands>
      </protocol>
  </protocols>
  <extern xmlns:xi="http://www.w3.org/2003/XInclude">
     <xi:include href="vito.xml" parse="xml"/>
  </extern>
</V-Control>
