MemoryNameSystem.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <mutex>
5#include <string>
6
8
9#include <RobotAPI/interface/armem/mns/MemoryNameSystemInterface.h>
10
11#include "Registry.h"
12
13namespace armarx::armem::mns
14{
15
17 {
18 public:
19 using WaitForServerFuturePtr = AMD_MemoryNameSystemInterface_waitForServerPtr;
20
21
22 public:
23 /**
24 * @brief Store the call in a container for later response.
25 */
26 void waitForServer_async(const AMD_MemoryNameSystemInterface_waitForServerPtr& future,
27 const dto::WaitForServerInput& input);
28
30
31 dto::RegisterServerResult registerServer(const dto::RegisterServerInput& input) override;
32
33
34 /// Builds a RemoteGui grid containing information about registered memories.
36
37
38 private:
39 /// Queued calls to `waitForServer`.
40 std::map<std::string, std::vector<WaitForServerFuturePtr>> waitForServerFutures;
41
42 std::mutex futuresMtx;
43 };
44
45} // namespace armarx::armem::mns
armarx::RemoteGui::Client::GridLayout RemoteGui_buildInfoGrid()
Builds a RemoteGui grid containing information about registered memories.
dto::RegisterServerResult registerServer(const dto::RegisterServerInput &input) override
Register a new memory server or update an existing entry.
void waitForServer_async(const AMD_MemoryNameSystemInterface_waitForServerPtr &future, const dto::WaitForServerInput &input)
Store the call in a container for later response.
AMD_MemoryNameSystemInterface_waitForServerPtr WaitForServerFuturePtr
Registry(const std::string &logTag="MemoryNameSystem Registry")
Definition Registry.cpp:10