The PDARunner is a small tool for starting Mica agents on a PDA. The interface for PDARunner can be seen in Figure 8.3.
The top line of the interface allows the user to select the
blackboard the agent is to connect to. The second line allows the user to
select the amount of debugging information they want to see. The third line
is a pull down menu of currently available agents. Below this is a text area
which will display all debugging output the agent writes using
unsw.cse.mica.util.Debug
. At the very bottom of the interface is
the button to start the agent.
As yet the PDARunner only supports XML over TCP transports as it is not yet known whether SSL sockets are available on the PDA.
<agent class="unsw.cse.mica.demo.PDAAgent" > <classpath > <pathelement url="pdaagent.jar" /> </classpath> <arg param="context" value="example" /> </agent>
Figure 8.4. Example PDARunner Configuration File
An example configuration file for PDARunner is shown in
Figure 8.4. The PDARunner looks in the
\My Documents\Jars\
folder of the PDA for its agent
configurations. Any file with a name like 'agent-*.xml'
in the folder is considered to be an agent configuration file.
The root element of the file is an agent
tag
which gives the class for the agent and optionally a name for the
agent.
When the PDARunner is started it uses a minimal classpath
so the agent can be given a classpath
tag to add
required classes to the classpath. Each new jar file or package
location is added using a separate pathelement
tag.
If needed, the configuration file can list a series of
parameters using arg
tags that will be passed to the
agent in its init
method.
The precise format for the PDARunner configuration files
can be found in pdarunner.dtd
.