7#ifndef YARP_OS_RATETHREAD_H
8#define YARP_OS_RATETHREAD_H
12#if !defined(YARP_INCLUDING_DEPRECATED_HEADER_ON_PURPOSE)
16#ifndef YARP_NO_DEPRECATED
91 bool setRate(
int period);
117 double getEstPeriod();
124 void getEstPeriod(
double& av,
double&
std);
129 unsigned int getIterations();
142 void getEstUsed(
double& av,
double&
std);
157 int setPriority(
int priority,
int policy = -1);
183 bool threadInit()
override;
191 void threadRelease()
override;
210 void beforeStart()
override;
217 void afterStart(
bool success)
override;
226 SystemRateThread(int period);
228 virtual ~SystemRateThread();
239class YARP_os_DEPRECATED_API RateThreadWrapper : public PeriodicThread
242 yarp::os::Runnable* helper;
250 RateThreadWrapper(Runnable* helper);
251 RateThreadWrapper(Runnable& helper);
253 virtual ~RateThreadWrapper();
256 virtual bool attach(Runnable& helper);
257 virtual bool attach(Runnable* helper);
259 bool open(double framerate = -1, bool polling = false);
264 bool threadInit() override;
265 void threadRelease() override;
266 void afterStart(bool success) override;
267 void beforeStart() override;
269 Runnable* getAttachment() const;
272} // namespace yarp::os
275#endif // YARP_NO_DEPRECATED
277#endif // YARP_OS_RATETHREAD_H
An abstraction for a periodic thread.
An abstraction for a periodic thread.
void run() override=0
Loop function.
An interface to the operating system, including Port based communication.
#define YARP_COMPILER_WARNING(x)
Generate a warning at build time on supported compilers.
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
#define YARP_DISABLE_DEPRECATED_WARNING
Disable deprecated warnings in the following code.
#define YARP_os_DEPRECATED_API_MSG(X)