1#ifndef H_EXTENSIONS_CUTEHMI_MODBUS_4_INCLUDE_CUTEHMI_MODBUS_TCPSERVER_HPP
2#define H_EXTENSIONS_CUTEHMI_MODBUS_4_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>
39 Q_PROPERTY(
QString host READ host WRITE setHost NOTIFY hostChanged)
40 Q_PROPERTY(
int port READ port WRITE setPort NOTIFY portChanged)
41 Q_PROPERTY(
int slaveAddress READ slaveAddress WRITE setSlaveAddress NOTIFY slaveAddressChanged)
49 void setHost(
const QString & host);
53 void setPort(
int port);
55 int slaveAddress()
const;
57 void setSlaveAddress(
int slaveAddress);
59 void setBusy(
bool busy)
override;
64 void close()
override;
84 backend(& config, coilData, discreteInputData, holdingRegisterData, inputRegisterData)
Abstract server.
Definition: AbstractServer.hpp:19
Definition: TCPServer.hpp:20
void slaveAddressChanged()
static const char * INITIAL_HOST
Definition: TCPServer.hpp:27
TCP server backend.
Definition: QtTCPServerBackend.hpp:17
RegisterTraits< HoldingRegister >::Container HoldingRegisterDataContainer
Definition: QtTCPServer.hpp:29
RegisterTraits< Coil >::Container CoilDataContainer
Definition: QtTCPServer.hpp:27
RegisterTraits< InputRegister >::Container InputRegisterDataContainer
Definition: QtTCPServer.hpp:30
RegisterTraits< DiscreteInput >::Container DiscreteInputDataContainer
Definition: QtTCPServer.hpp:28
Definition: TCPServerConfig.hpp:16
static constexpr int MIN_SLAVE_ADDRESS
Definition: TCPServerConfig.hpp:22
static constexpr int INITIAL_PORT
Definition: TCPServerConfig.hpp:25
static constexpr int INITIAL_SLAVE_ADDRESS
Definition: TCPServerConfig.hpp:26
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 constexpr quint16 INITIAL_COILS_ADDRESS_RANGE_MAX
Definition: TCPServerConfig.hpp:28
static constexpr quint16 INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MIN
Definition: TCPServerConfig.hpp:33
static constexpr quint16 INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MAX
Definition: TCPServerConfig.hpp:30
static constexpr quint16 INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MAX
Definition: TCPServerConfig.hpp:34
static constexpr quint16 INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MIN
Definition: TCPServerConfig.hpp:31
static constexpr int MAX_SLAVE_ADDRESS
Definition: TCPServerConfig.hpp:23
static constexpr quint16 INITIAL_COILS_ADDRESS_RANGE_MIN
Definition: TCPServerConfig.hpp:27