Package com.ctre.phoenix.schedulers
Class SequentialScheduler
java.lang.Object
com.ctre.phoenix.schedulers.SequentialScheduler
- All Implemented Interfaces:
ILoopable
public class SequentialScheduler extends Object implements ILoopable
Scheduler that will run its ILoopables in sequence
-
Constructor Summary
Constructors Constructor Description SequentialScheduler(int periodMs)
Constructor for SequentialScheduler -
Method Summary
Modifier and Type Method Description void
add(ILoopable aLoop)
Add ILoopable to schedulerILoopable
getCurrent()
Get 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
removeAll()
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
-