Timeout.cpp
Go to the documentation of this file.
1 
2 #include "Timeout.h"
3 
5 {
6 
8  PeriodicSkill(GetSkillDescription(), armarx::core::time::Frequency::Hertz(5))
9  {
10  }
11 
14  {
15  return SkillDescription{.skillId = SkillID{.skillName = "Timeout"},
16  .description = "This fails with timeout reached",
18  }
19 
21  TimeoutSkill::step()
22  {
23  // do heavy work
24  std::this_thread::sleep_for(std::chrono::milliseconds(50));
25 
27  }
28 } // namespace armarx::skills::provider
armarx::skills::provider::TimeoutSkill::GetSkillDescription
static SkillDescription GetSkillDescription()
Definition: Timeout.cpp:13
armarx::skills::SkillID::skillName
std::string skillName
Definition: SkillID.h:60
armarx::skills::PeriodicSkill
Definition: PeriodicSkill.h:33
armarx::skills::SkillDescription
Definition: SkillDescription.h:18
armarx::core::time::Frequency
Represents a frequency.
Definition: Frequency.h:17
armarx::skills::provider::TimeoutSkill::TimeoutSkill
TimeoutSkill()
Definition: Timeout.cpp:7
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition: SkillDescription.h:20
armarx::skills::provider
Definition: BusyWaiting.cpp:6
armarx::skills::ActiveOrTerminatedSkillStatus::Running
@ Running
Timeout.h
armarx::skills::SkillID
Definition: SkillID.h:17
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::core::time::Duration::MilliSeconds
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition: Duration.cpp:55
armarx::skills::PeriodicSkill::StepResult
Definition: PeriodicSkill.h:36