josx.robotics
Class Arbitrator

java.lang.Object
  extended byjosx.robotics.Arbitrator

public class Arbitrator
extends Object

Arbitrator controls which behavior should currently be active in a behavior control system. Make sure to call start() after the Arbitrator is instantiated.

See Also:
Behavior

Constructor Summary
Arbitrator(Behavior[] behaviors)
          Allocates an Arbitrator object and initializes it with an array of Behavior objects.
 
Method Summary
 void start()
          This method starts the arbitration of Behaviors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

Arbitrator

public Arbitrator(Behavior[] behaviors)
Allocates an Arbitrator object and initializes it with an array of Behavior objects. The highest index in the Behavior array will have the highest order behavior level, and hence will suppress all lower level behaviors if it becomes active. The Behaviors in an Arbitrator can not be changed once the arbitrator is initialized.
NOTE: Once the Arbitrator is initialized, the method start() must be called to begin the arbitration.

Method Detail

start

public void start()
This method starts the arbitration of Behaviors. Modifying the start() method is not recomended.
Note: Arbitrator does not run in a seperate thread, and hence the start() method will never return.