Qt canbus. The name of the can bus can0 can1 is taken as parameter. If this option is enabled the therefore received frames are marked with qcanbusframehaslocalecho. Generated on 2019 aug 01 from project qtserialbus revision v5130 68 gfd9b9c7 powered by code browser 21 generator usage only permitted with license.
Incoming frames are ordered according to their type. Qt provides the qt can bus api as part of its qtserialbus module. Qt d bus allows applications to send messages to each other using d bus.
When we build an hmi application to control a machine we need a lot more functionality than the qt can bus api should offer. This means whenever a can frame is transmitted on the can bus a local echo of this frame is sent to all applications connected to this can device. Qt can bus provides a clean and simple api to connect to a can bus to send and receive can frames over the can bus.
Code browser 21 generator usage only permitted with license. Key qt serial bus classes used in this example. Close closes a previously opened connection.
A connect dialog is provided to adjust the can bus connection parameters. Getmsg is a blocking call to receive a message. To meet the multiple user needs the local loopback is enabled by default.
This page lists examples which specifically use d bus for inter process communication ipc. Qt can bus a controller area network can is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other in applications without a host computer. Qcanbus loads qt can bus plugins at runtime.
Sendmsg is a non blocking call to send a message. It is possible to add a timeout value after the call will return even if no message is received. To run the example from qt creator open the welcome mode and select the example from examples.