PingLoadTest.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarXCore::ArmarXObjects::PingLoadTest
17 * @author Simon Ottenhaus ( simon dot ottenhaus at kit dot edu )
18 * @date 2019
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25
27#include <ArmarXCore/interface/observers/ObserverInterface.h>
28//#include <RobotAPI/libraries/core/visualization/DebugDrawerTopic.h>
30#include <ArmarXCore/interface/components/PingLoadTestInterface.h>
31
32namespace armarx
33{
34 /**
35 * @class PingLoadTestPropertyDefinitions
36 * @brief
37 */
43
44 /**
45 * @defgroup Component-PingLoadTest PingLoadTest
46 * @ingroup ArmarXCore-Components
47 * A description of the component PingLoadTest.
48 *
49 * @class PingLoadTest
50 * @ingroup Component-PingLoadTest
51 * @brief Brief description of class PingLoadTest.
52 *
53 * Detailed description of class PingLoadTest.
54 */
55 class PingLoadTest : virtual public PingLoadTestInterface, virtual public armarx::Component
56 {
57 public:
58 /// @see armarx::ManagedIceObject::getDefaultName()
59 virtual std::string getDefaultName() const override;
60
61
62 protected:
63 /// @see armarx::ManagedIceObject::onInitComponent()
64 virtual void onInitComponent() override;
65
66 /// @see armarx::ManagedIceObject::onConnectComponent()
67 virtual void onConnectComponent() override;
68
69 /// @see armarx::ManagedIceObject::onDisconnectComponent()
70 virtual void onDisconnectComponent() override;
71
72 /// @see armarx::ManagedIceObject::onExitComponent()
73 virtual void onExitComponent() override;
74
75 /// @see PropertyUser::createPropertyDefinitions()
77
78
79 private:
80 // Private methods and member variables go here.
81
82 /// Debug observer. Used to visualize e.g. time series.
84 /// Debug drawer. Used for 3D visualization.
85 //armarx::DebugDrawerTopic debugDrawer;
86 std::string remotePingComponentName;
87 PingLoadTestInterfacePrx remotePingPrx;
88 PingLoadTestTopicInterfacePrx pingTopicPrx;
92 int PingProxyDelayMS;
93 int PingTopicDelayMS;
94 int RemoteTopicSleepDelayMS;
95 int SleepDuringTopicPing;
96 int topicPingSeqNr = 0;
97
98
99 // PingLoadTestTopicInterface interface
100 void taskProxyPingRun();
101 void taskTopicPingRun();
102 void taskTopicSleepPingRun();
103
104 public:
105 void pingTopic(int seqNr, Ice::Long senderTime, const Ice::Current&) override;
106 void remoteTopicSleep(const std::string& targetNameFilter,
107 Ice::Long sleepMS,
108 const Ice::Current&) override;
109
110 // PingLoadTestInterface interface
111 public:
112 void ping(Ice::Long senderTime, const Ice::Current&) override;
113 Ice::Long getRemoteTime(const Ice::Current&) override;
114 };
115} // namespace armarx
Default component property definition container.
Definition Component.h:70
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
PingLoadTestPropertyDefinitions(std::string prefix)
Brief description of class PingLoadTest.
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.
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.