TestToolBox::PollingCheck Class Reference

Repeated polling until some condition comes true. For more info about usage see Using PollingCheck. More...

#include <PollingCheck.h>

Collaboration diagram for TestToolBox::PollingCheck:
Collaboration graph
[legend]

List of all members.

Protected Attributes

long m_initialSleepTimeMs
 Initial sleep time before making the first call.
long m_sleepTimeMs
 Delay time between the repeated calls.
long m_timeoutMs
 When this amount of time has elapsed the polling will be stopped with failure.
IEventReceiverm_pEventReceiver
 Interface for receiving all kind of test events.

Configuration



void SetInitialSleepTimeMs (long in_timeMs)
 Set initial sleep time before making the first call.
void SetSleepTimeMs (long in_timeMs)
 Set delay time between the repeated polling calls.
void SetTimeoutMs (long in_timeMs)
 When this amount of time has elapsed the polling will be stopped with failure.
void SetEventReceiver (IEventReceiver *in_pEventReceiver)
 Define to which destination test events (e.g. failures) are reported.

Execute polling



bool Run (BoolFunctor in_functor, char const *in_functionName=0, char const *in_argValue=0, char const *in_file=0, long in_lineNum=0)
 Execute the check for some condition by calling repeatedly the functor until true is returned or the configured timeout has elapsed.

Detailed Description

Repeated polling until some condition comes true. For more info about usage see Using PollingCheck.

See also:
PollingCheck.h (File documentation)
TestPollingCheck (unit test for class Environment)
Using PollingCheck (Usage documentation)

Member Function Documentation

bool TestToolBox::PollingCheck::Run ( BoolFunctor  in_functor,
char const *  in_functionName = 0,
char const *  in_argValue = 0,
char const *  in_file = 0,
long  in_lineNum = 0 
)

Execute the check for some condition by calling repeatedly the functor until true is returned or the configured timeout has elapsed.

Returns:
false if condition was not fulfilled and timeout has elapsed
Parameters:
in_functor function checking condition
in_functionName optional function name for protocol
in_argValue optional argument value for protocol
in_file optional file name used in case of error
in_lineNum optional line number used in case of error

The documentation for this class was generated from the following file:
Generated on Fri May 27 22:57:02 2011 for TestToolBox by  doxygen 1.6.3