ReasoningMemory.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 Markus Grotz ( markus dot grotz at kit dot edu )
18
* @date 2022
19
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20
* GNU General Public License
21
*/
22
23
#include "
ReasoningMemory.h
"
24
25
#include <SimoxUtility/algorithm/string.h>
26
27
#include <
ArmarXCore/core/exceptions/local/ExpressionException.h
>
28
29
#include <
RobotAPI/libraries/armem/core/error.h
>
30
#include <
RobotAPI/libraries/armem/server/wm/memory_definitions.h
>
31
32
namespace
armarx::armem::server
33
{
34
armarx::PropertyDefinitionsPtr
35
ReasoningMemory::createPropertyDefinitions
()
36
{
37
armarx::PropertyDefinitionsPtr
defs =
38
new
ComponentPropertyDefinitions
(
getConfigIdentifier
());
39
40
setMemoryName
(
"Reasoning"
);
41
return
defs;
42
}
43
44
ReasoningMemory::ReasoningMemory
() : anticipationSegment(iceAdapter())
45
{
46
}
47
48
std::string
49
ReasoningMemory::getDefaultName
()
const
50
{
51
return
"ReasoningMemory"
;
52
}
53
54
void
55
ReasoningMemory::onInitComponent
()
56
{
57
58
{
59
wm::CoreSegment
& cs =
workingMemory
().
addCoreSegment
(
60
"Anticipation"
, armarx::reasoning::arondto::Anticipation::ToAronType());
61
cs.
setMaxHistorySize
(20);
62
}
63
}
64
65
void
66
ReasoningMemory::onConnectComponent
()
67
{
68
}
69
70
void
71
ReasoningMemory::onDisconnectComponent
()
72
{
73
}
74
75
void
76
ReasoningMemory::onExitComponent
()
77
{
78
}
79
}
// namespace armarx::armem::server
ReasoningMemory.h
armarx::armem::server::ReasoningMemory::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition:
ReasoningMemory.cpp:66
armarx::armem::server::ReasoningMemory::getDefaultName
std::string getDefaultName() const override
Definition:
ReasoningMemory.cpp:49
armarx::armem::server::wm::detail::MaxHistorySizeParent::setMaxHistorySize
void setMaxHistorySize(long maxSize)
Sets the maximum history size of entities in this container.
Definition:
MaxHistorySize.h:41
armarx::armem::server::ReasoningMemory::ReasoningMemory
ReasoningMemory()
Definition:
ReasoningMemory.cpp:44
armarx::armem::server::ReasoningMemory::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition:
ReasoningMemory.cpp:35
armarx::armem::server::plugins::ReadWritePluginUser::setMemoryName
void setMemoryName(const std::string &memoryName)
Definition:
ReadWritePluginUser.cpp:29
armarx::armem::server::plugins::ReadWritePluginUser::workingMemory
server::wm::Memory & workingMemory()
Definition:
ReadWritePluginUser.cpp:128
armarx::armem::server::ReasoningMemory::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition:
ReasoningMemory.cpp:71
memory_definitions.h
error.h
armarx::armem::server::ReasoningMemory::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition:
ReasoningMemory.cpp:76
armarx::armem::server
Definition:
GraspMemory.cpp:34
ExpressionException.h
armarx::armem::server::wm::CoreSegment
base::CoreSegmentBase
Definition:
memory_definitions.h:75
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition:
Component.cpp:79
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition:
Component.h:69
IceUtil::Handle
Definition:
forward_declarations.h:30
armarx::armem::server::ReasoningMemory::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition:
ReasoningMemory.cpp:55
armarx::armem::server::wm::Memory::addCoreSegment
CoreSegment & addCoreSegment(const std::string &name, Args... args)
Definition:
memory_definitions.h:151
RobotAPI
components
armem
server
ReasoningMemory
ReasoningMemory.cpp
Generated by
1.8.17