|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Load-test client driving a RequestGateway with binary-protocol requests at a configurable frequency/payload (used by RequestGateway::UnitTest()). More...
#include <RequestClient.h>
Public Member Functions | |
| TestRequestClient (uint32 id) | |
| bool | init (uint16 port, uint32 gatewayCount, double sendfreq, int32 reconnectMS, uint32 payload, const char *longTestName) |
| bool | finishUp () |
| bool | isStillRunning () |
Protected Member Functions | |
| bool | run () |
Protected Attributes | |
| uint32 | id |
| uint16 | port |
| uint32 | gatewayCount |
| double | sendfreq |
| int32 | reconnectMS |
| uint32 | payload |
| std::string | longTestName |
| bool | shouldContinue |
| bool | shouldFinishUp |
| bool | isRunning |
Friends | |
| THREAD_RET THREAD_FUNCTION_CALL | TestRequestClientRun (THREAD_ARG arg) |
Load-test client driving a RequestGateway with binary-protocol requests at a configurable frequency/payload (used by RequestGateway::UnitTest()).
Definition at line 503 of file RequestClient.h.
| cmlabs::TestRequestClient::TestRequestClient | ( | uint32 | id | ) |
Definition at line 889 of file RequestClient.cpp.
References gatewayCount, isRunning, payload, port, reconnectMS, sendfreq, shouldContinue, and shouldFinishUp.
Referenced by TestRequestClientRun.
| bool cmlabs::TestRequestClient::finishUp | ( | ) |
Definition at line 915 of file RequestClient.cpp.
References LOG_SYSTEM, LogPrint, and shouldFinishUp.
| bool cmlabs::TestRequestClient::init | ( | uint16 | port, |
| uint32 | gatewayCount, | ||
| double | sendfreq, | ||
| int32 | reconnectMS, | ||
| uint32 | payload, | ||
| const char * | longTestName ) |
Definition at line 901 of file RequestClient.cpp.
References cmlabs::ThreadManager::CreateThread(), gatewayCount, longTestName, payload, port, reconnectMS, sendfreq, and TestRequestClientRun.
Referenced by cmlabs::RequestGateway::UnitTest().
|
inline |
Definition at line 509 of file RequestClient.h.
References isRunning.
|
protected |
Definition at line 921 of file RequestClient.cpp.
References cmlabs::Stats::add(), cmlabs::RequestClient::addGateway(), cmlabs::DataMessage::copy(), cmlabs::FAILED, cmlabs::RequestClient::finishRequest(), gatewayCount, cmlabs::Stats::getAverage(), cmlabs::RequestReply::getRequestDuration(), cmlabs::RequestReply::getStatus(), cmlabs::GetTimeAgeMS(), cmlabs::GetTimeNow(), cmlabs::RequestReply::isComplete(), isRunning, cmlabs::LOCALERROR, LOG_SYSTEM, LogPrint, cmlabs::NETWORKERROR, NOENC, payload, port, cmlabs::RequestClient::postRequest(), reconnectMS, sendfreq, cmlabs::RequestClient::SendRequestAndWaitForReplyObject(), cmlabs::SERVERERROR, cmlabs::DataMessage::setData(), cmlabs::DataMessage::setString(), shouldContinue, shouldFinishUp, cmlabs::utils::Sleep(), cmlabs::SUCCESS, cmlabs::TIMEOUT, and cmlabs::TOOBUSY.
Referenced by TestRequestClientRun.
|
friend |
Definition at line 1112 of file RequestClient.cpp.
References run(), TestRequestClient(), THREAD_ARG, THREAD_FUNCTION_CALL, THREAD_RET, and thread_ret_val.
Referenced by init().
|
protected |
Definition at line 515 of file RequestClient.h.
Referenced by init(), run(), and TestRequestClient().
|
protected |
Definition at line 513 of file RequestClient.h.
|
protected |
Definition at line 522 of file RequestClient.h.
Referenced by isStillRunning(), run(), and TestRequestClient().
|
protected |
Definition at line 519 of file RequestClient.h.
Referenced by init().
|
protected |
Definition at line 518 of file RequestClient.h.
Referenced by init(), run(), and TestRequestClient().
|
protected |
Definition at line 514 of file RequestClient.h.
Referenced by init(), run(), and TestRequestClient().
|
protected |
Definition at line 517 of file RequestClient.h.
Referenced by init(), run(), and TestRequestClient().
|
protected |
Definition at line 516 of file RequestClient.h.
Referenced by init(), run(), and TestRequestClient().
|
protected |
Definition at line 520 of file RequestClient.h.
Referenced by run(), and TestRequestClient().
|
protected |
Definition at line 521 of file RequestClient.h.
Referenced by finishUp(), run(), and TestRequestClient().