Class Task

    • Field Detail

      • done

        public static boolean done
      • firstErr

        public static int firstErr
        first error occurred, see this error list
        1: error at installation
        2: too many tasks
        3: task is already or still installed
      • time

        public int time
        time: 0 <= time : start time in ms from install time
      • period

        public int period
        period: 0 <= period : period time in ms
        The period is must be specified before installation of the task by calling install. Subsequent modifications of this value do not have any effects!
      • nofActivations

        public int nofActivations
        number of activations
      • safe

        public boolean safe
        safe=FALSE -> task gets removed on trap, currently not used
      • nextTime

        public long nextTime
      • periodNs

        public long periodNs
    • Constructor Detail

      • Task

        public Task()
        Creates a new Task.
        It's action method will be called by the task scheduler
      • Task

        public Task​(Actionable act)
        Creates a new Task.
        The action method of the parameter Actionable will be called by the task scheduler
        Parameters:
        act - Actionable to be installed.
    • Method Detail

      • error

        static void error​(int n)
      • action

        public void action()
        Action to be performed by the task
        Specified by:
        action in interface Actionable
      • time

        public static int time()
        Returns system time in milliseconds, time starts at powerup
        Returns:
        Current time in ms.
      • install

        public static void install​(Task task)
        Installs a new Task.
        Parameters:
        task - Task to be installed.
      • remove

        public static void remove​(Task task)
        Removes an installed task
        Parameters:
        task - Task to be removed.
      • loop

        static void loop()