run

open fun run(registeredIndex: Int)

Run a single robot task iteration, where further calls will no-op if the task is finished.

This is for tasks that you may want to run start-to-finish only once, where you don't want this task to auto-reset and execute after the task is done. Note that if this is the only way for you to run this task (where you did not store a reference yourself), you do not have control over this task, making it so this task will run once and never be able to requeue again (as the ability to reset it won't be possible due to a lack of handling the instance).

Resetting a task to run again can be accomplished on the task itself via task.reset(), where this method will run another cycle of the task automatically on the next call.

Parameters

registeredIndex

the existing index of the task as registered in order from register parameters order.


open fun run(task: Task)

Run a single robot task iteration, where further calls will no-op if the task is finished. This task must be registered prior through register. Do not instantiate new tasks here.

This is for tasks that you may want to run start-to-finish only once, where you don't want this task to auto-reset and execute after the task is done. You may choose to reset this instance at your own discretion, using your own reference.

Resetting a task to run again can be accomplished on the task itself via task.reset(), where this method will run another cycle of the task automatically on the next call.

Parameters

task

the registered instance of the task that will be stored and subsequently run with additional calls to this method