Go to the documentation of this file.
29 #include <VisionX/libraries/armem_human/aron/FaceRecognition.aron.generated.h>
53 prefix +
"loadDummyEntries",
54 "Initialise FaceRecognition segment with some dummy entries.");
69 Segment::loadDummyEntries()
73 using armarx::human::arondto::FaceRecognition;
77 rainer.coreSegmentName =
"Profile";
78 rainer.providerSegmentName =
"jubot_long_term_memory_data";
79 rainer.entityName =
"rainer-kartmann";
82 fr.profileID = rainer;
87 update.instancesData = {fr.toAron()};
95 update.instancesData = {fr.toAron()};
101 std::map<std::string, std::vector<armarx::armem::human::FaceRecognition>>
104 std::map<std::string, std::vector<armarx::armem::human::FaceRecognition>>
115 faceRecognitionMap[provSegment.
name()] = {};
127 armarx::human::arondto::FaceRecognition dto;
128 dto.fromAron(instance.data());
131 armarx::armem::human::FaceRecognition bo;
134 if ((now - instance.metadata().referencedTime) < maxAge)
136 faceRecognitionMap[provSegment.name()].push_back(bo);
142 return faceRecognitionMap;
151 armarx::human::arondto::FaceRecognition dto;
152 dto.fromAron(instance->
data());
const armem::MemoryID FaceRecognitionCoreSegmentID
A bundle of updates to be sent to the memory.
Client-side working entity instance.
Helps connecting a Memory server to the Ice interface.
auto & getLatestSnapshot(int snapshotIndex=0)
Retrieve the latest entity snapshot.
Brief description of class FaceRecognition.
static const std::string CORE_SEGMENT_NAME
std::string coreSegmentName
server::wm::CoreSegment * segmentPtr
MemoryID withProviderSegmentName(const std::string &name) const
wm::CoreSegment & getCoreSegment()
virtual void init() override
bool forEachProviderSegment(ProviderSegmentFunctionT &&func)
An update of an entity for a specific point in time.
auto doLocked(FunctionT &&function) const
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
std::map< std::string, std::vector< armarx::armem::human::FaceRecognition > > getFaceRecognitionEntities(const Duration &maxAge) const
Represents a point in time.
void fromAron(const arondto::MemoryID &dto, MemoryID &bo)
void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
MemoryID withEntityName(const std::string &name) const
MemoryToIceAdapter & iceMemory
bool forEachEntity(EntityFunctionT &&func)
static DateTime Now()
Current time on the virtual clock.
Segment(armem::server::MemoryToIceAdapter &iceMemory)
const DataT & data() const
virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
This file offers overloads of toIce() and fromIce() functions for STL container types.
data::CommitResult commit(const data::Commit &commitIce, Time timeArrived)
const armem::MemoryID MemoryID