CTRE Phoenix C++ 5.33.1
ctre::phoenix::tasking::schedulers::SequentialScheduler Class Reference

Scheduler that will run its ILoopables in sequence. More...

#include <ctre/phoenix/tasking/Schedulers/SequentialScheduler.h>

Inheritance diagram for ctre::phoenix::tasking::schedulers::SequentialScheduler:
ctre::phoenix::tasking::ILoopable ctre::phoenix::tasking::IProcessable

Public Member Functions

 SequentialScheduler ()
 
virtual ~SequentialScheduler ()
 
void Add (ILoopable *aLoop)
 Add ILoopable to scheduler. More...
 
ILoopableGetCurrent ()
 Get the currently running ILoopable. More...
 
void RemoveAll ()
 Remove all ILoopables. More...
 
void Start ()
 Start next ILoopable. More...
 
void Stop ()
 Stop every ILoopable. More...
 
void Process ()
 Process the currently active ILoopable. More...
 
void OnStart ()
 Start next ILoopable. More...
 
void OnLoop ()
 Process currently active ILoopable. More...
 
void OnStop ()
 Stop all ILoopables. More...
 
bool IsDone ()
 
- Public Member Functions inherited from ctre::phoenix::tasking::ILoopable
virtual ~ILoopable ()
 
virtual void OnStart ()=0
 Function called when object starts. More...
 
virtual void OnLoop ()=0
 Function called every loop. More...
 
virtual bool IsDone ()=0
 
virtual void OnStop ()=0
 Function called when object stops. More...
 
- Public Member Functions inherited from ctre::phoenix::tasking::IProcessable
virtual ~IProcessable ()
 
virtual void Process ()=0
 This function is called when a process occurs. More...
 

Public Attributes

bool _running = false
 should be private More...
 
std::vector< ILoopable * > _loops
 should be private More...
 
unsigned int _idx = 0
 should be private More...
 
bool _iterated = false
 should be private More...
 

Detailed Description

Scheduler that will run its ILoopables in sequence.

Constructor & Destructor Documentation

◆ SequentialScheduler()

ctre::phoenix::tasking::schedulers::SequentialScheduler::SequentialScheduler ( )

◆ ~SequentialScheduler()

virtual ctre::phoenix::tasking::schedulers::SequentialScheduler::~SequentialScheduler ( )
virtual

Member Function Documentation

◆ Add()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::Add ( ILoopable aLoop)

Add ILoopable to scheduler.

Parameters
aLoopILoopable to add

◆ GetCurrent()

ILoopable * ctre::phoenix::tasking::schedulers::SequentialScheduler::GetCurrent ( )

Get the currently running ILoopable.

Returns
null, not implemented

◆ IsDone()

bool ctre::phoenix::tasking::schedulers::SequentialScheduler::IsDone ( )
virtual
Returns
true when no longer running

Implements ctre::phoenix::tasking::ILoopable.

◆ OnLoop()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::OnLoop ( )
virtual

Process currently active ILoopable.

Implements ctre::phoenix::tasking::ILoopable.

◆ OnStart()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::OnStart ( )
virtual

◆ OnStop()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::OnStop ( )
virtual

Stop all ILoopables.

Implements ctre::phoenix::tasking::ILoopable.

◆ Process()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::Process ( )
virtual

Process the currently active ILoopable.

Call this every loop

Implements ctre::phoenix::tasking::IProcessable.

◆ RemoveAll()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::RemoveAll ( )

Remove all ILoopables.

◆ Start()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::Start ( )

Start next ILoopable.

◆ Stop()

void ctre::phoenix::tasking::schedulers::SequentialScheduler::Stop ( )

Stop every ILoopable.

Member Data Documentation

◆ _idx

unsigned int ctre::phoenix::tasking::schedulers::SequentialScheduler::_idx = 0

should be private

◆ _iterated

bool ctre::phoenix::tasking::schedulers::SequentialScheduler::_iterated = false

should be private

◆ _loops

std::vector<ILoopable*> ctre::phoenix::tasking::schedulers::SequentialScheduler::_loops

should be private

◆ _running

bool ctre::phoenix::tasking::schedulers::SequentialScheduler::_running = false

should be private


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