1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_ABSTRACTSERVER_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_ABSTRACTSERVER_HPP
4 #include "AbstractDevice.hpp"
21 static constexpr
bool INITIAL_BUSY =
false;
23 Q_PROPERTY(
bool busy READ busy WRITE setBusy NOTIFY busyChanged)
27 virtual void setBusy(
bool busy) = 0;
57 void handleRequest(
const QJsonObject & request)
override;
60 virtual void handleCoilsWritten(quint16 address, quint16 amount);
62 virtual void handleDiscreteInputsWritten(quint16 address, quint16 amount);
64 virtual void handleHoldingRegistersWritten(quint16 address, quint16 amount);
66 virtual void handleInputRegistersWritten(quint16 address, quint16 amount);
68 void updateBusy(
bool busy);
70 CUTEHMI_PROTECTED_SIGNALS:
81 bool busy = INITIAL_BUSY;