SubjectMemory.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package RobotAPI::ArmarXObjects::ExampleMemory
17  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18  * @date 2020
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "SubjectMemory.h"
24 
26 
27 #include <SimoxUtility/algorithm/string.h>
28 
30 
31 
32 namespace armarx
33 {
35  {
37 
38  const std::string prefix = "mem.";
39  defs->optional(memoryName, prefix + "MemoryName", "Name of this memory (server).");
40  mdbMotions.defineProperties(defs, prefix + "mdb.");
41  return defs;
42  }
43 
45  mdbMotions(armem::server::ComponentPluginUser::iceMemory, armem::server::ComponentPluginUser::workingMemoryMutex)
46  {
47 
48  }
49 
50 
51  std::string SubjectMemory::getDefaultName() const
52  {
53  return "MotionMemory";
54  }
55 
57  {
58  workingMemory.name() = memoryName;
59  longtermMemory.name() = memoryName;
60  }
61 
63  {
64  }
65 
67  {
68  }
69 
71  {
72  }
73 }
armarx::armem
Definition: LegacyRobotStateMemoryAdapter.cpp:31
armarx::SubjectMemory::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: SubjectMemory.cpp:70
armarx::armem::base::MemoryBase::name
std::string & name()
Definition: MemoryBase.h:92
armarx::SubjectMemory::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: SubjectMemory.cpp:56
armarx::armem::server::plugins::ReadWritePluginUser::workingMemory
server::wm::Memory & workingMemory()
Definition: ReadWritePluginUser.cpp:106
armarx::SubjectMemory::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: SubjectMemory.cpp:62
error.h
ExpressionException.h
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
armarx::armem::client::ComponentPluginUser
plugins::ListeningPluginUser ComponentPluginUser
Definition: plugins.h:12
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
armarx::SubjectMemory::getDefaultName
std::string getDefaultName() const override
Definition: SubjectMemory.cpp:51
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::SubjectMemory::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: SubjectMemory.cpp:66
armarx::SubjectMemory::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: SubjectMemory.cpp:34
armarx::armem::server::plugins::ReadWritePluginUser::longtermMemory
server::ltm::Memory & longtermMemory()
Definition: ReadWritePluginUser.cpp:118
armarx::SubjectMemory::SubjectMemory
SubjectMemory()
Definition: SubjectMemory.cpp:44
SubjectMemory.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::armem::server::ltm::detail::MemoryItem::name
std::string name() const
Definition: MemoryItem.cpp:43