|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_OS_RATETHREAD_H
11 #define YARP_OS_RATETHREAD_H
15 #if !defined(YARP_INCLUDING_DEPRECATED_HEADER_ON_PURPOSE)
19 #ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0 (RateThreadWrapper since YARP 3.3)
95 bool setRate(
int period);
121 double getEstPeriod();
128 void getEstPeriod(
double& av,
double& std);
133 unsigned int getIterations();
146 void getEstUsed(
double& av,
double& std);
161 int setPriority(
int priority,
int policy = -1);
187 bool threadInit()
override;
195 void threadRelease()
override;
214 void beforeStart()
override;
221 void afterStart(
bool success)
override;
230 SystemRateThread(int period);
232 virtual ~SystemRateThread();
243 class YARP_os_DEPRECATED_API RateThreadWrapper : public PeriodicThread
246 yarp::os::Runnable* helper;
254 RateThreadWrapper(Runnable* helper);
255 RateThreadWrapper(Runnable& helper);
257 virtual ~RateThreadWrapper();
260 virtual bool attach(Runnable& helper);
261 virtual bool attach(Runnable* helper);
263 bool open(double framerate = -1, bool polling = false);
268 bool threadInit() override;
269 void threadRelease() override;
270 void afterStart(bool success) override;
271 void beforeStart() override;
273 Runnable* getAttachment() const;
280 #endif // YARP_NO_DEPRECATED
282 #endif // YARP_OS_RATETHREAD_H
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
void run() override=0
Loop function.
An abstraction for a periodic thread.
The main, catch-all namespace for YARP.
#define YARP_os_DEPRECATED_API_MSG(X)
An abstraction for a periodic thread.
#define YARP_COMPILER_WARNING(x)
Generate a warning at build time on supported compilers.
#define YARP_DISABLE_DEPRECATED_WARNING
Disable deprecated warnings in the following code.