ImageRecordingManager.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::RecordingManager
17  * @author Christian R. G. Dreher <c.dreher@kit.edu>
18  * @date 2020
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 
24 #pragma once
25 
26 
27 // STD/STL
28 #include <atomic>
29 #include <map>
30 #include <mutex>
31 #include <optional>
32 #include <shared_mutex>
33 #include <string>
34 
35 // ArmarX
38 #include <VisionX/components/ImageRecordingManager/ImageRecordingManagerInterface.h>
39 
40 
42 {
43 
44  class Component:
45  virtual public armarx::Component,
47  {
48 
49  private:
50 
51  std::shared_mutex m_configs_mx;
52  std::string m_configs_json;
53  std::optional<std::map<std::string, imrec::Config>> m_configs;
54 
55  public:
56 
57  ~Component() override;
58 
59  void onInitComponent() override;
60 
61  void onConnectComponent() override;
62 
63  void onDisconnectComponent() override;
64 
65  void onExitComponent() override;
66 
67  static std::string GetDefaultName();
68 
69  std::string getDefaultName() const override;
70 
72 
73  void configureRecordings(const std::map<std::string, imrec::Config>&, const Ice::Current&) override;
74 
75  void configureRecordingsFromJson(const std::string&, const Ice::Current&) override;
76 
77  std::map<std::string, imrec::Config> getConfiguration(const Ice::Current&) override;
78 
79  bool isConfigured(const Ice::Current&) override;
80 
81  std::map<std::string, visionx::imrecman::StartStopStatus> startRecordings(const Ice::Current&) override;
82 
83  std::map<std::string, visionx::imrec::Status> getRecordingStatuses(const Ice::Current&) override;
84 
85  std::map<std::string, visionx::imrecman::StartStopStatus> stopRecordings(const Ice::Current&) override;
86 
87  };
88 
89 }
90 
91 
92 namespace visionx
93 {
95 }
visionx::ImageRecordingManagerInterface::isConfigured
bool isConfigured()
visionx::ImageRecordingManagerInterface::stopRecordings
imrecman::StartStopStatusesMap stopRecordings()
visionx::imrecman::Component::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: ImageRecordingManager.cpp:66
visionx::imrecman::Component::configureRecordingsFromJson
void configureRecordingsFromJson(const std::string &, const Ice::Current &) override
Definition: ImageRecordingManager.cpp:91
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::imrecman::Component::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ImageRecordingManager.cpp:278
visionx::imrecman
Definition: ImageRecordingManager.h:41
visionx::imrecman::Component::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: ImageRecordingManager.cpp:59
visionx::ImageRecordingManagerInterface
Definition: ImageRecordingManagerInterface.ice:58
visionx::imrecman::Component::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: ImageRecordingManager.cpp:52
visionx::imrecman::Component::~Component
~Component() override
Definition: ImageRecordingManager.cpp:34
visionx::ImageRecordingManagerInterface::startRecordings
imrecman::StartStopStatusesMap startRecordings()
Component.h
visionx::imrecman::Component::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: ImageRecordingManager.cpp:271
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
visionx::ImageRecordingManagerInterface::getConfiguration
imrec::ConfigMap getConfiguration()
IceUtil::Handle< class PropertyDefinitionContainer >
Logging.h
visionx::imrecman::Component::configureRecordings
void configureRecordings(const std::map< std::string, imrec::Config > &, const Ice::Current &) override
Definition: ImageRecordingManager.cpp:73
visionx::imrecman::Component
Definition: ImageRecordingManager.h:44
visionx::imrecman::Component::GetDefaultName
static std::string GetDefaultName()
Definition: ImageRecordingManager.cpp:264
visionx::imrecman::Component::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ImageRecordingManager.cpp:41
visionx::ImageRecordingManagerInterface::getRecordingStatuses
imrec::StatusesMap getRecordingStatuses()