SkillImplementationWrapper.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <experimental/memory>
4
#include <shared_mutex>
5
6
#include <RobotAPI/interface/skills/SkillManagerInterface.h>
7
#include <
RobotAPI/libraries/skills/core/Skill.h
>
8
#include <
RobotAPI/libraries/skills/core/SkillDescription.h
>
9
#include <
RobotAPI/libraries/skills/core/SkillPreparationInput.h
>
10
#include <
RobotAPI/libraries/skills/core/SkillStatusUpdate.h
>
11
#include <
RobotAPI/libraries/skills/provider/SkillFactory.h
>
12
13
namespace
armarx
14
{
15
namespace
skills
16
{
17
namespace
detail
18
{
19
class
SkillRuntime
20
{
21
private
:
22
const
std::experimental::observer_ptr<const skills::SkillBlueprint>
factory;
23
24
std::unique_ptr<Skill> skill;
25
mutable
std::mutex executionMutex;
26
27
public
:
28
// Current execution statuses. Changes during execution
29
// The status also holds the used parameterization
30
mutable
std::mutex
skillStatusesMutex
;
31
SkillStatusUpdate
statusUpdate
;
32
33
// Set exteranally to store the execution somewhere
34
std::thread
execution
;
35
36
// ctor
37
SkillRuntime
(
const
skills::SkillBlueprint
* fac,
38
const
skills::SkillExecutionID
&,
39
const
aron::data::DictPtr
&,
40
const
skills::callback::dti::SkillProviderCallbackInterfacePrx&);
41
42
// execute a skill. The parameterization is copied. T
43
// the return type additionally contains the input configuration (similar to the status updates used in callbacks)
44
TerminatedSkillStatusUpdate
executeSkill
();
45
46
// ask a skill to stop. Must be concurrent to execute skill
47
void
stopSkill
();
48
49
// add parameters to a skill. Must be concurrent to execute skill
50
void
updateSkillParameters
(
const
aron::data::DictPtr
& i);
51
};
52
}
// namespace detail
53
}
// namespace skills
54
}
// namespace armarx
armarx::skills::SkillExecutionID
Definition:
SkillExecutionID.h:19
skills
This file is part of ArmarX.
SkillStatusUpdate.h
armarx::skills::detail::SkillRuntime::statusUpdate
SkillStatusUpdate statusUpdate
Definition:
SkillImplementationWrapper.h:31
armarx::skills::detail::SkillRuntime::skillStatusesMutex
std::mutex skillStatusesMutex
Definition:
SkillImplementationWrapper.h:30
SkillFactory.h
detail
Definition:
OpenCVUtil.cpp:127
std::experimental::fundamentals_v2::observer_ptr
Definition:
ManagedIceObject.h:53
armarx::skills::detail::SkillRuntime::execution
std::thread execution
Definition:
SkillImplementationWrapper.h:34
armarx::skills::detail::SkillRuntime::executeSkill
TerminatedSkillStatusUpdate executeSkill()
Definition:
SkillImplementationWrapper.cpp:46
armarx::skills::SkillStatusUpdate
Definition:
SkillStatusUpdate.h:139
Skill.h
armarx::skills::detail::SkillRuntime::updateSkillParameters
void updateSkillParameters(const aron::data::DictPtr &i)
Definition:
SkillImplementationWrapper.cpp:32
armarx::skills::detail::SkillRuntime::stopSkill
void stopSkill()
Definition:
SkillImplementationWrapper.cpp:18
armarx::skills::detail::SkillRuntime
Definition:
SkillImplementationWrapper.h:19
armarx::skills::TerminatedSkillStatusUpdate
Definition:
SkillStatusUpdate.h:79
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition:
Dict.h:41
armarx::skills::SkillBlueprint
Definition:
SkillFactory.h:11
SkillPreparationInput.h
armarx::skills::detail::SkillRuntime::SkillRuntime
SkillRuntime(const skills::SkillBlueprint *fac, const skills::SkillExecutionID &, const aron::data::DictPtr &, const skills::callback::dti::SkillProviderCallbackInterfacePrx &)
Definition:
SkillImplementationWrapper.cpp:7
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
SkillDescription.h
RobotAPI
libraries
skills
provider
detail
SkillImplementationWrapper.h
Generated on Sat Oct 12 2024 09:14:11 for armarx_documentation by
1.8.17