Class Bus

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, CommunicationAspect, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Decorator, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class Bus
    extends AtomicCommunicationAspect
    This actor is a CommunicationAspect that, when its sendToken(Receiver, Receiver, Token) method is called, delays the delivery of the specified token to the specified receiver according to a service rule. Specifically, if the actor is not currently servicing a previous token, then it delivers the token with a delay given by the serviceTimeMultiplicationFactor parameter multiplied by the messageLength parameter specified in the port. If the actor is currently servicing a previous token, then it waits until it has finished servicing that token (and any other pending tokens), and then delays for an additional amount given by serviceTimeMultiplicationFactor * messageLength. In the default case of the messageLength = 1, the behavior is similar to the Server actor. Tokens are processed in FIFO order.

    To use this communication aspect, drag an instance of this Bus into the model, and (optionally) assign it a name. Then, on any input port whose communication is to be mediated by this instance of Bus, open the configuration dialogue, select the tab with the name of the bus in the title and select the enable attribute. The message length is by default set to 1 but can be configured in this tab.

    Several Bus communication aspects can be used in sequence. The order in which Tokens are sent through Buses depends on the order in which these are enabled via the DecoratorAttributes.

    This actor is tested in continuous and DE.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Patricia Derler, Edward A. Lee
    Pt.AcceptedRating:
    Red (derler)
    Pt.ProposedRating:
    Yellow (derler)