Package ptolemy.domains.sequence.lib
Class SequencedIntegrator
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.actor.lib.SetVariable
-
- ptolemy.domains.sequence.lib.SequencedSharedMemoryActor
-
- ptolemy.domains.sequence.lib.BaseMultipleMethodsActor
-
- ptolemy.domains.sequence.lib.SequencedIntegrator
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,ExplicitChangeContext
,MultipleFireMethodsInterface
,Changeable
,ChangeListener
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class SequencedIntegrator extends BaseMultipleMethodsActor
An integrator actor that can be sequenced and share state across multiple instances.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Red (cshelton)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description TypedIOPort
callSetStateMethod
The trigger port for the setState() method.TypedIOPort
currentState
The current state of the integrator output port.TypedIOPort
sampleFactor
The sample factor input port.TypedIOPort
sampleTime
The sample time input port.TypedIOPort
setStateValue
The integrator initialization input port.-
Fields inherited from class ptolemy.domains.sequence.lib.BaseMultipleMethodsActor
_defaultFireMethodName, _fireMethodName, _fireMethodNameToInputPortList, _methodList
-
Fields inherited from class ptolemy.domains.sequence.lib.SequencedSharedMemoryActor
_scope, _sharedName, initialVariableName
-
Fields inherited from class ptolemy.actor.lib.SetVariable
delayed, input, output, variableName
-
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 SequencedIntegrator(CompositeEntity container, java.lang.String name)
Create a new instance of the SequencedIntegrator actor with the given name and container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Token
_getDefaultValue()
Supplies a default value for the variable, in the case that there is no initial value.void
fire()
Execute the SequencedIntegrator actor.void
preinitialize()
Perform preinitialization checks on the actor.-
Methods inherited from class ptolemy.domains.sequence.lib.BaseMultipleMethodsActor
_addFireMethod, getDefaultFireMethodName, getFireMethodNames, getMethodInputPortList, getMethodOutputPort, numFireMethods, setFireMethod
-
Methods inherited from class ptolemy.domains.sequence.lib.SequencedSharedMemoryActor
_setValue, _setValue, checkForAttributes, checkForAttributes, getInitialVariable, getInitialVariableName, getModifiedVariable, getModifiedVariable, getSharedName, getVariable, getVariableName, setName
-
Methods inherited from class ptolemy.actor.lib.SetVariable
_customTypeConstraints, changeExecuted, changeFailed, clone, getContext, getModifiedVariables, postfire
-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, 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
-
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, initialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName
-
-
-
-
Field Detail
-
callSetStateMethod
public TypedIOPort callSetStateMethod
The trigger port for the setState() method.
-
currentState
public TypedIOPort currentState
The current state of the integrator output port.
-
sampleFactor
public TypedIOPort sampleFactor
The sample factor input port.
-
sampleTime
public TypedIOPort sampleTime
The sample time input port.
-
setStateValue
public TypedIOPort setStateValue
The integrator initialization input port. Used for the setState() fire method.
-
-
Constructor Detail
-
SequencedIntegrator
public SequencedIntegrator(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Create a new instance of the SequencedIntegrator actor with the given name and container.- Parameters:
container
- The model in which the new actor will be contained.name
- The name of the new actor- Throws:
IllegalActionException
- If the new actor cannot be created.NameDuplicationException
- If there is already a NamedObj with the same name in the container model.
-
-
Method Detail
-
fire
public void fire() throws IllegalActionException
Execute the SequencedIntegrator actor. call either the setState method, the integrate method, or the currentState method depending on which current fire method is set.- Specified by:
fire
in interfaceExecutable
- Overrides:
fire
in classSequencedSharedMemoryActor
- Throws:
IllegalActionException
- If the fire method name is invalid.
-
preinitialize
public void preinitialize() throws IllegalActionException
Perform preinitialization checks on the actor. Also call the superclass ASCETSharedMemoryActor's preinitialize() method. In ASCETSharedMemoryActor, preinitialize() sets up a type constraint between the input port and the variable (setTypeAtLeast) and the variable and the output port. Also, preinitialize() in ASCETSharedMemoryActor will create a new variable if none exists.- Specified by:
preinitialize
in interfaceInitializable
- Overrides:
preinitialize
in classSequencedSharedMemoryActor
- Throws:
IllegalActionException
- If the SequencedIntegrator actor's state variable is not a scalar type.
-
_getDefaultValue
protected Token _getDefaultValue() throws IllegalActionException
Supplies a default value for the variable, in the case that there is no initial value.- Overrides:
_getDefaultValue
in classSequencedSharedMemoryActor
- Returns:
- A token containing the default value
- Throws:
IllegalActionException
- Subclasses should throw an exception if an explicit initial value is required.
-
-