Package ptolemy.actor
Interface CommunicationAspect
-
- All Known Implementing Classes:
AFDXESs
,AFDXSwitch
,AtomicCommunicationAspect
,BasicSwitch
,Bus
,CanBus
,CompositeCommunicationAspect
,CrossbarSwitch
,HMMGaussianEstimator
,PacketDropFaultGenerator
,ParameterEstimator
,StuckAtFaultGenerator
,TTESwitch
,VariableDelaySwitch
public interface CommunicationAspect
An interface for objects that can intervene in communication between actors. A communication aspect creates receivers that wrap the receivers created by aDirector
, delegating (or not) to those receivers as it sees fit. If anIOPort
references a communication aspect, then calls to any receiver in that port will be handled instead by a receiver created by the communication aspect.For example, a communication aspect could intervene in communications to take into account shared resources. For example, it could delay delivery of any tokens to the original receiver (that created by the director) until the resources become available for the transport to occur.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Patricia Derler, Edward A. Lee
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
decoratorHighlightColorName
The parameter name of the decorator highlight color.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Receiver
createIntermediateReceiver(Receiver receiver)
Create a receiver to mediate a communication via the specified receiver.void
registerListener(CommunicationAspectListener monitor)
Add a communication aspect monitor to the list of listeners.void
reset()
Reset the CommunicationAspect.void
sendToken(Receiver source, Receiver receiver, Token token)
Take the specified token and mediate communication to the specified receiver.
-
-
-
Field Detail
-
decoratorHighlightColorName
static final java.lang.String decoratorHighlightColorName
The parameter name of the decorator highlight color.- See Also:
- Constant Field Values
-
-
Method Detail
-
createIntermediateReceiver
Receiver createIntermediateReceiver(Receiver receiver) throws IllegalActionException
Create a receiver to mediate a communication via the specified receiver.- Parameters:
receiver
- Receiver whose communication is to be mediated.- Returns:
- A new receiver.
- Throws:
IllegalActionException
- If the receiver cannot be created.
-
registerListener
void registerListener(CommunicationAspectListener monitor)
Add a communication aspect monitor to the list of listeners.- Parameters:
monitor
- The communication aspect monitor.
-
reset
void reset()
Reset the CommunicationAspect.
-
sendToken
void sendToken(Receiver source, Receiver receiver, Token token) throws IllegalActionException
Take the specified token and mediate communication to the specified receiver. An implementer could, for example, delay the communication to account for resource contention. Or, it could make a record of the energy consumed by the communication.- Parameters:
source
- Receiver that sent the token.receiver
- The receiver for which this communication aspect is mediating communication.token
- The token for the communication to mediate.- Throws:
IllegalActionException
- If the token cannot be sent.
-
-