public abstract class SequencedSharedMemoryActor extends SetVariable
Red (beth) |
Red (beth) |
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SequencedSharedMemoryActor.Scope
An enumeration that represents the scope of the memory element.
|
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected SequencedSharedMemoryActor.Scope |
_scope
The scope of the actor.
|
protected java.lang.String |
_sharedName
The name shared by a set of messages.
|
StringAttribute |
initialVariableName
The name of the initial value variable in the container to set.
|
delayed, input, output, variableName
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
SequencedSharedMemoryActor(CompositeEntity container,
java.lang.String name)
Create a new SequencedSharedMemoryActor with the given name and
container.
|
Modifier and Type | Method and Description |
---|---|
protected Token |
_getDefaultValue()
Supplies a default value for the variable, in the case that there
is no initial value.
|
protected void |
_setValue(Attribute variable,
java.lang.String value)
Set the value of the associated container's variable.
|
protected void |
_setValue(Attribute variable,
Token value)
Set the value of the associated container's variable.
|
void |
checkForAttributes()
Check to see if the parameters exist in the workspace.
|
void |
checkForAttributes(Token value1,
Token value2)
Check to see if both the variable and initial value variable exist.
|
void |
fire()
Fire the SequencedSharedMemoryActor.
|
Variable |
getInitialVariable()
Return the initial variable.
|
java.lang.String |
getInitialVariableName()
Returns the initial variable's name.
|
Attribute |
getModifiedVariable()
From superclass.
|
Variable |
getModifiedVariable(java.lang.String name)
Similar to superclass getModifiedVariable(), but takes a
name as an argument and does not used cached variables, and
checks only in the proper scope.
|
java.lang.String |
getSharedName()
Return the sharedName.
|
Variable |
getVariable()
Return the modified variable.
|
java.lang.String |
getVariableName()
Returns the variable's name.
|
void |
preinitialize()
Set up the type constraint between the output and the variable
and the output and the initial value variable.
|
void |
setName(java.lang.String name)
When the actor name is changed, update the referenced variables
to point to the new parameters and check to see if these parameters
exist.
|
_customTypeConstraints, changeExecuted, changeFailed, clone, getContext, getModifiedVariables, postfire
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_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
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
description, getContainer, getDisplayName, getFullName, getName, getName
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate
addInitializable, initialize, removeInitializable, wrapup
getDerivedLevel, getDerivedList, propagateValue
public StringAttribute initialVariableName
protected java.lang.String _sharedName
protected SequencedSharedMemoryActor.Scope _scope
public SequencedSharedMemoryActor(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container
- The container for the new actor.name
- The name of the new actor.NameDuplicationException
- Thrown if the chosen name matches the
name of an already existing actor in the model.IllegalActionException
- Thrown if there is a problem instantiating
the actor.public void checkForAttributes() throws IllegalActionException
IllegalActionException
- If there is a problem with the attributes.public void checkForAttributes(Token value1, Token value2) throws IllegalActionException
value1
- The value to assign to the variable.value2
- The value to assign to the initial value variable.IllegalActionException
- If the attributes cannot be created.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class SetVariable
IllegalActionException
- If the actor cannot be fired.public Variable getInitialVariable() throws IllegalActionException
IllegalActionException
- If the variable cannot be found.public java.lang.String getInitialVariableName()
public Attribute getModifiedVariable() throws IllegalActionException
getModifiedVariable
in class SetVariable
IllegalActionException
- If the container is null, or the name is invalid (from checkSingleAttribute).public Variable getModifiedVariable(java.lang.String name) throws IllegalActionException
name
- The name of the variable to get.IllegalActionException
- If the container is null, or the name is invalid (from checkSingleAttribute)public java.lang.String getSharedName()
public Variable getVariable() throws IllegalActionException
IllegalActionException
- If there is a problem with the variable
referenced by this actor.public java.lang.String getVariableName()
public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class SetVariable
IllegalActionException
- If the actor cannot be preinitialized.public void setName(java.lang.String name) throws IllegalActionException, NameDuplicationException
setName
in interface Nameable
setName
in class ComponentEntity<TypedIOPort>
name
- The new name of the actorIllegalActionException
- If the name cannot be changed.NameDuplicationException
- If there is another actor with the same
name in the actor's containerNamedObj.getName()
,
NamedObj.getName(NamedObj)
protected Token _getDefaultValue() throws IllegalActionException
IllegalActionException
- Subclasses should throw an exception if
an explicit initial value is required.protected void _setValue(Attribute variable, java.lang.String value) throws IllegalActionException
variable
- The variable whose value will be set.value
- The new value as a string.IllegalActionException
- If the variable cannot be set.protected void _setValue(Attribute variable, Token value) throws IllegalActionException
variable
- The variable whose value will be set.value
- The new value as a token.IllegalActionException
- If the variable cannot be set.