Package com.ctre.phoenix.schedulers
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 Summary
Constructors Constructor Description ConcurrentScheduler()
-
Method Summary
Modifier and Type Method Description void
add(ILoopable aLoop)
Add ILoopable to schedulervoid
add(ILoopable aLoop, boolean enable)
Add ILoopable to scheduleboolean
isDone()
void
onLoop()
Process all ILoopablesvoid
onStart()
Start all ILoopablesvoid
onStop()
Stop all ILoopablesvoid
process()
Process every ILoopable Call this every loopvoid
removeAll()
Remove all ILoopables from schedulervoid
start(ILoopable toStart)
Start an ILoopablevoid
startAll()
Start all ILoopablesvoid
stop(ILoopable toStop)
Stop an ILoopablevoid
stopAll()
Stop all ILoopables
-
Constructor Details
-
ConcurrentScheduler
public ConcurrentScheduler()
-
-
Method Details
-
add
Add ILoopable to schedule- Parameters:
aLoop
- ILoopable to add to scheduleenable
- Whether to enable ILoopable
-
add
Add ILoopable to scheduler- Parameters:
aLoop
- ILoopable to add
-
removeAll
Remove all ILoopables from scheduler -
start
Start an ILoopable- Parameters:
toStart
- ILoopable to start
-
stop
Stop an ILoopable- Parameters:
toStop
- ILoopable to stop
-
startAll
Start all ILoopables -
stopAll
Stop all ILoopables -
process
Process every ILoopable Call this every loop -
onStart
Start all ILoopables -
onLoop
Process all ILoopables -
onStop
Stop all ILoopables -
isDone
-