Repeated polling until some condition comes true. For more info about usage see Using PollingCheck. More...
#include <PollingCheck.h>
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. | |
IEventReceiver * | m_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. |
Repeated polling until some condition comes true. For more info about usage see Using PollingCheck.
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.
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 |