Package ca.team3161.lib.robot.subsystem
Class RepeatingIndependentSubsystem
- java.lang.Object
-
- ca.team3161.lib.robot.subsystem.AbstractSubsystem
-
- ca.team3161.lib.robot.subsystem.AbstractIndependentSubsystem
-
- ca.team3161.lib.robot.subsystem.RepeatingIndependentSubsystem
-
- All Implemented Interfaces:
Subsystem
- Direct Known Subclasses:
AbstractController
public abstract class RepeatingIndependentSubsystem extends AbstractIndependentSubsystem
A Subsystem whose task is run repeatedly with a specified period, until cancelled.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ca.team3161.lib.robot.subsystem.AbstractSubsystem
AbstractSubsystem.RunTask
-
-
Field Summary
-
Fields inherited from class ca.team3161.lib.robot.subsystem.AbstractSubsystem
job, resourceLocks, THREAD_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description RepeatingIndependentSubsystem()
RepeatingIndependentSubsystem(long timeout, java.util.concurrent.TimeUnit timeUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDone()
Check if this subsystem's task has been completed.void
start()
Start (or restart) this Subsystem's background task.-
Methods inherited from class ca.team3161.lib.robot.subsystem.AbstractIndependentSubsystem
getExecutorService
-
Methods inherited from class ca.team3161.lib.robot.subsystem.AbstractSubsystem
acquireResources, cancel, getJob, isCancelled, isScheduled, isStarted, releaseResources, require
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.team3161.lib.robot.subsystem.Subsystem
defineResources, task
-
-
-
-
Method Detail
-
start
public void start()
Description copied from interface:Subsystem
Start (or restart) this Subsystem's background task.
-
isDone
public boolean isDone()
Check if this subsystem's task has been completed. This is never true for repeating subsystems, which are always "Not Started", "Scheduled", or "Cancelled".- Returns:
- true iff completed.
-
-