public class TDLModuleDirector extends ModalDirector
In the initialization, output ports and actuators are initialized with values specified in the parameters of the ports. The schedule is generated and events are scheduled. Events that are safe to process at current model time are executed, then the fireAt(time) of the enclosing director is called with the time stamp of the next event. Events are processed in the order specified in the graph.
NamedObj.ContainedObjectsIterator_currentLocalReceiverMap, _indexOffset, _localReceiverMaps, controllerName_actorsFinishedExecution, _aspectForActor, _aspectsPresent, _defaultMicrostep, _executionAspects, _finishRequested, _initializables, _nextScheduleTime, _stopRequested, _tokenSentToCommunicationAspect, _zeroTime, localClock, startTime, stopTime_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
TDLModuleDirector(CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fire()
Select all actions that can be fired at the current model time.
|
CausalityInterface |
getCausalityInterface()
Return a causality interface for the composite actor that
contains this director.
|
static int |
getFrequency(NamedObj obj)
Get frequency of the task.
|
Time |
getModelTime()
Return the current model time which is the model time of the executive
director.
|
Time |
getModePeriod(NamedObj obj)
Get mode period from state parameter "period".
|
static java.lang.String |
getSlots(NamedObj obj)
Get frequency of the task.
|
double |
getWCET()
Return the worst case execution time of the actor or 0 if no worst case
execution time was specified.
|
static double |
getWCETParameter(Actor actor)
Return the worst case execution time of the actor or 0 if no worst case
execution time was specified.
|
void |
initialize()
Initialize the director, calculate schedule and schedule first firing.
|
static boolean |
isFast(NamedObj obj)
Find out if task (=actor) or actuator (=output port) is fast task.
|
Receiver |
newReceiver()
Return a new TDLReceiver.
|
boolean |
prefire()
Check if at the current time there is something to do.
|
void |
scheduleEventsAfterAction(Node node)
Schedules actions which depend on the action specified in the given node.
|
boolean |
transferInputs(IOPort port)
Don't read inputs as this is specifically scheduled by a TDLModule.
|
boolean |
transferOutputs(IOPort port)
Outputs are only transferred when scheduled, therefore do nothing if
transfer outputs is called by another actor.
|
void |
wrapup()
Clear private variables and lists.
|
_buildLocalReceiverMaps, _currentLocalReceivers, _getLastChosenTransition, _getStateRefinementsToPostfire, _getTransitionRefinementsToPostfire, _readInputs, _readOutputsFromRefinement, _setCurrentConnectionMap, _setCurrentState, _transferOutputs, attributeChanged, clone, defaultDependency, fireAt, getContext, getController, getIndex, getModelNextIterationTime, getModifiedVariables, getParseTreeEvaluator, handleModelError, implementsStrictActorSemantics, invalidateSchedule, isStrict, postfire, preinitialize, resetOutputReceivers, setContainer, setIndex_actorFinished, _consultTimeRegulators, _description, _isEmbedded, _isTopLevel, _schedule, _transferInputs, addInitializable, createSchedule, delayDependency, finish, fireAt, fireAt, fireAtCurrentTime, fireContainerAt, fireContainerAt, getCurrentTime, getDeadline, getEnvironmentTime, getErrorTolerance, getExecutionAspect, getGlobalTime, getModelStartTime, getModelStopTime, getNextIterationTime, getStartTime, getStopTime, getTimeResolution, initialize, invalidateResolvedTypes, isEmbedded, isFireFunctional, isStopRequested, iterate, mutexLockObject, notifyTokenSentToCommunicationAspect, preinitialize, removeInitializable, requestInitialization, resume, resumeActor, scheduleContainedActors, setCurrentTime, setEmbedded, setModelTime, setTimeResolution, stop, stopFire, suggestedModalModelDirectors, supportMultirateFiring, suspend, terminate, transferOutputs_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamepublic TDLModuleDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container - Container of this director.name - Name of this director.IllegalActionException - If the name has a period in it, or the director is not
compatible with the specified container.NameDuplicationException - If the container not a CompositeActor and the name
collides with an entity in the container.public void fire()
throws IllegalActionException
fire in interface Executablefire in class FSMDirectorIllegalActionException - If there is more than one
transition enabled and nondeterminism is not
permitted, or there is no controller, or it is
thrown by any choice action.public Time getModePeriod(NamedObj obj)
obj - The objectpublic Time getModelTime()
getModelTime in class DirectorDirector.setModelTime(Time)public static double getWCETParameter(Actor actor)
actor - The actor for which the worst case execution time is
requested.public double getWCET()
throws IllegalActionException
IllegalActionExceptionpublic void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class FSMDirectorIllegalActionException - If thrown by the initialize()
method of the super class, or can not find mode
controller, or can not find refinement of the
current state.public static boolean isFast(NamedObj obj)
obj - The object that could be a fast task or actuator.public CausalityInterface getCausalityInterface()
TDLCausalityInterface.getCausalityInterface in class Directorpublic static int getFrequency(NamedObj obj)
obj - The object that could be a fast task or actuator.public static java.lang.String getSlots(NamedObj obj)
obj - The object that could be a fast task or actuator.public Receiver newReceiver()
newReceiver in class FSMDirectorpublic boolean prefire()
throws IllegalActionException
prefire in interface Executableprefire in class FSMDirectorIllegalActionException - Thrown if execution was missed, input ports could not be
transferred or by parent class.public void scheduleEventsAfterAction(Node node) throws IllegalActionException
node - Given node.IllegalActionException - Not thrown here but in the base class.public boolean transferOutputs(IOPort port)
transferOutputs in class Directorport - output port.public boolean transferInputs(IOPort port) throws IllegalActionException
transferInputs in class FSMDirectorport - Input port.IllegalActionException - Thrown if inputs are about to be transferred for a non opaque
input port.public void wrapup()
throws IllegalActionException
wrapup in interface Initializablewrapup in class DirectorIllegalActionException - If the wrapup() method of
one of the associated actors throws it.