<runner> <blackboard /> <agent class="unsw.cse.mica.tools.LogDebugger" name="AnAgent" /> <host name="www.myhost.com" /> <port number="8500" /> <agent class="unsw.cse.mica.tools.LogDebugger" name="AnotherAgent" > <depends name="AnAgent" /> <arg param="x" value="600" /> </agent> </runner>
Figure 6.2. Example MicaRunner Configuration File
MicaRunner needs to be given a configuration file for it to run. A very simple configuration file is shown in Figure 6.2. This configuration file tells MicaRunner what blackboards and agents are needed.
When defining an agent it is possible to add a depends
element to indicate that the agent requires another agent to be running
before it can be successfully be started. By default if the runner has to
start a blackboard all agents will be dependent upon it running.
When declaring an agent the class which implements the agent needs to be specified. Optionally the name the agent is to use can also be given.
It is possible to define parameters using arg
tags
that will be passed to an agent/blackboard in its init
method.
By default agents will attempt to connect to a blackboard running
on the local machine and both blackboards and agents will attempt to
connect using port 8500. It is possible to use host
and
port
tags to override this default behaviour.
If all agents are connecting to a remote blackboard MicaRunner is not required to start a local one.
MicaRunner processes tags in the order found in the configuration file so settings will only apply to agents/blackboards declared after the setting and not those declared before it.
There are many more configuration options available to MicaRunner.
For details look at runner.dtd
.