Electronics and Software
Engineering Innovation
Beam-lib  2.15.1

#include <BCondInt.h>

Public Member Functions

 BCondWrap ()
 
 ~BCondWrap ()
 
void setValue (uint32_t value)
 Set the value. Wakes waiting. More...
 
uint32_t value ()
 Current value. More...
 
uint32_t increment (uint32_t v=1)
 Increment. Wakes waiting. More...
 
uint32_t decrement (uint32_t v=1)
 Decrement. Wakes waiting. More...
 
int waitMoreThanOrEqual (uint32_t v, uint32_t decrement=0, uint32_t timeOutUs=0)
 Wait until value is at least the value given. More...
 
int waitLessThanOrEqual (uint32_t v, uint32_t increment=0, uint32_t timeOutUs=0)
 Wait until value is equal to or below the value given. More...
 
int waitLessThan (uint32_t v, uint32_t timeOutUs=0)
 Wait until value is equal to or below the value given. More...
 
void operator+= (int v)
 Add to value. Wakes waiting. More...
 
void operator-= (int v)
 Subtract from value. Wakes waiting. More...
 
void operator++ (int)
 Increment value. Wakes waiting. More...
 
void operator-- (int)
 Decrement value. Wakes waiting. More...
 

Private Member Functions

int diff (uint32_t v)
 

Private Attributes

pthread_mutex_t omutex
 
pthread_cond_t ocond
 
uint32_t ovalue
 

Constructor & Destructor Documentation

◆ BCondWrap()

BCondWrap::BCondWrap ( )

◆ ~BCondWrap()

BCondWrap::~BCondWrap ( )

Member Function Documentation

◆ decrement()

uint32_t BCondWrap::decrement ( uint32_t  v = 1)

Decrement. Wakes waiting.

◆ diff()

int BCondWrap::diff ( uint32_t  v)
private

◆ increment()

uint32_t BCondWrap::increment ( uint32_t  v = 1)

Increment. Wakes waiting.

◆ operator++()

void BCondWrap::operator++ ( int  )
inline

Increment value. Wakes waiting.

◆ operator+=()

void BCondWrap::operator+= ( int  v)
inline

Add to value. Wakes waiting.

◆ operator--()

void BCondWrap::operator-- ( int  )
inline

Decrement value. Wakes waiting.

◆ operator-=()

void BCondWrap::operator-= ( int  v)
inline

Subtract from value. Wakes waiting.

◆ setValue()

void BCondWrap::setValue ( uint32_t  value)

Set the value. Wakes waiting.

◆ value()

uint32_t BCondWrap::value ( )

Current value.

◆ waitLessThan()

int BCondWrap::waitLessThan ( uint32_t  v,
uint32_t  timeOutUs = 0 
)

Wait until value is equal to or below the value given.

◆ waitLessThanOrEqual()

int BCondWrap::waitLessThanOrEqual ( uint32_t  v,
uint32_t  increment = 0,
uint32_t  timeOutUs = 0 
)

Wait until value is equal to or below the value given.

◆ waitMoreThanOrEqual()

int BCondWrap::waitMoreThanOrEqual ( uint32_t  v,
uint32_t  decrement = 0,
uint32_t  timeOutUs = 0 
)

Wait until value is at least the value given.

Member Data Documentation

◆ ocond

pthread_cond_t BCondWrap::ocond
private

◆ omutex

pthread_mutex_t BCondWrap::omutex
private

◆ ovalue

uint32_t BCondWrap::ovalue
private

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