Class LimitedFiringSource

    • Field Detail

      • firingCountLimit

        public Parameter firingCountLimit
        If a positive integer, then the number of iterations before the actor indicates to the scheduler that it is finished by returning false in its postfire() method.
      • _firingCountLimit

        protected int _firingCountLimit
        This is the value in parameter firingCountLimit. It may be convenient for derived classes to read this variable in the iterate() method.
      • _iterationCount

        protected int _iterationCount
        The current number of elapsed iterations. It may be convenient for derived classes to read/set this variable in the iterate() method.
    • Method Detail

      • postfire

        public boolean postfire()
                         throws IllegalActionException
        Increment the iteration counter, and if it equals the value of the firingCountLimit parameter, return false. Otherwise, return true. Derived classes should call this at the end of their postfire() method and return its returned value.
        Specified by:
        postfire in interface Executable
        Overrides:
        postfire in class AtomicActor<TypedIOPort>
        Returns:
        True if execution can continue into the next iteration.
        Throws:
        IllegalActionException - If firingCountLimit has an invalid expression.