SkillProviderExample.cpp
Go to the documentation of this file.
1 
2 #include "SkillProviderExample.h"
3 
5 {
7  {
8  }
9 
12  {
15  return defs;
16  }
17 
18  std::string
20  {
21  return "SkillProviderExample";
22  }
23 
24  void
26  {
27  // Add example skill
28  ARMARX_INFO << "Adding skill HelloWorldSkill";
29  addSkillFactory<HelloWorldSkill>();
30 
31  // Add another lambda example skill
32  {
34  .description = "This skill does exactly nothing.",
35  .timeout =
37  addSkillFactory(fooDesc,
38  []()
39  {
40  std::cout << "Hello from Foo." << std::endl;
42  });
43  }
44 
45  // Add another example skill
46  ARMARX_INFO << "Adding skill CallbackSkill";
47  addSkillFactory<CallbackSkill>();
48 
49  // Add timeout skill
50  ARMARX_INFO << "Adding skill TimeoutSkill";
51  addSkillFactory<TimeoutSkill>();
52 
53  // chaining
54  ARMARX_INFO << "Adding skill ChainingSkill";
55  addSkillFactory<ChainingSkill>();
56 
57  // incomplete and prepare
58  ARMARX_INFO << "Adding skill IncompleteSkill";
59  addSkillFactory<IncompleteSkill>();
60 
61  // segfault
62  ARMARX_INFO << "Adding skill SegfaultSkill";
63  addSkillFactory<SegfaultSkill>();
64 
65  // random
66  ARMARX_INFO << "Adding skill RandomChainingSkill";
67  addSkillFactory<RandomChainingSkill>();
68 
69  // insta kill
70  ARMARX_INFO << "Adding skill InstaKill";
71  addSkillFactory<InstantKillSkill>();
72 
73  ARMARX_INFO << "Adding skill BusyWaiting";
74  addSkillFactory<BusyWaitingSkill>();
75 
76  ARMARX_INFO << "Adding skill Recursive";
77  addSkillFactory<RecursiveSkill>();
78  }
79 
80  void
82  {
83  }
84 
85  void
87  {
88  }
89 
90  void
92  {
93  }
94 } // namespace armarx::skills::provider
armarx::skills::TerminatedSkillStatus::Succeeded
@ Succeeded
armarx::skills::SkillID::skillName
std::string skillName
Definition: SkillID.h:60
armarx::skills::SkillDescription
Definition: SkillDescription.h:18
armarx::skills::provider::SkillProviderExample::SkillProviderExample
SkillProviderExample()
Definition: SkillProviderExample.cpp:6
armarx::SkillProviderComponentPluginUser
Definition: SkillProviderComponentPlugin.h:120
armarx::skills::provider::SkillProviderExample::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: SkillProviderExample.cpp:25
SkillProviderExample.h
armarx::skills::provider::SkillProviderExample::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: SkillProviderExample.cpp:81
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition: SkillDescription.h:20
armarx::skills::provider::SkillProviderExample::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: SkillProviderExample.cpp:11
armarx::SkillProviderComponentPluginUser::addSkillFactory
skills::SkillBlueprint * addSkillFactory(const skills::SkillDescription &desc, const skills::LambdaSkill::FunctionType &f)
Definition: SkillProviderComponentPlugin.h:172
armarx::skills::provider
Definition: BusyWaiting.cpp:6
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
armarx::skills::provider::SkillProviderExample::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: SkillProviderExample.cpp:91
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::skills::provider::SkillProviderExample::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: SkillProviderExample.cpp:86
armarx::skills::provider::SkillProviderExample::getDefaultName
std::string getDefaultName() const override
Definition: SkillProviderExample.cpp:19
armarx::skills::SkillID
Definition: SkillID.h:17
armarx::core::time::Duration::MilliSeconds
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition: Duration.cpp:55