Package ptolemy.domains.coroutine.lib
Class Counter
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable,Actor,Executable,FiringsRecordable,Initializable,TypedActor,Continuation,Changeable,Debuggable,DebugListener,Derivable,Instantiable,ModelErrorHandler,MoMLExportable,Moveable,Nameable
public class Counter extends AtomicContinuationActor
- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- shaver
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description TypedIOPort_alarmInTypedIOPort_countOutControlExitToken.ExitLocationalarmExitParameteralarmPControlEntryToken.EntryLocationresetEntryControlEntryToken.EntryLocationsetEntryControlEntryToken.EntryLocationtickEntry-
Fields inherited from class ptolemy.domains.coroutine.kernel.AtomicContinuationActor
_entryPoints, _entryPointsR, _entryPort, _exitPoints, _exitPointsR, _exitPort, _initPoint, _resumePoint
-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description Counter()Counter(CompositeEntity container, java.lang.String name)Counter(Workspace workspace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_init()ControlExitTokencontrolEnter(ControlEntryToken entry)voidinitialize()Initialize this actor.booleanpostfire()Return true, unless stop() has been called, in which case, return false.-
Methods inherited from class ptolemy.domains.coroutine.kernel.AtomicContinuationActor
addEntryLocation, addExitLocation, controlEnterAt, controlInit, controlResume, entryLocations, exitLocations, fire, getEntryActionFromPort, getExitLocationFromPort
-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, preinitialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
_alarmIn
public TypedIOPort _alarmIn
-
_countOut
public TypedIOPort _countOut
-
alarmP
public Parameter alarmP
-
resetEntry
public final ControlEntryToken.EntryLocation resetEntry
-
tickEntry
public final ControlEntryToken.EntryLocation tickEntry
-
setEntry
public final ControlEntryToken.EntryLocation setEntry
-
alarmExit
public final ControlExitToken.ExitLocation alarmExit
-
-
Constructor Detail
-
Counter
public Counter()
-
Counter
public Counter(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
-
Counter
public Counter(Workspace workspace)
-
-
Method Detail
-
controlEnter
public ControlExitToken controlEnter(ControlEntryToken entry) throws IllegalActionException
- Specified by:
controlEnterin interfaceContinuation- Overrides:
controlEnterin classAtomicContinuationActor- Throws:
IllegalActionException
-
initialize
public void initialize() throws IllegalActionExceptionDescription copied from class:AtomicActorInitialize this actor. Derived classes override this method to perform actions that should occur once at the beginning of an execution, but after type resolution. Derived classes can produce output data and schedule events.- Specified by:
initializein interfaceInitializable- Overrides:
initializein classAtomicActor<TypedIOPort>- Throws:
IllegalActionException- If a derived class throws it.
-
postfire
public boolean postfire() throws IllegalActionExceptionDescription copied from class:AtomicActorReturn true, unless stop() has been called, in which case, return false. Derived classes override this method to define operations to be performed at the end of every iteration of its execution, after one invocation of the prefire() method and any number of invocations of the fire() method. This method typically wraps up an iteration, which may involve updating local state. In derived classes, this method returns false to indicate that this actor should not be fired again.- Specified by:
postfirein interfaceExecutable- Overrides:
postfirein classAtomicActor<TypedIOPort>- Returns:
- True if execution can continue into the next iteration.
- Throws:
IllegalActionException- Not thrown in this base class.
-
_init
protected void _init() throws IllegalActionException, NameDuplicationException
-
-