Open Lighting Architecture: ola::thread::SchedulerInterface Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ola::thread::SchedulerInterface Class Referenceabstract

## Detailed Description

Allows Callbacks to be scheduled to run after a specified interval.

Inheritance diagram for ola::thread::SchedulerInterface:

## Public Member Functions
virtual timeout_id | RegisterRepeatingTimeout (unsigned int period, Callback0< bool > *callback)=0
| Execute a callback periodically.
virtual timeout_id | RegisterRepeatingTimeout (const ola::TimeInterval &period, Callback0< bool > *callback)=0
| Execute a callback periodically.
virtual timeout_id | RegisterSingleTimeout (unsigned int delay, SingleUseCallback0< void > *callback)=0
| Execute a callback after a certain time interval.
virtual timeout_id | RegisterSingleTimeout (const ola::TimeInterval &delay, SingleUseCallback0< void > *callback)=0
| Execute a callback after a certain time interval.
virtual void | RemoveTimeout (timeout_id id)=0
| Cancel an existing timeout.

## Member Function Documentation

## ◆ RegisterRepeatingTimeout() [1/2]

virtual timeout_id ola::thread::SchedulerInterface::RegisterRepeatingTimeout | ( | const ola::TimeInterval & | period,
|  | Callback0< bool > * | callback )
| pure virtual

Execute a callback periodically.

Parameters

  period | the time interval between each execution of the callback.
  callback | the callback to run. Ownership is transferred.

Returns
  a timeout_id which can be used later to cancel the timeout.

Returning false from the callback will cause it to be cancelled.

Implemented in ola::client::SelectServer, ola::io::SelectServer, ola::io::SelectServerInterface, ola::plugin::karate::PluginAdaptor, ola::plugin::opendmx::PluginAdaptor, ola::plugin::osc::SelectServerInterface, ola::plugin::stageprofi::SelectServerInterface, ola::PluginAdaptor, ola::SelectServer, ola::SelectServerInterface, ola::thread::SelectServer, and SelectServer.

## ◆ RegisterRepeatingTimeout() [2/2]

virtual timeout_id ola::thread::SchedulerInterface::RegisterRepeatingTimeout | ( | unsigned int | period,
|  | Callback0< bool > * | callback )
| pure virtual

Execute a callback periodically.

Parameters

  period | the number of milliseconds between each execution of the callback.
  callback | the callback to run. Ownership is transferred.

Returns
  a timeout_id which can be used later to cancel the timeout.

Deprecated
  Use the version that takes a TimeInterval instead.

Returning false from the callback will cause it to be cancelled.

Implemented in ola::client::SelectServer, ola::io::SelectServer, ola::io::SelectServerInterface, ola::plugin::karate::PluginAdaptor, ola::plugin::opendmx::PluginAdaptor, ola::plugin::osc::SelectServerInterface, ola::plugin::stageprofi::SelectServerInterface, ola::PluginAdaptor, ola::SelectServer, ola::SelectServerInterface, ola::thread::SelectServer, and SelectServer.

## ◆ RegisterSingleTimeout() [1/2]

virtual timeout_id ola::thread::SchedulerInterface::RegisterSingleTimeout | ( | const ola::TimeInterval & | delay,
|  | SingleUseCallback0< void > * | callback )
| pure virtual

Execute a callback after a certain time interval.

Parameters

  delay | the time interval to wait before the callback is executed.
  callback | the callback to run. Ownership is transferred.

Returns
  a timeout_id which can be used later to cancel the timeout.

Implemented in ola::client::SelectServer, ola::io::SelectServer, ola::io::SelectServerInterface, ola::plugin::karate::PluginAdaptor, ola::plugin::opendmx::PluginAdaptor, ola::plugin::osc::SelectServerInterface, ola::plugin::stageprofi::SelectServerInterface, ola::PluginAdaptor, ola::SelectServer, ola::SelectServerInterface, ola::thread::SelectServer, and SelectServer.

## ◆ RegisterSingleTimeout() [2/2]

virtual timeout_id ola::thread::SchedulerInterface::RegisterSingleTimeout | ( | unsigned int | delay,
|  | SingleUseCallback0< void > * | callback )
| pure virtual

Execute a callback after a certain time interval.

Parameters

  delay | the number of milliseconds before the callback is executed.
  callback | the callback to run. Ownership is transferred.

Returns
  a timeout_id which can be used later to cancel the timeout.

Deprecated
  Use the version that takes a TimeInterval instead.

Implemented in ola::client::SelectServer, ola::io::SelectServer, ola::io::SelectServerInterface, ola::plugin::karate::PluginAdaptor, ola::plugin::opendmx::PluginAdaptor, ola::plugin::osc::SelectServerInterface, ola::plugin::stageprofi::SelectServerInterface, ola::PluginAdaptor, ola::SelectServer, ola::SelectServerInterface, ola::thread::SelectServer, and SelectServer.

## ◆ RemoveTimeout()

virtual void ola::thread::SchedulerInterface::RemoveTimeout | ( | timeout_id | id | ) |
| pure virtual

Cancel an existing timeout.

Parameters

  id | the timeout_id returned by a call to RegisterRepeatingTimeout or RegisterSingleTimeout.

Implemented in ola::client::SelectServer, ola::io::SelectServer, ola::io::SelectServerInterface, ola::plugin::karate::PluginAdaptor, ola::plugin::opendmx::PluginAdaptor, ola::plugin::osc::SelectServerInterface, ola::plugin::stageprofi::SelectServerInterface, ola::PluginAdaptor, ola::SelectServer, ola::SelectServerInterface, ola::thread::SelectServer, and SelectServer.

The documentation for this class was generated from the following file:

- include/ola/thread/SchedulerInterface.h