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",
17  .rootProfileDefaults = armarx::aron::make_dict(),
19  }
20 
22  TimeoutSkill::step()
23  {
24  // do heavy work
25  std::this_thread::sleep_for(std::chrono::milliseconds(50));
26 
28  }
29 } // namespace armarx::skills::provider
armarx::skills::provider::TimeoutSkill::GetSkillDescription
static SkillDescription GetSkillDescription()
Definition: Timeout.cpp:13
armarx::aron::make_dict
aron::data::DictPtr make_dict(_Args &&... args)
Definition: Dict.h:107
armarx::skills::SkillID::skillName
std::string skillName
Definition: SkillID.h:41
armarx::skills::PeriodicSkill
Definition: PeriodicSkill.h:33
armarx::skills::SkillDescription
Definition: SkillDescription.h:17
armarx::core::time::Frequency
Represents a frequency.
Definition: Frequency.h:16
armarx::skills::provider::TimeoutSkill::TimeoutSkill
TimeoutSkill()
Definition: Timeout.cpp:7
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition: SkillDescription.h:19
armarx::skills::provider
Definition: BusyWaiting.cpp:6
armarx::skills::ActiveOrTerminatedSkillStatus::Running
@ Running
Timeout.h
armarx::skills::SkillID
Definition: SkillID.h:14
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::core::time::Duration::MilliSeconds
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition: Duration.cpp:48
armarx::skills::PeriodicSkill::StepResult
Definition: PeriodicSkill.h:36