34 #include <ArmarXCore/interface/observers/SystemObserverInterface.h>
35 #include <ArmarXCore/interface/observers/VariantBase.h>
41 #define ARMARX_SYSTEM_OBSERVER SystemObserver
86 virtual public SystemObserverInterface
90 void onInitObserver()
override;
105 return "SystemObserver";
115 void startTimer_async(
const AMD_SystemObserverInterface_startTimerPtr& amd,
116 const std::string& timerBaseName,
117 const Ice::Current&
c = Ice::emptyCurrent)
override;
122 void resetTimer_async(
const AMD_SystemObserverInterface_resetTimerPtr& amd,
123 const ChannelRefBasePtr& timer,
124 const Ice::Current&
c = Ice::emptyCurrent)
override;
130 void pauseTimer_async(
const AMD_SystemObserverInterface_pauseTimerPtr& amd,
131 const ChannelRefBasePtr& timer,
132 const Ice::Current&
c = Ice::emptyCurrent)
override;
138 void unpauseTimer_async(
const AMD_SystemObserverInterface_unpauseTimerPtr& amd,
139 const ChannelRefBasePtr& timer,
140 const Ice::Current&
c = Ice::emptyCurrent)
override;
145 void removeTimer_async(
const AMD_SystemObserverInterface_removeTimerPtr& amd,
146 const ChannelRefBasePtr& timer,
147 const Ice::Current&
c = Ice::emptyCurrent)
override;
155 void startCounter_async(
const AMD_SystemObserverInterface_startCounterPtr& amd,
157 const std::string& counterBaseName,
158 const Ice::Current&
c = Ice::emptyCurrent)
override;
159 void incrementCounter_async(
const AMD_SystemObserverInterface_incrementCounterPtr& amd,
160 const ChannelRefBasePtr& counter,
161 const Ice::Current&
c = Ice::emptyCurrent)
override;
162 void decrementCounter_async(
const AMD_SystemObserverInterface_decrementCounterPtr& amd,
163 const ChannelRefBasePtr& counter,
164 const Ice::Current&
c = Ice::emptyCurrent)
override;
165 void resetCounter_async(
const AMD_SystemObserverInterface_resetCounterPtr& amd,
166 const ChannelRefBasePtr& counter,
167 const Ice::Current&
c = Ice::emptyCurrent)
override;
168 void setCounter_async(
const AMD_SystemObserverInterface_setCounterPtr& amd,
169 const ChannelRefBasePtr& counter,
171 const Ice::Current&
c = Ice::emptyCurrent)
override;
172 void removeCounter_async(
const AMD_SystemObserverInterface_removeCounterPtr& amd,
173 const ChannelRefBasePtr& counter,
174 const Ice::Current&
c = Ice::emptyCurrent)
override;
177 void postWorkerJobs()
override;
183 int getCurrentTimeMs();
184 int getElapsedTimeMs(
int referenceTimeMs);
187 void updateCounter(SystemObserverCounterMap::iterator& iterCounter);
190 std::recursive_mutex timersMutex;
193 std::recursive_mutex countersMutex;