1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QMODBUSRTUSERIALCLIENT_H
5#define QMODBUSRTUSERIALCLIENT_H
6
7// The pragma is required to generate proper headers for source compatibility.
8#if 0
9#pragma qt_deprecates(QModbusRtuSerialMaster)
10#endif
11
12#include <QtSerialBus/qmodbusclient.h>
13
14QT_BEGIN_NAMESPACE
15
16class QModbusRtuSerialClientPrivate;
17
18class Q_SERIALBUS_EXPORT QModbusRtuSerialClient : public QModbusClient
19{
20 Q_OBJECT
21 Q_DECLARE_PRIVATE(QModbusRtuSerialClient)
22
23public:
24 explicit QModbusRtuSerialClient(QObject *parent = nullptr);
25 ~QModbusRtuSerialClient();
26
27 int interFrameDelay() const;
28 void setInterFrameDelay(int microseconds);
29
30 int turnaroundDelay() const;
31 void setTurnaroundDelay(int turnaroundDelay);
32
33protected:
34 QModbusRtuSerialClient(QModbusRtuSerialClientPrivate &dd, QObject *parent = nullptr);
35
36 void close() override;
37 bool open() override;
38};
39
40#if QT_DEPRECATED_SINCE(6, 2)
41QT_WARNING_PUSH
42QT_WARNING_DISABLE_GCC("-Wattributes")
43using QModbusRtuSerialMaster
44 Q_DECL_DEPRECATED_X("Please port your application to QModbusRtuSerialClient.") = QModbusRtuSerialClient;
45#endif
46QT_WARNING_POP
47QT_END_NAMESPACE
48
49#endif // QMODBUSRTUSERIALCLIENT_H
50

source code of qtserialbus/src/serialbus/qmodbusrtuserialclient.h