Qt6 receive/send PCAN bus by PCAN library
-
I am trying to receive/send CAN-Bus messages via the library (PCANBasic.dll) with USB.
now I can use a timer to read can-bus message, but I don't know how receive message by event.
from the Peak CAN example based on C++MFC, it supports Reading use Event and Timer. -
I am trying to receive/send CAN-Bus messages via the library (PCANBasic.dll) with USB.
now I can use a timer to read can-bus message, but I don't know how receive message by event.
from the Peak CAN example based on C++MFC, it supports Reading use Event and Timer.@Peter626 How about using Qt's CAN library (which uses PCANBasic in the background)? https://doc.qt.io/qt-6/qtcanbus-backends.html
-
I am trying to receive/send CAN-Bus messages via the library (PCANBasic.dll) with USB.
now I can use a timer to read can-bus message, but I don't know how receive message by event.
from the Peak CAN example based on C++MFC, it supports Reading use Event and Timer.@Peter626 said in Qt6 receive/send PCAN bus by PCAN library:
now I can use a timer to read can-bus message, but I don't know how receive message by event.
What event? There is no Qt event for that.
You need to wrap the 3rd party lib code yourself, if you want "Qt events"...I would use Qt Signals instead.
Create some kind of worker which receives messages in the background (don't know the library interface... could be async, could be blocking) and then emit signals to update your Qt app. -
I am trying to receive/send CAN-Bus messages via the library (PCANBasic.dll) with USB.
now I can use a timer to read can-bus message, but I don't know how receive message by event.
from the Peak CAN example based on C++MFC, it supports Reading use Event and Timer.@Peter626 How about using Qt's CAN library (which uses PCANBasic in the background)? https://doc.qt.io/qt-6/qtcanbus-backends.html
-
@Peter626 How about using Qt's CAN library (which uses PCANBasic in the background)? https://doc.qt.io/qt-6/qtcanbus-backends.html
-
P Peter626 has marked this topic as solved on