1#ifndef OS_WRAPPER_EVENT_FLAG_H_INCLUDED
2#define OS_WRAPPER_EVENT_FLAG_H_INCLUDED
11class EventFlagFactory;
The container with bitwise operation like std::bitset.
Definition BitPattern.h:17
Abstract class that has functions of common RTOS's event flag.
Definition EventFlag.h:24
virtual Error timedWaitOne(std::size_t pos, Timeout tmout)=0
Block the current thread until the bit at position pos of this EventFlag is set ON but only within th...
virtual ~EventFlag()
Definition EventFlag.h:26
virtual Error waitAny()=0
Block the current thread until any bit of this EventFlag is set ON.
virtual Error tryWaitAny()=0
Query without blocking whether any bit of this EventFlag is set ON.
virtual Error reset(Pattern bitPattern)=0
Reset the bits of bitPattern of this EventFlag object OFF.
virtual Error setAll()=0
Set all the bits of this EventFlag object ON.
Container::BitPattern< unsigned int > Pattern
Type for bit pattern of EventFlag.
Definition EventFlag.h:40
virtual Error resetOne(std::size_t pos)=0
Reset the bit at position pos of this EventFlag object OFF.
virtual Pattern getCurrentPattern() const =0
Get current bit pattern of this EventFlag object.
virtual Error timedWaitAny(Timeout tmout)=0
Block the current thread until any bit of this EventFlag is set ON but only within the limited time.
static EventFlag * create(bool autoReset)
Create an EventFlag object.
Definition EventFlag.cpp:14
virtual Error setOne(std::size_t pos)=0
Set the bit at position pos of this EventFlag object ON.
virtual Error wait(Pattern bitPattern, Mode waitMode, Pattern *releasedPattern)=0
Block the current thread until the condition is satisfied.
virtual Error tryWaitOne(std::size_t pos)=0
Query without blocking whether the bit at position pos of this EventFlag is set ON.
Mode
Used as argument of the wait methods.
Definition EventFlag.h:32
@ AND
Definition EventFlag.h:34
@ OR
Definition EventFlag.h:33
virtual Error resetAll()=0
Reset all the bits of this EventFlag object OFF.
static void destroy(EventFlag *e)
Destroy an EventFlag object.
Definition EventFlag.cpp:20
virtual Error timedWait(Pattern bitPattern, Mode waitMode, Pattern *releasedPattern, Timeout tmout)=0
Block the current thread until the condition is satisfied but only within the limited time.
virtual Error tryWait(Pattern bitPattern, Mode waitMode, Pattern *releasedPattern)=0
Query without blocking whether the condition is satisfied.
virtual Error waitOne(std::size_t pos)=0
Block the current thread until the bit at position pos of this EventFlag is set ON.
virtual Error set(Pattern bitPattern)=0
Set the bits of bitPattern of this EventFlag object ON.
Value object for the timeout.
Definition Timeout.h:11
OSWrapper provides abstract C++ interface of common RTOS: thread, mutex, event flag,...
Definition EventFlag.cpp:5
void registerEventFlagFactory(EventFlagFactory *factory)
Register the EventFlagFactory.
Definition EventFlag.cpp:9
Error
Kinds of errors of the OS objects.
Definition OSWrapperError.h:9