<?xml version='1.0' encoding='utf-8'?>

<!-- The AreaController configuration file. Documentation for each
node comes first, followed by the actual XML configuration -->

<!-- 
This file controls the parameters for the AreaController.

	<ac> 
	The 'name' attribute specifies the version and codename of
	 the AC.
	The 'port' attribute specifies the TCP port the AC runs on.
	The 'debug' attribute specifies a server-wide debug attribute for the
	 logger element. Obviously, the lower the debug value, the more performance
	 you get, but the less output you get.
	The 'defaultHelloInterval' specifies the default time in milliseconds
	 that the AC will wait to hear from devices. Devices may override this
	 by supplying the appropriate parameter-value pair in the 
	 GOOD MORNING MESSAGE.
	The 'defaultDeadInterval' specifies the default number of hello intervals
	 that will pass without trying to replace a device.
	</ac>
	
	<logger>
	The logger element specifies the logger for the whole AreaController JVM.
	The 'logFile' attribute specifies the filename for the log file.
	The 'logPathConnector' attribute specifies an option relative path to the
	 'application's home directory'
	The 'logSleepTime' attribute specifies the number of milliseconds the log thread
	 should sleep between attempts to empty the queue.
	The 'useFullDate' attribute specifies whether or not the logger should convert
	 the raw millisecond format to a nice date display format in the log file. Turn it
	 to 'false' for improved logger performance.
	</logger>
	
	<acConsole>
	The 'commandPort' attribute specifies the port that serves the AC as an 
	 'out of band' command channel for controlling the server itself, not the
	 PCXSES protocol implementation.
	The 'shutDownSecret' should obviously be protected by making this file read-only
	 by the AreaController user. It is the shared secret that the running AreaController
	 and the "StopTask" have to perform authentication.
	</acConsole>
	
	<repositoryManager>
	The 'initialContextFactory' is a JNDI attribute. Since the JNDI implementation in
	 the AreaController assumes that it is accessing the filesystem, it doesn't make
	 much sense (yet) to change this to an LDAP service provider, for example.
	The 'repositoryBase' attribute is informational only; you cannot change it. It is
	 the default "root" for the AreaController to search for stored .class files.
	</respositoryManager>
	
	<deviceManager>
	The 'deviceList' attribute specifies another XML file, relative to the 
	 $AC_HOME/conf directory that lists all the devices in the network. See that
	 file for more detail.
	The 'sleepTime' attribute should not be set too high; at most the order of a few
	 milliseconds. It is merely present to make sure that the deviceManager gives up
	 the processor on a single-processor machine so other threads get a chance to run.
	</deviceManager>
	
	<policyEngine />
	

-->

<ac name="AreaController v0.1 (Aragorn)"
	port="3780"
	debug="99"
	defaultHelloInterval="8000"
	defaultDeadInterval="3" >
    	
    	<!-- think about adding an autoRotate var which sees if the current log file exists, and saves it
    	  to currentlogname+"currenttime"+".oldlog -->
    	<logger logFile="ac.log" logPathConnector="\\logs\\" logSleepTime="210" useFullDate="true" />
    
	<acConsole commandPort="41081" shutDownSecret="CHANGE_this_2_SOMEthing" />
	
	<!-- repositoryBase is non-negotiable -->
	<repositoryManager initialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
			   repositoryBase="$AC_HOME/data/dev-src/" />
	
	<deviceManager deviceList="devices.xml" sleepTime="10"/>
	
	<policyEngine />
</ac>