ptolemy.domains.ct.kernel
Interface CTStatefulActor

All Superinterfaces:
Actor, Executable, Initializable, Nameable
All Known Implementing Classes:
Case, CTBaseIntegrator, CTCase, CTCompositeActor, CTCompositeActor, CTRefinement, Integrator, ModalModel, Refinement, TDLModule, TDLRefinement, TransitionRefinement

public interface CTStatefulActor
extends Actor

Interface for actors that have states. The state of the actor can be marked (saved). The saved state can be restored so that an actor can go back to its previously marked state. This feature is used for rolling back the simulation when needed, which is essential when embedding CT subsystem in a discrete event system.

The interface defines two methods, markState() and goToMarkedState(). If the markState() method is called, the current state of the actor, for example values of the local variables, should be remembered. When the goToMarkedState() method is called after that, the marked states should be restored.

Since:
Ptolemy II 0.2
Version:
$Id: CTStatefulActor.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Jie Liu
Accepted Rating:
Green (yuhong)
Proposed Rating:
Green (liuj)

Field Summary
 
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
 
Method Summary
 void goToMarkedState()
          Implementations of this method should go to the marked state.
 void markState()
          Implementations of this method should mark the current state of the actor.
 
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
 
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
 
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, initialize, preinitialize, removeInitializable, wrapup
 
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
 

Method Detail

goToMarkedState

void goToMarkedState()
                     throws IllegalActionException
Implementations of this method should go to the marked state. If there's no marked state, throws an exception.

Throws:
IllegalActionException - If there were no marked state.

markState

void markState()
Implementations of this method should mark the current state of the actor.