Index: main.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- main.cpp (.../main.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ main.cpp (.../main.cpp) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -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 main.cpp * \author (last) Peter Lucia * \date (last) 26-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 24-Sep-2019 - * + * */ /*! @@ -299,9 +299,12 @@ //! - Initializing Main Timer _MainTimer.init(); + //! - Initialize the Qml Viewer and starts GUI int app_exec = -1; + LOG_DEBUG("GUI Starting"); if ( startGui() ) { + LOG_DEBUG("GUI Started"); app_exec = app.exec(); } Index: sources/canbus/messageinterpreter.cpp =================================================================== diff -u -r93b6ad6b18c505fedab37d95dc87be61db48641c -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 93b6ad6b18c505fedab37d95dc87be61db48641c) +++ sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -24,18 +24,8 @@ using namespace Can; -#define DEBUG_RECEIVE_SIGNAL(vID, vMODEL) // Debug() << #vID << #vMODEL; +#define DEBUG_RECEIVE_SIGNAL(vID, vMODEL) qDebug() << vID << vMODEL; -// This define helps to prevent having multiple overloaded functions for each model -#define EMIT_RECEIVE_SIGNAL(vID, vMODEL) { \ - vMODEL mModel; \ - ok = prepareData(vMessage, vID, mModel, vData); \ - if ( ! ok ) return false; \ - emit didActionReceive(mModel.data()); \ - logReceivedMessage(mModel); \ - DEBUG_RECEIVE_SIGNAL(vID, vMODEL) \ -} - /*! * \brief MessageInterpreter::MessageInterpreter * \details Constructor @@ -45,6 +35,32 @@ MessageInterpreter::MessageInterpreter(QObject *parent) : QObject(parent) { } /*! + * \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 + * \param vMessage - The Denali message + * \param vID - The Message ID to be checked against + * \param vModel - The appropriate model for the Message Data + * \param vData - A QVariant list of the Message Data which will be used for debugging if needed. + * \return true on successful check and prepare. + */ +template +bool MessageInterpreter::notify(const Message &vMessage, QVariantList &vData, Gui::GuiActionType vIdCheck) +{ + bool ok = false; + TModel mModel; + if ( ! isValidMessage(vMessage, vIdCheck) ) return ok; + ok = mModel.fromByteArray(vMessage.data); + mModel.toVariantList(vData); + if ( ! ok ) return false; + emit didActionReceive(mModel.data()); + logReceivedMessage(mModel); + DEBUG_RECEIVE_SIGNAL(vIdCheck, typeid(TModel).name()) + return ok; +} + +/*! * \brief MessageInterpreter::isType * \details Checks if this is the message intended to be * \param vMessage - The message @@ -125,24 +141,6 @@ } /*! - * \brief MessageInterpreter::prepareData - * \details Checks and Prepaires the model with the Message Data - * \param vMessage - The Denali message - * \param vID - The Message ID to be checked against - * \param vModel - The appropriate model for the Message Data - * \param vData - A QVariant list of the Message Data which will be used for debugging if needed. - * \return true on successful check and prepare. - */ -bool MessageInterpreter::prepareData(const Message &vMessage, Gui::GuiActionType vID, Model::MAbstract &vModel, QVariantList &vData) -{ - bool ok = false; - if ( ! isValidMessage(vMessage, vID) ) return ok; - ok = vModel.fromByteArray(vMessage.data); - vModel.toVariantList(vData); - return ok; -} - -/*! * \brief MessageInterpreter::logReceived * \details Regarding the type of message logs the message recived. * \param vModel - the MAbstract model type @@ -302,38 +300,38 @@ vData.clear(); switch (vMessage.actionId) { // notice we are in receive mode // ----- Debug - case Gui::GuiActionType::ID_CANBusFaultCount : ok = canbusFaultCountData (vMessage, vData); break; + case Gui::GuiActionType::ID_CANBusFaultCount : ok = canbusFaultCountData (vMessage, vData); break; // TODO : implement notify<>() // ----- Datum - case Gui::GuiActionType::ID_TreatmentTime : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_TreatmentTime , Model::MTreatmentTime ); break; - case Gui::GuiActionType::ID_BloodFlow : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_BloodFlow , Model::MBloodFlow ); break; - case Gui::GuiActionType::ID_DialysateInletFlow : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DialysateInletFlow , Model::MDialysateFlow ); break; - case Gui::GuiActionType::ID_DialysateOutletFlow : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DialysateOutletFlow , Model::MOutletFlow ); break; - case Gui::GuiActionType::ID_TreatmentRanges : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_TreatmentRanges , Model::MTreatmentRanges ); break; - case Gui::GuiActionType::ID_PressureOcclusion : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_PressureOcclusion , Model::MPressureOcclusion ); break; - case Gui::GuiActionType::ID_TreatmentStates : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_TreatmentStates , Model::MTreatmentStates ); break; + case Gui::GuiActionType::ID_TreatmentTime : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentTime ); break; + case Gui::GuiActionType::ID_BloodFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_BloodFlow ); break; + case Gui::GuiActionType::ID_DialysateInletFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DialysateInletFlow ); break; + case Gui::GuiActionType::ID_DialysateOutletFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DialysateOutletFlow ); break; + case Gui::GuiActionType::ID_TreatmentRanges : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentRanges ); break; + case Gui::GuiActionType::ID_PressureOcclusion : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PressureOcclusion ); break; + case Gui::GuiActionType::ID_TreatmentStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentStates ); break; // ----- Events - case Gui::GuiActionType::ID_HDOperationModeData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_HDOperationModeData , Model::MHDOperationMode ); break; - case Gui::GuiActionType::ID_HDDebugText : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_HDDebugText , Model::MHDDebugText ); break; + case Gui::GuiActionType::ID_HDOperationModeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDOperationModeData ); break; + case Gui::GuiActionType::ID_HDDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDDebugText ); break; - case Gui::GuiActionType::ID_Acknow : ok = true; break; // Needs more investigation for EMIT_RECEIVE_SIGNAL consistency - case Gui::GuiActionType::ID_PowerOff : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_PowerOff , Model::MPowerOff ); break; - case Gui::GuiActionType::ID_ShuttingDown : ok = true; LOG_EVENT("HD,ShuttingDown"); break; // Needs more investigation for EMIT_RECEIVE_SIGNAL consistency - case Gui::GuiActionType::ID_AlarmStatus : ok = alarmStatus (vMessage, vData); break; - case Gui::GuiActionType::ID_AlarmTriggered : ok = alarmTriggered (vMessage, vData); break; - case Gui::GuiActionType::ID_AlarmCleared : ok = alarmCleared (vMessage, vData); break; + case Gui::GuiActionType::ID_Acknow : ok = true; break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_PowerOff : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PowerOff ); break; + case Gui::GuiActionType::ID_ShuttingDown : ok = true; LOG_EVENT("HD,ShuttingDown"); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_AlarmStatus : ok = alarmStatus (vMessage, vData); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_AlarmTriggered : ok = alarmTriggered (vMessage, vData); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_AlarmCleared : ok = alarmCleared (vMessage, vData); break; // TODO : implement notify<>() // Adjustment Response Messages - case Gui::GuiActionType::ID_AdjustDurationRsp : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_AdjustDurationRsp , Model::MAdjustDurationResponse ); break; - case Gui::GuiActionType::ID_AdjustBloodDialysateRsp : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_AdjustBloodDialysateRsp , Model::MAdjustBloodDialysateResponse ); break; - case Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq : ok = adjustUltrafiltrationState (vMessage, vData); break; // Needs more investigation for EMIT_RECEIVE_SIGNAL consistency - case Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); break; // Needs more investigation for EMIT_RECEIVE_SIGNAL consistency - case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp : ok = adjustUltrafiltrationConfirm (vMessage, vData); break; // Needs more investigation for EMIT_RECEIVE_SIGNAL consistency + case Gui::GuiActionType::ID_AdjustDurationRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDurationRsp ); break; + case Gui::GuiActionType::ID_AdjustBloodDialysateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustBloodDialysateRsp); break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq : ok = adjustUltrafiltrationState (vMessage, vData); break; // TODO : implement notify<>() + 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 // there has nothing been defined for these messages. - default : printUnhandled (vMessage ); break; + default : printUnhandled (vMessage ); break; } return ok; @@ -357,23 +355,22 @@ bool ok = false; vData.clear(); switch (vMessage.actionId) { // notice we are in receive mode - case Gui::GuiActionType::ID_DGCheckIn: + case Gui::GuiActionType::ID_DGCheckIn: // TODO : implement notify<>() ok = true; LOG_EVENT(QString("DG,CheckIn," + QVariant(vData).toStringList().join(','))); break; - case Gui::GuiActionType::ID_DGROPumpData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGROPumpData , Model::MDGROPump ); break; - case Gui::GuiActionType::ID_DGPressuresData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGPressuresData , Model::MDGPressures ); break; - case Gui::GuiActionType::ID_DGDrainPumpData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGDrainPumpData , Model::MDGDrainPump ); break; - case Gui::GuiActionType::ID_DGOperationModeData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGOperationModeData , Model::MDGOperationMode ); break; - case Gui::GuiActionType::ID_DGReservoirData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGReservoirData , Model::MDGReservoir ); break; - case Gui::GuiActionType::ID_DGValvesStatesData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGValvesStatesData , Model::MDGValvesStates ); break; - case Gui::GuiActionType::ID_DGHeatersData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGHeatersData , Model::MDGHeaters ); break; - case Gui::GuiActionType::ID_DGLoadCellReadingsData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGLoadCellReadingsData , Model::MDGLoadCellReadings ); break; - case Gui::GuiActionType::ID_DGTemperaturesData : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGTemperaturesData , Model::MDGTemperatures ); break; + case Gui::GuiActionType::ID_DGROPumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGROPumpData ); break; + case Gui::GuiActionType::ID_DGPressuresData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGPressuresData ); break; + case Gui::GuiActionType::ID_DGDrainPumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGDrainPumpData ); break; + case Gui::GuiActionType::ID_DGOperationModeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGOperationModeData ); break; + case Gui::GuiActionType::ID_DGReservoirData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGReservoirData ); break; + case Gui::GuiActionType::ID_DGValvesStatesData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGValvesStatesData ); break; + case Gui::GuiActionType::ID_DGHeatersData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGHeatersData ); break; + case Gui::GuiActionType::ID_DGLoadCellReadingsData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGLoadCellReadingsData); break; + 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; - case Gui::GuiActionType::ID_DGDebugText : EMIT_RECEIVE_SIGNAL(Gui::GuiActionType::ID_DGDebugText , Model::MDGDebugText ); break; - // unhandles messages: these will only be logged as received message // there has nothing been defined for these messages. default: Index: sources/canbus/messageinterpreter.h =================================================================== diff -u -r93b6ad6b18c505fedab37d95dc87be61db48641c -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/canbus/messageinterpreter.h (.../messageinterpreter.h) (revision 93b6ad6b18c505fedab37d95dc87be61db48641c) +++ sources/canbus/messageinterpreter.h (.../messageinterpreter.h) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -49,8 +49,7 @@ void logInvalidLength (const Gui::GuiActionType &vActionId); void printUnhandled (const Message &vMessage ) const; - bool prepareData (const Message &vMessage, Gui::GuiActionType vID, Model::MAbstract &vModel, QVariantList &vData ); - void logReceivedMessage ( const Model::MAbstract &vModel ); + void logReceivedMessage (const Model::MAbstract &vModel); bool interpretMessage_HD (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; bool interpretMessage_DG (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; @@ -71,6 +70,9 @@ bool adjustUltrafiltrationEdit (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; bool adjustUltrafiltrationConfirm (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + template + bool notify (const Message &vMessage, QVariantList &vData, Gui::GuiActionType vIdCheck) __attribute_warn_unused_result__; + public: explicit MessageInterpreter(QObject *parent = nullptr); Index: sources/gui/guiglobals.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -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 guiglobals.cpp * \author (last) Behrouz NemaiPour * \date (last) 12-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 28-Oct-2019 - * + * */ #include "guiglobals.h" @@ -73,6 +73,7 @@ // but Qt needs them to be registered to be able to use them in between threads queue // by their metadata information. REGISTER_MODEL_METATYPES + LOG_DEBUG(__FUNCTION__); } /*! @@ -85,6 +86,7 @@ qmlRegisterUncreatableType ("Gui.Actions", 0, 1, "GuiActions", QStringLiteral("Used only for enumerations no need to have an object")); REGISTER_VIEW_TYPES + LOG_DEBUG(__FUNCTION__); } /*! @@ -100,6 +102,7 @@ // coco begin validated: this portion of the code is handling application initialization // and if not initialized correctly will terminate the applicaiton . // So it had been manually tested. + LOG_DEBUG(__FUNCTION__); bool ok = vStatus == QQuickView::Ready; if (ok) { _viewer->show(); @@ -113,7 +116,9 @@ // coco end }, Qt::QueuedConnection ); + LOG_DEBUG(__FUNCTION__); _viewer->setSource(QStringLiteral("qrc:/main.qml")); + LOG_DEBUG("Done"); return true; } } Index: sources/gui/qml/main.qml =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/gui/qml/main.qml (.../main.qml) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/gui/qml/main.qml (.../main.qml) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -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 main.qml * \author (last) Peter Lucia * \date (last) 26-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 24-Sep-2019 - * + * */ // Qt @@ -96,7 +96,7 @@ _alarm_bar.visible = true; } } - } + } onHideAlarm: { _alarm_bar.visible = false; Index: sources/maintimer.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/maintimer.cpp (.../maintimer.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/maintimer.cpp (.../maintimer.cpp) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -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 maintimer.cpp * \author (last) Behrouz NematiPour * \date (last) 13-Apr-2020 * \author (original) Behrouz NematiPour * \date (original) 24-Sep-2019 - * + * */ #include "maintimer.h" Index: sources/model/MDGDebugText.h =================================================================== diff -u -r15de0cd12dad1ea5107c52e5ed89280bc9e29b1d -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/model/MDGDebugText.h (.../MDGDebugText.h) (revision 15de0cd12dad1ea5107c52e5ed89280bc9e29b1d) +++ sources/model/MDGDebugText.h (.../MDGDebugText.h) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -30,16 +30,17 @@ // friends friend class ::tst_models; -protected: // DG Drain Pump Data (U32) Set pt. RPM (U32) DAC value - Type_Enum typeText () const override { return Type_Enum::eEvent; } - Unit_Enum unitText () const override { return Unit_Enum::eDG ; } - QString infoText () const override { return QString("Debug") ; } QVariantList parameters() const override; QString _data; public: + + Type_Enum typeText () const override { return Type_Enum::eEvent; } + Unit_Enum unitText () const override { return Unit_Enum::eDG ; } + QString infoText () const override { return QString("Debug") ; } + struct Data { QString text; }; Index: sources/model/MHDDebugText.h =================================================================== diff -u -r15de0cd12dad1ea5107c52e5ed89280bc9e29b1d -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/model/MHDDebugText.h (.../MHDDebugText.h) (revision 15de0cd12dad1ea5107c52e5ed89280bc9e29b1d) +++ sources/model/MHDDebugText.h (.../MHDDebugText.h) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -30,16 +30,16 @@ // friends friend class ::tst_models; -protected: // DG Drain Pump Data (U32) Set pt. RPM (U32) DAC value - Type_Enum typeText () const override { return Type_Enum::eEvent; } - Unit_Enum unitText () const override { return Unit_Enum::eHD ; } - QString infoText () const override { return QString("Debug") ; } QVariantList parameters() const override; - QString _data; public: + + Type_Enum typeText () const override { return Type_Enum::eEvent; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + QString infoText () const override { return QString("Debug") ; } + struct Data { QString text; }; Index: sources/storage/logger.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- sources/storage/logger.cpp (.../logger.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/storage/logger.cpp (.../logger.cpp) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -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 logger.cpp * \author (last) Behrouz NematiPour * \date (last) 13-Apr-2020 * \author (original) Behrouz NematiPour * \date (original) 24-Sep-2019 - * + * */ #include "logger.h" Index: unittests/tst_models.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -r9cc1608f615e66d0f1c3a022aa6d19579d76b241 --- unittests/tst_models.cpp (.../tst_models.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ unittests/tst_models.cpp (.../tst_models.cpp) (revision 9cc1608f615e66d0f1c3a022aa6d19579d76b241) @@ -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_models.cpp * \author (last) Peter Lucia * \date (last) 07-Jul-2020 * \author (original) Behrouz NematiPour * \date (original) 21-Apr-2020 - * + * */ #include "tst_models.h" @@ -43,7 +43,7 @@ #include "MTreatmentAdjustUltrafiltrationEditResponse.h" #include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" -#include "malarmstatus.h" +#include "MAlarmStatusData.h" // #define CONSOLEOUT @@ -382,13 +382,13 @@ void tst_models::tst_MAlarmStatus() { - for (int i = 1; i < GuiAlarmID::NUM_OF_ALARM_IDS; ++i) { - QVERIFY(!Model::MAlarmStatus::toText(GuiAlarmID(i)).isEmpty()); + for (int i = 1; i < Gui::GuiAlarmID::NUM_OF_ALARM_IDS; ++i) { + QVERIFY(!Model::MAlarmStatus::toText(Gui::GuiAlarmID(i)).isEmpty()); } - QCOMPARE(Model::MAlarmStatus::toText(GuiAlarmID(0)), tr("")); - QCOMPARE(Model::MAlarmStatus::toText(GuiAlarmID(-1)), tr("Alarm Not Recognized.")); - QCOMPARE(Model::MAlarmStatus::toText(GuiAlarmID(599)), tr("Alarm Not Recognized.")); + QCOMPARE(Model::MAlarmStatus::toText(Gui::GuiAlarmID(0)), tr("")); + QCOMPARE(Model::MAlarmStatus::toText(Gui::GuiAlarmID(-1)), tr("Alarm Not Recognized.")); + QCOMPARE(Model::MAlarmStatus::toText(Gui::GuiAlarmID(599)), tr("Alarm Not Recognized.")); } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~