|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <ScheduledTask.h>
Public Member Functions | |
| ScheduledTask (RuntimeScheduler *scheduler, QObject *context) | |
| ~ScheduledTask () | |
| bool | schedule (std::chrono::microseconds delay, RuntimeScheduler::Callback callback) |
| bool | scheduleRepeating (std::chrono::microseconds interval, RuntimeScheduler::Callback callback) |
| void | cancel () |
| bool | active () const |
Owns one deferred callback on the scheduler's thread; replacing or destroying it cancels the callback. All access, including destruction, must occur on that thread.
Definition at line 11 of file ScheduledTask.h.
| ScheduledTask::ScheduledTask | ( | RuntimeScheduler * | scheduler, |
| QObject * | context | ||
| ) |
Definition at line 9 of file ScheduledTask.cc.
| ScheduledTask::~ScheduledTask | ( | ) |
Definition at line 15 of file ScheduledTask.cc.
References cancel().
| bool ScheduledTask::active | ( | ) | const |
Definition at line 63 of file ScheduledTask.cc.
| void ScheduledTask::cancel | ( | ) |
Definition at line 54 of file ScheduledTask.cc.
Referenced by GPSSourceHealth::reset(), schedule(), scheduleRepeating(), PositionManager::setConfiguration(), GPSCorrectionManager::shutdown(), GPSReceiver::shutdown(), NTRIPGgaReporter::start(), NTRIPConnectionStats::stop(), NTRIPGgaReporter::stop(), GPSSourceHealth::updateObservation(), and ~ScheduledTask().
| bool ScheduledTask::schedule | ( | std::chrono::microseconds | delay, |
| RuntimeScheduler::Callback | callback | ||
| ) |
Definition at line 21 of file ScheduledTask.cc.
References cancel().
Referenced by scheduleRepeating(), and NTRIPManager::setConfiguration().
| bool ScheduledTask::scheduleRepeating | ( | std::chrono::microseconds | interval, |
| RuntimeScheduler::Callback | callback | ||
| ) |
Runs callback every interval until cancelled or replaced. Each run is rescheduled before the callback, so the callback may cancel or replace it.
Definition at line 40 of file ScheduledTask.cc.
References cancel(), schedule(), and scheduleRepeating().
Referenced by scheduleRepeating(), NTRIPConnectionStats::start(), and GPSReceiver::startConnectionPolling().