36 #include <ArmarXCore/interface/components/EmergencyStopInterface.h>
39 #include <ArmarXGui/interface/RemoteGuiInterface.h>
41 #include <RobotAPI/interface/components/RobotHealthInterface.h>
42 #include <RobotAPI/interface/speech/SpeechInterface.h>
43 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
59 virtual public RobotHealthComponentInterface,
74 void signUp(
const RobotHealthHeartbeatArgs& args,
const Ice::Current& current)
override;
75 void unregister(
const std::string& identifier,
const Ice::Current&)
override;
79 const std::vector<std::string>& tags,
80 const Ice::Current& current)
override;
82 const std::vector<std::string>& tags,
83 const Ice::Current& current)
override;
87 void heartbeat(
const std::string& identifier,
88 const core::time::dto::DateTime& referenceTime,
89 const Ice::Current& current)
override;
91 std::string
getTopicName(
const Ice::Current& current)
override;
93 RobotHealthInfo
getSummary(
const Ice::Current& current)
override;
125 UpdateEntry(
const std::string& name,
129 maximumCycleTimeWarn(maximumCycleTimeWarn),
130 maximumCycleTimeErr(maximumCycleTimeErr)
135 std::vector<std::string> tags;
136 RobotHealthState state = HealthOK;
137 std::string description =
"";
139 bool required =
false;
142 mutable std::mutex mutex;
153 std::deque<TimeInfo> history;
159 void monitorHealthUpdateTaskClb();
161 UpdateEntry* findUpdateEntry(
const std::string& name);
162 std::pair<bool, UpdateEntry&> findOrCreateUpdateEntry(
const std::string& name);
164 void reportDebugObserver();
167 void updateRequiredElements();
168 std::set<std::string> requestedTags()
const;
172 mutable std::mutex updateMutex;
174 std::deque<UpdateEntry> updateEntries;
176 std::map<std::string, std::set<std::string>> tagsPerRequester;
185 EmergencyStopListenerPrx emergencyStopTopicPrx;
186 std::string robotHealthTopicName =
"RobotHealthTopic";
187 AggregatedRobotHealthInterfacePrx aggregatedRobotHealthTopicPrx;
188 RemoteGuiInterfacePrx remoteGuiPrx;
189 long maximumCycleTimeWarnMS = 50;
190 long maximumCycleTimeErrMS = 100;
192 std::string requiredTags;