1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_3_INCLUDE_CUTEHMI_MODBUS_ABSTRACTCLIENT_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_3_INCLUDE_CUTEHMI_MODBUS_ABSTRACTCLIENT_HPP
4 #include "AbstractDevice.hpp"
6 #include "internal/PollingIterator.hpp"
22 static constexpr
int INITIAL_POLLING_INTERVAL = 250;
24 static constexpr
int INITIAL_POLLING_TASK_INTERVAL = 10;
26 Q_PROPERTY(
int pollingInterval READ pollingInterval WRITE setPollingInterval NOTIFY pollingIntervalChanged)
28 Q_PROPERTY(
int pollingTaskInterval READ pollingTaskInterval WRITE setPollingTaskInterval NOTIFY pollingTaskIntervalChanged)
30 int pollingInterval() const;
32 void setPollingInterval(
int interval);
34 int pollingTaskInterval() const;
36 void setPollingTaskInterval(
int interval);
61 void pollingIntervalChanged();
63 void pollingTaskIntervalChanged();
68 void handleRequest(const
QJsonObject & request) override;
73 virtual
void onStateChanged();
79 CUTEHMI_PROTECTED_SIGNALS:
82 void pollingRequested();
84 void pollingFinished();
86 void pollingTaskRequested();
88 void pollingTaskFinished();
94 int pollingTaskInterval;
97 pollingIterator(device),
98 pollingInterval(INITIAL_POLLING_INTERVAL),
99 pollingTaskInterval(INITIAL_POLLING_TASK_INTERVAL)