Quantum Leaps / qp Featured

Dependents:   qp_hangman qp_dpp qp_blinky

Embed: (wiki syntax)

« Back to documentation index

QPSet8 Class Reference

QPSet8 Class Reference

Priority Set of up to 8 elements for building various schedulers, but also useful as a general set of up to 8 elements of any kind. More...

#include <qp.h>

Public Member Functions

bool isEmpty (void) const
 the function evaluates to TRUE if the set is empty, which means that no active objects are ready to run.
bool notEmpty (void) const
 the function evaluates to TRUE if the set has elements, which means that some active objects are ready to run.
bool hasElement (uint8_t const n) const
 the function evaluates to TRUE if the priority set has the element n.
void insert (uint8_t const n)
 insert element n into the set, n = 1..8
void remove (uint8_t const n)
 remove element n from the set, n = 1..8
uint8_t findMax (void) const
 find the maximum element in the set,

Friends

class QPSet64

Detailed Description

Priority Set of up to 8 elements for building various schedulers, but also useful as a general set of up to 8 elements of any kind.

The priority set represents the set of active objects that are ready to run and need to be considered by scheduling processing. The set is capable of storing up to 8 priority levels.

Definition at line 957 of file qp.h.


Member Function Documentation

uint8_t findMax ( void   ) const

find the maximum element in the set,

Note:
returns zero if the set is empty

Definition at line 996 of file qp.h.

bool hasElement ( uint8_t const   n ) const

the function evaluates to TRUE if the priority set has the element n.

Definition at line 979 of file qp.h.

void insert ( uint8_t const   n )

insert element n into the set, n = 1..8

Definition at line 985 of file qp.h.

bool isEmpty ( void   ) const

the function evaluates to TRUE if the set is empty, which means that no active objects are ready to run.

Definition at line 967 of file qp.h.

bool notEmpty ( void   ) const

the function evaluates to TRUE if the set has elements, which means that some active objects are ready to run.

Definition at line 973 of file qp.h.

void remove ( uint8_t const   n )

remove element n from the set, n = 1..8

Definition at line 990 of file qp.h.