Reader.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
* @author Fabian Reister ( fabian dot reister at kit dot edu )
17
* @date 2021
18
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19
* GNU General Public License
20
*/
21
22
#pragma once
23
24
#include <mutex>
25
#include <optional>
26
27
#include <
ArmarXCore/core/application/properties/PropertyDefinitionContainer.h
>
28
29
#include <
RobotAPI/libraries/armem/client/MemoryNameSystem.h
>
30
#include <
RobotAPI/libraries/armem/client/Reader.h
>
31
#include <
RobotAPI/libraries/armem_objects/types.h
>
32
33
34
namespace
armarx::armem::attachment
35
{
36
class
Reader
37
{
38
public
:
39
Reader
(
armem::client::MemoryNameSystem
& memoryNameSystem);
40
virtual
~Reader
() =
default
;
41
42
void
registerPropertyDefinitions
(
armarx::PropertyDefinitionsPtr
& def);
43
void
connect
();
44
45
std::vector<ObjectAttachment>
queryObjectAttachments
(
const
armem::Time
& timestamp)
const
;
46
std::vector<ObjectAttachment>
queryObjectAttachments
(
const
armem::Time
& timestamp,
const
std::string& providerName)
const
;
47
48
std::vector<ArticulatedObjectAttachment>
queryArticulatedObjectAttachments
(
const
armem::Time
& timestamp)
const
;
49
std::vector<ArticulatedObjectAttachment>
queryArticulatedObjectAttachments
(
const
armem::Time
& timestamp,
const
std::string& providerName)
const
;
50
51
private
:
52
53
54
struct
Properties
55
{
56
std::string
memoryName
=
"Object"
;
57
std::string coreAttachmentsSegmentName =
"Attachments"
;
58
} properties;
59
60
const
std::string propertyPrefix =
"mem.obj.attachment."
;
61
62
armem::client::MemoryNameSystem
& memoryNameSystem;
63
armem::client::Reader
memoryReader;
64
std::mutex memoryWriterMutex;
65
};
66
67
68
}
// namespace armarx::armem::attachment
armarx::armem::client::Reader
Reads data from a memory server.
Definition:
Reader.h:24
Reader.h
armarx::armem::attachment::Reader::~Reader
virtual ~Reader()=default
armarx::armem::attachment::Reader::connect
void connect()
Definition:
Reader.cpp:87
armarx::armem::attachment::Reader::Reader
Reader(armem::client::MemoryNameSystem &memoryNameSystem)
Definition:
Reader.cpp:69
armarx::armem::attachment::Reader::queryObjectAttachments
std::vector< ObjectAttachment > queryObjectAttachments(const armem::Time ×tamp) const
Definition:
Reader.cpp:104
types.h
armarx::armem::attachment::Reader
Definition:
Reader.h:36
armarx::armem::attachment
Definition:
Reader.cpp:22
armarx::core::time::DateTime
Represents a point in time.
Definition:
DateTime.h:24
PropertyDefinitionContainer.h
armarx::armem::laser_scans::constants::memoryName
const std::string memoryName
Definition:
constants.h:28
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition:
MemoryNameSystem.h:69
MemoryNameSystem.h
armarx::armem::attachment::Reader::registerPropertyDefinitions
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Definition:
Reader.cpp:73
armarx::armem::attachment::Reader::queryArticulatedObjectAttachments
std::vector< ArticulatedObjectAttachment > queryArticulatedObjectAttachments(const armem::Time ×tamp) const
Definition:
Reader.cpp:156
RobotAPI
libraries
armem_objects
client
attachment
Reader.h
Generated on Sat Oct 12 2024 09:14:08 for armarx_documentation by
1.8.17