Class Merge

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

    public class Merge
    extends TypedAtomicActor
    This actor merges any number of input sequences onto one output sequence. It begins by being willing to rendezvous with any input. When it receives an input, it then becomes willing to rendezvous with the output. After successfully delivering the input token to the output, it returns again to being willing to rendezvous with any input. This actor is designed for use in the rendezvous domain, where it will execute in its own thread.

    The behavior of this actor is similar to that of the ResourcePool actor, except that the ResourcePool actor does buffering. That is, the ResourcePool is always ready to rendezvous with any input, while this actor is ready to rendezvous with an input only after it has delivered the previous input token to the output.

    Since:
    Ptolemy II 5.1
    Version:
    $Id$
    Author:
    Edward A. Lee
    See Also:
    ResourcePool
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • output

        public TypedIOPort output
        The output port. The type must be at least that of the input.
      • input

        public TypedIOPort input
        The input port. This is a multiport that accepts any type.
    • Constructor Detail

      • Merge

        public Merge​(CompositeEntity container,
                     java.lang.String name)
              throws IllegalActionException,
                     NameDuplicationException
        Construct an actor in the specified container with the specified name. The name must be unique within the container or an exception is thrown. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name.
        Throws:
        IllegalActionException - If the actor cannot be contained by the proposed container.
        NameDuplicationException - If the name coincides with an actor already in the container.