Go to the documentation of this file.
36 std::string providerSegmentName) :
37 memoryNameSystem(mns),
38 providerSegmentName(providerSegmentName),
49 ARMARX_IMPORTANT <<
"ViewSelection: Waiting for memory '" << coreSegmentID <<
"' ...";
52 memoryWriter = memoryNameSystem.
getWriter(coreSegmentID);
53 memoryReader = memoryNameSystem.
getReader(coreSegmentID);
54 ARMARX_IMPORTANT <<
"ViewSelection: Connected to memory '" << coreSegmentID <<
"'";
73 if (snapshot !=
nullptr)
76 gaze_targets::arondto::GazeTarget::FromAron(snapshot->data()));
93 "ViewSelection::connect() in onConnectComponent()?";
98 ARMARX_WARNING <<
"The target name is empty. Did you forget to initialize it?";
102 gaze_targets::arondto::GazeTarget dto;
109 update.instancesData = {dto.toAron()};
110 memoryWriter.commit(
update);
const auto * findLatestInstance(int instanceIndex=0) const
Find the latest entity instance.
const armem::MemoryID coreSegmentID
Brief description of class targets.
wm::Memory memory
The slice of the memory that matched the query.
QueryInput buildQueryInput() const
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
const std::string GazeTargetCoreSegmentName
Business Object (BO) class of GazeTarget.
void commitGazeTargets(const std::vector< gaze_targets::GazeTarget > &targets)
void latestEntitySnapshot(const MemoryID &entityID)
Writer getWriter(const MemoryID &memoryID)
Get a writer to the given memory name.
Brief description of class memory.
MemoryID withProviderSegmentName(const std::string &name) const
An update of an entity for a specific point in time.
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
void commitGazeTarget(const gaze_targets::GazeTarget &target)
const std::string ViewMemoryName
MemoryID withEntityName(const std::string &name) const
gaze_targets::GazeTarget readGazeTarget(const std::string name)
The memory name system (MNS) client.
Indicates that a query to the Memory Name System failed.
static DateTime Now()
Current time on the virtual clock.
The query::Builder class provides a fluent-style specification of hierarchical queries.
void toAron(arondto::PackagePath &dto, const PackageFileLocation &bo)
Reader getReader(const MemoryID &memoryID)
Get a reader to the given memory name.
QueryResult query(const QueryInput &input) const
Perform a query on the WM.
ViewSelection(armarx::armem::client::MemoryNameSystem &mns, std::string providerSegmentName)