CppELib 1.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestDoubleOSWrapper::TestDoubleEventFlag Class Reference

#include <TestDoubleEventFlagFactory.h>

Public Member Functions

 TestDoubleEventFlag ()
 
void setCreateArgs (bool autoReset)
 
virtual ~TestDoubleEventFlag ()
 
virtual OSWrapper::Error waitAny ()
 Block the current thread until any bit of this EventFlag is set ON.
 
virtual OSWrapper::Error waitOne (std::size_t pos)
 Block the current thread until the bit at position pos of this EventFlag is set ON.
 
virtual OSWrapper::Error wait (OSWrapper::EventFlag::Pattern bitPattern, OSWrapper::EventFlag::Mode waitMode, OSWrapper::EventFlag::Pattern *releasedPattern)
 Block the current thread until the condition is satisfied.
 
virtual OSWrapper::Error tryWaitAny ()
 Query without blocking whether any bit of this EventFlag is set ON.
 
virtual OSWrapper::Error tryWaitOne (std::size_t pos)
 Query without blocking whether the bit at position pos of this EventFlag is set ON.
 
virtual OSWrapper::Error tryWait (OSWrapper::EventFlag::Pattern bitPattern, OSWrapper::EventFlag::Mode waitMode, OSWrapper::EventFlag::Pattern *releasedPattern)
 Query without blocking whether the condition is satisfied.
 
virtual OSWrapper::Error timedWaitAny (OSWrapper::Timeout tmout)
 Block the current thread until any bit of this EventFlag is set ON but only within the limited time.
 
virtual OSWrapper::Error timedWaitOne (std::size_t pos, OSWrapper::Timeout tmout)
 Block the current thread until the bit at position pos of this EventFlag is set ON but only within the limited time.
 
virtual OSWrapper::Error timedWait (OSWrapper::EventFlag::Pattern bitPattern, OSWrapper::EventFlag::Mode waitMode, OSWrapper::EventFlag::Pattern *releasedPattern, OSWrapper::Timeout tmout)
 Block the current thread until the condition is satisfied but only within the limited time.
 
virtual OSWrapper::Error setAll ()
 Set all the bits of this EventFlag object ON.
 
virtual OSWrapper::Error setOne (std::size_t pos)
 Set the bit at position pos of this EventFlag object ON.
 
virtual OSWrapper::Error set (OSWrapper::EventFlag::Pattern bitPattern)
 Set the bits of bitPattern of this EventFlag object ON.
 
virtual OSWrapper::Error resetAll ()
 Reset all the bits of this EventFlag object OFF.
 
virtual OSWrapper::Error resetOne (std::size_t pos)
 Reset the bit at position pos of this EventFlag object OFF.
 
virtual OSWrapper::Error reset (OSWrapper::EventFlag::Pattern bitPattern)
 Reset the bits of bitPattern of this EventFlag object OFF.
 
virtual OSWrapper::EventFlag::Pattern getCurrentPattern () const
 Get current bit pattern of this EventFlag object.
 

Protected Attributes

bool m_autoReset
 

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 EventFlagcreate (bool autoReset)
 Create an EventFlag object.
 
static void destroy (EventFlag *e)
 Destroy an EventFlag object.
 
- Protected Member Functions inherited from OSWrapper::EventFlag
virtual ~EventFlag ()
 

Constructor & Destructor Documentation

◆ TestDoubleEventFlag()

TestDoubleOSWrapper::TestDoubleEventFlag::TestDoubleEventFlag ( )
inline

◆ ~TestDoubleEventFlag()

virtual TestDoubleOSWrapper::TestDoubleEventFlag::~TestDoubleEventFlag ( )
inlinevirtual

Member Function Documentation

◆ getCurrentPattern()

virtual OSWrapper::EventFlag::Pattern TestDoubleOSWrapper::TestDoubleEventFlag::getCurrentPattern ( ) const
inlinevirtual

Get current bit pattern of this EventFlag object.

Returns
Current bit pattern

Implements OSWrapper::EventFlag.

◆ reset()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::reset ( OSWrapper::EventFlag::Pattern  bitPattern)
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)

Parameters
bitPatternRequested bit pattern
Return values
OKAlways success

Implements OSWrapper::EventFlag.

◆ resetAll()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::resetAll ( )
inlinevirtual

Reset all the bits of this EventFlag object OFF.

Return values
OKAlways success

Implements OSWrapper::EventFlag.

◆ resetOne()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::resetOne ( std::size_t  pos)
inlinevirtual

Reset the bit at position pos of this EventFlag object OFF.

