Class ConcurrentScheduler

java.lang.Object
com.ctre.phoenix.schedulers.ConcurrentScheduler
All Implemented Interfaces:
ILoopable

public class ConcurrentScheduler extends Object implements ILoopable
Scheduler that wil run its ILoopables in concurrency
  • Constructor Details

  • Method Details

    • add

      public void add(ILoopable aLoop, boolean enable)
      Add ILoopable to schedule
      Parameters:
      aLoop - ILoopable to add to schedule
      enable - Whether to enable ILoopable
    • add

      public void add(ILoopable aLoop)
      Add ILoopable to scheduler
      Parameters:
      aLoop - ILoopable to add
    • removeAll

      public void removeAll()
      Remove all ILoopables from scheduler
    • start

      public void start(ILoopable toStart)
      Start an ILoopable
      Parameters:
      toStart - ILoopable to start
    • stop

      public void stop(ILoopable toStop)
      Stop an ILoopable
      Parameters:
      toStop - ILoopable to stop
    • startAll

      public void startAll()
      Start all ILoopables
    • stopAll

      public void stopAll()
      Stop all ILoopables
    • process

      public void process()
      Process every ILoopable Call this every loop
    • onStart

      public void onStart()
      Start all ILoopables
      Specified by:
      onStart in interface ILoopable
    • onLoop

      public void onLoop()
      Process all ILoopables
      Specified by:
      onLoop in interface ILoopable
    • onStop

      public void onStop()
      Stop all ILoopables
      Specified by:
      onStop in interface ILoopable
    • isDone

      public boolean isDone()
      Specified by:
      isDone in interface ILoopable
      Returns:
      false, this is never done