Class TaskPtDirector

    • Constructor Detail

      • TaskPtDirector

        public TaskPtDirector​(CompositeEntity container,
                              java.lang.String name)
                       throws IllegalActionException,
                              NameDuplicationException
        Construct a director in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. Increment the version number of the workspace. The director will have a default scheduler of type SequenceScheduler. In addition to invoking the base class constructor the memory is initialized.
        Parameters:
        container - Container of the director.
        name - Name of this director.
        Throws:
        IllegalActionException - If the director is not compatible with the specified container. May be thrown in a derived class.
        NameDuplicationException - If the container is not a CompositeActor and the name collides with an entity in the container.
    • Method Detail

      • getMemory

        public Memory getMemory()
        Get the memory assigned to this director.
        Returns:
        The memory assigned to this director.
      • postfire

        public boolean postfire()
                         throws IllegalActionException
        Return false if the system has finished executing. In addition to calling the to invoking the base class method clear receivers and the memory, if the system has finished executing.
        Specified by:
        postfire in interface Executable
        Overrides:
        postfire in class SequencedModelDirector
        Returns:
        True if the Director wants to be fired again in the future.
        Throws:
        IllegalActionException - Thrown if the iterations parameter does not contain a legal value.
      • _transferInputs

        protected boolean _transferInputs​(IOPort port)
                                   throws IllegalActionException
        Transfer at most one data token from the given input port of the container to the ports it is connected to on the inside. This method delegates the operation to the IOPort, so that the subclass of IOPort, TypedIOPort, can override this method to perform run-time type conversion.
        Overrides:
        _transferInputs in class Director
        Parameters:
        port - The port to transfer tokens from.
        Returns:
        True if at least one data token is transferred.
        Throws:
        IllegalActionException - Thrown, if the port is not an opaque input port.
        See Also:
        IOPort.transferInputs()
      • _transferOutputs

        protected boolean _transferOutputs​(IOPort port)
                                    throws IllegalActionException
        Transfer at most one data token from the given output port of the container to the ports it is connected to on the outside.
        Overrides:
        _transferOutputs in class Director
        Parameters:
        port - The port to transfer tokens from.
        Returns:
        True if the port has an inside token that was successfully transferred. Otherwise return false (or throw an exception).
        Throws:
        IllegalActionException - Thrown, if the port is not an opaque output port.
      • _setInitialValues

        protected void _setInitialValues()
                                  throws IllegalActionException
        Set the initial Tokens present on the inputs of the actors. In this case do not set any initial tokens. Remove already present tokens.
        Throws:
        IllegalActionException - Thrown if already present tokens cannot be removed.