MemoryPolling.h
Go to the documentation of this file.
1#pragma once
2
3
4#include <mutex>
5#include <string>
6#include <vector>
7
9
14
16
18{
19 class MemoryNameSystem;
20}
21
23{
24
25 class MemoryPolling : virtual public SimpleEventHandler
26 {
27
28 public:
29 MemoryPolling(const std::string& callerId, armem::client::MemoryNameSystem& mns);
30
31 void handleEvent(const armem::wm::EntityInstance& memoryEntity);
32
33 // Non-API.
34 public:
35 ~MemoryPolling() override;
36
37
38 protected:
41
42
43 void onEntityUpdate(const std::vector<armem::MemoryID>& snapshotIDs);
44
45 private:
46 const std::string callerId;
47 armem::client::MemoryNameSystem& memoryNameSystem;
48
49 armem::Time lastMemoryEventReceived;
50
51 armem::client::Reader memoryReader;
52
53 std::mutex eventHandlingMtx;
54
56 };
57
58} // namespace armarx::navigation::client
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
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.
void handleEvents(const armem::wm::Memory &memory)
void handleEvent(const armem::wm::EntityInstance &memoryEntity)
MemoryPolling(const std::string &callerId, armem::client::MemoryNameSystem &mns)
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.