Writer.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 RobotAPI::ArmarXObjects::
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
25#include <mutex>
26
28
29#include <RobotAPI/interface/units/LaserScannerUnit.h>
32
34{
35
36 /**
37 * @defgroup Component-ExampleClient ExampleClient
38 * @ingroup RobotAPI-Components
39 * A description of the component ExampleClient.
40 *
41 * @class ExampleClient
42 * @ingroup Component-ExampleClient
43 * @brief Brief description of class ExampleClient.
44 *
45 * Detailed description of class ExampleClient.
46 */
47 class Writer
48 {
49 public:
50 Writer();
51 virtual ~Writer();
52
53
54 void connect(armem::client::MemoryNameSystem& memoryNameSystem);
55
56 // MappingDataWriterInterface
57 /// to be called in Component::onConnectComponent
58 // void connect() override;
59
60 /// to be called in Component::addPropertyDefinitions
62
63 bool storeSensorData(const LaserScan& laserScan,
64 const std::string& frame,
65 const std::string& agentName,
66 const armem::Time& timestamp);
67
68 private:
69 armem::client::Writer memoryWriter;
70
71 // Properties
72 struct Properties
73 {
74 } properties;
75
76 std::mutex memoryWriterMutex;
77
78 const std::string propertyPrefix = "mem.vision.laser_scans.";
79 };
80
81} // namespace armarx::armem::laser_scans::client
std::string timestamp()
The memory name system (MNS) client.
Helps a memory client sending data to a memory.
Definition Writer.h:23
bool storeSensorData(const LaserScan &laserScan, const std::string &frame, const std::string &agentName, const armem::Time &timestamp)
Definition Writer.cpp:49
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
Definition Writer.cpp:27
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
to be called in Component::onConnectComponent
Definition Writer.cpp:19
armarx::core::time::DateTime Time
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.