Let's have a look at
in a little
more detail:sharedpad-run.xml
<runner> <host name="localhost"/> <port number="8500"/> <pos x="0" y="0" /> <size width="800" height="500" /> <catch value="false" /> <blackboard/> <agent class="unsw.cse.mica.tools.Debugger"> <needs name="blackboard"/> <arg param="scroll" value="true" /> <arg param="x" value="0" /> <arg param="y" value="500" /> <arg param="width" value="500" /> <arg param="height" value="400" /> </agent> <agent class="unsw.cse.mica.demo.SharedPad" name="Pad1"> <needs name="blackboard"/> </agent> <agent class="unsw.cse.mica.demo.SharedPad" name="Pad2"> <needs name="blackboard"/> </agent> <agent class="unsw.cse.mica.tools.MobMaker2"> <needs name="blackboard"/> <arg param="x" value="500" /> <arg param="y" value="500" /> <arg param="width" value="300" /> <arg param="height" value="400" /> </agent> </runner>
Figure 3.2. sharedpad-run.xml
The first line of Figure 3.2 declares that the file is a runner file. the next two lines specify the particular blackboard to connect to, in this case the current machine running on port 8500. Specifications are also be given for the location for the position of the runner window, using the . This is followed by the specification of the blackboard. In this particular case, the blackboard does not try to restore the information on the blackboard from the last time it ran, and it also specifies the amount of debugging information that is given.
The others are entries for individual agents. The first is for the debugger tool (that allows you to see what's on the blackboard). The second and third are two instances of the SharedPad.
The Shared Pads need not run on the same computer as the
blackboard. If you had two computers and installed MICA on both, then
you could have Shared Pads running on different machines, with a
slightly different version of the sharedpad-run.xml
file (i.e., without the blackboard tag, and with a
runner tag that pointed to the appropriate remote
blackboard). Nor are you limited to only two, you could have as many
shared pads as you liked.
More documentation on MicaRunner can be found in the API
documentation, and more examples of the kinds of things that go in a run
file can be seen in the examples/run
folder of the
mica distribution.