SkillImplementationWrapper.h
Go to the documentation of this file.
1#pragma once
2
3#include <experimental/memory>
4#include <memory>
5#include <mutex>
6#include <thread>
7
9
10#include <RobotAPI/interface/skills/SkillProviderInterface.h>
16
17namespace armarx
18{
19 namespace skills
20 {
21 namespace detail
22 {
24 {
25 private:
27
28 std::unique_ptr<Skill> skill;
29 mutable std::mutex executionMutex;
30
31 public:
32 // Current execution statuses. Changes during execution
33 // The status also holds the used parameterization
34 mutable std::mutex skillStatusesMutex;
36
37 // Set exteranally to store the execution somewhere
38 std::thread execution;
39
40 // ctor
44 const skills::callback::dti::SkillProviderCallbackInterfacePrx&);
45
46 // execute a skill. The parameterization is copied. T
47 // the return type additionally contains the input configuration (similar to the status updates used in callbacks)
49
50 // ask a skill to stop. Must be concurrent to execute skill
51 void stopSkill();
52
53 // add parameters to a skill. Must be concurrent to execute skill
55
56 inline void
58 {
59 if (skill)
60 {
61 skill->updateSubSkillStatus(statusUpdate);
62 }
63 }
64 };
65 } // namespace detail
66 } // namespace skills
67} // namespace armarx
Base Class for all Logging classes.
Definition Logging.h:240
void updateSkillParameters(const aron::data::DictPtr &i)
SkillRuntime(const skills::SkillBlueprint *fac, const skills::SkillExecutionID &, const aron::data::DictPtr &, const skills::callback::dti::SkillProviderCallbackInterfacePrx &)
void updateSubSkillStatus(const skills::SkillStatusUpdate &statusUpdate)
std::shared_ptr< Dict > DictPtr
Definition Dict.h:42
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.