Index: sources/canbus/frameinterface.h =================================================================== diff -u -re1605219ac2baf49ef21d0889f845ac53d59c3c1 -r56d00a82669a7a2c00ab90109a89dbec8db27527 --- sources/canbus/frameinterface.h (.../frameinterface.h) (revision e1605219ac2baf49ef21d0889f845ac53d59c3c1) +++ sources/canbus/frameinterface.h (.../frameinterface.h) (revision 56d00a82669a7a2c00ab90109a89dbec8db27527) @@ -16,22 +16,18 @@ // Qt #include #include -#include // Project #include "main.h" -#include "guiglobals.h" -#include "messagebuilder.h" -#include "messageinterpreter.h" +#include "messageglobals.h" // Define -#define _FrameInterface FrameInterface::I() +#define _FrameInterface Can::FrameInterface::I() // forward declarations class tst_canbus; // namespace -using namespace Gui; namespace Can { /*! @@ -59,14 +55,25 @@ eChannel_Outputs, ///< The Channels that are related to UI frames out. }; - // Singleton - SINGLETON(FrameInterface) -public: + QThread *_thread = nullptr; + bool _init = false; + +// Singleton +SINGLETON(FrameInterface) + +public slots: bool init(); + bool init(QThread &vThread); + +private slots: void quit(); private: void initConnections(); + + void initThread(QThread &vThread); + void quitThread(); + void transmitFrame(Can_Id vCan_Id, const QByteArray &vData = 0); ChannelGroup checkChannel(quint32 vFrameId, bool *vOK = nullptr);