LRT14
1.0
|
Container for a repeating automation routine. More...
#include <Repeating.h>
Public Member Functions | |
Repeating (const char *name, Automation *routine, int times=0, bool queueIfBlocked=false, bool restartable=false) | |
Creates a repeating routine. | |
virtual bool | Start () |
Starts the task. | |
virtual bool | Abort () |
Aborts the task. | |
virtual bool | Run () |
Runs one cycle of the task. | |
virtual void | AllocateResources () |
Calls AllocateResource() on resources used in by this task. | |
![]() | |
Automation (const char *name, bool requiresAbortCycles=false, bool queueIfBlocked=false, bool restartable=false) | |
Creates an automation routine. | |
bool | Update () |
Updates the task for one cycle, including calling Run(). | |
bool | StartAutomation (Event *trigger=NULL) |
Tries to start this task. | |
bool | AbortAutomation (Event *trigger=NULL) |
Tries to aborts this task. | |
void | ContinueAutomation (Event *trigger) |
Sets the task to continue. | |
bool | CheckResources () |
Allocates resources used by this task. Checks if this task is blocked. | |
void | DeallocateResources () |
Clears all resources allocated by this task. | |
bool | IsRestartable () |
Gets whether a task can be restarted (started again when already running). | |
bool | QueueIfBlocked () |
Gets whether a task should continue to be started if blocked. | |
bool | RequiresAbortCycles () |
Gets whether a task requires running cycles before aborting. | |
const char * | GetName () |
Gets the name of the automation routine. | |
Protected Member Functions | |
virtual bool | Repeat () |
Checks whether the the routine can be repeated this cycle. | |
virtual bool | FinishRepeat () |
Checks if the routine is done repeating. | |
![]() | |
bool | AllocateResource (ControlResource::Enum resource) |
Allocates a resource to be used. | |
bool | Aborting () |
Gets whether this task is aborting (abort event fired and requires abort cycles). | |
bool | Continued () |
Returns whether this task has been continued. | |
Event * | GetStartEvent () |
Returns the event that started this task. | |
Event * | GetAbortEvent () |
Returns the event that aborted this task. | |
Event * | GetContinueEvent () |
Returns the event that continued this task. | |
Additional Inherited Members | |
![]() | |
static bool | GetAllocation (ControlResource::Enum resource) |
Gets the task that allocated a resource. | |
Container for a repeating automation routine.
Repeating::Repeating | ( | const char * | name, |
Automation * | routine, | ||
int | times = 0 , |
||
bool | queueIfBlocked = false , |
||
bool | restartable = false |
||
) |
Creates a repeating routine.
name | the name of the routine |
routine | the routine to repeat |
times | the number of times to repeat, or 0 if the routine should be repeated until aborted |
queueIfBlocked | whether the routine should be queued if blocked |
restartable | whether the routine can be restarted |
|
virtual |
Aborts the task.
Implements Automation.
|
protectedvirtual |
Checks if the routine is done repeating.
|
protectedvirtual |
Checks whether the the routine can be repeated this cycle.
|
virtual |
Runs one cycle of the task.
Implements Automation.
|
virtual |
Starts the task.
Implements Automation.