#include <TestDoubleEventFlagFactory.h>
◆ TestDoubleEventFlag()
TestDoubleOSWrapper::TestDoubleEventFlag::TestDoubleEventFlag |
( |
| ) |
|
|
inline |
◆ ~TestDoubleEventFlag()
virtual TestDoubleOSWrapper::TestDoubleEventFlag::~TestDoubleEventFlag |
( |
| ) |
|
|
inlinevirtual |
◆ getCurrentPattern()
Get current bit pattern of this EventFlag object.
- Returns
- Current bit pattern
Implements OSWrapper::EventFlag.
◆ reset()
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)
- Parameters
-
bitPattern | Requested bit pattern |
- Return values
-
Implements OSWrapper::EventFlag.
◆ resetAll()
◆ resetOne()
virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::resetOne |
( |
std::size_t |
pos | ) |
|
|
inlinevirtual |
Reset the bit at position pos of this EventFlag object OFF.
- Parameters
-
- Return values
-
OK | Success |
InvalidParameter | pos >= EventFlag::Pattern().size() |
Implements OSWrapper::EventFlag.
◆ set()
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)
- Parameters
-
bitPattern | Requested bit pattern |
- Return values
-
Implements OSWrapper::EventFlag.
◆ setAll()
◆ setCreateArgs()
void TestDoubleOSWrapper::TestDoubleEventFlag::setCreateArgs |
( |
bool |
autoReset | ) |
|
|
inline |
◆ setOne()
virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::setOne |
( |
std::size_t |
pos | ) |
|
|
inlinevirtual |
Set the bit at position pos of this EventFlag object ON.
- Parameters
-
- Return values
-
OK | Success |
InvalidParameter | pos >= EventFlag::Pattern().size() |
Implements OSWrapper::EventFlag.
◆ timedWait()
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 waitMode is EventFlag::OR, the condition is (selfPattern & bitPattern) != 0
- If waitMode is EventFlag::AND, the condition is (selfPattern & bitPattern) == bitPattern
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.
- Parameters
-
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 |
- Return values
-
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 |
- Note
- If tmout is Timeout::POLLING then this method queries whether the condition has been satisfied without blocking.
-
If tmout is Timeout::FOREVER then this method waits forever until the condition is satisfied.
Implements OSWrapper::EventFlag.
◆ timedWaitAny()
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.
- Parameters
-
- Return values
-
OK | Success. Any bit is set ON |
TimedOut | The limited time was elapsed |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
- Note
- If tmout is Timeout::POLLING then this method queries whether the condition has been satisfied without blocking.
-
If tmout is Timeout::FOREVER then this method waits forever until the condition is satisfied.
Implements OSWrapper::EventFlag.
◆ timedWaitOne()
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.
- Parameters
-
pos | Position of the bit |
tmout | The limited time |
- Return values
-
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() |
- Note
- If tmout is Timeout::POLLING then this method queries whether the condition has been satisfied without blocking.
-
If tmout is Timeout::FOREVER then this method waits forever until the condition is satisfied.
Implements OSWrapper::EventFlag.
◆ tryWait()
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.
- Parameters
-
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 |
- Return values
-
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 |
- Note
- Same as timedWait(bitPattern, waitMode, releasedPattern, Timeout::POLLING)
Implements OSWrapper::EventFlag.
◆ tryWaitAny()
virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::tryWaitAny |
( |
| ) |
|
|
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.
- Return values
-
OK | Success. Any bit is set ON |
TimedOut | All the bits of this EventFlag object are OFF |
- Note
- Same as timedWaitAny(Timeout::POLLING)
Implements OSWrapper::EventFlag.
◆ tryWaitOne()
virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::tryWaitOne |
( |
std::size_t |
pos | ) |
|
|
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.
- Parameters
-
- Return values
-
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() |
- Note
- Same as timedWaitOne(pos, Timeout::POLLING)
Implements OSWrapper::EventFlag.
◆ wait()
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.
- Parameters
-
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 |
- Return values
-
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 |
- Note
- Same as timedWait(bitPattern, waitMode, releasedPattern, Timeout::FOREVER)
Implements OSWrapper::EventFlag.
◆ waitAny()
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.
- Return values
-
OK | Success. Any bit is set ON |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
- Note
- Same as timedWaitAny(Timeout::FOREVER)
Implements OSWrapper::EventFlag.
◆ waitOne()
virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::waitOne |
( |
std::size_t |
pos | ) |
|
|
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.
- Parameters
-
- Return values
-
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() |
- Note
- Same as timedWaitOne(pos, Timeout::FOREVER)
Implements OSWrapper::EventFlag.
◆ m_autoReset
bool TestDoubleOSWrapper::TestDoubleEventFlag::m_autoReset |
|
protected |
The documentation for this class was generated from the following file: