31 #include <ArmarXCore/interface/observers/VariantBase.h>
32 #include <ArmarXCore/interface/observers/SystemObserverInterface.h>
44 #define ARMARX_SYSTEM_OBSERVER SystemObserver
89 virtual public SystemObserverInterface
93 void onInitObserver()
override;
99 return "SystemObserver";
109 void startTimer_async(
110 const AMD_SystemObserverInterface_startTimerPtr& amd,
111 const std::string& timerBaseName,
112 const Ice::Current&
c = Ice::emptyCurrent)
override;
117 void resetTimer_async(
118 const AMD_SystemObserverInterface_resetTimerPtr& amd,
119 const ChannelRefBasePtr& timer,
120 const Ice::Current&
c = Ice::emptyCurrent)
override;
126 void pauseTimer_async(
127 const AMD_SystemObserverInterface_pauseTimerPtr& amd,
128 const ChannelRefBasePtr& timer,
129 const Ice::Current&
c = Ice::emptyCurrent)
override;
135 void unpauseTimer_async(
136 const AMD_SystemObserverInterface_unpauseTimerPtr& amd,
137 const ChannelRefBasePtr& timer,
138 const Ice::Current&
c = Ice::emptyCurrent)
override;
143 void removeTimer_async(
144 const AMD_SystemObserverInterface_removeTimerPtr& amd,
145 const ChannelRefBasePtr& timer,
146 const Ice::Current&
c = Ice::emptyCurrent)
override;
154 void startCounter_async(
155 const AMD_SystemObserverInterface_startCounterPtr& amd,
157 const std::string& counterBaseName,
158 const Ice::Current&
c = Ice::emptyCurrent)
override;
159 void incrementCounter_async(
160 const AMD_SystemObserverInterface_incrementCounterPtr& amd,
161 const ChannelRefBasePtr& counter,
162 const Ice::Current&
c = Ice::emptyCurrent)
override;
163 void decrementCounter_async(
164 const AMD_SystemObserverInterface_decrementCounterPtr& amd,
165 const ChannelRefBasePtr& counter,
166 const Ice::Current&
c = Ice::emptyCurrent)
override;
167 void resetCounter_async(
168 const AMD_SystemObserverInterface_resetCounterPtr& amd,
169 const ChannelRefBasePtr& counter,
170 const Ice::Current&
c = Ice::emptyCurrent)
override;
171 void setCounter_async(
172 const AMD_SystemObserverInterface_setCounterPtr& amd,
173 const ChannelRefBasePtr& counter,
175 const Ice::Current&
c = Ice::emptyCurrent)
override;
176 void removeCounter_async(
177 const AMD_SystemObserverInterface_removeCounterPtr& amd,
178 const ChannelRefBasePtr& counter,
179 const Ice::Current&
c = Ice::emptyCurrent)
override;
182 void postWorkerJobs()
override;
188 int getCurrentTimeMs();
189 int getElapsedTimeMs(
int referenceTimeMs);
192 void updateCounter(SystemObserverCounterMap::iterator& iterCounter);
195 std::recursive_mutex timersMutex;
198 std::recursive_mutex countersMutex;