ArMemToImageProvider.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 VisionX::ArmarXObjects::ArMemToImageProvider
17 * @author Rainer Kartmann ( rainer dot kartmann 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
25#include <mutex>
26
28#include <ArmarXCore/interface/observers/ObserverInterface.h>
29
31
35
36namespace visionx
37{
38
39 /**
40 * @defgroup Component-ArMemToImageProvider ArMemToImageProvider
41 * @ingroup VisionX-Components
42 * A description of the component ArMemToImageProvider.
43 *
44 * @class ArMemToImageProvider
45 * @ingroup Component-ArMemToImageProvider
46 * @brief Brief description of class ArMemToImageProvider.
47 *
48 * Detailed description of class ArMemToImageProvider.
49 */
51 virtual public armarx::Component,
53 {
54 public:
55 static std::string GetDefaultName();
56 std::string getDefaultName() const override;
57
58 protected:
60
61 void onInitComponent() override;
62 void onConnectComponent() override;
63 void onDisconnectComponent() override;
64 void onExitComponent() override;
65
66
67 private:
68 void enableResultImages(size_t numberImages,
69 ImageDimension imageDimension,
70 ImageType imageType,
71 const std::string& name);
72 void fetchUpdates(const armarx::armem::MemoryID& entityID,
73 const std::vector<armarx::armem::MemoryID>& updatedSnapshotIDs);
74
75
76 private:
78 std::mutex armemToImageMutex;
79
82
83 struct Properties
84 {
86
87 std::string providerSegmentName = "ProviderSegmentName";
88 std::string resultImagesName = "(auto)";
89 Eigen::Vector2i fallbackDims{640, 480};
90 };
91
92 Properties p;
93 };
94} // namespace visionx
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
Brief description of class ArMemToImageProvider.
void onInitComponent() override
Pure virtual hook for the subclass.
void onDisconnectComponent() override
Hook for subclass.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
Pure virtual hook for the subclass.
void onExitComponent() override
Hook for subclass.
std::string getDefaultName() const override
Retrieve default name of component.
client::plugins::ListeningPluginUser ListeningClientPluginUser
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
ArmarX headers.