µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::rtos::internal::event_flags Class Reference

Internal event flags implementation. More...

#include <os-flags.h>

Public Member Functions

Constructors & Destructor
 event_flags ()=default
 Construct an internal event flags object instance.
 
 ~event_flags ()=default
 Destruct the internal event flags object instance.
 
Public Member Functions
result_t raise (flags::mask_t mask, flags::mask_t *oflags)
 Raise event flags.
 
bool check_raised (flags::mask_t mask, flags::mask_t *oflags, flags::mode_t mode)
 Check if expected flags are raised.
 
flags::mask_t get (flags::mask_t mask, flags::mode_t mode)
 Get (and possibly clear) event flags.
 
result_t clear (flags::mask_t mask, flags::mask_t *oflags)
 Clear event flags.
 
flags::mask_t mask (void)
 Get the flags mask.
 

Detailed Description

Internal event flags implementation.

Definition at line 63 of file os-flags.h.

Constructor & Destructor Documentation

◆ event_flags()

os::rtos::internal::event_flags::event_flags ( )
default

Construct an internal event flags object instance.

◆ ~event_flags()

os::rtos::internal::event_flags::~event_flags ( )
default

Destruct the internal event flags object instance.

Member Function Documentation

◆ check_raised()

bool os::rtos::internal::event_flags::check_raised ( flags::mask_t  mask,
flags::mask_t oflags,
flags::mode_t  mode 
)

Check if expected flags are raised.

Parameters
[in]maskThe expected flags (OR-ed bit-mask); if flags::any, any flag raised will do it.
[out]oflagsPointer where to store the current flags; may be nullptr.
[in]modeMode bits to select if either all or any flags in the mask are expected, and if the flags should be cleared.
Return values
trueThe expected flags are raised.
falseThe expected flags are not raised.

Definition at line 77 of file os-flags.cpp.

◆ clear()

result_t os::rtos::internal::event_flags::clear ( flags::mask_t  mask,
flags::mask_t oflags 
)

Clear event flags.

Parameters
[in]maskThe OR-ed flags to clear.
[out]oflagsOptional pointer where to store the previous value of the flags; may be nullptr.
Return values
result::okThe flags were cleared.
EINVALThe mask is zero.

Definition at line 158 of file os-flags.cpp.

◆ get()

flags::mask_t os::rtos::internal::event_flags::get ( flags::mask_t  mask,
flags::mode_t  mode 
)

Get (and possibly clear) event flags.

Parameters
[in]maskThe OR-ed flags to get/clear; can be flags::any.
[in]modeMode bits to select if the flags should be cleared (the other bits are ignored).
Returns
The selected bits from the flags mask.

Definition at line 124 of file os-flags.cpp.

◆ mask()

flags::mask_t os::rtos::internal::event_flags::mask ( void  )
inline

Get the flags mask.

Returns
The internal bit-mask.

Definition at line 208 of file os-flags.h.

◆ raise()

result_t os::rtos::internal::event_flags::raise ( flags::mask_t  mask,
flags::mask_t oflags 
)

Raise event flags.

Parameters
[in]maskThe OR-ed flags to raise.
[out]oflagsOptional pointer where to store the new value of the flags; may be nullptr.
Return values
result::okThe flags were raised.
EINVALThe mask is zero.
ENOTRECOVERABLERaise failed.

Definition at line 49 of file os-flags.cpp.


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