lejos.subsumption
Class Arbitrator
java.lang.Object
lejos.subsumption.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.
- Version:
- 0.1 27-July-2001
- Author:
- Brian Bagnall
- 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. |
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.
- Parameters:
behaviors
- An array of Behavior objects.
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.