Class DateToEvent

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

    public class DateToEvent
    extends Transformer
    A timed actor that accepts DateTokens on the input. If the date in the DateToken is in the future, the output is generated at this future date. If the date is in the past, an exception is thrown. The output is a DateToken with the system time obtained when producing the output. Internally, the input date is converted to model time, which is used in the local clock of the director. Because we are using system time here, the output time will not be exact and the output DateToken will not be exactly the same as the DateToken received on the input. Using this actor makes sense in models that synchronize to real time (e.g. in the DE domain by enabling the synchronizeToRealTime property).
    Since:
    Ptolemy II 10.0
    Version:
    $Id$, $Id$
    Author:
    Patricia Derler
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Detail

      • DateToEvent

        public DateToEvent​(CompositeEntity container,
                           java.lang.String name)
                    throws IllegalActionException,
                           NameDuplicationException
        Create a new 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 of this actor within the container.
        Throws:
        IllegalActionException - If this actor cannot be contained by the proposed container (see the setContainer() method).
        NameDuplicationException - If the name coincides with an entity already in the container.