Go to the documentation of this file.
25 #include <SimoxUtility/algorithm/string.h>
43 ReadWritePluginUser(),
46 statechartListenerProviderSegment(iceAdapter()),
47 executableSkillCoreSegment(iceAdapter()),
48 skillEventCoreSegment(iceAdapter()),
49 skillExecutionRequestCoreSegment(iceAdapter())
59 const std::string prefix =
"mem.";
60 statechartListenerProviderSegment.
defineProperties(defs, prefix +
"statechartlistener.");
61 executableSkillCoreSegment.
defineProperties(defs, prefix +
"executableskill.");
62 skillExecutionRequestCoreSegment.
defineProperties(defs, prefix +
"executionrequest.");
78 statechartListenerProviderSegment.
init();
79 executableSkillCoreSegment.
init();
80 skillExecutionRequestCoreSegment.
init();
81 skillEventCoreSegment.
init();
99 armem::data::CommitResult
104 armem::data::CommitResult result = ReadWritePluginUser::commit(
commit);
106 skills::callback::dti::SkillProviderCallbackInterfacePrx myPrx;
109 for (
const auto& up :
commit.updates)
111 if (up.entityID.coreSegmentName ==
114 for (
const auto& instance : up.instancesData)
130 const Ice::Current& current)
132 ARMARX_INFO <<
"Adding provider to skill memory: " << info.providerId.providerName;
142 const Ice::Current& current)
150 skills::manager::dto::SkillStatusUpdate
152 const Ice::Current& current)
160 skills::manager::dto::SkillExecutionID
162 const Ice::Current& current)
172 const skills::callback::dto::ProviderID& providerId,
173 const Ice::Current& current)
180 IceUtil::Optional<skills::manager::dto::SkillStatusUpdate>
182 const Ice::Current& current)
188 return op->toManagerIce();
193 skills::manager::dto::SkillStatusUpdateMap
196 skills::manager::dto::SkillStatusUpdateMap
ret;
198 for (
const auto& [k,
v] : updates)
200 ret.insert({k.toManagerIce(),
v.toManagerIce()});
210 const ProfilerStatechartTransitionWithParameters& x,
218 const ProfilerStatechartTransitionWithParametersList& x,
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)
void removeProvider(const skills::manager::dto::ProviderID &provider, const Ice::Current ¤t) override
ReaderT::InputType T & ret
void onExitComponent() override
void addProvider(const skills::manager::dto::ProviderInfo &info, const Ice::Current ¤t) override
static SkillStatusUpdate FromIce(const provider::dto::SkillStatusUpdate &update, const std::optional< skills::ProviderID > &providerId=std::nullopt)
IceUtil::Optional< skills::manager::dto::SkillStatusUpdate > getSkillExecutionStatus(const skills::manager::dto::SkillExecutionID &executionId, const Ice::Current ¤t) override
skills::manager::dto::SkillStatusUpdate executeSkill(const skills::manager::dto::SkillExecutionRequest &info, const Ice::Current ¤t) override
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
void removeSkillProvider(const std::string &providerName)
skills::SkillExecutionRequest convertCommit(const aron::data::dto::DictPtr &commitData)
static SkillExecutionRequest FromIce(const manager::dto::SkillExecutionRequest &)
std::string getDefaultName() const override
void onConnectComponent() override
void setMemoryName(const std::string &memoryName)
static ProviderInfo FromIce(const manager::dto::ProviderInfo &)
void reportStatechartTransitionWithParametersList(const ProfilerStatechartTransitionWithParametersList &, const Ice::Current &) override
armem::data::CommitResult commit(const armem::data::Commit &commit, const Ice::Current &) override
skills::manager::dto::SkillExecutionID executeSkillAsync(const skills::manager::dto::SkillExecutionRequest &skillExecutionRequest, const Ice::Current ¤t) override
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)
void reportStatechartTransitionWithParametersList(const ProfilerStatechartTransitionWithParametersList &)
void reportStatechartTransitionWithParameters(const ProfilerStatechartTransitionWithParameters &, const Ice::Current &) override
void updateStatusForSkill(const skills::provider::dto::SkillStatusUpdate &update, const skills::callback::dto::ProviderID &id, const Ice::Current ¤t) override
static constexpr const char * CoreSegmentName
skills::manager::dto::SkillExecutionID executeSkillAsync(const skills::manager::dto::SkillExecutionRequest &info, const Ice::Current ¤t) override
void removeProvider(const skills::manager::dto::ProviderID &provider, const Ice::Current ¤t) override
void onInitComponent() override
void reportStatechartTransitionWithParameters(const ProfilerStatechartTransitionWithParameters &)
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
manager::dto::SkillExecutionRequest toManagerIce() const
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
double v(double t, double v0, double a0, double j)
Default component property definition container.
std::map< skills::SkillExecutionID, skills::SkillStatusUpdate > getSkillStatusUpdates()
void addProvider(const skills::manager::dto::ProviderInfo &providerInfo, const Ice::Current ¤t) override
void addSkillUpdateEvent(const skills::SkillStatusUpdate &update)
static SkillExecutionID FromIce(const skills::manager::dto::SkillExecutionID &)
skills::manager::dto::SkillStatusUpdateMap getSkillExecutionStatuses(const Ice::Current ¤t) override
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)
skills::manager::dto::SkillStatusUpdate executeSkill(const skills::manager::dto::SkillExecutionRequest &info, const Ice::Current ¤t) override
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)
std::optional< skills::SkillStatusUpdate > getSkillStatusUpdate(const skills::SkillExecutionID &id)
void addSkillExecutionRequest(const skills::SkillExecutionRequest &info)
This file offers overloads of toIce() and fromIce() functions for STL container types.
static ProviderID FromIce(const manager::dto::ProviderID &)
void addSkillProvider(const skills::ProviderInfo &info)