|
CuteHMI - Modbus (CuteHMI.Modbus.2)
|
1 #ifndef H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_TCPSERVER_HPP
2 #define H_EXTENSIONS_CUTEHMI_MODBUS_2_INCLUDE_CUTEHMI_MODBUS_TCPSERVER_HPP
4 #include "AbstractServer.hpp"
5 #include "internal/RegisterTraits.hpp"
6 #include "internal/QtTCPServerBackend.hpp"
8 #include <cutehmi/macros.hpp>
11 #include <QStateMachine>
12 #include <QModbusTcpServer>
37 Q_PROPERTY(
QString host READ host WRITE setHost NOTIFY hostChanged)
38 Q_PROPERTY(
int port READ port WRITE setPort NOTIFY portChanged)
39 Q_PROPERTY(
int slaveAddress READ slaveAddress WRITE setSlaveAddress NOTIFY slaveAddressChanged)
47 void setHost(const
QString & host);
51 void setPort(
int port);
53 int slaveAddress() const;
55 void setSlaveAddress(
int slaveAddress);
57 void setBusy(
bool busy) override;
62 void close() override;
69 void slaveAddressChanged();
82 backend(& config, coilData, discreteInputData, holdingRegisterData, inputRegisterData)
Definition: TCPServerConfig.hpp:14
static constexpr quint16 INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MIN
Definition: TCPServerConfig.hpp:31
static constexpr int INITIAL_SLAVE_ADDRESS
Definition: TCPServerConfig.hpp:26
static constexpr quint16 INITIAL_COILS_ADDRESS_RANGE_MIN
Definition: TCPServerConfig.hpp:27
static constexpr quint16 INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MAX
Definition: TCPServerConfig.hpp:34
Definition: TCPServer.hpp:17
static constexpr int MIN_SLAVE_ADDRESS
Definition: TCPServerConfig.hpp:22
static constexpr quint16 INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MAX
Definition: TCPServerConfig.hpp:30
RegisterTraits< HoldingRegister >::Container HoldingRegisterDataContainer
Definition: QtTCPServer.hpp:29
TCP server backend.
Definition: QtTCPServerBackend.hpp:15
RegisterTraits< Coil >::Container CoilDataContainer
Definition: QtTCPServer.hpp:27
static constexpr int INITIAL_PORT
Definition: TCPServerConfig.hpp:25
static constexpr int MAX_SLAVE_ADDRESS
Definition: TCPServerConfig.hpp:23
RegisterTraits< InputRegister >::Container InputRegisterDataContainer
Definition: QtTCPServer.hpp:30
static constexpr quint16 INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MIN
Definition: TCPServerConfig.hpp:33
static constexpr quint16 INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MIN
Definition: TCPServerConfig.hpp:29
static constexpr quint16 INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MAX
Definition: TCPServerConfig.hpp:32
static const char * INITIAL_HOST
Definition: TCPServer.hpp:25
Abstract server.
Definition: AbstractServer.hpp:15
static constexpr quint16 INITIAL_COILS_ADDRESS_RANGE_MAX
Definition: TCPServerConfig.hpp:28
RegisterTraits< DiscreteInput >::Container DiscreteInputDataContainer
Definition: QtTCPServer.hpp:28