summaryrefslogtreecommitdiffstats
path: root/src/serialbus/doc/src/qtserialbus-index.qdoc
blob: 05b1e44d5ab3d17782ba4a7f2478f33b911f570e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page qtserialbus-index.html
    \title Qt Serial Bus
    \brief Provides an API to access various serial bus devices
    \ingroup technology-apis

    The Qt Serial Bus API provides classes and functions to access the various
    industrial serial buses and protocols, such as CAN, ModBus, and others.

    \section1 Getting Started

    To include the definitions of the module's classes and functions, use the
    following directive:

    \code
    #include <QtSerialBus>
    \endcode

    To use the module with CMake, use the \c{find_package()} command to locate
    the needed module components in the \c{Qt6} package:
    \include qtserialbus-module-use.qdocinc cmakebuild

    To use the module for building with qmake, add the module as a value of the
    \c QT variable in the project's .pro file:
    \include qtserialbus-module-use.qdocinc qmakebuild

    \section1 Supported Buses and Protocols

    \list
        \li \l {Qt CAN Bus}
        \li \l {Qt Modbus}
    \endlist

    \section1 API Reference

    These are links to the API reference materials.

    \list
         \li \l {Qt Serial Bus C++ Classes}{C++ Classes}
    \endlist

    \section1 Logging Categories

    The \l QtSerialBus module exports the following \l {Configuring Categories}{logging categories}:

    \table
    \header
        \li Logging Category
        \li Description
    \row
        \li qt.canbus
        \li Enables standard logging inside the \l {Qt CAN Bus} classes
    \row
        \li qt.canbus.plugins
        \li Enables low level logging inside the \l {Qt CAN Bus} plugin classes.
        To set logging for a specific plugin, use "qt.canbus.plugins.pluginname".
        e.g. "qt.canbus.plugins.socketcan". "qt.canbus.plugins*" affects all plugins.
    \row
        \li qt.modbus
        \li Enables standard logging inside the \l {Qt Modbus} classes
    \row
        \li qt.modbus.lowlevel
        \li Enables low level logging including individual packet content inside
            the \l {Qt Modbus} classes
    \endtable

    Logging categories can be used to enable additional warning and debug output
    for \l QtSerialBus. More detailed information about logging can be found
    in \l QLoggingCategory.

    A quick way to enable all \l {Qt Modbus} logging is to add the following line
    to the main() function:

    \code
        QLoggingCategory::setFilterRules(QStringLiteral("qt.modbus* = true"));
    \endcode

    \section1 Examples

    \list
         \li \l {CAN Bus Example}
         \li \l {Modbus Client example}
         \li \l {Modbus Server example}
         \li \l {Modbus Custom command example}
    \endlist

    \section1 Module Evolution
    \l {Changes to Qt SerialBus} lists important changes in the module API and
    functionality that were done for the Qt 6 series of Qt.
*/