LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Sequential Class Reference

Container for sequentially executing automation routines. More...

#include <Sequential.h>

Inheritance diagram for Sequential:
Collaboration diagram for Sequential:

Public Member Functions

 Sequential (const char *name, bool queueIfBlocked=false, bool restartable=false)
 Creates a sequential routine.
 
 Sequential (const char *name, std::vector< Automation * > sequence, bool queueIfBlocked=false, bool restartable=false)
 Creates a sequential routine initialized with a sequence of routines.
 
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.
 
void AddAutomation (Automation *automation)
 Adds an automation routine to the sequence of routines.
 
void AddAutomation (std::vector< Automation * > automation)
 Adds a list of automation routine to the sequence of routines.
 
void ClearSequence ()
 Clears the sequence of routines.
 
- Public Member Functions inherited from Automation
 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 ContinueNextStep ()
 Checks whether the next step in the sequence can be started.
 
- Protected Member Functions inherited from Automation
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.
 
EventGetStartEvent ()
 Returns the event that started this task.
 
EventGetAbortEvent ()
 Returns the event that aborted this task.
 
EventGetContinueEvent ()
 Returns the event that continued this task.
 

Additional Inherited Members

- Static Public Member Functions inherited from Automation
static bool GetAllocation (ControlResource::Enum resource)
 Gets the task that allocated a resource.
 

Detailed Description

Container for sequentially executing automation routines.

Constructor & Destructor Documentation

Sequential::Sequential ( const char *  name,
bool  queueIfBlocked = false,
bool  restartable = false 
)

Creates a sequential routine.

Parameters
namethe name of the routine
queueIfBlockedwhether the routine should be queued if blocked
restartablewhether the routine can be restarted
Sequential::Sequential ( const char *  name,
std::vector< Automation * >  sequence,
bool  queueIfBlocked = false,
bool  restartable = false 
)

Creates a sequential routine initialized with a sequence of routines.

Parameters
namethe name of the routine
sequencethe list of routines to initialize the sequential routine with
queueIfBlockedwhether the routine should be queued if blocked
restartablewhether the routine can be restarted

Member Function Documentation

bool Sequential::Abort ( )
virtual

Aborts the task.

Returns
true if task can be aborted, false otherwise

Implements Automation.

Here is the call graph for this function:

void Sequential::AddAutomation ( Automation automation)

Adds an automation routine to the sequence of routines.

Parameters
automationthe routine to add

Here is the caller graph for this function:

void Sequential::AddAutomation ( std::vector< Automation * >  automation)

Adds a list of automation routine to the sequence of routines.

Parameters
automationthe list of routines to add
bool Sequential::ContinueNextStep ( )
protectedvirtual

Checks whether the next step in the sequence can be started.

Returns
whether the next step in the sequence can be started

Here is the caller graph for this function:

bool Sequential::Run ( )
virtual

Runs one cycle of the task.

Returns
true if completed, false otherwise

Implements Automation.

Here is the call graph for this function:

bool Sequential::Start ( )
virtual

Starts the task.

Returns
true if task is able to start, false otherwise

Implements Automation.

Reimplemented in Autonomous.

Here is the caller graph for this function:


The documentation for this class was generated from the following files: