Segfault.cpp
Go to the documentation of this file.
1 
2 #include "Segfault.h"
3 
5 {
6  SegfaultSkill::SegfaultSkill() : SimpleSkill(GetSkillDescription())
7  {
8  }
9 
12  {
13  return SkillDescription{
14  .skillId = skills::SkillID{.skillName = "Segfault"},
15  .description = "This skill segfaults while executing. This will kill (Signal 11) the Provider to test the stability of the GUI and other components in case of a skill issue.",
17  }
18 
20  SegfaultSkill::main(const MainInput& in)
21  {
22  int* number = nullptr;
23  (*number)++;
24 
25  ARMARX_IMPORTANT << "If you can read this in the log, something is really wrong with the "
26  "SegfaultSkill. It should have segfaulted by now...";
27  return {TerminatedSkillStatus::Succeeded, nullptr};
28  }
29 } // namespace armarx::skills::provider
armarx::skills::TerminatedSkillStatus::Succeeded
@ Succeeded
ARMARX_IMPORTANT
#define ARMARX_IMPORTANT
Definition: Logging.h:183
armarx::skills::SkillID::skillName
std::string skillName
Definition: SkillID.h:60
armarx::skills::SkillDescription
Definition: SkillDescription.h:18
armarx::skills::provider::SegfaultSkill::SegfaultSkill
SegfaultSkill()
Definition: Segfault.cpp:6
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition: SkillDescription.h:20
Segfault.h
armarx::skills::provider
Definition: BusyWaiting.cpp:6
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition: Skill.h:48
armarx::skills::SimpleSkill
Definition: SimpleSkill.h:9
armarx::skills::provider::SegfaultSkill::GetSkillDescription
static SkillDescription GetSkillDescription()
Definition: Segfault.cpp:11
armarx::skills::SimpleSkill::main
MainResult main() final
Override this method with the actual implementation. The callback is for status updates to the callin...
Definition: SimpleSkill.cpp:15
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