public class MultiFrameTask extends TypedCompositeActor implements Task
A multiframe task is an edge-labeled and vertex-labeled directed cyclic graph
together with a current location predicate. The nodes are annotated with task frames,
the edges are labeled with minimum separation times, and the current location contains
a specific node of the graph. A task frame TaskFrame
is represented by an
execution time and a relative deadline.
During an execution a multiframe task is at the node specified by current location predicate. If it has not released a job since the time it entered the node, it may do so at any time. The job's deadline and execution time are as specified by the task frame associated with the node. After a job is released at a node, the multiframe task waits for time equal to the separation time specified by the outgoing edge (there is a unique outgoing edge, since it is a cyclic graph) and then moves the current location to the node downstream.
The minimum separation time of an edge, that connects two nodes A and B, describes then the minimum time that can separate a release of a job from node B from a release of a job from node A. This class simulates the case where the separation time is always equal to the minimum value.
For more information on multiframe tasks and the schedulability problem of such tasks look at: Sanjoy Baruah, Deji Chen, Sergey Gorinsky, and Aloysius Mok (1999). Generalized Multiframe Tasks. Real-Time Systems, July 1999, Volume 17, Issue 1, pp 5-22.
CompositeEntity.ContainedObjectsIterator
_actorFiringListeners, _causalityInterface, _derivedPiggybacks, _initializables, _notifyingActorFiring, _piggybacks, _publishedPorts, _publisherRelations, _stopRequested, _subscribedPorts
_levelCrossingLinks
_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 |
---|
MultiFrameTask(CompositeEntity container,
java.lang.String name)
Construct a multiframe task with the specified container and name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_addTaskFrame(TaskFrame taskFrame)
Add a task frame to the multiframe task.
|
void |
fire()
If it is time, release a new job with the deadline and execution time of the
current task frame.
|
void |
initialize()
Initialize the task frames contained by the multiframe task by calling the base class
initialize, set the current frame to the task frame that is set to be initial,
and register this actor as a schedulable task to the director.
|
boolean |
isOpaque()
Return true
|
Time |
nextFireTime()
Return the next time that the multiframe task will release a job.
|
void |
preinitialize()
Clear the task frames, the initial frame, get a reference to the toplevel scheduler,
and set the next fire time to be zero.
|
_addEntity, _addPort, _addRelation, _checkTypesFromTo, _destinationTypeConstraints, attributeChanged, attributeTypeChanged, isBackwardTypeInferenceEnabled, newPort, newRelation, resolveTypes, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _finishedAddEntity, _setDirector, _transferPortParameterInputs, addActorFiringListener, addInitializable, addPiggyback, clone, connectionsChanged, createReceivers, createSchedule, getCausalityInterface, getDirector, getExecutiveDirector, getManager, getPublishedPort, getPublishedPortChannel, getPublishedPorts, getSubscribedPortChannel, inferringWidths, inferWidths, inputPortList, isFireFunctional, isPublishedPort, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, recordFiring, registerPublisherPort, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, unregisterPublisherPort, wrapup
_adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_removePort, connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, clone, 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, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public MultiFrameTask(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the actor.IllegalActionException
- If the entity cannot be contained
by the proposed container, if the construction of the director throws it,
or if hiding the director fails.NameDuplicationException
- If the name coincides with
an actor already in the container, or if the director constructor throws it.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class CompositeActor
IllegalActionException
public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class CompositeActor
IllegalActionException
- If the director's initialize throws it, since it is
guaranteed that a director is contained, or if more than one task frames are declared
initial.public boolean isOpaque()
isOpaque
in class CompositeActor
CompositeEntity
public Time nextFireTime()
nextFireTime
in interface Task
public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class CompositeActor
IllegalActionException
- If the superclass preinitialize() throws it.protected void _addTaskFrame(TaskFrame taskFrame)
taskFrame
- The task frame to add.