Project: bml_realizer

License: BSD

Dependencies:

Used by: None

All Packages

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

Inheritance diagram for edu::wpi::hri::bml::net::Transition:

List of all members.

Public Member Functions

boolean addInput (Place p)
boolean addOutput (Place p)
void end ()
boolean existsCycle (List< PetriPart > beento)
String getName ()
boolean mergeWith (Transition trans)
 Transition (ThreadGroup group, Logger sublog, String name)

Protected Member Functions

boolean checkRequirements ()
void execute () throws PetriException
void sendTokens ()
void tokenFrom (PetriPart from)

Private Attributes

Hashtable< Place, Boolean > inputs
final String name
Set< Placeoutputs

Detailed Description

The Transition class stores the inputs and outputs that should be synchronized in a Petri net.

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

Definition at line 51 of file Transition.java.


Constructor & Destructor Documentation

edu::wpi::hri::bml::net::Transition::Transition ( ThreadGroup  group,
Logger  sublog,
String  name 
) [inline]

Create a transition from one place to another

Definition at line 60 of file Transition.java.


Member Function Documentation

boolean edu::wpi::hri::bml::net::Transition::addInput ( Place  p  )  [inline]

Add an input that this transition must wait for.

Parameters:
p The place to wait for.
Returns:
True if the place was not already added.

Definition at line 124 of file Transition.java.

boolean edu::wpi::hri::bml::net::Transition::addOutput ( Place  p  )  [inline]

Add an output that should be sent a token upon completion of the inputs.

Parameters:
p The place to send a token to.
Returns:
True if the place was not already added.

Definition at line 140 of file Transition.java.

boolean edu::wpi::hri::bml::net::Transition::checkRequirements (  )  [inline, protected, virtual]

This method must implement the check of waiting for "all" previous parts. If a part does not need to wait for all, but instead one, it should return true upon the first input.

Returns:
True for starting requirements met, false otherwise.

Implements edu::wpi::hri::bml::net::PetriPart.

Definition at line 72 of file Transition.java.

void edu::wpi::hri::bml::net::Transition::end (  )  [inline]

Definition at line 195 of file Transition.java.

void edu::wpi::hri::bml::net::Transition::execute (  )  throws PetriException [inline, protected, virtual]

This method will only execute once for each part. The implementation should ensure that the actions which are specific to this part are performed. The exception that can be thrown signals whether the Petri net is allowed to continue or if an error has occurred.

Implements edu::wpi::hri::bml::net::PetriPart.

Definition at line 85 of file Transition.java.

boolean edu::wpi::hri::bml::net::Transition::existsCycle ( List< PetriPart beento  )  [inline, virtual]

Implements edu::wpi::hri::bml::net::PetriPart.

Definition at line 104 of file Transition.java.

String edu::wpi::hri::bml::net::Transition::getName (  )  [inline]

Definition at line 67 of file Transition.java.

boolean edu::wpi::hri::bml::net::Transition::mergeWith ( Transition  trans  )  [inline]

This method allows for two transitions to merge together. The one given will be add to this one.

Parameters:
trans The transition to add to this one.
Returns:
True for successful merge, false for errors

Definition at line 152 of file Transition.java.

void edu::wpi::hri::bml::net::Transition::sendTokens (  )  [inline, protected, virtual]

Tell the subclass to send all of the tokens. This should call the sendSignalTo method.

Implements edu::wpi::hri::bml::net::PetriPart.

Definition at line 90 of file Transition.java.

void edu::wpi::hri::bml::net::Transition::tokenFrom ( PetriPart  from  )  [inline, protected, virtual]

Let the subclass know that a token has been received from the given part.

Parameters:
from The part which is sending a token to this part.

Implements edu::wpi::hri::bml::net::PetriPart.

Definition at line 95 of file Transition.java.


Member Data Documentation

Hashtable<Place, Boolean> edu::wpi::hri::bml::net::Transition::inputs [private]

Definition at line 53 of file Transition.java.

Definition at line 55 of file Transition.java.

Definition at line 54 of file Transition.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