Go to the documentation of this file.
26 #include <SimoxUtility/algorithm/string.h>
37 #include <RobotAPI/interface/skills/SkillManagerInterface.h>
43 #include <RobotAPI/libraries/skills/core/aron/FluxioSkill.aron.generated.h>
49 ReadWritePluginUser(),
52 statechartListenerProviderSegment(iceAdapter()),
53 executableSkillCoreSegment(iceAdapter()),
54 composedSkillCoreSegment(iceAdapter()),
55 profileCoreSegment(iceAdapter()),
56 skillEventCoreSegment(iceAdapter()),
57 skillExecutionRequestCoreSegment(iceAdapter())
67 const std::string prefix =
"mem.";
68 statechartListenerProviderSegment.
defineProperties(defs, prefix +
"statechartlistener.");
69 executableSkillCoreSegment.
defineProperties(defs, prefix +
"executableskill.");
72 skillExecutionRequestCoreSegment.
defineProperties(defs, prefix +
"executionrequest.");
88 statechartListenerProviderSegment.
init();
89 executableSkillCoreSegment.
init();
90 composedSkillCoreSegment.
init();
91 profileCoreSegment.
init();
92 skillExecutionRequestCoreSegment.
init();
93 skillEventCoreSegment.
init();
111 armem::data::CommitResult
116 armem::data::CommitResult result = ReadWritePluginUser::commit(
commit);
118 skills::callback::dti::SkillProviderCallbackInterfacePrx myPrx;
121 for (
const auto& up :
commit.updates)
123 if (up.entityID.coreSegmentName ==
126 for (
const auto& instance : up.instancesData)
142 const Ice::Current& current)
144 ARMARX_INFO <<
"Adding provider to skill memory: " << info.providerId.providerName;
154 const Ice::Current& current)
162 skills::manager::dto::SkillStatusUpdate
164 const Ice::Current& current)
172 skills::manager::dto::SkillExecutionID
174 const Ice::Current& current)
184 const skills::callback::dto::ProviderID& providerId,
185 const Ice::Current& current)
192 IceUtil::Optional<skills::manager::dto::SkillStatusUpdate>
194 const Ice::Current& current)
200 return op->toManagerIce();
205 skills::manager::dto::SkillStatusUpdateMap
208 skills::manager::dto::SkillStatusUpdateMap
ret;
210 for (
const auto& [k,
v] : updates)
212 ret.insert({k.toManagerIce(),
v.toManagerIce()});
222 const ProfilerStatechartTransitionWithParameters& x,
230 const ProfilerStatechartTransitionWithParametersList& x,
242 composedSkillCoreSegment.
addSkill(skill);
247 return composedSkillCoreSegment.
getSkills();
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)
void saveSkill(const skills::manager::arondto::FluxioSkill &skillt) override
void removeProvider(const skills::manager::dto::ProviderID &provider, const Ice::Current ¤t) override
ReaderT::InputType T & ret
void onExitComponent() override
void addSkill(const skills::manager::arondto::FluxioSkill &skill)
void addProvider(const skills::manager::dto::ProviderInfo &info, const Ice::Current ¤t) override
std::optional< std::vector< skills::manager::arondto::FluxioSkill > > getSkills() const
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 addProfile(const skills::manager::arondto::FluxioProfile &profile)
std::optional< std::vector< skills::manager::arondto::FluxioProfile > > loadProfiles() override
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 &)
std::optional< std::vector< skills::manager::arondto::FluxioSkill > > getSkillsOfProvider(const std::string &providerId) const
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
std::optional< std::vector< skills::manager::arondto::FluxioSkill > > loadCompositeSkillsOfProvider(const std::string &providerId) override
void addProfile(const skills::manager::arondto::FluxioProfile &profile) override
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.
std::optional< std::vector< skills::manager::arondto::FluxioSkill > > loadCompositeSkills() override
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
std::optional< std::vector< skills::manager::arondto::FluxioProfile > > getProfiles() const
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)
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)
void defineProperties(PropertyDefinitionsPtr defs, const std::string &prefix)