Index: sources/threads.cpp =================================================================== diff -u -rb9c5b0b3afc3b34d4980ecc4f023f498f80dafbc -r56e378f7504701b9e9a9dccaf205aef2fd52c58e --- sources/threads.cpp (.../threads.cpp) (revision b9c5b0b3afc3b34d4980ecc4f023f498f80dafbc) +++ sources/threads.cpp (.../threads.cpp) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) @@ -1,14 +1,15 @@ /*! * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. - * copyright - * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, - * IN PART OR IN WHOLE, - * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * - * file threads.cpp - * date 1/6/2020 - * author Behrouz NematiPour + * \file threads.cpp + * \author (last) Behrouz NematiPour + * \date (last) 30-Jul-2020 + * \author (original) Behrouz NematiPour + * \date (original) 07-Jan-2020 * */ #include "threads.h" @@ -28,11 +29,12 @@ * this has currently been done in main.cpp in main() after the qpp.exe() is done. */ namespace Threads { - QThread _CanFrame_Thread; - QThread _CanMessage_Thread; - QThread _USBWatcher_Thread; - QThread _Logger_Thread; - QThread _Application_Thread; + QThread _CanFrame_Thread ; + QThread _CanAcknow_Thread ; + QThread _CanMessage_Thread ; + QThread _DriveWatcher_Thread ; + QThread _Logger_Thread ; + QThread _Application_Thread ; /*! * \brief registerTypes @@ -51,6 +53,12 @@ // FrameInterface : This is required for Signal/Slots in threading. qRegisterMetaType("Can_Id"); + + // MessageAcknowModel : This is required for Signal/Slots in threading. + qRegisterMetaType("Sequence"); + + // MessageAcknowModel : This is required for Signal/Slots in threading. + qRegisterMetaType("FrameList"); } /*! @@ -60,10 +68,13 @@ */ void quitThread(QThread &vThread) { + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. // runs in main thread - vThread.quit(); - vThread.wait(); + vThread.quit(); // validated + vThread.wait(); // validated } + // coco end /*! * \brief quitThreads @@ -73,10 +84,14 @@ */ void quitThreads() { - quitThread(_CanFrame_Thread ); - quitThread(_CanMessage_Thread ); - quitThread(_USBWatcher_Thread ); - quitThread(_Logger_Thread ); - quitThread(_Application_Thread); + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. + quitThread(_CanFrame_Thread ); // validated + quitThread(_CanAcknow_Thread ); // validated + quitThread(_CanMessage_Thread ); // validated + quitThread(_DriveWatcher_Thread ); // validated + quitThread(_Logger_Thread ); // validated + quitThread(_Application_Thread ); // validated } + // coco end }