ReadWritePluginUser.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <RobotAPI/interface/armem/server/MemoryInterface.h>
9 
11 {
12 
13  class Plugin;
14 
15  /**
16  * @brief Base class of memory server components.
17  *
18  * Implements the server ice interfaces using the ice adapter of the plugin.
19  */
21  virtual public ManagedIceObject,
22  virtual public MemoryInterface,
24  {
25  public:
27  virtual ~ReadWritePluginUser() override;
28 
29 
30  void setMemoryName(const std::string& memoryName);
31 
32 
33  // WritingInterface interface
34  virtual data::AddSegmentsResult
35  addSegments(const data::AddSegmentsInput& input,
36  const Ice::Current& = Ice::emptyCurrent) override;
37  data::AddSegmentsResult addSegments(const data::AddSegmentsInput& input,
38  bool addCoreSegments);
39 
40  virtual data::CommitResult commit(const data::Commit& commit,
41  const Ice::Current& = Ice::emptyCurrent) override;
42 
43 
44  // ReadingInterface interface
45  virtual armem::query::data::Result query(const armem::query::data::Input& input,
46  const Ice::Current& = Ice::emptyCurrent) override;
47  virtual armem::structure::data::GetServerStructureResult
48  getServerStructure(const Ice::Current& = Ice::emptyCurrent) override;
49 
50 
51  // StoringInterface interface
52  virtual dto::DirectlyStoreResult
53  directlyStore(const dto::DirectlyStoreInput&,
54  const Ice::Current& = Ice::emptyCurrent) override;
55  virtual dto::StartRecordResult
56  startRecord(const dto::StartRecordInput& startRecordInput,
57  const Ice::Current& = Ice::emptyCurrent) override;
58  virtual dto::StopRecordResult stopRecord(const Ice::Current& = Ice::emptyCurrent) override;
59  virtual dto::RecordStatusResult
60  getRecordStatus(const Ice::Current& = Ice::emptyCurrent) override;
61 
62  // ActionsInterface interface
63  virtual armem::actions::GetActionsOutputSeq
64  getActions(const armem::actions::GetActionsInputSeq& inputs);
65  virtual armem::actions::ExecuteActionOutputSeq
66  executeActions(const armem::actions::ExecuteActionInputSeq& inputs);
67 
68  virtual armem::actions::GetActionsOutputSeq
69  getActions(const armem::actions::GetActionsInputSeq& inputs,
70  const ::Ice::Current&) override;
71  virtual armem::actions::ExecuteActionOutputSeq
72  executeActions(const armem::actions::ExecuteActionInputSeq& inputs,
73  const ::Ice::Current&) override;
74 
75  // PredictingInterface interface
76  virtual armem::prediction::data::PredictionResultSeq
77  predict(const armem::prediction::data::PredictionRequestSeq& requests);
78 
79  // Unless you need very unusual behavior from this method for your memory server,
80  // it is better to set the available prediction engines in the memory itself
81  // and let it handle the requests than to override this.
82  virtual armem::prediction::data::EngineSupportMap getAvailableEngines();
83 
84  virtual armem::prediction::data::PredictionResultSeq
85  predict(const armem::prediction::data::PredictionRequestSeq& requests,
86  const ::Ice::Current&) override;
87  virtual armem::prediction::data::EngineSupportMap
88  getAvailableEngines(const ::Ice::Current&) override;
89 
90  //test
92 
93  public:
95 
98 
100 
101 
102  private:
103  plugins::Plugin* plugin = nullptr;
104  };
105 
106 } // namespace armarx::armem::server::plugins
107 
108 namespace armarx::armem::server
109 {
111 }
armarx::armem::server::plugins::ReadWritePluginUser::predict
virtual armem::prediction::data::PredictionResultSeq predict(const armem::prediction::data::PredictionRequestSeq &requests)
Definition: ReadWritePluginUser.cpp:153
armarx::armem::server::plugins::ReadWritePluginUser::directlyStore
virtual dto::DirectlyStoreResult directlyStore(const dto::DirectlyStoreInput &, const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:71
armarx::armem::server::plugins::ReadWritePluginUser::query
virtual armem::query::data::Result query(const armem::query::data::Input &input, const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:56
armarx::armem::server::MemoryToIceAdapter
Helps connecting a Memory server to the Ice interface.
Definition: MemoryToIceAdapter.h:19
armarx::armem::server::plugins::ReadWritePluginUser::getServerStructure
virtual armem::structure::data::GetServerStructureResult getServerStructure(const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:63
armarx::armem::server::plugins::ReadWritePluginUser::ReadWritePluginUser
ReadWritePluginUser()
Definition: ReadWritePluginUser.cpp:15
armarx::armem::server::plugins::ReadWritePluginUser::stopRecord
virtual dto::StopRecordResult stopRecord(const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:86
armarx::armem::server::plugins::ReadWritePluginUser::setMemoryName
void setMemoryName(const std::string &memoryName)
Definition: ReadWritePluginUser.cpp:25
armarx::armem::server::plugins::ReadWritePluginUser::getActions
virtual armem::actions::GetActionsOutputSeq getActions(const armem::actions::GetActionsInputSeq &inputs)
Definition: ReadWritePluginUser.cpp:132
armarx::armem::server::plugins::ReadWritePluginUser::workingMemory
server::wm::Memory & workingMemory()
Definition: ReadWritePluginUser.cpp:106
armarx::armem::server::plugins::ReadWritePluginUser::getAvailableEngines
virtual armem::prediction::data::EngineSupportMap getAvailableEngines()
Definition: ReadWritePluginUser.cpp:159
armarx::armem::server::ltm::Memory
A memory storing data on the hard drive and in mongodb (needs 'armarx memory start' to start the mong...
Definition: Memory.h:19
armarx::armem::server::wm::Memory
Definition: memory_definitions.h:136
ManagedIceObject.h
armarx::armem::server::plugins::ReadWritePluginUser::addSegments
virtual data::AddSegmentsResult addSegments(const data::AddSegmentsInput &input, const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:32
actions.h
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:19
armarx::armem::server::plugins::ReadWritePluginUser
Base class of memory server components.
Definition: ReadWritePluginUser.h:20
armarx::armem::CommitResult
Result of a Commit.
Definition: Commit.h:110
armarx::armem::server::plugins::ReadWritePluginUser::iceAdapter
MemoryToIceAdapter & iceAdapter()
Definition: ReadWritePluginUser.cpp:112
armarx::armem::server::plugins::ReadWritePluginUser::memoryServerPlugin
Plugin & memoryServerPlugin()
Definition: ReadWritePluginUser.cpp:100
armarx::armem::server::plugins::ReadWritePluginUser::~ReadWritePluginUser
virtual ~ReadWritePluginUser() override
Definition: ReadWritePluginUser.cpp:20
armarx::armem::server
Definition: GraspMemory.cpp:19
armarx::armem::server::plugins::ReadWritePluginUser::commit
virtual data::CommitResult commit(const data::Commit &commit, const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:48
armarx::armem::server::plugins::ReadWritePluginUser::reloadFromLTM
armem::CommitResult reloadFromLTM()
Definition: ReadWritePluginUser.cpp:178
armarx::armem::server::plugins::ReadWritePluginUser::executeActions
virtual armem::actions::ExecuteActionOutputSeq executeActions(const armem::actions::ExecuteActionInputSeq &inputs)
Definition: ReadWritePluginUser.cpp:146
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
forward_declarations.h
armarx::armem::laser_scans::constants::memoryName
const std::string memoryName
Definition: constants.h:28
plugins::Plugin
armarx::armem::server::plugins::ReadWritePluginUser::longtermMemory
server::ltm::Memory & longtermMemory()
Definition: ReadWritePluginUser.cpp:118
armarx::armem::server::plugins
Definition: Plugin.cpp:13
armarx::armem::server::plugins::ReadWritePluginUser::startRecord
virtual dto::StartRecordResult startRecord(const dto::StartRecordInput &startRecordInput, const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:78
armarx::armem::server::plugins::Plugin
Definition: Plugin.h:23
armarx::armem::client::plugins::ListeningPluginUser
A memory name system client which listens to the memory updates topic (MemoryListenerInterface).
Definition: ListeningPluginUser.h:23
ListeningPluginUser.h
armarx::armem::server::plugins::ReadWritePluginUser::getRecordStatus
virtual dto::RecordStatusResult getRecordStatus(const Ice::Current &=Ice::emptyCurrent) override
Definition: ReadWritePluginUser.cpp:93