Class CSPSource

    • Field Detail

      • tokenLimit

        public Parameter tokenLimit
        The number of tokens produced by this actor. If this limit is set to -1, then produce output tokens indefinitely. The default value of this parameter is -1.
    • Constructor Detail

      • CSPSource

        public CSPSource​(CompositeActor container,
                         java.lang.String name,
                         int limit,
                         int initValue)
                  throws IllegalActionException,
                         NameDuplicationException
        Construct a CSPSource with the specified container and 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. The limit argument specifies how many tokens will be produced during an invocation of the fire() method. If the value of limit is set to -1, then tokens will be produced indefinitely. The initValue argument specifies the initial integer value of the output tokens.
        Parameters:
        container - The container of this actor.
        name - The name of this actor.
        limit - The number of tokens that this actor will produce.
        initValue - The initial integer value of the produced tokens.
        Throws:
        IllegalActionException - If the superclass throws it or if there is an error with instantiation of the tokenLimit parameter.
        NameDuplicationException - If the name of this actor or the tokenLimit parameter is not unique within the container.