Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Hofmann
RobotAPI
Commits
66455f74
Commit
66455f74
authored
3 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Revise ltm properties
parent
93957084
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/armem/server/ComponentPlugin.cpp
+14
-9
14 additions, 9 deletions
source/RobotAPI/libraries/armem/server/ComponentPlugin.cpp
source/RobotAPI/libraries/armem/server/ComponentPlugin.h
+1
-0
1 addition, 0 deletions
source/RobotAPI/libraries/armem/server/ComponentPlugin.h
with
15 additions
and
9 deletions
source/RobotAPI/libraries/armem/server/ComponentPlugin.cpp
+
14
−
9
View file @
66455f74
...
...
@@ -18,13 +18,16 @@ namespace armarx::armem::server::plugins
void
ComponentPlugin
::
postCreatePropertyDefinitions
(
PropertyDefinitionsPtr
&
properties
)
{
MemoryNameSystemComponentPlugin
::
postCreatePropertyDefinitions
(
properties
);
properties
->
topic
(
memoryListener
,
this
->
parent
<
ComponentPluginUser
>
().
memoryListenerDefaultName
);
properties
->
optional
(
this
->
parent
<
ComponentPluginUser
>
().
longtermMemory
.
dbsettings
.
host
,
"Longtermmemoryhost"
);
properties
->
optional
(
this
->
parent
<
ComponentPluginUser
>
().
longtermMemory
.
dbsettings
.
port
,
"Longtermmemoryport"
);
properties
->
optional
(
this
->
parent
<
ComponentPluginUser
>
().
longtermMemory
.
dbsettings
.
user
,
"Longtermmemoryuser"
);
properties
->
optional
(
this
->
parent
<
ComponentPluginUser
>
().
longtermMemory
.
dbsettings
.
password
,
"Longtermmemorypassword"
);
properties
->
optional
(
this
->
parent
<
ComponentPluginUser
>
().
longtermMemory
.
dbsettings
.
database
,
"Longtermmemorydatabase"
);
ComponentPluginUser
&
parent
=
this
->
parent
<
ComponentPluginUser
>
();
properties
->
topic
(
memoryListener
,
parent
.
memoryListenerDefaultName
);
properties
->
optional
(
parent
.
longtermMemoryEnabled
,
"ltm.00_enabled"
);
properties
->
optional
(
parent
.
longtermMemory
.
dbsettings
.
host
,
"ltm.10_host"
);
properties
->
optional
(
parent
.
longtermMemory
.
dbsettings
.
port
,
"ltm.11_port"
);
properties
->
optional
(
parent
.
longtermMemory
.
dbsettings
.
user
,
"ltm.20_user"
);
properties
->
optional
(
parent
.
longtermMemory
.
dbsettings
.
password
,
"ltm.21_password"
);
properties
->
optional
(
parent
.
longtermMemory
.
dbsettings
.
database
,
"ltm.22_database"
);
}
...
...
@@ -39,7 +42,10 @@ namespace armarx::armem::server::plugins
parent
.
iceMemory
.
setMemoryListener
(
memoryListener
);
// establishing connection to ltm and mongodb
parent
.
longtermMemory
.
reload
();
if
(
parent
.
longtermMemoryEnabled
)
{
parent
.
longtermMemory
.
reload
();
}
}
...
...
@@ -145,8 +151,7 @@ namespace armarx::armem::server
// LTM LOADING
data
::
StoreResult
ComponentPluginUser
::
store
(
const
data
::
StoreInput
&
input
,
const
Ice
::
Current
&
)
{
std
::
scoped_lock
lock
(
workingMemoryMutex
);
std
::
scoped_lock
lock2
(
longtermMemoryMutex
);
std
::
scoped_lock
lock
(
workingMemoryMutex
,
longtermMemoryMutex
);
return
iceMemory
.
store
(
input
);
}
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/armem/server/ComponentPlugin.h
+
1
−
0
View file @
66455f74
...
...
@@ -100,6 +100,7 @@ namespace armarx::armem::server
wm
::
Memory
workingMemory
;
std
::
mutex
workingMemoryMutex
;
bool
longtermMemoryEnabled
=
true
;
ltm
::
Memory
longtermMemory
;
std
::
mutex
longtermMemoryMutex
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment