Qt Serial Bus C++ Classes
提供读写串行总线数据的类。更多
命名空间
在 QtSerialPort 模块的 CAN 总线处理部分中使用的一些通用枚举 |
类
处理总线插件的注册和创建 | |
CAN 总线的接口类 | |
QCanBusDevice::Filter 结构定义了 CAN 总线帧的过滤器。 | |
CAN 总线接口信息 | |
用作 CAN 总线插件接口的工厂类 | |
代表单个 CAN 帧的容器类 | |
微秒精度的时间戳信息 | |
可用于解析 DBC 文件 | |
可用于解码 QCanBusFrame 或将输入数据转换为 QCanBusFrame,以便发送给接收器 | |
结构体被用作 QCanFrameProcessor::parseFrame() 方法的返回值 | |
描述了处理 CAN 报文并将其表示为应用程序定义格式的规则 | |
描述从 CAN 帧中提取一个值并以应用程序定义的格式表示该值的规则 | |
定义多路复用器信号的取值范围 | |
描述在 QCanBusFrame 中访问唯一标识符的规则 | |
发送 Modbus 请求的接口 | |
表示 Modbus 寄存器中单字位和 16 字位条目的容器类 | |
Modbus 类、QModbusServer 和 QModbusClient 的基类 | |
表示 Modbus 服务器物理和功能描述的容器类 | |
包含 Modbus ADU 内部功能和错误代码的容器类 | |
抽象容器类,包含存储在 Modbus ADU 内部的功能代码和有效载荷 | |
包含用 QModbus 客户端派生类发送的请求数据 | |
包含存储在 Modbus ADU 中的功能代码和有效载荷的容器类 | |
包含存储在 Modbus ADU 中的功能代码和有效载荷的容器类 | |
代表使用串行总线与 Modbus 服务器通信的 Modbus 客户端 | |
代表使用串行端口与 Modbus 客户端通信的 Modbus 服务器 | |
接收和处理 Modbus 请求的接口 | |
Modbus TCP 客户端设备的接口类 | |
代表可传递给 QModbusTcpServer::installConnectionObserver 的对象接口 | |
代表使用 TCP 服务器与 Modbus 客户端通信的 Modbus 服务器 |
详细描述
提供访问各种串行总线的类。
对于 C++ 项目,包含适合当前用例的头文件,例如,使用 CAN 总线设备的应用程序可使用
#include <QCanBusDevice>
要在 CMake 中使用该模块,可使用find_package()
命令在Qt6
包中找到所需的模块组件:
find_package(Qt6 COMPONENTS SerialBus REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::SerialBus)
要使用 qmake 制作模块,可在项目的 .pro 文件中将模块添加为QT
变量的值:
QT += serialbus
更多信息请参阅Qt Serial Bus 概述。
© 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.