Incrementing Task Group
A group of tasks that is similar to a SequentialTaskGroup, but instead of queueing the next task after the previous one finishes, it queues the next task every time the task group is initialised.
The timeout of this group is calculated dynamically, based on the currently incremented task. This task retains information across resets and reinitialisation, wrapping around to the first task when the last task is reached and finished.
Author
Lucas Bubner, 2024
Since
7.0.0
Constructors
Inherited properties
Enabling will reject all future on calls. Useful for composing tasks that will internally re-schedule a wrapped Task.
Timeout value for an infinite task that will run forever.
Whether this task should override other tasks in the queue if they conflict with this task. Will only apply if this task has a dependency to run on (see dependency).
Functions
Inherited functions
Compose this task into a SequentialTaskGroup with the supplied tasks to run before this one.
Shorthand group utility for creating a DeadlineTaskGroup.
Constructor utility to create a new DeferredTask based on the supplied task builder.
Compose this task into a DeadlineTaskGroup with the supplied tasks to run these extra tasks until this task is done.
Scheduling method that will either attach this task to a subsystem or run it as part of the standard run method. This is the recommended way to run a task as it will attempt to run on the context as provided by the dependency.
Composes a ParallelTaskGroup with a WaitTask to run before this task. This will ensure the task runs for at least the specified time, and no-ops until the duration if it finishes early.
Convenience field to get a reference to a TelemetryPacket for sending telemetry to the dashboard. Available as soon as init has been called for this task.
Time since the task was started.
Get the subsystem reference that this task has elected a dependency on. Will return an Optional where if it is not present, this task is not dependent on any subsystem.
Shorthand group utility for creating a IncrementingTaskGroup.
Query (but not update) the finished state of the task. This will return true if the task is finished and the finisher has been fired.
Utility for creating a DynamicTask that will loop some function until the task is manually finished.
Creates a new DynamicTask instance by wrapping this existing Task instance, allowing you to add new functionality to a task without modifying the original task.
Compose this task into a IncrementingTaskGroup with the supplied tasks to run the next task in sequence after the previous one finishes, while looping back to the first task.
Set the subsystem you want to elect this task to run on, notifying the runner that this task should run there.
Finalising function to run once the task is finished. This will always run regardless of whether the task was ended because of an interrupt or the task naturally finishing. Override to add your own callback.
Shorthand group utility for creating a ParallelTaskGroup.
Compose this task into a RaceTaskGroup with the supplied tasks to run all of these tasks until one finishes.
Shorthand group utility for creating a RaceTaskGroup.
Wrap this task in a RepeatTask where finish conditions are reset immediately.
Utility for creating a DynamicTask that will loop some function for some time.
Shorthand group utility for creating a SequentialTaskGroup.
Attempts to assign this task as the default task of the current dependency.
Convenience field to get a reference to a TelemetryPacket for sending telemetry to the dashboard. Available as soon as init has been called for this task.
Utility to create a new DynamicTask instance for building a new task.
Compose this task into a SequentialTaskGroup with the supplied tasks to follow after this one.
Get a verbose string representation of this task, including all of its properties.
Compose this task into a RaceTaskGroup with a wait condition based on this condition.
Utility for creating a DynamicTask that will wait for some condition and finish when the condition is true.
Compose this task into a ParallelTaskGroup with the supplied tasks to run all of these tasks at once.