1 | // Copyright (C) 2017 Denis Shienkov <denis.shienkov@gmail.com> |
---|---|
2 | // Copyright (C) 2017 The Qt Company Ltd. |
3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
4 | |
5 | #ifndef TINYCANBACKEND_P_H |
6 | #define TINYCANBACKEND_P_H |
7 | |
8 | #include "tinycanbackend.h" |
9 | #include "tinycan_symbols_p.h" |
10 | |
11 | // |
12 | // W A R N I N G |
13 | // ------------- |
14 | // |
15 | // This file is not part of the Qt API. It exists purely as an |
16 | // implementation detail. This header file may change from version to |
17 | // version without notice, or even be removed. |
18 | // |
19 | // We mean it. |
20 | // |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | class QWinEventNotifier; |
25 | class QTimer; |
26 | |
27 | class TinyCanBackendPrivate |
28 | { |
29 | Q_DECLARE_PUBLIC(TinyCanBackend) |
30 | public: |
31 | TinyCanBackendPrivate(TinyCanBackend *q); |
32 | ~TinyCanBackendPrivate(); |
33 | |
34 | bool open(); |
35 | void close(); |
36 | bool setConfigurationParameter(QCanBusDevice::ConfigurationKey key, const QVariant &value); |
37 | |
38 | QString systemErrorString(int errorCode); |
39 | void setupChannel(const QString &interfaceName); |
40 | void setupDefaultConfigurations(); |
41 | void startWrite(); |
42 | void startRead(); |
43 | void startupDriver(); |
44 | void cleanupDriver(); |
45 | void resetController(); |
46 | |
47 | bool setBitRate(int bitrate); |
48 | |
49 | TinyCanBackend * const q_ptr; |
50 | |
51 | bool isOpen = false; |
52 | int channelIndex = INDEX_INVALID; |
53 | QTimer *writeNotifier = nullptr; |
54 | }; |
55 | |
56 | QT_END_NAMESPACE |
57 | |
58 | #endif // TINYCANBACKEND_P_H |
59 |