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

Scheduler that wil run its ILoopables in concurrency. More...

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

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

Public Member Functions

 ConcurrentScheduler ()
 
virtual ~ConcurrentScheduler ()
 
void Add (ILoopable *aLoop, bool enable=true)
 Add ILoopable to schedule. More...
 
void RemoveAll ()
 Remove all ILoopables from scheduler. More...
 
void Start (ILoopable *toStart)
 Start an ILoopable. More...
 
void Stop (ILoopable *toStop)
 Stop an ILoopable. More...
 
void StartAll ()
 Start all ILoopables. More...
 
void StopAll ()
 Stop all ILoopables. More...
 
void Process ()
 Process every ILoopable. More...
 
bool Iterated ()
 
void OnStart ()
 Start all ILoopables. More...
 
void OnLoop ()
 Process all ILoopables. 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

std::vector< ILoopable * > _loops
 Should be private. More...
 
std::vector< bool > _enabs
 Should be private. More...
 

Detailed Description

Scheduler that wil run its ILoopables in concurrency.

Constructor & Destructor Documentation

◆ ConcurrentScheduler()

ctre::phoenix::tasking::schedulers::ConcurrentScheduler::ConcurrentScheduler ( )

◆ ~ConcurrentScheduler()

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

Member Function Documentation

◆ Add()

void ctre::phoenix::tasking::schedulers::ConcurrentScheduler::Add ( ILoopable aLoop,
bool  enable = true 
)

Add ILoopable to schedule.

Parameters
aLoopILoopable to add to schedule
enableWhether to enable ILoopable

◆ IsDone()

bool ctre::phoenix::tasking::schedulers::ConcurrentScheduler::IsDone ( )
virtual
Returns
false, this is never done

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

◆ Iterated()

bool ctre::phoenix::tasking::schedulers::ConcurrentScheduler::Iterated ( )
Returns
false, this never iterates

◆ OnLoop()

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

Process all ILoopables.

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

◆ OnStart()

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

Start all ILoopables.

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

◆ OnStop()

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

Stop all ILoopables.

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

◆ Process()

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

Process every ILoopable.

Call this every loop

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

◆ RemoveAll()

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

Remove all ILoopables from scheduler.

◆ Start()

void ctre::phoenix::tasking::schedulers::ConcurrentScheduler::Start ( ILoopable toStart)

Start an ILoopable.

Parameters
toStartILoopable to start

◆ StartAll()

void ctre::phoenix::tasking::schedulers::ConcurrentScheduler::StartAll ( )

Start all ILoopables.

◆ Stop()

void ctre::phoenix::tasking::schedulers::ConcurrentScheduler::Stop ( ILoopable toStop)

Stop an ILoopable.

Parameters
toStopILoopable to stop

◆ StopAll()

void ctre::phoenix::tasking::schedulers::ConcurrentScheduler::StopAll ( )

Stop all ILoopables.

Member Data Documentation

◆ _enabs

std::vector<bool> ctre::phoenix::tasking::schedulers::ConcurrentScheduler::_enabs

Should be private.

◆ _loops

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

Should be private.


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