Project: bml_realizer

License: BSD

Dependencies:

Used by: None

All Packages

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

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

List of all members.

Public Member Functions

abstract boolean existsCycle (List< PetriPart > beento)
byte finish ()
void start ()

Protected Member Functions

abstract boolean checkRequirements ()
abstract void execute () throws PetriException
 PetriPart (ThreadGroup group, Logger sublog, String name)
abstract void sendTokens ()
final void sendTokensTo (Set<?extends PetriPart > parts)
abstract void tokenFrom (PetriPart from)

Protected Attributes

final Logger logger
boolean status
final Thread thread

Private Member Functions

final void receiveToken (PetriPart from, boolean status)
final boolean shouldExecute ()

Private Attributes

boolean success

Detailed Description

The PetriPart class is responsible for holding information relevant for each and every type of part in a Petri net.

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

Definition at line 50 of file PetriPart.java.


Constructor & Destructor Documentation

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

Create a new part and therefore the thread that is needed to run.

Parameters:
group The Thread group to add this thread to
sublog The logger to use as a base for this logger
name The name to give to the logger

Definition at line 67 of file PetriPart.java.


Member Function Documentation

abstract boolean edu::wpi::hri::bml::net::PetriPart::checkRequirements (  )  [protected, pure 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.

Implemented in edu::wpi::hri::bml::net::Place, and edu::wpi::hri::bml::net::Transition.

abstract void edu::wpi::hri::bml::net::PetriPart::execute (  )  throws PetriException [protected, pure 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.

Implemented in edu::wpi::hri::bml::net::BehaviorPlace, edu::wpi::hri::bml::net::TimedPlace, and edu::wpi::hri::bml::net::Transition.

abstract boolean edu::wpi::hri::bml::net::PetriPart::existsCycle ( List< PetriPart beento  )  [pure virtual]
byte edu::wpi::hri::bml::net::PetriPart::finish (  )  [inline]

Attempt to wait for the ending of this part

Reimplemented in edu::wpi::hri::bml::net::BehaviorPlace.

Definition at line 181 of file PetriPart.java.

final void edu::wpi::hri::bml::net::PetriPart::receiveToken ( PetriPart  from,
boolean  status 
) [inline, private]

Definition at line 106 of file PetriPart.java.

abstract void edu::wpi::hri::bml::net::PetriPart::sendTokens (  )  [protected, pure virtual]

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

Implemented in edu::wpi::hri::bml::net::Place, and edu::wpi::hri::bml::net::Transition.

final void edu::wpi::hri::bml::net::PetriPart::sendTokensTo ( Set<?extends PetriPart parts  )  [inline, protected]

This method is a helper for the subclasses to send tokens to all of the next parts.

Parameters:
parts The parts to be notified.

Definition at line 158 of file PetriPart.java.

final boolean edu::wpi::hri::bml::net::PetriPart::shouldExecute (  )  [inline, private]

Definition at line 114 of file PetriPart.java.

void edu::wpi::hri::bml::net::PetriPart::start (  )  [inline]

Attempt to start this place. If there are no outstanding tokens that are required, the place will begin to execute.

Definition at line 170 of file PetriPart.java.

abstract void edu::wpi::hri::bml::net::PetriPart::tokenFrom ( PetriPart  from  )  [protected, pure 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.

Implemented in edu::wpi::hri::bml::net::Place, and edu::wpi::hri::bml::net::Transition.


Member Data Documentation

Definition at line 52 of file PetriPart.java.

Definition at line 55 of file PetriPart.java.

Reimplemented in edu::wpi::hri::bml::net::BehaviorPlace.

Definition at line 54 of file PetriPart.java.

Definition at line 53 of file PetriPart.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