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
53d06560
Commit
53d06560
authored
1 year ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Update and add doc
parent
b21f4f09
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/armem/client/Query.h
+26
-11
26 additions, 11 deletions
source/RobotAPI/libraries/armem/client/Query.h
with
26 additions
and
11 deletions
source/RobotAPI/libraries/armem/client/Query.h
+
26
−
11
View file @
53d06560
#pragma once
// RobotAPI
#include
<RobotAPI/interface/armem/query.h>
#include
<RobotAPI/libraries/armem/core/wm/ice_conversions.h>
#include
<RobotAPI/libraries/armem/core/SuccessHeader.h>
#include
<RobotAPI/libraries/armem/core/query/DataMode.h>
#include
<RobotAPI/libraries/armem/core/query/QueryTarget.h>
#include
<RobotAPI/libraries/armem/core/wm/ice_conversions.h>
#include
<RobotAPI/libraries/armem/core/wm/memory_definitions.h>
namespace
armarx
::
armem
::
client
::
query
{
// #include <RobotAPI/libraries/armem/client/query/Builder.h>
class
Builder
;
}
}
// namespace armarx::armem::client::query
namespace
armarx
::
armem
::
client
{
using
QueryBuilder
=
query
::
Builder
;
/**
* @brief A
n update of an entity for a specific point in time
.
* @brief A
query for parts of a memory
.
*/
struct
QueryInput
{
/**
* @brief The queries.
*/
armem
::
query
::
data
::
MemoryQuerySeq
memoryQueries
;
/**
* @brief Whether entity instance data (i.e., their payload) should be transferred.
*/
armem
::
query
::
DataMode
dataMode
;
static
QueryInput
fromIce
(
const
armem
::
query
::
data
::
Input
&
ice
);
armem
::
query
::
data
::
Input
toIce
()
const
;
};
/**
* @brief Result of an `EntityUpdate`.
* @brief Result of a `QueryInput`.
*
* If `success` is false, an error occurred during the query. In this case, `errorMessage` can
* contain more information.
*
* @note An empty result is valid, i.e. successful. In other words, an empty result is not a
* failure. To check whether any entity snapshot matched the query, use `memory.hasSnapshots()`
* or `memory.hasInstances()`.
*
* @see wm::Memory::hasInstances(), wm::Memory::hasSnapshots()
*/
struct
QueryResult
:
public
detail
::
SuccessHeader
{
/**
* @brief The slice of the memory that matched the query.
*
* To check whether the memory contains any snapshots or instances, use
* `memory.hasSnapshots()` or `memory.hasInstances()`.
*/
wm
::
Memory
memory
;
...
...
@@ -48,11 +64,10 @@ namespace armarx::armem::client
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
QueryResult
&
rhs
);
};
void
toIce
(
armem
::
query
::
data
::
Input
&
ice
,
const
QueryInput
&
input
);
void
fromIce
(
const
armem
::
query
::
data
::
Input
&
ice
,
QueryInput
&
input
);
void
toIce
(
armem
::
query
::
data
::
Result
&
ice
,
const
QueryResult
&
result
);
void
fromIce
(
const
armem
::
query
::
data
::
Result
&
ice
,
QueryResult
&
result
);
}
}
// namespace armarx::armem::client
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