Parameters
posPosition of the bit
Return values
OKSuccess
InvalidParameterpos >= EventFlag::Pattern().size()

Implements OSWrapper::EventFlag.

◆ set()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::set ( OSWrapper::EventFlag::Pattern  bitPattern)
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)

Parameters
bitPatternRequested bit pattern
Return values
OKAlways success

Implements OSWrapper::EventFlag.

◆ setAll()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::setAll ( )
inlinevirtual

Set all the bits of this EventFlag object ON.

Return values
OKAlways success

Implements OSWrapper::EventFlag.

◆ 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
posPosition of the bit
Return values
OKSuccess
InvalidParameterpos >= EventFlag::Pattern().size()

Implements OSWrapper::EventFlag.

◆ timedWait()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::timedWait ( OSWrapper::EventFlag::Pattern  bitPattern,
OSWrapper::EventFlag::Mode  waitMode,
OSWrapper::EventFlag::Pattern releasedPattern,
OSWrapper::Timeout  tmout 
)
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 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
bitPatternRequested bit pattern
waitModeSpecify EventFlag::OR or EventFlag::AND
releasedPatternPointer of variable that stores the bit pattern of this EventFlag when the condition is satisfied. If null pointer, not accessed
tmoutThe limited time
Return values
OKSuccess. The condition is satisfied
TimedOutThe limited time was elapsed
CalledByNonThreadCalled from non thread context (interrupt handler, timer, etc)
InvalidParameterAll 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()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::timedWaitAny ( OSWrapper::Timeout  tmout)
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.

Parameters
tmoutThe limited time
Return values
OKSuccess. Any bit is set ON
TimedOutThe limited time was elapsed
CalledByNonThreadCalled 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()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::timedWaitOne ( std::size_t  pos,
OSWrapper::Timeout  tmout 
)
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.

Parameters
posPosition of the bit
tmoutThe limited time
Return values
OKSuccess. The bit at position pos is set ON
TimedOutThe limited time was elapsed
CalledByNonThreadCalled from non thread context (interrupt handler, timer, etc)
InvalidParameterpos >= 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()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::tryWait ( OSWrapper::EventFlag::Pattern  bitPattern,
OSWrapper::EventFlag::Mode  waitMode,
OSWrapper::EventFlag::Pattern releasedPattern 
)
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.

Parameters
bitPatternRequested bit pattern
waitModeSpecify EventFlag::OR or EventFlag::AND
releasedPatternPointer of variable that stores the bit pattern of this EventFlag when the condition is satisfied. If null pointer, not accessed
Return values
OKSuccess. The condition is satisfied
TimedOutThe bit pattern of this EventFlag object is not satisfied the condition
InvalidParameterAll 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
OKSuccess. Any bit is set ON
TimedOutAll 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
posPosition of the bit
Return values
OKSuccess. The bit at position pos is set ON
TimedOutThe bit at position pos of this EventFlag object is OFF
InvalidParameterpos >= EventFlag::Pattern().size()
Note
Same as timedWaitOne(pos, Timeout::POLLING)

Implements OSWrapper::EventFlag.

◆ wait()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::wait ( OSWrapper::EventFlag::Pattern  bitPattern,
OSWrapper::EventFlag::Mode  waitMode,
OSWrapper::EventFlag::Pattern releasedPattern 
)
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.

Parameters
bitPatternRequested bit pattern
waitModeSpecify EventFlag::OR or EventFlag::AND
releasedPatternPointer of variable that stores the bit pattern of this EventFlag when the condition is satisfied. If null pointer, not accessed
Return values
OKSuccess. The condition is satisfied
CalledByNonThreadCalled from non thread context (interrupt handler, timer, etc)
InvalidParameterAll the bits of bitPattern are OFF, or waitMode is invalid value
Note
Same as timedWait(bitPattern, waitMode, releasedPattern, Timeout::FOREVER)

Implements OSWrapper::EventFlag.

◆ waitAny()

virtual OSWrapper::Error TestDoubleOSWrapper::TestDoubleEventFlag::waitAny ( )
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.

Return values
OKSuccess. Any bit is set ON
CalledByNonThreadCalled 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
posPosition of the bit
Return values
OKSuccess. The bit at position pos is set ON
CalledByNonThreadCalled from non thread context (interrupt handler, timer, etc)
InvalidParameterpos >= EventFlag::Pattern().size()
Note
Same as timedWaitOne(pos, Timeout::FOREVER)

Implements OSWrapper::EventFlag.

Member Data Documentation

◆ m_autoReset

bool TestDoubleOSWrapper::TestDoubleEventFlag::m_autoReset
protected

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