QModbusTcpClient Class

QModbusTcpClient 类是 Modbus TCP 客户端设备的接口类。更多

头文件: #include <QModbusTcpClient>
CMake: find_package(Qt6 REQUIRED COMPONENTS SerialBus)
target_link_libraries(mytarget PRIVATE Qt6::SerialBus)
qmake: QT += serialbus
继承: QModbusClient

公共函数

QModbusTcpClient(QObject *parent = nullptr)
virtual ~QModbusTcpClient()

重实现的保护函数

virtual void close() override
virtual bool open() override

详细说明

QModbusTcpClient 与 Modbus 后端通信,为用户提供方便的 API。

成员函数文档

[explicit] QModbusTcpClient::QModbusTcpClient(QObject *parent = nullptr)

用指定的parent 构建 QModbusTcpClient。

[virtual noexcept] QModbusTcpClient::~QModbusTcpClient()

销毁QModbusTcpClient 实例。

[override virtual protected] void QModbusTcpClient::close()

重新实现:QModbusDevice::close().

[override virtual protected] bool QModbusTcpClient::open()

重新实现:QModbusDevice::open().

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.