Index: sources/canbus/FrameInterface.cpp =================================================================== diff -u -r526875e8db8cf0c97f5cd8aa90564e41d42f5fde -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/canbus/FrameInterface.cpp (.../FrameInterface.cpp) (revision 526875e8db8cf0c97f5cd8aa90564e41d42f5fde) +++ sources/canbus/FrameInterface.cpp (.../FrameInterface.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 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. * * \file FrameInterface.cpp * \author (last) Behrouz NematiPour - * \date (last) 22-Sep-2021 + * \date (last) 30-Jul-2023 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -74,11 +74,11 @@ */ void FrameInterface::quit() { - // coco begin validated: Application termination is not correctly done in coco!!! + // disabled coco begin validated: Application termination is not correctly done in coco!!! // it has been tested and works perfectly fine in normal run. quitThread(); // validated } -// coco end +// disabled coco end /*! * \brief FrameInterface connections definition @@ -123,15 +123,15 @@ */ void FrameInterface::quitThread() { - // coco begin validated: Application termination is not correctly done in coco!!! + // disabled coco begin validated: Application termination is not correctly done in coco!!! // it has been tested and works perfectly fine in normal run. if ( ! _thread ) return; // runs in thread moveToThread(qApp->thread()); // validated } -// coco end +// disabled coco end /*! * \brief FrameInterface::transmitFrame @@ -178,54 +178,54 @@ case eDG_Dialin: case eDialin_UI: case eUI_Dialin: - if ( gEnableDialinUnhandled ) { - channelGroup = ChannelGroup::eChannel_Listens; - } else { + if ( gDisableDialinUnhandled ) { channelGroup = ChannelGroup::eChannel_Ignores; + } else { + channelGroup = ChannelGroup::eChannel_Listens; } - debugChannel = true; - ok = gEnableDialinUnhandled; + debugChannel = gDisableDialinUnhandled; // if debug channel is true, the raw can message in logged in the service log. + ok = ! gDisableDialinUnhandled; // if ok is true then it will be interpreted as unhandled messages. break; case eChlid_HD_DG : channelGroup = ChannelGroup::eChannel_Ignores; break; - // coco begin validated: The HD/DG communication has not been defined and implemented yet. + // disabled coco begin validated: The HD/DG communication has not been defined and implemented yet. case eChlid_DG_HD : - // coco end + // disabled coco end // this channel is used for DG CheckIn for HW support and testing for now. //channelGroup = ChannelGroup::eChannel_Ignores; //break; case eChlid_HD_UI : case eChlid_HD_Alarm : case eChlid_HD_Sync : - // coco begin validated: The UI/DG communication has not been defined and implemented yet. + // disabled coco begin validated: The UI/DG communication has not been defined and implemented yet. case eChlid_DG_Alarm : case eChlid_DG_UI : case eChlid_DG_Sync : - // coco end + // disabled coco end //case eChlid_DG_UI : // has duplicate value as eChlid_DG_Alarm channelGroup = ChannelGroup::eChannel_Listens; break; - // coco begin validated: The UI Alarm and Sync messages has not been defined and implemented yet. + // disabled coco begin validated: The UI Alarm and Sync messages has not been defined and implemented yet. case eChlid_UI_Alarm : case eChlid_UI_Sync : //case eChlid_UI_DG : channelGroup = ChannelGroup::eChannel_Outputs; break; - // coco end + // disabled coco end default: ok = false; break; } - // coco begin validated: manually tested + // disabled coco begin validated: manually tested if (vOK) *vOK = ok; if (vDebugChanngel) *vDebugChanngel = debugChannel; - // coco end + // disabled coco end return channelGroup; } @@ -278,7 +278,7 @@ void FrameInterface::onFrameTransmit(Can_Id vCan_Id, const QByteArray &vData) { appendHead(vCan_Id, vData); - // Test : qDebug() << _timestamp << "apnd #" << _txFrameList.count(); + // DEBUG: qDebug() << _timestamp << "apnd #" << _txFrameList.count(); } /*! @@ -289,7 +289,7 @@ { _transmitted = true; removeHead(); - // Test : qDebug() << _timestamp << "Sent #" << _txFrameList.count() << vCount; + // DEBUG: qDebug() << _timestamp << "Sent #" << _txFrameList.count() << vCount; } /*! @@ -299,10 +299,10 @@ void FrameInterface::timerEvent(QTimerEvent *) { static quint8 count = 0; - // Test : _timestamp = QTime::currentTime().toString("HH:mm:ss.zzz"); + // TEST : _timestamp = QTime::currentTime().toString("HH:mm:ss.zzz"); if (++count != _interval) return; - // Test : qDebug() << _timestamp; + // DEBUG: qDebug() << _timestamp; count = 0; _transmitted = false; trnsmtHead(); @@ -317,19 +317,19 @@ void FrameInterface::trnsmtHead() { if ( _txFrameList.isEmpty() ) { - // coco begin validated: This is a fake data generator for CANBus missing/swapped frames Testing + // disabled coco begin validated: This is a fake data generator for CANBus missing/swapped frames Testing // will never be executed on the product and shall be removed after the CANBus issues has been resolved. // has been tested manually if ( gSendEmptyKeepAwake ) { transmitFrame(eChlid_LOWEST,QByteArray()); // Keep the CANBus awake. return; } } - // coco end + // disabled coco end else { Frame frame = _txFrameList.first(); transmitFrame(frame.can_Id, frame.data); - // Test : qDebug() << _timestamp << "Tsmt #" << _txFrameList.count(); + // DEBUG: qDebug() << _timestamp << "Tsmt #" << _txFrameList.count(); } } @@ -356,7 +356,8 @@ */ void FrameInterface::appendHead(Can_Id vCan_Id, const QByteArray &vData) { - // coco begin validated: has been manually tested by sending over 4000 frames and not received by any other node. + // disabled coco begin validated: has been manually tested by sending over 4000 frames and not received by any other node. + //DEBUG qDebug() << "F " << _txFrameList.count(); if (_txFrameList.count() >= _txFrameList_Max) { static quint32 i = 0; if ( i % 60 == 0 ) { // log only for the first time and each minute. @@ -365,7 +366,7 @@ if ( i < UINT32_MAX - 1 ) i++ ; else i = 0; return; - // coco end + // disabled coco end } Frame frame = Frame(vCan_Id, vData);