Component.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 Navigation::ArmarXObjects::ControlMemory
17 * @author Fabian Reister ( fabian dot reister at kit dot edu )
18 * @date 2021
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
27
29
33// #include <ArmarXCore/libraries/ArmarXCoreComponentPlugins/DebugObserverComponentPlugin.h>
34
35#include <mutex>
36
38{
39
40 /**
41 * @defgroup Component-ControlMemory ControlMemory
42 * @ingroup armarx_navigation-Components
43 * A description of the component ControlMemory.
44 *
45 * @class ControlMemory
46 * @ingroup Component-ControlMemory
47 * @brief Brief description of class ControlMemory.
48 *
49 * Detailed description of class ControlMemory.
50 */
51 class Component :
52 virtual public armarx::Component
53 // , virtual public armarx::DebugObserverComponentPluginUser
54 ,
58 {
59 public:
60 /// @see armarx::ManagedIceObject::getDefaultName()
61 std::string getDefaultName() const override;
62 static std::string GetDefaultName();
63
64
65 protected:
66 /// @see PropertyUser::createPropertyDefinitions()
68
69 /// @see armarx::ManagedIceObject::onInitComponent()
70 void onInitComponent() override;
71
72 /// @see armarx::ManagedIceObject::onConnectComponent()
73 void onConnectComponent() override;
74
75 /// @see armarx::ManagedIceObject::onDisconnectComponent()
76 void onDisconnectComponent() override;
77
78 /// @see armarx::ManagedIceObject::onExitComponent()
79 void onExitComponent() override;
80
81
82 void createRemoteGuiTab();
83 void RemoteGui_update() override;
84
85
86 private:
87 void visuRun();
88
89 void loadDefaultConfigs();
90
91
92 private:
93 struct CoreSegmentProperties
94 {
95 std::int64_t maxHistorySize = 100;
96 };
97
98 /// Properties shown in the Scenario GUI.
99 struct Properties
100 {
101 std::string snapshotToLoad = "";
102
104 {
105 bool visuLocations = true;
106 bool visuGraphEdges = true;
107 float visuFrequency = 2;
108 };
109
110 LocationGraph locationGraph;
111
113 {
114 CoreSegmentProperties parameterization;
115 CoreSegmentProperties defaultParameterization;
116 } coreSeg;
117 };
118
119 Properties properties;
120 std::mutex propertiesMutex;
121
122 /// Tab shown in the Remote GUI.
123 struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
124 {
135
136 LocationGraph locationGraph;
137 };
138
139 RemoteGuiTab tab;
140
141 struct Tasks
142 {
144 };
145
146 Tasks tasks;
147 };
148
149} // namespace armarx::control::components::control_memory
Provides a ready-to-use ArViz client arviz as member variable.
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
Component()
Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
Definition Component.cpp:66
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
Base class of memory server components.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition Component.cpp:67
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.