Package com.ctre.phoenix.schedulers
Class SequentialScheduler
java.lang.Object
com.ctre.phoenix.schedulers.SequentialScheduler
- All Implemented Interfaces:
ILoopable
Scheduler that will run its ILoopables in sequence
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add ILoopable to schedulerGet the currently running ILoopableboolean
isDone()
boolean
iterated()
void
onLoop()
Process currently active ILoopablevoid
onStart()
Start next ILoopablevoid
onStop()
Stop all ILoopablesvoid
process()
Process the currently active ILoopable Call this every loopvoid
Remove all ILoopablesvoid
start()
Start next ILoopablevoid
stop()
Stop every ILoopable
-
Constructor Details
-
SequentialScheduler
Constructor for SequentialScheduler- Parameters:
periodMs
- Not used, pass 0
-
-
Method Details
-
add
Add ILoopable to scheduler- Parameters:
aLoop
- ILoopable to add
-
getCurrent
Get the currently running ILoopable- Returns:
- null, not implemented
-
removeAll
Remove all ILoopables -
start
Start next ILoopable -
stop
Stop every ILoopable -
process
Process the currently active ILoopable Call this every loop -
iterated
- Returns:
- true if we've just iterated to the next ILoopable
-
onStart
Start next ILoopable -
onLoop
Process currently active ILoopable -
isDone
-
onStop
Stop all ILoopables
-