Segfault.cpp
Go to the documentation of this file.
1
2
#include "
Segfault.h
"
3
4
namespace
armarx::skills::provider
5
{
6
SegfaultSkill::SegfaultSkill
() :
SimpleSkill
(
GetSkillDescription
())
7
{
8
}
9
10
SkillDescription
11
SegfaultSkill::GetSkillDescription
()
12
{
13
return
SkillDescription
{
14
.skillId =
skills::SkillID
{.skillName =
"Segfault"
},
15
.description =
16
"This skill segfaults while executing. This will kill (Signal 11) the Provider to "
17
"test the stability of the GUI and other components in case of a skill issue."
,
18
19
.rootProfileDefaults =
armarx::aron::make_dict
(),
20
.timeout =
armarx::core::time::Duration::MilliSeconds
(100)};
21
}
22
23
Skill::MainResult
24
SegfaultSkill::main
(
const
MainInput& in)
25
{
26
int
* number =
nullptr
;
27
(*number)++;
28
29
ARMARX_IMPORTANT
<<
"If you can read this in the log, something is really wrong with the "
30
"SegfaultSkill. It should have segfaulted by now..."
;
31
return
{
TerminatedSkillStatus::Succeeded
,
nullptr
};
32
}
33
}
// namespace armarx::skills::provider
Segfault.h
armarx::core::time::Duration::MilliSeconds
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition
Duration.cpp:48
armarx::skills::SimpleSkill
Definition
SimpleSkill.h:10
armarx::skills::SkillID
Definition
SkillID.h:15
armarx::skills::Skill::main
virtual MainResult main()
Override this method with the actual implementation.
Definition
Skill.cpp:542
armarx::skills::provider::SegfaultSkill::GetSkillDescription
static SkillDescription GetSkillDescription()
Definition
Segfault.cpp:11
armarx::skills::provider::SegfaultSkill::SegfaultSkill
SegfaultSkill()
Definition
Segfault.cpp:6
ARMARX_IMPORTANT
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
Definition
Logging.h:190
armarx::aron::make_dict
aron::data::DictPtr make_dict(_Args &&... args)
Definition
Dict.h:107
armarx::skills::provider
Definition
BusyWaiting.cpp:7
armarx::skills::TerminatedSkillStatus::Succeeded
@ Succeeded
Definition
SkillStatusUpdate.h:39
armarx::skills::SkillDescription
Definition
SkillDescription.h:18
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition
Skill.h:62
RobotAPI
components
skills
SkillProviderExample
Segfault.cpp
Generated by
1.13.2