TopicTimingClient.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 RobotAPI::ArmarXObjects::TopicTimingClient
17 * @author Fabian Paus ( fabian dot paus 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
26#include <mutex>
27
28#include <boost/circular_buffer.hpp>
29
31#include <ArmarXCore/interface/observers/ObserverInterface.h>
32
33#include <RobotAPI/interface/core/TopicTimingTest.h>
34
35namespace armarx
36{
37 /**
38 * @class TopicTimingClientPropertyDefinitions
39 * @brief
40 */
46
47 /**
48 * @defgroup Component-TopicTimingClient TopicTimingClient
49 * @ingroup RobotAPI-Components
50 * A description of the component TopicTimingClient.
51 *
52 * @class TopicTimingClient
53 * @ingroup Component-TopicTimingClient
54 * @brief Brief description of class TopicTimingClient.
55 *
56 * Detailed description of class TopicTimingClient.
57 */
59 virtual public armarx::Component,
60 virtual public armarx::topic_timing::Topic
61 {
62 public:
63 /// @see armarx::ManagedIceObject::getDefaultName()
64 virtual std::string getDefaultName() const override;
65
66 // Topic interface
67 void reportSmall(const topic_timing::SmallData& data, const Ice::Current&) override;
68 void reportBig(const topic_timing::BigData& data, const Ice::Current&) override;
69
70 protected:
71 /// @see armarx::ManagedIceObject::onInitComponent()
72 virtual void onInitComponent() override;
73
74 /// @see armarx::ManagedIceObject::onConnectComponent()
75 virtual void onConnectComponent() override;
76
77 /// @see armarx::ManagedIceObject::onDisconnectComponent()
78 virtual void onDisconnectComponent() override;
79
80 /// @see armarx::ManagedIceObject::onExitComponent()
81 virtual void onExitComponent() override;
82
83 /// @see PropertyUser::createPropertyDefinitions()
85
86
87 private:
89
90 std::mutex mutex;
91 IceUtil::Time lastSmallTime = IceUtil::Time::microSeconds(0);
92
93 boost::circular_buffer<IceUtil::Time> updateTimes;
94 int simulateWorkForMS = 20;
95 };
96} // namespace armarx
Default component property definition container.
Definition Component.h:70
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Brief description of class TopicTimingClient.
virtual void onInitComponent() override
void reportBig(const topic_timing::BigData &data, const Ice::Current &) override
virtual void onDisconnectComponent() override
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void reportSmall(const topic_timing::SmallData &data, const Ice::Current &) override
virtual void onConnectComponent() override
virtual void onExitComponent() override
virtual std::string getDefaultName() const override
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.