MemoryPolling.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
7
9
11
13{
14 class MemoryNameSystem;
15}
16
18{
19
20 /**
21 * @brief Polling delivery: queries the requester's slice of GazeTargetStatus periodically.
22 *
23 * Same dispatch as MemorySubscriber, but usable from contexts that are not a
24 * ListeningPluginUser (statecharts, for instance) at the cost of up to one poll period of
25 * latency.
26 */
28 {
29 public:
30 /// @param providerSegmentName The provider segment the client commits its gaze targets to.
31 MemoryPolling(const std::string& providerSegmentName, armem::client::MemoryNameSystem& mns);
32
33 MemoryPolling(const MemoryPolling&) = delete;
37
38 ~MemoryPolling() override;
39
40 private:
41 void poll();
42
43 const std::string providerSegmentName;
44
45 armem::client::MemoryNameSystem& memoryNameSystem;
46
47 armem::client::Reader memoryReader;
48
49 /// Watermark: everything up to here has been dispatched already.
50 armarx::DateTime lastPolled;
51
53 };
54
55} // namespace armarx::view_selection::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
Represents a point in time.
Definition DateTime.h:25
MemoryPolling & operator=(MemoryPolling &&)=delete
MemoryPolling(const std::string &providerSegmentName, armem::client::MemoryNameSystem &mns)
MemoryPolling(const MemoryPolling &)=delete
MemoryPolling & operator=(const MemoryPolling &)=delete
Turns a queried piece of the GazeTargetStatus core segment into dispatched updates.
This file is part of ArmarX.