36 "DebugObserverName",
"DebugObserver",
"Name of the topic the DebugObserver listens on");
39 "RemotePingComponentName",
"",
"Name of the remote ping component");
44 "Delay between proxy ping messages: < 0 disable ping; = 0 no "
45 "delay; > 0 enable with delay ");
48 "Delay between topic ping messages: < 0 disable ping; = 0 no "
49 "delay; > 0 enable with delay ");
51 "RemoteTopicSleepDelayMS",
53 "Delay between topic sleep calls: < 0 disable; = 0 no delay; > 0 enable with delay ");
55 "SleepDuringTopicPing",
57 "Sleep during topic ping: < 0 disable; = 0 no delay; > 0 enable with delay ");
63 return "PingLoadTest";
84 getProperty(RemoteTopicSleepDelayMS,
"RemoteTopicSleepDelayMS");
85 getProperty(SleepDuringTopicPing,
"SleepDuringTopicPing");
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__")
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
TopicProxyType getTopicFromProperty(const std::string &propertyName)
Get a topic proxy whose name is specified by the given property.
bool usingProxyFromProperty(const std::string &propertyName, const std::string &endpoints="")
Use a proxy whose name is specified by the given property.
void offeringTopicFromProperty(const std::string &propertyName)
Offer a topic whose name is specified by the given property.
void usingTopicFromProperty(const std::string &propertyName, bool orderedPublishing=false)
Use a topic whose name is specified by the given property.
ProxyType getProxyFromProperty(const std::string &propertyName, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
Get a proxy whose name is specified by the given property.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
std::string getName() const
Retrieve name of object.
PingLoadTestPropertyDefinitions(std::string prefix)
void remoteTopicSleep(const std::string &targetNameFilter, Ice::Long sleepMS, const Ice::Current &) override
virtual void onInitComponent() override
void pingTopic(int seqNr, Ice::Long senderTime, const Ice::Current &) override
virtual void onDisconnectComponent() override
Ice::Long getRemoteTime(const Ice::Current &) override
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void onConnectComponent() override
void ping(Ice::Long senderTime, const Ice::Current &) override
virtual void onExitComponent() override
virtual std::string getDefaultName() const override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
static IceUtil::Time GetTime(TimeMode timeMode=TimeMode::VirtualTime)
Get the current time.
static void SleepMS(float milliseconds)
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.