1#ifndef H_EXTENSIONS_CUTEHMI_MODBUS_4_INCLUDE_CUTEHMI_MODBUS_ABSTRACTSERVER_HPP
2#define H_EXTENSIONS_CUTEHMI_MODBUS_4_INCLUDE_CUTEHMI_MODBUS_ABSTRACTSERVER_HPP
4#include "AbstractDevice.hpp"
22 QML_UNCREATABLE(
"AbstractServer is an abstract class")
25 static constexpr bool INITIAL_BUSY =
false;
27 Q_PROPERTY(
bool busy READ busy WRITE setBusy NOTIFY busyChanged)
61 void handleRequest(
const QJsonObject & request)
override;
64 virtual void handleCoilsWritten(quint16 address, quint16 amount);
66 virtual void handleDiscreteInputsWritten(quint16 address, quint16 amount);
68 virtual void handleHoldingRegistersWritten(quint16 address, quint16 amount);
70 virtual void handleInputRegistersWritten(quint16 address, quint16 amount);
72 void updateBusy(
bool busy);
79 bool busy = INITIAL_BUSY;
Abstract Modbus device.
Definition: AbstractDevice.hpp:38
Abstract server.
Definition: AbstractServer.hpp:19
virtual void setBusy(bool busy)=0
Q_SIGNAL void requestAccepted(QJsonObject request)