Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::Algorithm Class Referenceabstract

#include <Algorithm.h>

Inheritance diagram for Boardcore::Algorithm:

Public Member Functions

virtual bool init ()=0
 Initializes the Algorithm object, must be called as soon as the object is created.
 
void begin ()
 Starts the execution of the algorithm and set the running flag to true.
 
void end ()
 Terminates the algorithm's execution and sets the running flag to false.
 
void update ()
 Checks wether the algorithm is in a running state or not, and eventually calls the.
 
bool isRunning ()
 

Protected Member Functions

virtual void step ()=0
 The actual algorithm step.
 

Protected Attributes

std::atomic< bool > running {false}
 

Detailed Description

Definition at line 29 of file Algorithm.h.

Member Function Documentation

◆ begin()

void Boardcore::Algorithm::begin ( )
inline

Starts the execution of the algorithm and set the running flag to true.

Definition at line 42 of file Algorithm.h.

◆ end()

void Boardcore::Algorithm::end ( )
inline

Terminates the algorithm's execution and sets the running flag to false.

Definition at line 48 of file Algorithm.h.

◆ init()

virtual bool Boardcore::Algorithm::init ( )
pure virtual

Initializes the Algorithm object, must be called as soon as the object is created.

Implemented in Boardcore::AirBrakesInterp, Boardcore::AirBrakesPI, Boardcore::Follower, and Boardcore::Propagator.

◆ isRunning()

bool Boardcore::Algorithm::isRunning ( )
inline

Definition at line 60 of file Algorithm.h.

◆ step()

virtual void Boardcore::Algorithm::step ( )
protectedpure virtual

The actual algorithm step.

Implemented in Boardcore::AirBrakesPI.

◆ update()

void Boardcore::Algorithm::update ( )
inline

Checks wether the algorithm is in a running state or not, and eventually calls the.

See also
{step} routine.

Definition at line 54 of file Algorithm.h.

Member Data Documentation

◆ running

std::atomic<bool> Boardcore::Algorithm::running {false}
protected

Definition at line 68 of file Algorithm.h.


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