Project: bml_realizer

License: BSD

Dependencies:

Used by: None

All Packages

edu::wpi::hri::bml::realizer::Schedule Class Reference

List of all members.

Public Member Functions

byte execute ()
void schedule () throws SchedulerException
 Schedule (Logger logger, BehaviorList list, BMLComm comm, ControlComm control)

Private Member Functions

void addConstraints (ConstraintBehavior constraint) throws SchedulerException
void concatBehaviors (List< Behavior > behavs) throws SchedulerException
void createExecutors (Logger base, ControlComm control)
void genExcept (String reason, SyncRef base, SyncRef listening, boolean required) throws SchedulerException

Private Attributes

final BehaviorList behaviors
final BMLComm comm
final Hashtable< String, Executorexecs
final ListExecutor fullExecutor
final Logger logger
final BMLPetriNet petrinet
final List< ExecutortoStart

Detailed Description

The schedule takes the behaviors and ensures that they are executed at the correct time. This involves setting behaviors to listen on the correct sync points of other behaviors and then ensuring that the behaviors fully execute.

Author:
Aaron Holroyd (aholroyd (at) wpi (dot) edu)

Definition at line 78 of file Schedule.java.


Constructor & Destructor Documentation

edu::wpi::hri::bml::realizer::Schedule::Schedule ( Logger  logger,
BehaviorList  list,
BMLComm  comm,
ControlComm  control 
) [inline]

Create a new schedule for the gien behaviors. The behaviors are converted into executors and scheduled once the schedule is created.

Parameters:
logger The logger to use.
list The list of behaviors to schedule.
comm The bml comm object to send messages through.
control The control comm object to call services.

Definition at line 101 of file Schedule.java.


Member Function Documentation

void edu::wpi::hri::bml::realizer::Schedule::addConstraints ( ConstraintBehavior  constraint  )  throws SchedulerException [inline, private]

Definition at line 200 of file Schedule.java.

void edu::wpi::hri::bml::realizer::Schedule::concatBehaviors ( List< Behavior behavs  )  throws SchedulerException [inline, private]

Ensure that each of the behaviors given listens to the previous one. Do this for each of the behaviors except for the first one. If the behavior is already listening on something, ignore it

Parameters:
behavs The list of behaviors to append
Exceptions:
SchedulerException if an exception occurred

Definition at line 173 of file Schedule.java.

void edu::wpi::hri::bml::realizer::Schedule::createExecutors ( Logger  base,
ControlComm  control 
) [inline, private]

Only add in the behaviors which have executors (not the constraints or the references). Each executor is added by using the behavior id as the key and then creating the executor from there.

Definition at line 127 of file Schedule.java.

byte edu::wpi::hri::bml::realizer::Schedule::execute (  )  [inline]

Execute the schedule and return the success value of everything.

Returns:
The status of the execution

Definition at line 354 of file Schedule.java.

void edu::wpi::hri::bml::realizer::Schedule::genExcept ( String  reason,
SyncRef  base,
SyncRef  listening,
boolean  required 
) throws SchedulerException [inline, private]

Definition at line 190 of file Schedule.java.

void edu::wpi::hri::bml::realizer::Schedule::schedule (  )  throws SchedulerException [inline]

Schedule the executors so that each sync point listens to exactly one other sync point which could be as simple as the previous sync point of the same behavior or listening to a different sync point of a different behavior. To start, complete all of the constraints since this is most likely to cause a failure.

Exceptions:
SchedulerException If the schedule can not processed properly.

Definition at line 289 of file Schedule.java.


Member Data Documentation

Definition at line 81 of file Schedule.java.

Definition at line 85 of file Schedule.java.

final Hashtable<String, Executor> edu::wpi::hri::bml::realizer::Schedule::execs [private]

Definition at line 82 of file Schedule.java.

Definition at line 84 of file Schedule.java.

Definition at line 80 of file Schedule.java.


The documentation for this class was generated from the following file:

bml_realizer
Author(s): Aaron Holroyd (aholroyd (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:44:15 2011