36 defineOptionalProperty<std::string>(
"DebugObserverName",
"DebugObserver",
"Name of the topic the DebugObserver listens on");
38 defineOptionalProperty<std::string>(
"RemotePingComponentName",
"",
"Name of the remote ping component");
39 defineOptionalProperty<std::string>(
"PingTopicName",
"PingTopic",
"Name of the ping topic");
41 defineOptionalProperty<int>(
"PingProxyDelayMS", -1,
"Delay between proxy ping messages: < 0 disable ping; = 0 no delay; > 0 enable with delay ");
42 defineOptionalProperty<int>(
"PingTopicDelayMS", -1,
"Delay between topic ping messages: < 0 disable ping; = 0 no delay; > 0 enable with delay ");
43 defineOptionalProperty<int>(
"RemoteTopicSleepDelayMS", -1,
"Delay between topic sleep calls: < 0 disable; = 0 no delay; > 0 enable with delay ");
44 defineOptionalProperty<int>(
"SleepDuringTopicPing", -1,
"Sleep during topic ping: < 0 disable; = 0 no delay; > 0 enable with delay ");
50 return "PingLoadTest";
59 if (getProperty<std::string>(
"RemotePingComponentName").getValue() !=
"")
71 getProperty(RemoteTopicSleepDelayMS,
"RemoteTopicSleepDelayMS");
72 getProperty(SleepDuringTopicPing,
"SleepDuringTopicPing");
87 debugObserver = getTopicFromProperty<DebugObserverInterfacePrx>(
"DebugObserverName");
90 if (getProperty<std::string>(
"RemotePingComponentName").getValue() !=
"")
98 if (PingProxyDelayMS >= 0)
101 taskProxyPing->start();
103 if (PingTopicDelayMS >= 0)
106 taskTopicPing->start();
108 if (RemoteTopicSleepDelayMS >= 0)
111 taskTopicSleep->start();
115 void PingLoadTest::taskProxyPingRun()
117 while (taskProxyPing->isRunning())
123 void PingLoadTest::taskTopicPingRun()
126 while (taskTopicPing->isRunning())
133 void PingLoadTest::taskTopicSleepPingRun()
135 while (taskTopicSleep->isRunning())
137 pingTopicPrx->remoteTopicSleep(
"__any__", 1000);
168 if (SleepDuringTopicPing > 0)
170 ARMARX_IMPORTANT <<
"seqNr: " << seqNr <<
" sleeping for " << SleepDuringTopicPing <<
"ms";
178 if (targetNameFilter == getName() || targetNameFilter ==
"" || targetNameFilter ==
"__any__")