8 #include <RobotAPI/interface/components/RobotHealthInterface.h>
15 const std::vector<std::string>& tags,
16 const std::string& description)
18 RobotHealthHeartbeatArgs argsCopy = defaultHeartbeatArgs;
19 argsCopy.description = description;
20 argsCopy.identifier = identifier;
29 const std::vector<std::string>& tags,
30 const std::string& description)
32 RobotHealthHeartbeatArgs argsCopy = defaultHeartbeatArgs;
33 argsCopy.description = description;
35 argsCopy.identifier = identifier;
36 toIce(argsCopy.maximumCycleTimeWarning, warning);
37 toIce(argsCopy.maximumCycleTimeError, error);
46 const std::vector<std::string>& tags,
47 const std::string& description)
49 RobotHealthHeartbeatArgs argsCopy = defaultHeartbeatArgs;
50 argsCopy.description = description;
52 toIce(argsCopy.maximumCycleTimeWarning, warning);
53 toIce(argsCopy.maximumCycleTimeError, error);
64 if (args.identifier.empty())
66 RobotHealthHeartbeatArgs argsCopy = args;
68 robotHealthComponentPrx->signUp(argsCopy);
73 RobotHealthHeartbeatArgs argsCopy = args;
74 argsCopy.identifier =
parent().
getName() +
"_" + argsCopy.identifier;
75 robotHealthComponentPrx->signUp(argsCopy);
82 if (robotHealthComponentPrx)
84 armarx::core::time::dto::DateTime now;
86 robotHealthComponentPrx->heartbeat(
parent().getName(), now);
97 if (robotHealthComponentPrx)
99 armarx::core::time::dto::DateTime now;
101 robotHealthComponentPrx->heartbeat(
parent().getName() +
"_" + channelName, now);
142 properties->component(
143 robotHealthComponentPrx,
"RobotHealth", healthPropertyName,
"Name of the robot health component.");
146 if (not properties->hasDefinition(
makePropertyName(maximumCycleTimeWarningMSPropertyName)))
148 properties->optional(p.maximumCycleTimeWarningMS,
149 maximumCycleTimeWarningMSPropertyName,
150 "maximum cycle time before warning is emitted");
153 if (not properties->hasDefinition(
makePropertyName(maximumCycleTimeErrorMSPropertyName)))
155 properties->optional(p.maximumCycleTimeErrorMS,
156 maximumCycleTimeErrorMSPropertyName,
157 "maximum cycle time before error is emitted");