基于Qt的Can通信代码

上传者: u013411428 | 上传时间: 2021-05-21 10:11:23 | 文件大小: 5.31MB | 文件类型: RAR
在基于Qt的平台下实现同CAN总线的通信,使用Qt加载动态库来实现CAN通信。周立功为CAN通信提供了动态库:官方提供了很多相关动态库和lib等。其中kerneldlls里还有很多动态库,还有一个配置文件。 如果只用到USBCAN2通信,则只需要kerneldlls里面的usbcan.dll这个动态库,里面封装了用windows和can模块通过usb通信的函数。 然后还需要ControlCAN.h这个头文件,里面有对使用dll函数时一些结构体的声明和定义。对于ControlCAN.dll和ControlCAN.lib实际上是对使用usbcan.dll动态库的引导入口。 最后使用Qt加载这些动态库来实现CAN通信,有两种方式: (1) 显式: 通过代码加载动态库我们需要的函数,把这些函数实际放在自己的工程之中 (2) 隐式:通过在工程中加入动态库入口的路径,使可执行文件在运行时在相应路径找动态库,再使用其函数

文件下载

资源详情

[{"title":"( 63 个子文件 5.31MB ) 基于Qt的Can通信代码","children":[{"title":"CanDemo","children":[{"title":"CanDemo.pro.user <span style='color:#111;'> 23.88KB </span>","children":null,"spread":false},{"title":"kerneldll.ini <span style='color:#111;'> 638B </span>","children":null,"spread":false},{"title":"contorlcan.h <span style='color:#111;'> 5.69KB </span>","children":null,"spread":false},{"title":"canthread.h <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false},{"title":"ControlCAN.h <span style='color:#111;'> 9.05KB </span>","children":null,"spread":false},{"title":"CANopen_easy_begin.pdf <span style='color:#111;'> 3.75MB </span>","children":null,"spread":false},{"title":"widget.ui <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false},{"title":"usbcan.dll <span style='color:#111;'> 33.50KB </span>","children":null,"spread":false},{"title":"CANTestIcon.png <span style='color:#111;'> 71.28KB </span>","children":null,"spread":false},{"title":"canthread.cpp <span style='color:#111;'> 7.31KB </span>","children":null,"spread":false},{"title":"main.cpp <span style='color:#111;'> 178B </span>","children":null,"spread":false},{"title":"ControlCAN.lib <span style='color:#111;'> 4.27KB </span>","children":null,"spread":false},{"title":"kerneldlls","children":[{"title":"CANETE.dll <span style='color:#111;'> 302.55KB </span>","children":null,"spread":false},{"title":"USBCANFD.dll <span style='color:#111;'> 109.55KB </span>","children":null,"spread":false},{"title":"CANDTU_NET.dll <span style='color:#111;'> 439.55KB </span>","children":null,"spread":false},{"title":"CANET_TCP.dll <span style='color:#111;'> 422.86KB </span>","children":null,"spread":false},{"title":"CANFDNET_UDP.dll <span style='color:#111;'> 129.86KB </span>","children":null,"spread":false},{"title":"VirtualUSBCAN.dll <span style='color:#111;'> 138.50KB </span>","children":null,"spread":false},{"title":"CANFDNET_TCP.dll <span style='color:#111;'> 136.36KB </span>","children":null,"spread":false},{"title":"CANDTU_NET_400.dll <span style='color:#111;'> 439.55KB </span>","children":null,"spread":false},{"title":"VCI_USBCAN2.xml <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"CANWIFI_UDP.dll <span style='color:#111;'> 303.05KB </span>","children":null,"spread":false},{"title":"CANDevice.dll <span style='color:#111;'> 30.91KB </span>","children":null,"spread":false},{"title":"devices_property","children":[{"title":"usbcan-4e-u.xml <span style='color:#111;'> 26.81KB </span>","children":null,"spread":false},{"title":"canet-tcp.xml <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"candtu-net-400.xml <span style='color:#111;'> 6.92KB </span>","children":null,"spread":false},{"title":"candtu-200ur.xml <span style='color:#111;'> 6.03KB </span>","children":null,"spread":false},{"title":"canfdcom-100ie.xml <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"candtu.ini <span style='color:#111;'> 522B </span>","children":null,"spread":false},{"title":"pci-5020-u.xml <span style='color:#111;'> 8.17KB </span>","children":null,"spread":false},{"title":"canet-udp.xml <span style='color:#111;'> 1.45KB </span>","children":null,"spread":false},{"title":"canfdnet-tcp.xml <span style='color:#111;'> 7.29KB </span>","children":null,"spread":false},{"title":"pci-5010-u.xml <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"canscope.xml <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"pcie-canfd-200u.xml <span style='color:#111;'> 12.40KB </span>","children":null,"spread":false},{"title":"pcie-canfd-400u.xml <span style='color:#111;'> 22.79KB </span>","children":null,"spread":false},{"title":"canfdnet-udp.xml <span style='color:#111;'> 6.16KB </span>","children":null,"spread":false},{"title":"usbcan1.xml <span style='color:#111;'> 4.64KB </span>","children":null,"spread":false},{"title":"usbcanfd-200u.xml <span style='color:#111;'> 18.78KB </span>","children":null,"spread":false},{"title":"usbcan2.xml <span style='color:#111;'> 7.13KB </span>","children":null,"spread":false},{"title":"can.xml <span style='color:#111;'> 12.69KB </span>","children":null,"spread":false},{"title":"virtual.xml <span style='color:#111;'> 4.06KB </span>","children":null,"spread":false},{"title":"candtu-100ur.xml <span style='color:#111;'> 3.41KB </span>","children":null,"spread":false},{"title":"usbcan4.xml <span style='color:#111;'> 12.26KB </span>","children":null,"spread":false},{"title":"device_locale_strings.xml <span style='color:#111;'> 9.77KB </span>","children":null,"spread":false},{"title":"pcie-canfd-100u.xml <span style='color:#111;'> 7.16KB </span>","children":null,"spread":false},{"title":"usbcanfd-100u.xml <span style='color:#111;'> 10.46KB </span>","children":null,"spread":false},{"title":"candtu-net.xml <span style='color:#111;'> 4.54KB </span>","children":null,"spread":false},{"title":"usbcan-8e-u.xml <span style='color:#111;'> 51.77KB </span>","children":null,"spread":false}],"spread":false},{"title":"ZlgCloud.dll <span style='color:#111;'> 571.00KB </span>","children":null,"spread":false},{"title":"CANDevCore.dll <span style='color:#111;'> 30.41KB </span>","children":null,"spread":false},{"title":"dll_cfg.ini <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"CANFDCOM.dll <span style='color:#111;'> 95.67KB </span>","children":null,"spread":false},{"title":"USBCAN.dll <span style='color:#111;'> 33.50KB </span>","children":null,"spread":false},{"title":"device_locale_strings.xml <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"USBCAN.xml <span style='color:#111;'> 4.13KB </span>","children":null,"spread":false},{"title":"CANWIFI_TCP.dll <span style='color:#111;'> 423.36KB </span>","children":null,"spread":false}],"spread":false},{"title":"CAN_test_um.pdf <span style='color:#111;'> 1.60MB </span>","children":null,"spread":false},{"title":"ControlCAN.dll <span style='color:#111;'> 14.50KB </span>","children":null,"spread":false},{"title":"widget.cpp <span style='color:#111;'> 3.45KB </span>","children":null,"spread":false},{"title":"widget.h <span style='color:#111;'> 728B </span>","children":null,"spread":false},{"title":"CanDemo.pro <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"icon.qrc <span style='color:#111;'> 99B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明