DebugObserverComponentPlugin.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 ArmarXGui::ArmarXObjects::ArmarXGuiComponentPlugins
17 * @author Raphael Grimm ( raphael dot grimm 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#include <utility> // for std::forward
26
30
31namespace armarx::plugins
32{
33 /**
34 * @defgroup Library-ArmarXCoreComponentPlugins ArmarXCoreComponentPlugins
35 * @ingroup ArmarXGui
36 * A description of the library ArmarXCoreComponentPlugins.
37 */
38
39 /**
40 * @class DebugObserverComponentPlugin
41 * @ingroup Library-ArmarXCoreComponentPlugins
42 * @brief Brief description of class DebugObserverComponentPlugin.
43 *
44 * Detailed description of class DebugObserverComponentPlugin.
45 */
47 {
48 public:
49 using ComponentPlugin::ComponentPlugin;
50
51 void setDebugObserverTopic(const std::string& name);
52 std::string getDebugObserverTopic();
53
54
55 protected:
56 void preOnInitComponent() override;
57 void postOnInitComponent() override;
58 void preOnConnectComponent() override;
59
61
62
63 private:
64 static constexpr auto _propertyName = "DebugObserverTopicName";
65 std::string _topicName;
66 };
67} // namespace armarx::plugins
68
70
71namespace armarx
72{
74 {
75 public:
77
78
79 public:
81
83
84 template <class... Ts>
85 void
86 setDebugObserverDatafield(Ts&&... ts) const
87 {
88 _debugObserverComponentPlugin->setDebugObserverDatafield(std::forward<Ts>(ts)...);
89 }
90
91 void setDebugObserverChannel(const std::string& channelName,
92 StringVariantBaseMap valueMap) const;
93 void removeDebugObserverChannel(const std::string& channelname) const;
94 void removeDebugObserverDatafield(const std::string& channelName,
95 const std::string& datafieldName) const;
97
99
100 void setDebugObserverBatchModeEnabled(bool enable);
102
103
104 private:
105 DebugObserverComponentPlugin* _debugObserverComponentPlugin{nullptr};
106 };
107} // namespace armarx
armarx::plugins::DebugObserverComponentPlugin DebugObserverComponentPlugin
void setDebugObserverChannel(const std::string &channelName, StringVariantBaseMap valueMap) const
plugins::DebugObserverComponentPlugin & getDebugObserverComponentPlugin()
void removeDebugObserverDatafield(const std::string &channelName, const std::string &datafieldName) const
const DebugObserverInterfacePrx & getDebugObserver() const
void removeDebugObserverChannel(const std::string &channelname) const
DebugObserverHelper(const DebugObserverInterfacePrx &prx=nullptr, bool batchmode=false)
ManagedIceObject(ManagedIceObject const &other)
Brief description of class DebugObserverComponentPlugin.
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
std::map< std::string, VariantBasePtr > StringVariantBaseMap
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.