Project: bml_realizer

License: BSD

Dependencies:

Used by: None

All Packages

edu::wpi::hri::bml::net::BMLPetriNet Class Reference

List of all members.

Public Member Functions

boolean addExecutor (Executor exec)
boolean after (String first, String second, long delayms)
boolean after (String first, String second)
boolean before (String first, String second, long delay)
boolean before (String first, String second)
 BMLPetriNet (ListExecutor block, Logger sublog)
byte execute ()
boolean existsCycle ()
boolean synchronize (String first, String second)

Private Attributes

final List< TransitionallTrans
final Transition beginning
final Place blockStart
final Logger logger
final Hashtable< String, Placeplaces
final ThreadGroup threads

Detailed Description

The BMLPetriNet class is responsible for holding the entire net and ensuring that the constraints are properly satisfied. This is done through the methods of synchronize, after, and before.

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

Definition at line 55 of file BMLPetriNet.java.


Constructor & Destructor Documentation

edu::wpi::hri::bml::net::BMLPetriNet::BMLPetriNet ( ListExecutor  block,
Logger  sublog 
) [inline]

Create a new Petri Net which executes the given block.

Parameters:
block The executor for the whole block.

Definition at line 70 of file BMLPetriNet.java.


Member Function Documentation

boolean edu::wpi::hri::bml::net::BMLPetriNet::addExecutor ( Executor  exec  )  [inline]

Add the given executor and it's places and sync points to the Petri net.

Parameters:
exec The executor to add
Returns:
True for successful add, false if it already was added.

Definition at line 92 of file BMLPetriNet.java.

boolean edu::wpi::hri::bml::net::BMLPetriNet::after ( String  first,
String  second,
long  delayms 
) [inline]

Set the second sync point to wait for a token from a delay after the first sync point.

Parameters:
first The one to send the token.
second The one to receive the token.
delay The amount of time to wait after second to send a token to first.
Returns:
True for successfully setting up the constraint.

Definition at line 191 of file BMLPetriNet.java.

boolean edu::wpi::hri::bml::net::BMLPetriNet::after ( String  first,
String  second 
) [inline]

Set the second sync point to wait for a token from the first sync point.

Parameters:
first The one to send the token.
second The one to receive the token.
Returns:
True for successfully setting up the constraint.

Definition at line 154 of file BMLPetriNet.java.

boolean edu::wpi::hri::bml::net::BMLPetriNet::before ( String  first,
String  second,
long  delay 
) [inline]

Set the second sync point to delay and then send a token to the first sync point. This is exactly equal to after(second, first, delay).

Parameters:
first The one to receive the token.
second The one to send the token.
delay The amount of time to wait after second to send a token to first.
Returns:
True for successfully setting up the constraint.

Definition at line 228 of file BMLPetriNet.java.

boolean edu::wpi::hri::bml::net::BMLPetriNet::before ( String  first,
String  second 
) [inline]

Set the second sync point to send a token to the first sync point. This is exactly equal to after(second, first).

Parameters:
first The one to receive the token.
second The one to send the token.
Returns:
True for successfully setting up the constraint.

Definition at line 174 of file BMLPetriNet.java.

byte edu::wpi::hri::bml::net::BMLPetriNet::execute (  )  [inline]

Execute the entire petri net and return the result.

Returns:
1 for success, 0 for failure.

Definition at line 237 of file BMLPetriNet.java.

boolean edu::wpi::hri::bml::net::BMLPetriNet::existsCycle (  )  [inline]

Definition at line 248 of file BMLPetriNet.java.

boolean edu::wpi::hri::bml::net::BMLPetriNet::synchronize ( String  first,
String  second 
) [inline]

Merge the transitions which are the inputs to the first and second sync points. This will ensure that neither sync point begins without the other.

Parameters:
first The first sync point to synchronize.
second The second sync point to synchronize.
Returns:
True for a successful merge of the transitions.

Definition at line 137 of file BMLPetriNet.java.


Member Data Documentation

Definition at line 60 of file BMLPetriNet.java.

Definition at line 61 of file BMLPetriNet.java.

Definition at line 57 of file BMLPetriNet.java.

final Hashtable<String, Place> edu::wpi::hri::bml::net::BMLPetriNet::places [private]

Definition at line 58 of file BMLPetriNet.java.

final ThreadGroup edu::wpi::hri::bml::net::BMLPetriNet::threads [private]

Definition at line 62 of file BMLPetriNet.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