Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
RunUpdateChannels.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_THREADS_RUNUPDATECHANNELS_HPP_
2#define IV_SRC_THREADS_RUNUPDATECHANNELS_HPP_
3
4#include "core/buildInfo.hpp"
7
8namespace iv::threads
9{
10
12{
13public:
14 static constexpr iv::types::pollTime pollTime {CLIM ? 100 : 0};
16 {
17 controller = iv::appdiamar::Application::get()->getApplicationController();
18 }
19
20private:
21 void periodicTask() override
22 {
23 if (const auto controllerRef = controller.lock())
24 {
25 controllerRef->updateChannels();
26 controllerRef->alarmsManager()->frame();
27 }
28 }
29
30 std::weak_ptr<iv::appdiamar::IApplicationController> controller;
31};
32
33}// namespace iv::threads
34
35#endif//IV_SRC_THREADS_RUNUPDATECHANNELS_HPP_
#define CLIM
Definition buildInfo.hpp:17
static std::unique_ptr< Application > & get()
Definition Application.cpp:20
Definition RunUpdateChannels.hpp:12
RunUpdateChannels()
Definition RunUpdateChannels.hpp:15
static constexpr iv::types::pollTime pollTime
Definition RunUpdateChannels.hpp:14
std::weak_ptr< iv::appdiamar::IApplicationController > controller
Definition RunUpdateChannels.hpp:30
void periodicTask() override
Definition RunUpdateChannels.hpp:21
Definition ThreadRunnablePeriodic.hpp:15
Definition BackgroundTaskWithDialog.cpp:8
std::chrono::milliseconds pollTime
Definition types.hpp:44