35 defineOptionalProperty<std::string>(
36 "DebugObserverName",
"DebugObserver",
"Name of the topic the DebugObserver listens on");
38 defineOptionalProperty<std::string>(
39 "RemotePingComponentName",
"",
"Name of the remote ping component");
40 defineOptionalProperty<std::string>(
"PingTopicName",
"PingTopic",
"Name of the ping topic");
42 defineOptionalProperty<int>(
"PingProxyDelayMS",
44 "Delay between proxy ping messages: < 0 disable ping; = 0 no "
45 "delay; > 0 enable with delay ");
46 defineOptionalProperty<int>(
"PingTopicDelayMS",
48 "Delay between topic ping messages: < 0 disable ping; = 0 no "
49 "delay; > 0 enable with delay ");
50 defineOptionalProperty<int>(
51 "RemoteTopicSleepDelayMS",
53 "Delay between topic sleep calls: < 0 disable; = 0 no delay; > 0 enable with delay ");
54 defineOptionalProperty<int>(
55 "SleepDuringTopicPing",
57 "Sleep during topic ping: < 0 disable; = 0 no delay; > 0 enable with delay ");
63 return "PingLoadTest";
72 if (getProperty<std::string>(
"RemotePingComponentName").getValue() !=
"")
84 getProperty(RemoteTopicSleepDelayMS,
"RemoteTopicSleepDelayMS");
85 getProperty(SleepDuringTopicPing,
"SleepDuringTopicPing");
96 debugObserver = getTopicFromProperty<DebugObserverInterfacePrx>(
"DebugObserverName");
99 if (getProperty<std::string>(
"RemotePingComponentName").getValue() !=
"")
107 if (PingProxyDelayMS >= 0)
110 this, &PingLoadTest::taskProxyPingRun,
"taskProxyPing");
111 taskProxyPing->start();
113 if (PingTopicDelayMS >= 0)
116 this, &PingLoadTest::taskTopicPingRun,
"taskTopicPing");
117 taskTopicPing->start();
119 if (RemoteTopicSleepDelayMS >= 0)
122 this, &PingLoadTest::taskTopicSleepPingRun,
"taskTopicSleep");
123 taskTopicSleep->start();
128 PingLoadTest::taskProxyPingRun()
130 while (taskProxyPing->isRunning())
138 PingLoadTest::taskTopicPingRun()
141 while (taskTopicPing->isRunning())
150 PingLoadTest::taskTopicSleepPingRun()
152 while (taskTopicSleep->isRunning())
154 pingTopicPrx->remoteTopicSleep(
"__any__", 1000);
182 if (SleepDuringTopicPing > 0)
184 ARMARX_IMPORTANT <<
"seqNr: " << seqNr <<
" sleeping for " << SleepDuringTopicPing <<
"ms";
195 if (targetNameFilter == getName() || targetNameFilter ==
"" || targetNameFilter ==
"__any__")