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 std::string getDefaultName() const override;
56
57 protected:
59
60 void onInitComponent() override;
61 void onConnectComponent() override;
62 void onDisconnectComponent() override;
63 void onExitComponent() override;
64
65
66 private:
67 void enableResultImages(size_t numberImages,
68 ImageDimension imageDimension,
69 ImageType imageType,
70 const std::string& name);
71 void fetchUpdates(const armarx::armem::MemoryID& entityID,
72 const std::vector<armarx::armem::MemoryID>& updatedSnapshotIDs);
73
74
75 private:
77 std::mutex armemToImageMutex;
78
81
82 struct Properties
83 {
85
86 std::string providerSegmentName = "ProviderSegmentName";
87 std::string resultImagesName = "(auto)";
88 Eigen::Vector2i fallbackDims{640, 480};
89 };
90
91 Properties p;
92 };
93} // 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.