SkillManagerComponentPluginUser.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <vector>
5 
6 #include <Ice/Current.h>
7 
8 #include <RobotAPI/interface/aron/Aron.h>
9 #include <RobotAPI/interface/skills/SkillManagerInterface.h>
10 #include <RobotAPI/libraries/skills/core/aron/FluxioSkill.aron.generated.h>
11 
13 
14 namespace armarx::plugins
15 {
16  class SkillManagerComponentPlugin; // forward declaration
17 }
18 
19 namespace armarx
20 {
22  virtual public ManagedIceObject,
23  virtual public skills::manager::dti::SkillManagerInterface
24  {
25  public:
27 
28  void addProvider(const skills::manager::dto::ProviderInfo& providerInfo,
29  const Ice::Current& current) override;
30 
31  void removeProvider(const skills::manager::dto::ProviderID& provider,
32  const Ice::Current& current) override;
33 
34  skills::manager::dto::SkillStatusUpdate
35  executeSkill(const skills::manager::dto::SkillExecutionRequest& info,
36  const Ice::Current& current) override;
37 
38  skills::manager::dto::SkillExecutionID
39  executeSkillAsync(const skills::manager::dto::SkillExecutionRequest& skillExecutionRequest,
40  const Ice::Current& current) override;
41 
42  skills::provider::dto::ParameterUpdateResult
43  updateSkillParameters(const skills::manager::dto::SkillExecutionID& executionId,
44  const aron::data::dto::DictPtr& params,
45  const Ice::Current& current) override;
46 
47  void updateStatusForSkill(const skills::provider::dto::SkillStatusUpdate& update,
48  const skills::callback::dto::ProviderID& id,
49  const Ice::Current& current) override;
50 
51  skills::provider::dto::AbortSkillResult
52  abortSkill(const skills::manager::dto::SkillExecutionID& id,
53  const Ice::Current& current) override;
54 
55  skills::provider::dto::AbortSkillResult
56  abortSkillAsync(const skills::manager::dto::SkillExecutionID& id,
57  const Ice::Current& current) override;
58 
59  std::vector<skills::provider::dto::AbortSkillResult>
60  abortAllSkills(const Ice::Current& current) override;
61 
62  std::vector<skills::provider::dto::AbortSkillResult>
63  abortAllSkillsAsync(const Ice::Current& current) override;
64 
65  skills::manager::dto::SkillDescriptionMap
66  getSkillDescriptions(const Ice::Current& current) override;
67 
68  IceUtil::Optional<skills::manager::dto::SkillDescription>
69  getSkillDescription(const skills::manager::dto::SkillID& id,
70  const Ice::Current& current) override;
71 
72  IceUtil::Optional<skills::manager::dto::SkillStatusUpdate>
73  getSkillExecutionStatus(const skills::manager::dto::SkillExecutionID& executionId,
74  const Ice::Current& current) override;
75 
76  skills::manager::dto::SkillStatusUpdateMap
77  getSkillExecutionStatuses(const Ice::Current& current) override;
78 
79  //****************************//
80  //** Fluxio related methods **//
81  //****************************//
82 
83  aron::type::dto::AronObjectPtr getTypes(const Ice::Current& current) override;
84 
85  IceUtil::Optional<std::string> executeFluxioSkill(const std::string& skillId,
86  const std::string& profileId,
87  const Ice::Current& current) override;
88 
89  void abortFluxioSkill(const std::string& executionId, const Ice::Current& current) override;
90 
91  IceUtil::Optional<skills::manager::dto::FluxioSkillStatusUpdateList>
92  getFluxioSkillExecutionStatus(const std::string& executionId,
93  const Ice::Current& current) override;
94 
95  skills::manager::dto::FluxioSkillList getSkillList(const Ice::Current& current) override;
96 
97  IceUtil::Optional<skills::manager::dto::FluxioSkill>
98  getSkill(const std::string& id, const Ice::Current& current) override;
99 
100  bool updateSkill(const std::string& userId,
101  const skills::manager::dto::FluxioSkill& skill,
102  const Ice::Current& current) override;
103 
104  bool updateSkillValues(const std::string& userId,
105  const std::string& skillId,
106  const skills::manager::dto::FluxioParameterList& parameters,
107  const Ice::Current& current) override;
108 
109  bool updateSkillParameterValues(const std::string& userId,
110  const std::string& skillId,
111  const std::string& parameterId,
112  const skills::manager::dto::FluxioValueList& values,
113  const Ice::Current& current) override;
114 
115  IceUtil::Optional<skills::manager::dto::FluxioIdentificatorList>
116  deleteSkill(const std::string& skillId,
117  const std::string& userId,
118  bool dryRun,
119  const Ice::Current& current) override;
120 
121  bool getSkillMutex(const std::string& skillId,
122  const std::string& userId,
123  const Ice::Current& current) override;
124 
125  void deleteSkillMutex(const std::string& skillId,
126  const std::string& userId,
127  const Ice::Current& current) override;
128 
129  IceUtil::Optional<skills::manager::dto::FluxioIdentificatorList>
130  deleteSkillParameter(const std::string& skillId,
131  const std::string& parameterId,
132  const std::string& userId,
133  bool dryRun,
134  const Ice::Current& current) override;
135 
136  IceUtil::Optional<skills::manager::dto::FluxioIdentificatorList>
137  updateSkillParameter(const std::string& skillId,
138  const skills::manager::dto::FluxioParameter& parameter,
139  const std::string& userId,
140  bool dryRun,
141  const Ice::Current& current) override;
142 
143  skills::manager::dto::FluxioProfileList
144  getProfileList(const Ice::Current& current) override;
145 
146  IceUtil::Optional<skills::manager::dto::FluxioProfile>
147  getProfile(const std::string& id, const Ice::Current& current) override;
148 
149  skills::manager::dto::FluxioProfile
150  createProfile(const skills::manager::dto::FluxioProfile& profile,
151  const Ice::Current& current) override;
152 
153  void updateProfile(const skills::manager::dto::FluxioProfile& profile,
154  const Ice::Current& current) override;
155 
156  skills::manager::dto::FluxioProviderList
157  getProviderList(const Ice::Current& current) override;
158 
159  IceUtil::Optional<skills::manager::dto::FluxioProvider>
160  getProvider(const std::string& id, const Ice::Current& current) override;
161 
162  IceUtil::Optional<skills::manager::dto::FluxioSkillList>
163  getSkillsOfProvider(const std::string& id, const Ice::Current& current) override;
164 
165  IceUtil::Optional<skills::manager::dto::FluxioSkill>
166  addSkillToProvider(const std::string& userId,
167  const std::string& providerId,
168  const skills::manager::dto::FluxioSkill& skill,
169  const Ice::Current& current) override;
170 
171  virtual void saveSkill(const skills::manager::arondto::FluxioSkill& skill);
172  virtual std::optional<std::vector<skills::manager::arondto::FluxioSkill>>
174  virtual std::optional<std::vector<skills::manager::arondto::FluxioSkill>>
175  loadCompositeSkillsOfProvider(const std::string& providerId);
176 
177  virtual void addProfile(const skills::manager::arondto::FluxioProfile& profile);
178  virtual std::optional<std::vector<skills::manager::arondto::FluxioProfile>> loadProfiles();
179 
180  private:
182  };
183 } // namespace armarx
armarx::SkillManagerComponentPluginUser::createProfile
skills::manager::dto::FluxioProfile createProfile(const skills::manager::dto::FluxioProfile &profile, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:678
armarx::SkillManagerComponentPluginUser::getProfile
IceUtil::Optional< skills::manager::dto::FluxioProfile > getProfile(const std::string &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:664
armarx::SkillManagerComponentPluginUser::addSkillToProvider
IceUtil::Optional< skills::manager::dto::FluxioSkill > addSkillToProvider(const std::string &userId, const std::string &providerId, const skills::manager::dto::FluxioSkill &skill, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:788
armarx::SkillManagerComponentPluginUser::loadProfiles
virtual std::optional< std::vector< skills::manager::arondto::FluxioProfile > > loadProfiles()
Definition: SkillManagerComponentPluginUser.cpp:901
armarx::SkillManagerComponentPluginUser::getSkillExecutionStatus
IceUtil::Optional< skills::manager::dto::SkillStatusUpdate > getSkillExecutionStatus(const skills::manager::dto::SkillExecutionID &executionId, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:234
armarx::SkillManagerComponentPluginUser::executeSkill
skills::manager::dto::SkillStatusUpdate executeSkill(const skills::manager::dto::SkillExecutionRequest &info, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:74
armarx::SkillManagerComponentPluginUser::deleteSkillParameter
IceUtil::Optional< skills::manager::dto::FluxioIdentificatorList > deleteSkillParameter(const std::string &skillId, const std::string &parameterId, const std::string &userId, bool dryRun, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:587
armarx::SkillManagerComponentPluginUser::getSkillsOfProvider
IceUtil::Optional< skills::manager::dto::FluxioSkillList > getSkillsOfProvider(const std::string &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:748
armarx::SkillManagerComponentPluginUser::getSkillDescriptions
skills::manager::dto::SkillDescriptionMap getSkillDescriptions(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:206
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::SkillManagerComponentPluginUser::getProfileList
skills::manager::dto::FluxioProfileList getProfileList(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:644
armarx::SkillManagerComponentPluginUser::saveSkill
virtual void saveSkill(const skills::manager::arondto::FluxioSkill &skill)
Definition: SkillManagerComponentPluginUser.cpp:874
armarx::SkillManagerComponentPluginUser::addProfile
virtual void addProfile(const skills::manager::arondto::FluxioProfile &profile)
Definition: SkillManagerComponentPluginUser.cpp:894
armarx::SkillManagerComponentPluginUser::loadCompositeSkills
virtual std::optional< std::vector< skills::manager::arondto::FluxioSkill > > loadCompositeSkills()
Definition: SkillManagerComponentPluginUser.cpp:880
armarx::SkillManagerComponentPluginUser::executeSkillAsync
skills::manager::dto::SkillExecutionID executeSkillAsync(const skills::manager::dto::SkillExecutionRequest &skillExecutionRequest, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:83
armarx::SkillManagerComponentPluginUser::getProviderList
skills::manager::dto::FluxioProviderList getProviderList(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:708
armarx::SkillManagerComponentPluginUser::getSkillExecutionStatuses
skills::manager::dto::SkillStatusUpdateMap getSkillExecutionStatuses(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:248
SkillManagerComponentPlugin.h
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::SkillManagerComponentPluginUser::abortAllSkillsAsync
std::vector< skills::provider::dto::AbortSkillResult > abortAllSkillsAsync(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:161
armarx::SkillManagerComponentPluginUser::getSkillDescription
IceUtil::Optional< skills::manager::dto::SkillDescription > getSkillDescription(const skills::manager::dto::SkillID &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:221
armarx::SkillManagerComponentPluginUser::abortSkill
skills::provider::dto::AbortSkillResult abortSkill(const skills::manager::dto::SkillExecutionID &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:105
armarx::plugins
This file is part of ArmarX.
Definition: DebugObserverComponentPlugin.cpp:27
armarx::SkillManagerComponentPluginUser::getProvider
IceUtil::Optional< skills::manager::dto::FluxioProvider > getProvider(const std::string &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:734
armarx::SkillManagerComponentPluginUser::getFluxioSkillExecutionStatus
IceUtil::Optional< skills::manager::dto::FluxioSkillStatusUpdateList > getFluxioSkillExecutionStatus(const std::string &executionId, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:303
armarx::SkillManagerComponentPluginUser
Definition: SkillManagerComponentPluginUser.h:21
armarx::SkillManagerComponentPluginUser::removeProvider
void removeProvider(const skills::manager::dto::ProviderID &provider, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:65
armarx::plugins::SkillManagerComponentPlugin
Definition: SkillManagerComponentPlugin.h:49
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:68
armarx::SkillManagerComponentPluginUser::abortAllSkills
std::vector< skills::provider::dto::AbortSkillResult > abortAllSkills(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:126
armarx::SkillManagerComponentPluginUser::executeFluxioSkill
IceUtil::Optional< std::string > executeFluxioSkill(const std::string &skillId, const std::string &profileId, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:274
armarx::SkillManagerComponentPluginUser::abortFluxioSkill
void abortFluxioSkill(const std::string &executionId, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:296
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:162
armarx::SkillManagerComponentPluginUser::updateStatusForSkill
void updateStatusForSkill(const skills::provider::dto::SkillStatusUpdate &update, const skills::callback::dto::ProviderID &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:195
armarx::SkillManagerComponentPluginUser::deleteSkill
IceUtil::Optional< skills::manager::dto::FluxioIdentificatorList > deleteSkill(const std::string &skillId, const std::string &userId, bool dryRun, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:520
armarx::SkillManagerComponentPluginUser::addProvider
void addProvider(const skills::manager::dto::ProviderInfo &providerInfo, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:40
armarx::SkillManagerComponentPluginUser::updateSkillValues
bool updateSkillValues(const std::string &userId, const std::string &skillId, const skills::manager::dto::FluxioParameterList &parameters, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:444
armarx::SkillManagerComponentPluginUser::updateSkillParameterValues
bool updateSkillParameterValues(const std::string &userId, const std::string &skillId, const std::string &parameterId, const skills::manager::dto::FluxioValueList &values, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:468
armarx::SkillManagerComponentPluginUser::updateSkillParameter
IceUtil::Optional< skills::manager::dto::FluxioIdentificatorList > updateSkillParameter(const std::string &skillId, const skills::manager::dto::FluxioParameter &parameter, const std::string &userId, bool dryRun, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:615
armarx::SkillManagerComponentPluginUser::updateProfile
void updateProfile(const skills::manager::dto::FluxioProfile &profile, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:696
armarx::SkillManagerComponentPluginUser::updateSkillParameters
skills::provider::dto::ParameterUpdateResult updateSkillParameters(const skills::manager::dto::SkillExecutionID &executionId, const aron::data::dto::DictPtr &params, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:92
armarx::SkillManagerComponentPluginUser::loadCompositeSkillsOfProvider
virtual std::optional< std::vector< skills::manager::arondto::FluxioSkill > > loadCompositeSkillsOfProvider(const std::string &providerId)
Definition: SkillManagerComponentPluginUser.cpp:887
armarx::SkillManagerComponentPluginUser::getSkill
IceUtil::Optional< skills::manager::dto::FluxioSkill > getSkill(const std::string &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:363
armarx::SkillManagerComponentPluginUser::abortSkillAsync
skills::provider::dto::AbortSkillResult abortSkillAsync(const skills::manager::dto::SkillExecutionID &id, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:115
armarx::SkillManagerComponentPluginUser::updateSkill
bool updateSkill(const std::string &userId, const skills::manager::dto::FluxioSkill &skill, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:390
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::SkillManagerComponentPluginUser::getSkillList
skills::manager::dto::FluxioSkillList getSkillList(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:327
armarx::SkillManagerComponentPluginUser::getTypes
aron::type::dto::AronObjectPtr getTypes(const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:267
armarx::SkillManagerComponentPluginUser::getSkillMutex
bool getSkillMutex(const std::string &skillId, const std::string &userId, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:571
armarx::SkillManagerComponentPluginUser::deleteSkillMutex
void deleteSkillMutex(const std::string &skillId, const std::string &userId, const Ice::Current &current) override
Definition: SkillManagerComponentPluginUser.cpp:579
armarx::SkillManagerComponentPluginUser::SkillManagerComponentPluginUser
SkillManagerComponentPluginUser()
Definition: SkillManagerComponentPluginUser.cpp:34