Skip to content
Snippets Groups Projects
Commit 53d06560 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Update and add doc

parent b21f4f09
No related branches found
No related tags found
No related merge requests found
#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 An 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment