MemorySubscriber.h
Go to the documentation of this file.
1#pragma once
2
3
4#include <mutex>
5#include <string>
6#include <vector>
7
13
15
17{
18 class MemoryNameSystem;
19}
20
22{
23
24 class MemorySubscriber : virtual public SimpleEventHandler
25 {
26
27 public:
28 MemorySubscriber(const std::string& callerId, armem::client::MemoryNameSystem& mns);
29
34
35 void handleEvent(const armem::wm::EntityInstance& memoryEntity);
36
37 // Non-API.
38 public:
40
41
42 protected:
44
45
46 void onEntityUpdate(const std::vector<armem::MemoryID>& snapshotIDs);
47
48 private:
49 const std::string callerId;
50 armem::client::MemoryNameSystem& memoryNameSystem;
51
52 armem::Time lastMemoryPoll;
53
54 armem::client::Reader memoryReader;
55
56 std::mutex eventHandlingMtx;
57
59 };
60
61} // namespace armarx::navigation::client
The memory name system (MNS) client.
Reads data from a memory server.
Definition Reader.h:25
Client-side working entity instance.
Client-side working memory.
MemorySubscriber(const MemorySubscriber &)=delete
void handleEvents(const armem::wm::Memory &memory)
MemorySubscriber & operator=(const MemorySubscriber &)=delete
void handleEvent(const armem::wm::EntityInstance &memoryEntity)
MemorySubscriber(const std::string &callerId, armem::client::MemoryNameSystem &mns)
MemorySubscriber & operator=(MemorySubscriber &&)=delete
MemorySubscriber(MemorySubscriber &&)=delete
void onEntityUpdate(const std::vector< armem::MemoryID > &snapshotIDs)
This file is part of ArmarX.
armarx::core::time::DateTime Time
This file is part of ArmarX.