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
39#include <VisionX/components/ImageRecordingManager/ImageRecordingManagerInterface.h>
40
42{
43
44 class Component :
45 virtual public armarx::Component,
47 {
48
49 private:
50 std::shared_mutex m_configs_mx;
51 std::string m_configs_json;
52 std::optional<std::map<std::string, imrec::Config>> m_configs;
53
54 public:
55 ~Component() override;
56
57 void onInitComponent() override;
58
59 void onConnectComponent() override;
60
61 void onDisconnectComponent() override;
62
63 void onExitComponent() override;
64
65 static std::string GetDefaultName();
66
67 std::string getDefaultName() const override;
68
70
71 void configureRecordings(const std::map<std::string, imrec::Config>&,
72 const Ice::Current&) override;
73
74 void configureRecordingsFromJson(const std::string&, const Ice::Current&) override;
75
76 std::map<std::string, imrec::Config> getConfiguration(const Ice::Current&) override;
77
78 bool isConfigured(const Ice::Current&) override;
79
80 std::map<std::string, visionx::imrecman::StartStopStatus>
81 startRecordings(const Ice::Current&) override;
82
83 std::map<std::string, visionx::imrec::Status>
84 getRecordingStatuses(const Ice::Current&) override;
85
86 std::map<std::string, visionx::imrecman::StartStopStatus>
87 stopRecordings(const Ice::Current&) override;
88 };
89
90} // namespace visionx::imrecman
91
92namespace visionx
93{
95}
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
void onInitComponent() override
Pure virtual hook for the subclass.
void configureRecordings(const std::map< std::string, imrec::Config > &, const Ice::Current &) override
void onDisconnectComponent() override
Hook for subclass.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void configureRecordingsFromJson(const std::string &, const Ice::Current &) 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.
imrecman::StartStopStatusesMap stopRecordings()
imrec::StatusesMap getRecordingStatuses()
imrecman::StartStopStatusesMap startRecordings()
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
ArmarX headers.
imrecman::Component ImageRecordingManager