Linux Face / QPFramework
Embed: (wiki syntax)

« Back to documentation index

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 <qpset.h>

Inherited by QPSet64.

Public Member Functions

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

Protected Attributes

uint8_t m_bits
 bimask representing elements of 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 51 of file qpset.h.


Member Function Documentation

uint8_t findMax ( void   ) volatile

find the maximum element in the set,

Note:
returns zero if the set is empty

Reimplemented in QPSet64.

Definition at line 89 of file qpset.h.

uint8_t hasElement ( uint8_t  n ) volatile

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

Reimplemented in QPSet64.

Definition at line 73 of file qpset.h.

void insert ( uint8_t  n ) volatile

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

Reimplemented in QPSet64.

Definition at line 78 of file qpset.h.

uint8_t isEmpty ( void   ) volatile

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

Definition at line 61 of file qpset.h.

uint8_t notEmpty ( void   ) volatile

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

Definition at line 67 of file qpset.h.

void remove ( uint8_t  n ) volatile

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

Reimplemented in QPSet64.

Definition at line 83 of file qpset.h.


Field Documentation

uint8_t m_bits [protected]

bimask representing elements of the set

Definition at line 55 of file qpset.h.