CTRE Phoenix C++ 5.35.1
Loading...
Searching...
No Matches
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.
 
void RemoveAll ()
 Remove all ILoopables from scheduler.
 
void Start (ILoopable *toStart)
 Start an ILoopable.
 
void Stop (ILoopable *toStop)
 Stop an ILoopable.
 
void StartAll ()
 Start all ILoopables.
 
void StopAll ()
 Stop all ILoopables.
 
void Process ()
 Process every ILoopable.
 
bool Iterated ()
 
void OnStart ()
 Start all ILoopables.
 
void OnLoop ()
 Process all ILoopables.
 
void OnStop ()
 Stop all ILoopables.
 
bool IsDone ()
 
- Public Member Functions inherited from ctre::phoenix::tasking::ILoopable
virtual ~ILoopable ()
 
- Public Member Functions inherited from ctre::phoenix::tasking::IProcessable
virtual ~IProcessable ()
 

Public Attributes

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

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: