Class NonBlockingFire

  • All Implemented Interfaces:
    StartOrResumable

    public class NonBlockingFire
    extends FireMachine
    NonBlockingFire is a wrapper for Ptolemy actor. It provides an implementation of FireMachine. More specifically, the wrapper implements a startOrResume() function that associates the state of FireMachine with the state of fire() of the wrapped actor as follows:
    1. START: initial state
    2. FINAL: final state
    When startOrResume() is called, if the current state is START, the wrapper calls fire() of the wrapped actor, and transition to FINAL
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Liangpeng Guo
    Pt.AcceptedRating:
    Red (glp)
    Pt.ProposedRating:
    Red (glp)
    • Constructor Detail

      • NonBlockingFire

        public NonBlockingFire​(Actor actor)
        Constructs a NonBlockingfire by wrapping the actor.
        Parameters:
        actor - actor to be wrapped.
    • Method Detail

      • startOrResume

        public void startOrResume​(java.util.LinkedList<metroIIcomm.Event.Builder> metroIIEventList)
                           throws IllegalActionException
        if the current state is START, call fire() of the wrapped actor, and transition to FINAL.
        Parameters:
        metroIIEventList - the list of MetroII events that trigger startOrResume().
        Throws:
        IllegalActionException - if the associated action (e.g. firing) is not permitted.