1#ifndef H_EXTENSIONS_CUTEHMI_MODBUS_4_INCLUDE_CUTEHMI_MODBUS_RTUCLIENT_HPP
2#define H_EXTENSIONS_CUTEHMI_MODBUS_4_INCLUDE_CUTEHMI_MODBUS_RTUCLIENT_HPP
4#include "AbstractClient.hpp"
5#include "internal/QtRTUClientBackend.hpp"
33 Q_PROPERTY(
QString port READ port WRITE setPort NOTIFY portChanged)
34 Q_PROPERTY(QSerialPort::Parity parity READ parity WRITE setParity NOTIFY parityChanged)
35 Q_PROPERTY(QSerialPort::BaudRate baudRate READ baudRate WRITE setBaudRate NOTIFY baudRateChanged)
36 Q_PROPERTY(QSerialPort::DataBits dataBits READ dataBits WRITE setDataBits NOTIFY dataBitsChanged)
37 Q_PROPERTY(QSerialPort::StopBits stopBits READ stopBits WRITE setStopBits NOTIFY stopBitsChanged)
38 Q_PROPERTY(
int slaveAddress READ slaveAddress WRITE setSlaveAddress NOTIFY slaveAddressChanged)
46 void setPort(
const QString & port);
48 QSerialPort::Parity parity()
const;
50 void setParity(QSerialPort::Parity);
52 QSerialPort::BaudRate baudRate()
const;
54 void setBaudRate(QSerialPort::BaudRate baudRate);
56 QSerialPort::DataBits dataBits()
const;
58 void setDataBits(QSerialPort::DataBits dataBits);
60 QSerialPort::StopBits stopBits()
const;
62 void setStopBits(QSerialPort::StopBits stopBits);
64 int slaveAddress()
const;
66 void setSlaveAddress(
int slaveAddress);
68 int timeout()
const override;
70 void setTimeout(
int timeout)
override;
75 void close()
override;
Abstract client.
Definition: AbstractClient.hpp:32
Modbus TCP client.
Definition: RTUClient.hpp:18
void slaveAddressChanged()
static const char * INITIAL_PORT
Definition: RTUClient.hpp:25
Modbus RTU client backend based on Qt Serial Bus.
Definition: QtRTUClientBackend.hpp:16
Definition: RTUClientConfig.hpp:18
static constexpr QSerialPort::BaudRate INITIAL_BAUD_RATE
Definition: RTUClientConfig.hpp:26
static constexpr QSerialPort::StopBits INITIAL_STOP_BITS
Definition: RTUClientConfig.hpp:28
static constexpr int INITIAL_TIMEOUT
Definition: RTUClientConfig.hpp:30
static constexpr int MAX_SLAVE_ADDRESS
Definition: RTUClientConfig.hpp:23
static constexpr QSerialPort::Parity INITIAL_PARITY
Definition: RTUClientConfig.hpp:25
static constexpr QSerialPort::DataBits INITIAL_DATA_BITS
Definition: RTUClientConfig.hpp:27
static constexpr int INITIAL_SLAVE_ADDRESS
Definition: RTUClientConfig.hpp:29
static constexpr int MIN_SLAVE_ADDRESS
Definition: RTUClientConfig.hpp:22