CppELib 1.7.0
|
Public Member Functions | |
StdCppEventFlag (bool autoReset) | |
~StdCppEventFlag () | |
OSWrapper::Error | waitAny () |
Block the current thread until any bit of this EventFlag is set ON. | |
OSWrapper::Error | waitOne (std::size_t pos) |
Block the current thread until the bit at position pos of this EventFlag is set ON. | |
OSWrapper::Error | wait (EventFlag::Pattern bitPattern, Mode waitMode, EventFlag::Pattern *releasedPattern) |
Block the current thread until the condition is satisfied. | |
OSWrapper::Error | tryWaitAny () |
Query without blocking whether any bit of this EventFlag is set ON. | |
OSWrapper::Error | tryWaitOne (std::size_t pos) |
Query without blocking whether the bit at position pos of this EventFlag is set ON. | |
OSWrapper::Error | tryWait (EventFlag::Pattern bitPattern, Mode waitMode, EventFlag::Pattern *releasedPattern) |
Query without blocking whether the condition is satisfied. | |
OSWrapper::Error | timedWaitAny (Timeout tmout) |
Block the current thread until any bit of this EventFlag is set ON but only within the limited time. | |
OSWrapper::Error | timedWaitOne (std::size_t pos, Timeout tmout) |
Block the current thread until the bit at position pos of this EventFlag is set ON but only within the limited time. | |
OSWrapper::Error | timedWait (EventFlag::Pattern bitPattern, Mode waitMode, EventFlag::Pattern *releasedPattern, Timeout tmout) |
Block the current thread until the condition is satisfied but only within the limited time. | |
OSWrapper::Error | setAll () |
Set all the bits of this EventFlag object ON. | |
OSWrapper::Error | setOne (std::size_t pos) |
Set the bit at position pos of this EventFlag object ON. | |
OSWrapper::Error | set (EventFlag::Pattern bitPattern) |
Set the bits of bitPattern of this EventFlag object ON. | |
OSWrapper::Error | resetAll () |
Reset all the bits of this EventFlag object OFF. | |
OSWrapper::Error | resetOne (std::size_t pos) |
Reset the bit at position pos of this EventFlag object OFF. | |
OSWrapper::Error | reset (EventFlag::Pattern bitPattern) |
Reset the bits of bitPattern of this EventFlag object OFF. | |
EventFlag::Pattern | getCurrentPattern () const |
Get current bit pattern of this EventFlag object. | |
Additional Inherited Members | |
Public Types inherited from OSWrapper::EventFlag | |
enum | Mode { OR , AND } |
Used as argument of the wait methods. More... | |
typedef Container::BitPattern< unsigned int > | Pattern |
Type for bit pattern of EventFlag. | |
Static Public Member Functions inherited from OSWrapper::EventFlag | |
static EventFlag * | create (bool autoReset) |
Create an EventFlag object. | |
static void | destroy (EventFlag *e) |
Destroy an EventFlag object. | |
Protected Member Functions inherited from OSWrapper::EventFlag | |
virtual | ~EventFlag () |
|
inlineexplicit |
|
inline |
|
inlinevirtual |
Get current bit pattern of this EventFlag object.
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Reset the bits of bitPattern of this EventFlag object OFF.
Let selfPattern is the bit pattern of this EventFlag object: Bitwise operation is (selfPattern &= ~bitPattern)
bitPattern | Requested bit pattern |
OK | Always success |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Reset all the bits of this EventFlag object OFF.
OK | Always success |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Reset the bit at position pos of this EventFlag object OFF.
pos | Position of the bit |
OK | Success |
InvalidParameter | pos >= EventFlag::Pattern().size() |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Set the bits of bitPattern of this EventFlag object ON.
Let selfPattern is the bit pattern of this EventFlag object: Bitwise operation is (selfPattern |= bitPattern)
bitPattern | Requested bit pattern |
OK | Always success |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Set all the bits of this EventFlag object ON.
OK | Always success |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Set the bit at position pos of this EventFlag object ON.
pos | Position of the bit |
OK | Success |
InvalidParameter | pos >= EventFlag::Pattern().size() |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Block the current thread until the condition is satisfied but only within the limited time.
Let selfPattern is the bit pattern of this EventFlag object:
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
bitPattern | Requested bit pattern |
waitMode | Specify EventFlag::OR or EventFlag::AND |
releasedPattern | Pointer of variable that stores the bit pattern of this EventFlag when the condition is satisfied. If null pointer, not accessed |
tmout | The limited time |
OK | Success. The condition is satisfied |
TimedOut | The limited time was elapsed |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
InvalidParameter | All the bits of bitPattern are OFF, or waitMode is invalid value |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Block the current thread until any bit of this EventFlag is set ON but only within the limited time.
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
tmout | The limited time |
OK | Success. Any bit is set ON |
TimedOut | The limited time was elapsed |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Block the current thread until the bit at position pos of this EventFlag is set ON but only within the limited time.
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
pos | Position of the bit |
tmout | The limited time |
OK | Success. The bit at position pos is set ON |
TimedOut | The limited time was elapsed |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
InvalidParameter | pos >= EventFlag::Pattern().size() |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Query without blocking whether the condition is satisfied.
The condition is the same as timedWait().
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
bitPattern | Requested bit pattern |
waitMode | Specify EventFlag::OR or EventFlag::AND |
releasedPattern | Pointer of variable that stores the bit pattern of this EventFlag when the condition is satisfied. If null pointer, not accessed |
OK | Success. The condition is satisfied |
TimedOut | The bit pattern of this EventFlag object is not satisfied the condition |
InvalidParameter | All the bits of bitPattern are OFF, or waitMode is invalid value |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Query without blocking whether any bit of this EventFlag is set ON.
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
OK | Success. Any bit is set ON |
TimedOut | All the bits of this EventFlag object are OFF |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Query without blocking whether the bit at position pos of this EventFlag is set ON.
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
pos | Position of the bit |
OK | Success. The bit at position pos is set ON |
TimedOut | The bit at position pos of this EventFlag object is OFF |
InvalidParameter | pos >= EventFlag::Pattern().size() |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Block the current thread until the condition is satisfied.
The condition is the same as timedWait().
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
bitPattern | Requested bit pattern |
waitMode | Specify EventFlag::OR or EventFlag::AND |
releasedPattern | Pointer of variable that stores the bit pattern of this EventFlag when the condition is satisfied. If null pointer, not accessed |
OK | Success. The condition is satisfied |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
InvalidParameter | All the bits of bitPattern are OFF, or waitMode is invalid value |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Block the current thread until any bit of this EventFlag is set ON.
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
OK | Success. Any bit is set ON |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
Implements OSWrapper::EventFlag.
|
inlinevirtual |
Block the current thread until the bit at position pos of this EventFlag is set ON.
If this EventFlag object has created with auto reset flag, when this method succeeds, the bit pattern of this EventFlag object is all reset OFF.
pos | Position of the bit |
OK | Success. The bit at position pos is set ON |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
InvalidParameter | pos >= EventFlag::Pattern().size() |
Implements OSWrapper::EventFlag.