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
Florian Leander Singer
RobotAPI
Commits
41109c6c
Commit
41109c6c
authored
1 year ago
by
Fabian Tërnava
Browse files
Options
Downloads
Patches
Plain Diff
add new public commitLocking methods (similar to commit) to iceAdapter
parent
65027c47
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp
+44
-0
44 additions, 0 deletions
...ce/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp
source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.h
+2
-0
2 additions, 0 deletions
source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.h
with
46 additions
and
0 deletions
source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp
+
44
−
0
View file @
41109c6c
...
...
@@ -157,6 +157,50 @@ namespace armarx::armem::server
return
this
->
_commit
(
commit
,
false
);
}
data
::
CommitResult
MemoryToIceAdapter
::
commitLocking
(
const
data
::
Commit
&
commitIce
,
Time
timeArrived
)
{
ARMARX_TRACE
;
ARMARX_CHECK_NOT_NULL
(
workingMemory
);
auto
handleException
=
[](
const
std
::
string
&
what
)
{
data
::
CommitResult
result
;
data
::
EntityUpdateResult
&
r
=
result
.
results
.
emplace_back
();
r
.
success
=
false
;
r
.
errorMessage
=
what
;
return
result
;
};
armem
::
Commit
commit
;
try
{
::
armarx
::
armem
::
fromIce
(
commitIce
,
commit
,
timeArrived
);
}
catch
(
const
aron
::
error
::
AronNotValidException
&
e
)
{
throw
;
return
handleException
(
e
.
what
());
}
catch
(
const
Ice
::
Exception
&
e
)
{
throw
;
return
handleException
(
e
.
what
());
}
armem
::
CommitResult
result
=
this
->
commitLocking
(
commit
);
data
::
CommitResult
resultIce
;
toIce
(
resultIce
,
result
);
return
resultIce
;
}
data
::
CommitResult
MemoryToIceAdapter
::
commitLocking
(
const
data
::
Commit
&
commitIce
)
{
ARMARX_TRACE
;
return
commitLocking
(
commitIce
,
armem
::
Time
::
Now
());
}
armem
::
CommitResult
MemoryToIceAdapter
::
commitLocking
(
const
armem
::
Commit
&
commit
)
{
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.h
+
2
−
0
View file @
41109c6c
...
...
@@ -37,6 +37,8 @@ namespace armarx::armem::server
data
::
CommitResult
commit
(
const
data
::
Commit
&
commitIce
,
Time
timeArrived
);
data
::
CommitResult
commit
(
const
data
::
Commit
&
commitIce
);
armem
::
CommitResult
commit
(
const
armem
::
Commit
&
commit
);
data
::
CommitResult
commitLocking
(
const
data
::
Commit
&
commitIce
,
Time
timeArrived
);
data
::
CommitResult
commitLocking
(
const
data
::
Commit
&
commitIce
);
armem
::
CommitResult
commitLocking
(
const
armem
::
Commit
&
commit
);
...
...
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