Go to the documentation of this file.
3 #include <SimoxUtility/algorithm/string.h>
6 #include <RobotAPI/libraries/armem_skills/aron/Skill.aron.generated.h>
36 armarx::skills::arondto::SkillStatusUpdate event;
43 auto aron =
event.toAron();
46 auto& entityUpdate = comm.
add();
49 entityUpdate.instancesData = {aron};
50 entityUpdate.entityID = commitId;
55 std::map<skills::SkillExecutionID, skills::SkillStatusUpdate>
58 std::map<skills::SkillExecutionID, skills::SkillStatusUpdate>
ret;
62 coreSegment->forEachInstance(
65 auto event = i.
dataAs<armarx::skills::arondto::SkillStatusUpdate>();
69 if (
auto it =
ret.find(up.executionId); it !=
ret.end() && up < it->second)
75 ret[up.executionId] = up;
86 std::optional<skills::SkillStatusUpdate>
89 std::optional<skills::SkillStatusUpdate>
ret = std::nullopt;
93 coreSegment->forEachInstance(
96 auto event = i.
dataAs<armarx::skills::arondto::SkillStatusUpdate>();
100 if (up.executionId ==
id)
102 if (!
ret || (
ret.has_value() && *
ret < up))
ReaderT::InputType T & ret
This file is part of ArmarX.
std::string providerSegmentName
A bundle of updates to be sent to the memory.
Client-side working entity instance.
Helps connecting a Memory server to the Ice interface.
float confidence
An optional confidence, may be used for things like decay.
void toAron(arondto::MemoryID &dto, const MemoryID &bo)
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
SkillEventCoreSegment(armem::server::MemoryToIceAdapter &iceMemory)
server::wm::CoreSegment * segmentPtr
AronDtoT dataAs() const
Get the data converted to a generated Aron DTO class.
virtual void init() override
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
void fromAron(const arondto::MemoryID &dto, MemoryID &bo)
MemoryToIceAdapter & iceMemory
std::map< skills::SkillExecutionID, skills::SkillStatusUpdate > getSkillStatusUpdates()
void addSkillUpdateEvent(const skills::SkillStatusUpdate &update)
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)
std::optional< skills::SkillStatusUpdate > getSkillStatusUpdate(const skills::SkillExecutionID &id)
data::CommitResult commitLocking(const data::Commit &commitIce, Time timeArrived)
This file offers overloads of toIce() and fromIce() functions for STL container types.