Index: sources/canbus/frameinterface.h =================================================================== diff -u -r805119c460b4a266d6401c8705f4427e7fbe270f -r4836b003eb45d7f8cb98ea4c7999d068f0beb0d2 --- sources/canbus/frameinterface.h (.../frameinterface.h) (revision 805119c460b4a266d6401c8705f4427e7fbe270f) +++ sources/canbus/frameinterface.h (.../frameinterface.h) (revision 4836b003eb45d7f8cb98ea4c7999d068f0beb0d2) @@ -16,6 +16,7 @@ // Qt #include #include +#include // Project #include "main.h" @@ -60,6 +61,23 @@ QThread *_thread = nullptr; bool _init = false; + struct Frame { + Can_Id can_Id; + QByteArray data ; + + Frame(Can_Id vCan_Id, const QByteArray &vData) { + can_Id = vCan_Id; + data = vData ; + } + }; + QList _frameList; + bool _waitSend = false; + QMutex _mutexTransmit1; + QMutex _mutexTransmit2; + QMutex _mutexTransmit3; + qint64 _fc = 0; + + // Singleton SINGLETON(FrameInterface) @@ -82,6 +100,7 @@ private slots: // Should be private for thread safety and is connected internally. void onFrameTransmit(Can_Id vCan_Id, const QByteArray &vData ); // GUI => CAN void onFrameReceive ( const QCanBusFrame &vFrame ); // GUI <= CAN + void onFrameWritten (qint64 vCount ); // GUI <= CAN signals: /*! @@ -108,5 +127,7 @@ * \param vFrame - The frame which has been created to be transmitted. */ void didFrameTransmit( const QCanBusFrame &vFrame ); // GUI => CAN +protected: + void timerEvent(QTimerEvent *); }; }