Class ControlActor

    • Field Detail

      • _enabledOutports

        protected java.util.ArrayList<TypedIOPort> _enabledOutports
        Returns a list of 0 or more output ports that are currently enabled. An 'enabled' output port means that actors connected to this port should be executed.
    • Constructor Detail

      • ControlActor

        public ControlActor()
        Construct an actor in the default workspace with an empty string as its name. The object is added to the workspace directory. Increment the version number of the workspace.
      • ControlActor

        public ControlActor​(Workspace workspace)
        Construct an actor in the specified workspace with an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace. The object is added to the workspace directory. Increment the version number of the workspace.
        Parameters:
        workspace - The workspace that will list the entity.
      • ControlActor

        public ControlActor​(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.
    • Method Detail

      • getEnabledOutports

        public java.util.ArrayList<TypedIOPort> getEnabledOutports()
        Return the (possibly empty) list of enabled output ports.
        Returns:
        The (possible empty) list of enabled output ports
        See Also:
        setEnabledOutports(List)
      • getDisabledOutports

        public java.util.ArrayList<TypedIOPort> getDisabledOutports()
        Return the (possibly empty) list of disabled output ports.
        Returns:
        The (possible empty) list of disabled output ports.
      • hasEnabledOutports

        public boolean hasEnabledOutports()
        Return true if there is at least one enabled output port, false otherwise.
        Returns:
        True if at least one output port is enabled.
      • setEnabledOutports

        protected boolean setEnabledOutports​(java.util.List<TypedIOPort> ports)
        Set the list of enabled output ports. Used by subclasses. Returns true if successful, and false if there was a problem (for example, if a port is not an output port). If unsuccessful, the list of output ports is cleared.
        Parameters:
        ports - List of output ports
        Returns:
        True if operation was successful; false otherwise
        See Also:
        getEnabledOutports()
      • addEnabledOutport

        protected boolean addEnabledOutport​(TypedIOPort port)
        Add a port to the list of enabled output ports. Used by subclasses. Returns true if successful, and false if there was a problem (for example, if a port is not an output port). If unsuccessful, the list of output ports is unchanged.
        Parameters:
        port - Output port
        Returns:
        True if operation was successful; false otherwise
      • clearEnabledOutports

        protected void clearEnabledOutports()
        Clear the list of enabled output ports. Used by subclasses.