public class AFDXESs extends AtomicCommunicationAspect
CommunicationAspect
that simulates an AFDX End-systems component
When its sendToken(Receiver, Receiver, Token)
method is called,
the delivery of the specified token to the specified receiver is delayed according
to the AFDX end-system protocol and behavior. Only one actor of this kind is required
to manage all end-systems of one AFDX network.
For more information please refer to: AFDX network simulation in PtolemyII. AFDX standard document.
Yellow (glasnier) |
Yellow (glasnier) |
Modifier and Type | Class and Description |
---|---|
static class |
AFDXESs.AFDXESsAttributes
The attributes configured per port which is mediated by a
AFDXESs.
|
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,java.util.LinkedList<TimedEvent>> |
_afdxSchedMuxsQueue
Tokens received in the AFDX scheduler multiplexor.
|
protected java.util.LinkedHashMap<java.lang.String,java.util.LinkedList<TimedEvent>> |
_afdxVLinksQueue
Tokens received as input to the AFDX traffic regulator
(aka Lissor or Shaper).
|
protected double |
_bitRate
Value of the bit rate of the bus.
|
protected double |
_delay
Computed delay according to the bag emission (see AFDX spec.).
|
protected java.util.HashMap<java.lang.String,Time> |
_lastEmissionTable
Last emission timestamp for a given virtual link.
|
protected Time |
_nextFireTime
Next time a token is sent and the next token can be processed.
|
protected java.util.HashMap<IOPort,AFDXVlink> |
_portToVirtualLinks
Routing table mapping ports to virtual link objects.
|
protected java.util.HashMap<java.lang.String,AFDXVlink> |
_virtualLinkTable
Routing table for virtual link object.
|
Parameter |
bitRate
The bit rate of the bus.
|
_parameters, _tokenCount
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
decoratorHighlightColorName
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
AFDXESs(CompositeEntity container,
java.lang.String name)
Construct a AFDXESs with a name and a container.
|
Modifier and Type | Method and Description |
---|---|
protected Time |
_getNextFireTime(Time nextFireTime,
java.util.LinkedList<TimedEvent> tokens)
Get next fire time for a set of tokens which is either the minimum
next fire time passed as an argument or the smallest timestamp of
the tokens in the set.
|
protected void |
_scheduleRefire()
Schedule a refiring of this actor based on the tokens in the queues.
|
void |
attributeChanged(Attribute attribute)
If the attribute is bitRate, then ensure that the value
is non-negative.
|
java.lang.Object |
clone(Workspace workspace)
Clone this actor into the specified workspace.
|
DecoratorAttributes |
createDecoratorAttributes(NamedObj target)
Return the decorated attributes for the target NamedObj.
|
void |
fire()
Fire the actor.
|
IntermediateReceiver |
getReceiver(Receiver receiver)
Create an intermediate receiver that wraps a given receiver.
|
Receiver |
getReceiver(Receiver receiver,
IOPort port)
Create a receiver to mediate a communication via the specified receiver.
|
void |
initialize()
Initialize the actor.
|
void |
printSMQueue()
Print all elements of the scheduler multiplexor queue.
|
void |
printVlinksQueue()
Print all elements of the different VL queues.
|
void |
reset()
Reset the communication aspect.
|
void |
sendToken(Receiver source,
Receiver receiver,
Token token)
Initiate a send of the specified token to the specified
receiver.
|
void |
setBag(IOPort port,
java.lang.Double bag)
Set bag value that is parameterized on a port.
|
void |
setFrameSize(IOPort port,
int size)
Set frame size that is parameterized on a port.
|
void |
setSchedulerMultiplexorName(IOPort port,
java.lang.String name)
Set the name of the scheduler that is parameterized on a port..
|
void |
setVlinkName(IOPort port,
java.lang.String name)
Set name of virtual link that is parameterized on a port.
|
_sendToReceiver, createIntermediateReceiver, decoratedObjects, isGlobalDecorator, registerListener, sendCommunicationEvent, setContainer
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_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, 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, setName
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
getDerivedLevel, getDerivedList, propagateValue
public Parameter bitRate
protected java.util.LinkedHashMap<java.lang.String,java.util.LinkedList<TimedEvent>> _afdxVLinksQueue
protected java.util.HashMap<java.lang.String,AFDXVlink> _virtualLinkTable
protected java.util.HashMap<IOPort,AFDXVlink> _portToVirtualLinks
protected java.util.HashMap<java.lang.String,Time> _lastEmissionTable
protected java.util.HashMap<java.lang.String,java.util.LinkedList<TimedEvent>> _afdxSchedMuxsQueue
protected Time _nextFireTime
protected double _delay
protected double _bitRate
public AFDXESs(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor.IllegalActionException
- If the container is incompatible
with this actor.NameDuplicationException
- If the name coincides with
an actor already in the container.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.IllegalActionException
- If the service time is negative.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class AtomicCommunicationAspect
workspace
- The workspace for the cloned object.java.lang.CloneNotSupportedException
- If cloned ports cannot have
as their container the cloned entity (this should not occur), or
if one of the attributes cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- If firing is not permitted.public DecoratorAttributes createDecoratorAttributes(NamedObj target)
createDecoratorAttributes
in interface Decorator
createDecoratorAttributes
in class AtomicCommunicationAspect
target
- The NamedObj that will be decorated.public IntermediateReceiver getReceiver(Receiver receiver)
receiver
- The receiver that is being wrapped.public Receiver getReceiver(Receiver receiver, IOPort port) throws IllegalActionException
receiver
- Receiver whose communication is to be mediated.port
- Port of the communication aspect.IllegalActionException
- If the receiver cannot be created.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicCommunicationAspect
IllegalActionException
- If the superclass throws it.public void printSMQueue()
public void printVlinksQueue()
public void reset()
public void sendToken(Receiver source, Receiver receiver, Token token) throws IllegalActionException
source
- Sender of the token.receiver
- The receiver to send to.token
- The token to send.IllegalActionException
- If the refiring request fails.public void setVlinkName(IOPort port, java.lang.String name)
port
- The port.name
- The virtual link name.public void setBag(IOPort port, java.lang.Double bag)
port
- The port.bag
- The bag value.public void setFrameSize(IOPort port, int size)
port
- The port.size
- The frame size.public void setSchedulerMultiplexorName(IOPort port, java.lang.String name) throws IllegalActionException
port
- The port.name
- The name.IllegalActionException
- Not thrown in this base classprotected Time _getNextFireTime(Time nextFireTime, java.util.LinkedList<TimedEvent> tokens)
nextFireTime
- Minimum next fire time.tokens
- The set of tokens.protected void _scheduleRefire() throws IllegalActionException
IllegalActionException
- If actor cannot be refired
at the computed time.