Index: sources/canbus/caninterface.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,432 +1,432 @@ /*! - * + * * 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. - * + * * \file caninterface.cpp * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 28-Oct-2019 - * + * */ -#include "caninterface.h" - -// Qt -#include -#include - -// stl -#include - -// Project -#include "logger.h" -#include "messageglobals.h" -#include "frameinterface.h" - -// namespace -using namespace Can; - -/*! - * \brief CanInterface::CanInterface - * \details Constructor - * \param parent - QObject parent owner object. - * Qt handles the children destruction by their parent objects life-cycle. - */ -CanInterface::CanInterface(QObject *parent) : QObject(parent) { } - -/*! - * \brief CanInterface Initialization - * \details Initializes the CANBUS and checks if can be connected - * \return true if connected, false otherwise - */ -bool CanInterface::init() -{ - if ( _init ) return false; - _init = true; - - // coco begin validated: Manually tested since required to disable and enable the canbus - if ( ! initDevice() ) return false; - // coco end - if ( ! testDevice() ) return false; - - initConnections(); - - status(tr("Connected")); - QString logMessage = QString("UI,%1,%2") - .arg(tr("%1 Initialized").arg(metaObject()->className())) - .arg(status()); - LOG_EVENT(logMessage); - - return true; -} - -/*! - * \brief CanInterface::init - * \details Initialized the Class by calling the init() method first - * And initializes the thread vThread by calling initThread - * on success init(). - * \param vThread - the thread - * \return returns the return value of the init() method - */ -bool CanInterface::init(QThread &vThread) -{ - // coco begin validated: Manually tested since required to disable and enable the canbus - if ( ! init() ) return false; - // coco end - initThread(vThread); - return true; -} - -/*! - * \brief CanInterface quit - * \details quits the class - * Calls quitThread - */ -void CanInterface::quit() -{ - // coco begin validated: Application termination is not correctly done in coco!!! - // it has been tested and works perfectly fine in normal run. - quitThread(); // verified -} -// coco end - -/*! - * \brief CanInterface status - * \details CanInterface status description - * \return The current stores status - */ -QString CanInterface::status() const -{ - return _canStatus; -} - -/*! - * \brief CanInterface::enableConsoleOut - * \details Enable or Disables the console output and logs the status - * \param vEnabled - Enalbe console output if true - */ -void CanInterface::enableConsoleOut(bool vEnabled) { - // coco begin validated: This code meant to be used only for debugging and tested manually - if (_enableConsoleOut == vEnabled) return; - _enableConsoleOut = vEnabled; - if (_enableConsoleOut) { - LOG_DEBUG("Console out CanInterface enabled"); - } else { - LOG_DEBUG("Console out CanInterface disabled"); - } -} -// coco end - -/*! - * \brief CanInterface connections definition - * \details Initializes the required signal/slot connection between this class and other objects - * to be able to communicate. - */ -void CanInterface::initConnections() -{ - // coco begin validated: Manually tested since required to disable and enable the canbus - if (_canDevice) { - // coco end - connect(_canDevice, SIGNAL( framesReceived()), - this , SLOT (onFrameReceive ())); - - connect(_canDevice, SIGNAL( errorOccurred(QCanBusDevice::CanBusError)), - this , SLOT (onFrameError (QCanBusDevice::CanBusError))); - - connect(_canDevice, SIGNAL( framesWritten(qint64)), - this , SLOT (onFrameWritten (qint64))); - } - connect(&_FrameInterface, SIGNAL(didFrameTransmit(QCanBusFrame)), - this , SLOT( onFrameTransmit(QCanBusFrame))); -} - -/*! - * \brief CanInterface::initThread - * \details Moves this object into the thread vThread. - * And checks that this method is called from main thread. - * Also connects quitThread to application aboutToQuit. - * \param vThread - the thread - */ -void CanInterface::initThread(QThread &vThread) -{ - // runs in main thread - Q_ASSERT_X(QThread::currentThread() == qApp->thread() , __func__, "The Class initialization must be done in Main Thread" ); - _thread = &vThread; - _thread->setObjectName(QString("%1_Thread").arg(metaObject()->className())); - connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(quit())); - _thread->start(); - moveToThread(_thread); -} - -/*! - * \brief CanInterface::quitThread - * \details Moves this object to main thread to be handled by QApplicaiton - * And to be destroyed there. - */ -void CanInterface::quitThread() -{ - // 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()); // verified -} -// coco end - -/*! - * \brief CanInterface::createDevice - * \details Creates the CANBus device - * \return false if can't create the device - */ -bool CanInterface::initDevice() -{ - QString mError; - _canDevice = QCanBus::instance()->createDevice(_canType, _canInterface, &mError); - // coco begin validated: Manually tested since required to disable and enable the canbus - if (!_canDevice) { - status(tr("Device Creation"), mError); - LOG_DEBUG(status()); - return false; - } - // coco end - return true; -} - -/*! - * \brief CanInterface::checkDevice - * \details Checks if the device has been connected. - * \return - */ -bool CanInterface::testDevice() -{ - if (!_canDevice->connectDevice()) { - status(tr("Connection")); - LOG_DEBUG(status()); - delete _canDevice; - _canDevice = nullptr; - return false; - } - return true; -} - -/*! - * \brief CanInterface::deleteDevice - * \details Disconnect the CANBus device and deletes the pointer - */ -void CanInterface::quitDevice() -{ - // coco begin validated: Manually tested since required to disable and enable the canbus - if (!_canDevice) return; - // coco end - _canDevice->disconnectDevice(); - delete _canDevice; - _canDevice = nullptr; - status(tr("Disconnected")); -} - -/*! - * \brief CanInterface status - * \details Sets the Can interface status description - * \param vDescription - Description about the CANBUS Interface errors - * \param vError - Qt CANBUS Interface Error - */ -void CanInterface::status(const QString &vDescription, QString vError) -{ - QString mError=""; - if (_canDevice) { - mError = _canDevice->errorString() + vError; - } - else { - mError = vError; - } - _canStatus = tr("%1 '%2[%3]', %4") - .arg(vDescription) - .arg(_canType) - .arg(_canInterface) - .arg(mError) - ; - qDebug() << _canStatus; -} - -/*! - * \brief CanInterface send - * \details send a frame over the CANBUS - * \param vFrame - CANBUS message frame - */ -bool CanInterface::transmit(const QCanBusFrame &vFrame) -{ - // coco begin validated: Manually tested since required to disable and enable the canbus - if( !_canDevice ) return false; - //coco end - return _canDevice->writeFrame(vFrame); -} - -/*! - * \brief CanInterface console Output messaging - * \details Sends out formatted CANBUS message to the console - * for debugging purposes. - * \param vFrame - The CANBUS frame to be sent out - */ -void CanInterface::consoleOut(const QCanBusFrame &vFrame, const QString &vFrameCount) -{ - // coco begin validated: This code is only for debugging purposes and had been tested manually. - if ( ! _enableConsoleOut ) return; - - const QString time = QString::fromLatin1("%1.%2 ") - .arg(vFrame.timeStamp().seconds(), 10, 10, QLatin1Char(' ')) - .arg(vFrame.timeStamp().microSeconds() / 100, 4, 10, QLatin1Char('0')); - const QString flags = frameFlags(vFrame); - QString view; - if (vFrame.frameType() == QCanBusFrame::ErrorFrame) { - view = _canDevice->interpretErrorFrame(vFrame); - } - else { - view = vFrame.payload().toHex('.').replace(QByteArray("a5"),QByteArray("\033[1;33mA5\033[0m")); - } - fprintf(stderr, "%s %s %s %i %s\n", vFrameCount.toLatin1().constData(), time.toLatin1().constData(), flags.toLatin1().constData(), vFrame.frameId(), view.toLatin1().constData()); -} -// coco end - -/*! - * \brief CanInterface::rxCount - * \details count received frames up the size of the FrameCount type size - * \return frame count - */ -FrameCount CanInterface::rxCount() -{ - Types::safeIncrement(_rxFrameCount); - return _rxFrameCount; -} - -/*! - * \brief CanInterface::txCount - * \details count transmitted frames up the size of the FrameCount type size - * \return frame count - */ -FrameCount CanInterface::txCount() -{ - Types::safeIncrement(_txFrameCount); - return _txFrameCount; -} - -/*! - * \brief CanInterface::erCount - * \details count errors happened - * \return error count - */ -FrameCount CanInterface::erCount() -{ - // coco begin validated: CANBus error handling has been tested manually. - // since it requires massive can messages sent/received to catch the error - Types::safeIncrement(_erFrameCount); - return _erFrameCount; - // coco end -} - -/*! - * \brief frameFlags - * \details CANBUS message frame type as flags - * \param vFrame - CANBUS message frame - * \return Frame flag as QString - */ -QString CanInterface::frameFlags(const QCanBusFrame &vFrame) -{ - // coco begin validated: CANBus error handling has been tested manually. - // since it requires massive can messages sent/received to catch the error - QString result = QLatin1String(" --- "); - - if (vFrame.hasBitrateSwitch()) - result[1] = QLatin1Char('B'); - if (vFrame.hasErrorStateIndicator()) - result[2] = QLatin1Char('E'); - if (vFrame.hasLocalEcho()) - result[3] = QLatin1Char('L'); - - return result; - // coco end -} - -/*! - * \brief CanInterface onError - * \details Can Bus error handler which sets the can status description - * \param vError - CANBUS error - */ -void CanInterface::onFrameError(QCanBusDevice::CanBusError vError) -{ - // coco begin validated: CANBus error handling has been tested manually. - // since it requires massive can messages sent/received to catch the error - erCount(); - switch (vError) { - case QCanBusDevice::ReadError: - case QCanBusDevice::WriteError: - case QCanBusDevice::ConnectionError: - case QCanBusDevice::ConfigurationError: - case QCanBusDevice::UnknownError: - _canStatus = _canDevice->errorString(); - LOG_DEBUG(QString("%1 - %2").arg(_erFrameCount).arg(_canStatus)); - break; - - default: - break; - - } - emit didFrameError(_canStatus); -} -// coco end - -/*! - * \brief CanInterface::onFrameWritten - * \details This is the slot connected to the signal - * which is emitted every time a payload of frames - * has been written to the CANBUS bus. - * \param vFramesCount - The framesCount argument is set to the number of frames - * that were written in this payload. - */ -void CanInterface::onFrameWritten(qint64 vFramesCount) -{ - static FrameCount mFrameCount = 0; - Types::safeIncrement(mFrameCount, vFramesCount); - emit didFrameWritten(vFramesCount); -} - -/*! - * \brief CanInterface onFrameReceived - * \details CANBUS message read handler - */ -void CanInterface::onFrameReceive () -{ - // coco begin validated: Manually tested since required to disable and enable the canbus - if (!_canDevice) return; - // coco end - while (_canDevice->framesAvailable()) { - const QCanBusFrame frame = _canDevice->readFrame(); - rxCount(); - // coco begin validated: This code is only for debugging purposes and had been tested manually. - if ( _enableConsoleOut ) - consoleOut(frame, QString("Rx:%1").arg(_rxFrameCount)); - // coco end - emit didFrameReceive(frame); - } -} - -/*! - * \brief CanInterface onActionPerform - * \details sends a CANBUS message frame of the CANBUS message of the performed action - * This is a response from application UI to HD device - * \param vFrame - CANBUS message frame - */ -void CanInterface::onFrameTransmit(const QCanBusFrame &vFrame) -{ - bool ok = transmit(vFrame); - txCount(); - // coco begin validated: This code is only for debugging purposes and had been tested manually. - if ( _enableConsoleOut ) - consoleOut(vFrame, QString("Tx:%1").arg(_txFrameCount)); - // coco end - emit didFrameTransmit(ok); -} +#include "caninterface.h" + +// Qt +#include +#include + +// stl +#include + +// Project +#include "logger.h" +#include "messageglobals.h" +#include "frameinterface.h" + +// namespace +using namespace Can; + +/*! + * \brief CanInterface::CanInterface + * \details Constructor + * \param parent - QObject parent owner object. + * Qt handles the children destruction by their parent objects life-cycle. + */ +CanInterface::CanInterface(QObject *parent) : QObject(parent) { } + +/*! + * \brief CanInterface Initialization + * \details Initializes the CANBUS and checks if can be connected + * \return true if connected, false otherwise + */ +bool CanInterface::init() +{ + if ( _init ) return false; + _init = true; + + // coco begin validated: Manually tested since required to disable and enable the canbus + if ( ! initDevice() ) return false; + // coco end + if ( ! testDevice() ) return false; + + initConnections(); + + status(tr("Connected")); + QString logMessage = QString("UI,%1,%2") + .arg(tr("%1 Initialized").arg(metaObject()->className())) + .arg(status()); + LOG_EVENT(logMessage); + + return true; +} + +/*! + * \brief CanInterface::init + * \details Initialized the Class by calling the init() method first + * And initializes the thread vThread by calling initThread + * on success init(). + * \param vThread - the thread + * \return returns the return value of the init() method + */ +bool CanInterface::init(QThread &vThread) +{ + // coco begin validated: Manually tested since required to disable and enable the canbus + if ( ! init() ) return false; + // coco end + initThread(vThread); + return true; +} + +/*! + * \brief CanInterface quit + * \details quits the class + * Calls quitThread + */ +void CanInterface::quit() +{ + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. + quitThread(); // verified +} +// coco end + +/*! + * \brief CanInterface status + * \details CanInterface status description + * \return The current stores status + */ +QString CanInterface::status() const +{ + return _canStatus; +} + +/*! + * \brief CanInterface::enableConsoleOut + * \details Enable or Disables the console output and logs the status + * \param vEnabled - Enalbe console output if true + */ +void CanInterface::enableConsoleOut(bool vEnabled) { + // coco begin validated: This code meant to be used only for debugging and tested manually + if (_enableConsoleOut == vEnabled) return; + _enableConsoleOut = vEnabled; + if (_enableConsoleOut) { + LOG_DEBUG("Console out CanInterface enabled"); + } else { + LOG_DEBUG("Console out CanInterface disabled"); + } +} +// coco end + +/*! + * \brief CanInterface connections definition + * \details Initializes the required signal/slot connection between this class and other objects + * to be able to communicate. + */ +void CanInterface::initConnections() +{ + // coco begin validated: Manually tested since required to disable and enable the canbus + if (_canDevice) { + // coco end + connect(_canDevice, SIGNAL( framesReceived()), + this , SLOT (onFrameReceive ())); + + connect(_canDevice, SIGNAL( errorOccurred(QCanBusDevice::CanBusError)), + this , SLOT (onFrameError (QCanBusDevice::CanBusError))); + + connect(_canDevice, SIGNAL( framesWritten(qint64)), + this , SLOT (onFrameWritten (qint64))); + } + connect(&_FrameInterface, SIGNAL(didFrameTransmit(QCanBusFrame)), + this , SLOT( onFrameTransmit(QCanBusFrame))); +} + +/*! + * \brief CanInterface::initThread + * \details Moves this object into the thread vThread. + * And checks that this method is called from main thread. + * Also connects quitThread to application aboutToQuit. + * \param vThread - the thread + */ +void CanInterface::initThread(QThread &vThread) +{ + // runs in main thread + Q_ASSERT_X(QThread::currentThread() == qApp->thread() , __func__, "The Class initialization must be done in Main Thread" ); + _thread = &vThread; + _thread->setObjectName(QString("%1_Thread").arg(metaObject()->className())); + connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(quit())); + _thread->start(); + moveToThread(_thread); +} + +/*! + * \brief CanInterface::quitThread + * \details Moves this object to main thread to be handled by QApplicaiton + * And to be destroyed there. + */ +void CanInterface::quitThread() +{ + // 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()); // verified +} +// coco end + +/*! + * \brief CanInterface::createDevice + * \details Creates the CANBus device + * \return false if can't create the device + */ +bool CanInterface::initDevice() +{ + QString mError; + _canDevice = QCanBus::instance()->createDevice(_canType, _canInterface, &mError); + // coco begin validated: Manually tested since required to disable and enable the canbus + if (!_canDevice) { + status(tr("Device Creation"), mError); + LOG_DEBUG(status()); + return false; + } + // coco end + return true; +} + +/*! + * \brief CanInterface::checkDevice + * \details Checks if the device has been connected. + * \return + */ +bool CanInterface::testDevice() +{ + if (!_canDevice->connectDevice()) { + status(tr("Connection")); + LOG_DEBUG(status()); + delete _canDevice; + _canDevice = nullptr; + return false; + } + return true; +} + +/*! + * \brief CanInterface::deleteDevice + * \details Disconnect the CANBus device and deletes the pointer + */ +void CanInterface::quitDevice() +{ + // coco begin validated: Manually tested since required to disable and enable the canbus + if (!_canDevice) return; + // coco end + _canDevice->disconnectDevice(); + delete _canDevice; + _canDevice = nullptr; + status(tr("Disconnected")); +} + +/*! + * \brief CanInterface status + * \details Sets the Can interface status description + * \param vDescription - Description about the CANBUS Interface errors + * \param vError - Qt CANBUS Interface Error + */ +void CanInterface::status(const QString &vDescription, QString vError) +{ + QString mError=""; + if (_canDevice) { + mError = _canDevice->errorString() + vError; + } + else { + mError = vError; + } + _canStatus = tr("%1 '%2[%3]', %4") + .arg(vDescription) + .arg(_canType) + .arg(_canInterface) + .arg(mError) + ; + qDebug() << _canStatus; +} + +/*! + * \brief CanInterface send + * \details send a frame over the CANBUS + * \param vFrame - CANBUS message frame + */ +bool CanInterface::transmit(const QCanBusFrame &vFrame) +{ + // coco begin validated: Manually tested since required to disable and enable the canbus + if( !_canDevice ) return false; + //coco end + return _canDevice->writeFrame(vFrame); +} + +/*! + * \brief CanInterface console Output messaging + * \details Sends out formatted CANBUS message to the console + * for debugging purposes. + * \param vFrame - The CANBUS frame to be sent out + */ +void CanInterface::consoleOut(const QCanBusFrame &vFrame, const QString &vFrameCount) +{ + // coco begin validated: This code is only for debugging purposes and had been tested manually. + if ( ! _enableConsoleOut ) return; + + const QString time = QString::fromLatin1("%1.%2 ") + .arg(vFrame.timeStamp().seconds(), 10, 10, QLatin1Char(' ')) + .arg(vFrame.timeStamp().microSeconds() / 100, 4, 10, QLatin1Char('0')); + const QString flags = frameFlags(vFrame); + QString view; + if (vFrame.frameType() == QCanBusFrame::ErrorFrame) { + view = _canDevice->interpretErrorFrame(vFrame); + } + else { + view = vFrame.payload().toHex('.').replace(QByteArray("a5"),QByteArray("\033[1;33mA5\033[0m")); + } + fprintf(stderr, "%s %s %s %i %s\n", vFrameCount.toLatin1().constData(), time.toLatin1().constData(), flags.toLatin1().constData(), vFrame.frameId(), view.toLatin1().constData()); +} +// coco end + +/*! + * \brief CanInterface::rxCount + * \details count received frames up the size of the FrameCount type size + * \return frame count + */ +FrameCount CanInterface::rxCount() +{ + Types::safeIncrement(_rxFrameCount); + return _rxFrameCount; +} + +/*! + * \brief CanInterface::txCount + * \details count transmitted frames up the size of the FrameCount type size + * \return frame count + */ +FrameCount CanInterface::txCount() +{ + Types::safeIncrement(_txFrameCount); + return _txFrameCount; +} + +/*! + * \brief CanInterface::erCount + * \details count errors happened + * \return error count + */ +FrameCount CanInterface::erCount() +{ + // coco begin validated: CANBus error handling has been tested manually. + // since it requires massive can messages sent/received to catch the error + Types::safeIncrement(_erFrameCount); + return _erFrameCount; + // coco end +} + +/*! + * \brief frameFlags + * \details CANBUS message frame type as flags + * \param vFrame - CANBUS message frame + * \return Frame flag as QString + */ +QString CanInterface::frameFlags(const QCanBusFrame &vFrame) +{ + // coco begin validated: CANBus error handling has been tested manually. + // since it requires massive can messages sent/received to catch the error + QString result = QLatin1String(" --- "); + + if (vFrame.hasBitrateSwitch()) + result[1] = QLatin1Char('B'); + if (vFrame.hasErrorStateIndicator()) + result[2] = QLatin1Char('E'); + if (vFrame.hasLocalEcho()) + result[3] = QLatin1Char('L'); + + return result; + // coco end +} + +/*! + * \brief CanInterface onError + * \details Can Bus error handler which sets the can status description + * \param vError - CANBUS error + */ +void CanInterface::onFrameError(QCanBusDevice::CanBusError vError) +{ + // coco begin validated: CANBus error handling has been tested manually. + // since it requires massive can messages sent/received to catch the error + erCount(); + switch (vError) { + case QCanBusDevice::ReadError: + case QCanBusDevice::WriteError: + case QCanBusDevice::ConnectionError: + case QCanBusDevice::ConfigurationError: + case QCanBusDevice::UnknownError: + _canStatus = _canDevice->errorString(); + LOG_DEBUG(QString("%1 - %2").arg(_erFrameCount).arg(_canStatus)); + break; + + default: + break; + + } + emit didFrameError(_canStatus); +} +// coco end + +/*! + * \brief CanInterface::onFrameWritten + * \details This is the slot connected to the signal + * which is emitted every time a payload of frames + * has been written to the CANBUS bus. + * \param vFramesCount - The framesCount argument is set to the number of frames + * that were written in this payload. + */ +void CanInterface::onFrameWritten(qint64 vFramesCount) +{ + static FrameCount mFrameCount = 0; + Types::safeIncrement(mFrameCount, vFramesCount); + emit didFrameWritten(vFramesCount); +} + +/*! + * \brief CanInterface onFrameReceived + * \details CANBUS message read handler + */ +void CanInterface::onFrameReceive () +{ + // coco begin validated: Manually tested since required to disable and enable the canbus + if (!_canDevice) return; + // coco end + while (_canDevice->framesAvailable()) { + const QCanBusFrame frame = _canDevice->readFrame(); + rxCount(); + // coco begin validated: This code is only for debugging purposes and had been tested manually. + if ( _enableConsoleOut ) + consoleOut(frame, QString("Rx:%1").arg(_rxFrameCount)); + // coco end + emit didFrameReceive(frame); + } +} + +/*! + * \brief CanInterface onActionPerform + * \details sends a CANBUS message frame of the CANBUS message of the performed action + * This is a response from application UI to HD device + * \param vFrame - CANBUS message frame + */ +void CanInterface::onFrameTransmit(const QCanBusFrame &vFrame) +{ + bool ok = transmit(vFrame); + txCount(); + // coco begin validated: This code is only for debugging purposes and had been tested manually. + if ( _enableConsoleOut ) + consoleOut(vFrame, QString("Tx:%1").arg(_txFrameCount)); + // coco end + emit didFrameTransmit(ok); +} Index: sources/canbus/frameinterface.cpp =================================================================== diff -u -r74005a93d93ec4b12230bac72ed29b948eb1aa0a -red5d989264015440d9da6d0830679394a323cf55 --- sources/canbus/frameinterface.cpp (.../frameinterface.cpp) (revision 74005a93d93ec4b12230bac72ed29b948eb1aa0a) +++ sources/canbus/frameinterface.cpp (.../frameinterface.cpp) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -227,7 +227,7 @@ if (!ok) { LOG_DEBUG("Unexpected Channel\r\n" + - Format::toHexString(mFrameId, false, eLenChannelDigits) + " -- " + vFrame.payload().toHex(' ')); + Format::toHexString(mFrameId, false, eLenChannelDigits) + " -- " + vFrame.payload().toHex(' ')); return; } Index: sources/canbus/messagebuilder.cpp =================================================================== diff -u -r7c2a96774285bb618946f125763bf7bea7acadd8 -red5d989264015440d9da6d0830679394a323cf55 --- sources/canbus/messagebuilder.cpp (.../messagebuilder.cpp) (revision 7c2a96774285bb618946f125763bf7bea7acadd8) +++ sources/canbus/messagebuilder.cpp (.../messagebuilder.cpp) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -141,8 +141,8 @@ QString mHexMIdString = Format::toHexString(vAction, false, eLenMessageIDDigits); QString mHexDatString = vData.toHex('.').toUpper(); LOG_DEBUG(QString("Not enough data has been provided for the Message ID '%1'\r\n%2") - .arg(mHexMIdString) - .arg(mHexDatString) + .arg(mHexMIdString) + .arg(mHexDatString) ); return false; } Index: sources/canbus/messagebuilder.h =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- sources/canbus/messagebuilder.h (.../messagebuilder.h) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/canbus/messagebuilder.h (.../messagebuilder.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file messagebuilder.h * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 09-Dec-2019 - * + * */ #pragma once @@ -88,8 +88,6 @@ void enableConsoleOut(bool vEnabled); - - signals: public slots: Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -rbf645acccabb7b5a84801620c4f7fa0b0e6878e0 -red5d989264015440d9da6d0830679394a323cf55 --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision bf645acccabb7b5a84801620c4f7fa0b0e6878e0) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -196,7 +196,7 @@ void MessageDispatcher::onFailedTransmit(Sequence vSequence) { - // coco begin validated: Is a placeholder and has not beed implemented yet + // coco begin validated: Is a placeholder and has not been implemented yet emit didFailedTransmit(vSequence); } // coco end @@ -231,7 +231,7 @@ /*! * \brief MessageDispatcher::onAdjustment * \details This method transmits the treatment duration Adjustment Denali message. - * \param vData - Data model contains treatment duration adjustment value in minuts + * \param vData - Data model contains treatment duration adjustment value in minutes * \return void */ void MessageDispatcher::onAdjustment(const AdjustDurationRequestData &vData) @@ -319,10 +319,10 @@ #endif } - // coco begin validated: Has been tested manyally but in this function this can't be false because the message interpreter is doing the same validation. + // coco begin validated: Has been tested manually but in this function this can't be false because the message interpreter is doing the same validation. // still checking here in case the logic has changed therefore buildFrame should still validate the message for developer safety. if ( ! _builder.buildFrames(vActionId, mData, frameList, mSequence) ) { - LOG_DEBUG(QString("Incorrect Message can't be built")); // TODO : LOGGINF IMPROVEMENT + LOG_DEBUG(QString("Incorrect Message can't be built")); // TODO : LOGGINFO IMPROVEMENT return; } // coco end @@ -360,7 +360,7 @@ bool MessageDispatcher::buildMessage(Can_Id vCan_Id, const QByteArray &vPayload) { if (vPayload.length() < eLenCanFrame) { - // Each frame has to have exactly 8 (eLenCanFrame) bytes of data and not used bytes should be passed as 00. + // Each frame has to have exactly 8 (eLenCanFrame) bytes of data and unused bytes should be passed as 00. LOG_DEBUG(QString("Incorrect frame length. Exp:%1,got:%2").arg(eLenCanFrame).arg(vPayload.length())); return false; } Index: sources/canbus/messageinterpreter.cpp =================================================================== diff -u -r7c2a96774285bb618946f125763bf7bea7acadd8 -red5d989264015440d9da6d0830679394a323cf55 --- sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 7c2a96774285bb618946f125763bf7bea7acadd8) +++ sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -36,9 +36,9 @@ /*! * \brief MessageInterpreter::notify - * \details Checks and Prepaires the model with the Message Data - * Regarding the type of message logs the message recived. - * Notofies observers by emiting the didActionReceive( < Data > ) signal + * \details Checks and prepares the model with the Message Data + * Regarding the type of message logs the message received. + * Notifies observers by emitting the didActionReceive( < Data > ) signal * \param vMessage - The Denali message * \param vID - The Message ID to be checked against * \param vModel - The appropriate model for the Message Data @@ -55,7 +55,7 @@ tModel.toVariantList(vData); // coco begin validated : Tested manually. This code will never go false // because the isValidMessage is catching errors. - // only is checking here for developer safty if logic has changed. + // only is checking here for developer safety if logic has changed. if ( ! ok ) return false; // coco end emit didActionReceive(tModel.data()); @@ -81,8 +81,8 @@ /*! * \brief MessageInterpreter::isPayloadLenValid - * \details Checks if the Data length has been defined for this type od messsage - * if not logs Undefind Data Length error + * \details Checks if the Data length has been defined for this type of message + * if not logs Undefined Data Length error * if defined checks if the correct length of data is provided for this type of message. * if not logs Incorrect Data Length error * otherwise returns true @@ -106,19 +106,19 @@ /*! * \brief MessageInterpreter::logInvalidLength - * \details Logs invalid data length for the message typye vActionId + * \details Logs invalid data length for the message type vActionId * \param vActionId - Message Type */ void MessageInterpreter::logInvalidLength(const Gui::GuiActionType &vActionId) { QString mActionIdHexString = Format::toHexString(vActionId); - LOG_DEBUG(QString("Incorrect data length for trsansmit Message with ID '%1'") + LOG_DEBUG(QString("Incorrect data length for transmit message with ID '%1'") .arg(mActionIdHexString)); } /*! * \brief MessageInterpreter::validateMessage - * \details Validate the messgae by checking its type and data + * \details Validate the message by checking its type and data * \param vMessage - The message * \param vType - The type of the message to be checked against * \return true on valid massage @@ -143,15 +143,15 @@ QString mActionIdHexString = Format::toHexString(vMessage.actionId, false, eLenMessageIDDigits); QString logMessage = tr("Unhandled Message ID (HD)") + '\n' + QString("%1 # %2 %3") - .arg(int(vMessage.can_id), 3, 16, QChar('0')) - .arg(mActionIdHexString) - .arg(QString(vMessage.data.toHex('.'))); + .arg(int(vMessage.can_id), 3, 16, QChar('0')) + .arg(mActionIdHexString) + .arg(QString(vMessage.data.toHex('.'))); LOG_DEBUG(logMessage); } /*! * \brief MessageInterpreter::logReceived - * \details Regarding the type of message logs the message recived. + * \details Regarding the type of message logs the message received. * \param vModel - the MAbstract model type */ void MessageInterpreter::logReceivedMessage(const Model::MAbstract &vModel) @@ -281,7 +281,7 @@ case eChlid_DG_HD : case eChlid_DG_UI : - // case eChlid_DG_Alarm: // commented out for now. Currentlyh there is no message in this category. + // case eChlid_DG_Alarm: // commented out for now. Currently there is no message in this category. case eChlid_DG_Sync : ok = interpretMessage_DG(vMessage, vData); break; default: @@ -338,7 +338,7 @@ case Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); break; // TODO : implement notify<>() case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp : ok = adjustUltrafiltrationConfirm (vMessage, vData); break; // TODO : implement notify<>() - // unhandles messages: these will only be logged as received message + // unhandled messages: these will only be logged as received message // there has nothing been defined for these messages. default : printUnhandled (vMessage ); break; } @@ -380,7 +380,7 @@ case Gui::GuiActionType::ID_DGTemperaturesData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGTemperaturesData ); break; case Gui::GuiActionType::ID_DGDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGDebugText ); break; - // unhandles messages: these will only be logged as received message + // unhandled messages: these will only be logged as received message // there has nothing been defined for these messages. default: printUnhandled (vMessage); Index: sources/gui/qml/dialogs/NotificationDialog.qml =================================================================== diff -u -rbf645acccabb7b5a84801620c4f7fa0b0e6878e0 -red5d989264015440d9da6d0830679394a323cf55 --- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision bf645acccabb7b5a84801620c4f7fa0b0e6878e0) +++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -80,6 +80,7 @@ anchors.centerIn: _titleBar; } } + Text { id: _desc objectName: "_NotificationDialog_Description" color: Colors.textMain @@ -108,6 +109,7 @@ } } + TouchRect { id : _dismiss width: _root.width / 3; text.text: qsTr("SILENCE") Index: sources/gui/qml/pages/ManagerHome.qml =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- sources/gui/qml/pages/ManagerHome.qml (.../ManagerHome.qml) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/gui/qml/pages/ManagerHome.qml (.../ManagerHome.qml) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file ManagerHome.qml * \author (last) Behrouz NematiPour * \date (last) 22-Mar-2020 * \author (original) Behrouz NematiPour * \date (original) 21-Oct-2019 - * + * */ // Qt @@ -23,18 +23,6 @@ import "qrc:/globals" import "qrc:/components" -//// The original code kept for later use -// ScreenItem { id: _root -// Column { -// spacing: Variables.columnSpacing -// anchors.centerIn: parent -// TitleText { id: _titleText -// width: parent.width -// text: qsTr("Manager Home Placeholder") -// } -// } -// } - /*! * \brief ManagerHome is the screen * which is the default screen in the "Manager" stack Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file TreatmentStack.qml * \author (last) Behrouz NemaiPour * \date (last) 18-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 27-Jan-2020 - * + * */ // Qt @@ -198,4 +198,5 @@ _treatmentAdjustmentUltrafiltrationConfirm.notification.text = vTreatmentAdjustmentUltrafiltrationConfirm.text() } } - }} + } +} Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.qml) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.qml) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file TreatmentAdjustmentUltrafiltrationEdit.qml * \author (last) Behrouz NemaiPour * \date (last) 18-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 15-May-2020 - * + * */ // Qt @@ -41,7 +41,7 @@ signal nextClicked(real vVolume) function reset() { - _volumeSlider.value = _private.current // Per Ultrafiltration Adjustment Demo request By Blaine. + _volumeSlider.value = _private.current } closeVisible : false Index: sources/storage/logger.cpp =================================================================== diff -u -rbf645acccabb7b5a84801620c4f7fa0b0e6878e0 -red5d989264015440d9da6d0830679394a323cf55 --- sources/storage/logger.cpp (.../logger.cpp) (revision bf645acccabb7b5a84801620c4f7fa0b0e6878e0) +++ sources/storage/logger.cpp (.../logger.cpp) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -165,7 +165,7 @@ void Logger::checkLogPath() { setLogBasePath(); // try to use /media/sd_card on device - // coco begin validated: It can only happen if the file system is readonly for any reson. + // coco begin validated: It can only happen if the file system is readonly for any reason. // it has been tested and works perfectly fine in normal run. if (! setLogPath()) { // check and create log folders & if unsuccessful then // coco end @@ -221,7 +221,7 @@ bool ok = false; switch (vLogType) { case LogType::eLogDebug: - _logPathNames[vLogType] = qApp->applicationDirPath() + "/" + _logBasePathNames[vLogType]; + _logPathNames[vLogType] = _dir.path() + "/" + _logBasePathNames[vLogType]; break; default: @@ -352,7 +352,7 @@ countRemoved += FileHandler::removeFiles({ mCSource }, mLogFileFilter, mOlderThan); } else { - LOG_DEBUG("Current day logs cannot be deletet"); + LOG_DEBUG("Current day logs cannot be deleted"); } } } Index: sources/view/vtreatmentadjustmentultrafiltrationconfirm.h =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -red5d989264015440d9da6d0830679394a323cf55 --- sources/view/vtreatmentadjustmentultrafiltrationconfirm.h (.../vtreatmentadjustmentultrafiltrationconfirm.h) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ sources/view/vtreatmentadjustmentultrafiltrationconfirm.h (.../vtreatmentadjustmentultrafiltrationconfirm.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file vtreatmentadjustmentultrafiltrationconfirm.h * \author (last) Behrouz NemaiPour * \date (last) 22-Jun-2020 * \author (original) Behrouz NemaiPour * \date (original) 09-Jun-2020 - * + * */ #pragma once @@ -34,7 +34,7 @@ // The property adjustment_Triggered has to be always true // and to always trigger the change event to work as a notifier for GUI // has been manually tested that it works perfectly fine - TRIGGER( bool , adjustment , 0) + TRIGGER( bool , adjustment , 0) // coco end // Treatment Ultrafiltration data Index: unittests/tst_acknow.h =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_acknow.h (.../tst_acknow.h) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ unittests/tst_acknow.h (.../tst_acknow.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_acknow.h * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 21-Jan-2020 - * + * */ #pragma once @@ -56,4 +56,3 @@ void onFramesTransmit(Can_Id vCan_Id , Sequence vSequence, const FrameList &vFrameList); void onFailedTransmit(Sequence); }; - Index: unittests/tst_canbus.h =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_canbus.h (.../tst_canbus.h) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ unittests/tst_canbus.h (.../tst_canbus.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_canbus.h * \author (last) Behrouz NemaiPour * \date (last) 22-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 19-Dec-2019 - * + * */ #pragma once @@ -77,8 +77,6 @@ void cleanup(); void cleanupTestCase(); - void onFrameTransmit(Can_Id vCan_Id , const QByteArray &vPayload); void onActionReceive(GuiActionType vAction , const QVariantList &vData ); }; - Index: unittests/tst_initializations.h =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_initializations.h (.../tst_initializations.h) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ unittests/tst_initializations.h (.../tst_initializations.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_initializations.h * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 21-Apr-2020 - * + * */ #pragma once @@ -33,4 +33,3 @@ void tst_DriveWatcher_init(); void tst_FrameInterface_init(); }; - Index: unittests/tst_logging.h =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_logging.h (.../tst_logging.h) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ unittests/tst_logging.h (.../tst_logging.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_logging.h * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 08-Jan-2020 - * + * */ #pragma once @@ -30,8 +30,6 @@ explicit tst_logging(QObject *parent = nullptr); private slots: - - // will be called before the first test function is executed. void initTestCase(); @@ -55,4 +53,3 @@ void readUnknown(); }; - Index: unittests/tst_messaging.h =================================================================== diff -u -rbf645acccabb7b5a84801620c4f7fa0b0e6878e0 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_messaging.h (.../tst_messaging.h) (revision bf645acccabb7b5a84801620c4f7fa0b0e6878e0) +++ unittests/tst_messaging.h (.../tst_messaging.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -110,7 +110,4 @@ void tst_MessageDispatcher_actionTransmit(); void tst_MessageDispatcher_actionTransmit_Unknown(); - }; - - Index: unittests/tst_models.h =================================================================== diff -u -rbf645acccabb7b5a84801620c4f7fa0b0e6878e0 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_models.h (.../tst_models.h) (revision bf645acccabb7b5a84801620c4f7fa0b0e6878e0) +++ unittests/tst_models.h (.../tst_models.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -28,7 +28,6 @@ explicit tst_models(QObject *parent = nullptr); private slots: - void tst_MTreatmentRanges_data (); void tst_MTreatmentRanges (); @@ -53,7 +52,6 @@ void tst_MAdjustUltrafiltrationConfirmResponse_data (); void tst_MAdjustUltrafiltrationConfirmResponse (); - // - Data Messages void tst_DGROPumpData_data(); void tst_DGROPumpData(); @@ -102,4 +100,3 @@ void tst_MAlarmCleared_data(); void tst_MAlarmCleared(); }; - Index: unittests/tst_threads.h =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_threads.h (.../tst_threads.h) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ unittests/tst_threads.h (.../tst_threads.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_threads.h * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 21-Apr-2020 - * + * */ #pragma once @@ -29,11 +29,8 @@ explicit tst_threads(QObject *parent = nullptr); private slots: - void initTestCase(); void tst_Thread_init(); void tst_Thread_names(); - }; - Index: unittests/tst_utilities.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_utilities.cpp (.../tst_utilities.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ unittests/tst_utilities.cpp (.../tst_utilities.cpp) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_utilities.cpp * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 08-Jan-2020 - * + * */ #include "tst_utilities.h" @@ -235,7 +235,6 @@ QCOMPARE(mActual, mExpected); } - void tst_utilities::tst_getValue_len() { Types::S32 vFlowSetPoint; @@ -265,5 +264,3 @@ Types::safeIncrement(c); QCOMPARE(c, 0); } - - Index: unittests/tst_utilities.h =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_utilities.h (.../tst_utilities.h) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ unittests/tst_utilities.h (.../tst_utilities.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_utilities.h * \author (last) Behrouz NematiPour * \date (last) 07-May-2020 * \author (original) Behrouz NematiPour * \date (original) 08-Jan-2020 - * + * */ #pragma once @@ -25,7 +25,6 @@ explicit tst_utilities(QObject *parent = nullptr); private slots: - void tst_getValue_len(); void tst_floatCompare_noMatch(); void tst_floatCompare_isMatch(); @@ -49,6 +48,4 @@ void tst_safeIncrement_StepZero(); void tst_safeIncrement_GtMaxValue_Step1 (); void tst_safeIncrement_GtMaxValue_Step10(); - }; - Index: unittests/tst_views.h =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -red5d989264015440d9da6d0830679394a323cf55 --- unittests/tst_views.h (.../tst_views.h) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ unittests/tst_views.h (.../tst_views.h) (revision ed5d989264015440d9da6d0830679394a323cf55) @@ -1,16 +1,16 @@ /*! - * + * * 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. - * + * * \file tst_views.h * \author (last) Behrouz NemaiPour * \date (last) 23-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 21-Apr-2020 - * + * */ #pragma once @@ -32,4 +32,3 @@ void VTreatmentAdjustmentUltrafiltrationState_text(); }; -