Index: denali.pro =================================================================== diff -u -re63d3ebd96751a9e13bb02ad44632f6a4e9c005d -r242ef09c059eac13b036989147f5e2314df54a30 --- denali.pro (.../denali.pro) (revision e63d3ebd96751a9e13bb02ad44632f6a4e9c005d) +++ denali.pro (.../denali.pro) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -37,10 +37,12 @@ sources/model/hd/adjustment \ sources/model/hd/alarm \ sources/model/hd/data \ + sources/model/dg/adjustment \ sources/model/dg/data \ sources/view \ sources/view/hd/adjustment \ sources/view/hd/data \ + sources/view/dg/adjustment \ sources/view/dg/data HEADERS += \ @@ -86,6 +88,8 @@ sources/model/hd/data/MHDOperationModeData.h \ sources/model/hd/data/MTreatmentSalineData.h \ sources/model/hd/data/MHDAccelerometerData.h \ + \ # ---------- Models - DG - Adjustment + sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h \ \ # ---------- Models - DG - Data sources/model/dg/data/MDGDrainPumpData.h \ sources/model/dg/data/MDGHeatersData.h \ @@ -97,6 +101,7 @@ sources/model/dg/data/MDGTemperaturesData.h \ sources/model/dg/data/MDGValvesStatesData.h \ sources/model/dg/data/MDGAccelerometerData.h \ + sources/model/dg/data/MTreatmentAdjustDGVersionsResponse.h \ \ # CANBus sources/canbus/caninterface.h \ sources/canbus/frameinterface.h \ @@ -112,7 +117,6 @@ sources/gui/guicontroller.h \ \ # ---------- Views ---------- sources/view/VEventSpy.h \ - sources/view/hd/data/VHDTreatmentStatesData.h \ sources/view/vview.h \ sources/view/vpoweroff.h \ \ # ---------- Views - Alarm @@ -136,6 +140,9 @@ sources/view/hd/data/VHDOperationModeData.h \ sources/view/hd/data/VTreatmentSalineData.h \ sources/view/hd/data/VHDAccelerometerData.h \ + sources/view/hd/data/VHDTreatmentStatesData.h \ + \ # ---------- Views - DG - Adjustment + sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.h \ \ # ---------- Views - DG - Data sources/view/dg/data/VDGDrainPumpData.h \ sources/view/dg/data/VDGHeatersData.h \ @@ -165,7 +172,6 @@ main.cpp \ sources/model/MDGDebugText.cpp \ sources/model/MHDDebugText.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.cpp \ sources/storage/DriveWatcher.cpp \ sources/threads.cpp \ sources/maintimer.cpp \ @@ -186,6 +192,7 @@ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp \ + sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.cpp \ \ # ---------- Models - HD - Data sources/model/hd/data/MTreatmentTimeData.cpp \ sources/model/hd/data/MTreatmentFlowsData.cpp \ @@ -196,6 +203,8 @@ sources/model/hd/data/MHDOperationModeData.cpp \ sources/model/hd/data/MTreatmentSalineData.cpp \ sources/model/hd/data/MHDAccelerometerData.cpp \ + \ # ---------- Models - DG - Adjustment + sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp \ \ # ---------- Models - DG - Data sources/model/dg/data/MDGDrainPumpData.cpp \ sources/model/dg/data/MDGHeatersData.cpp \ @@ -221,7 +230,6 @@ sources/gui/guicontroller.cpp \ \ # ---------- Views ---------- sources/view/VEventSpy.cpp \ - sources/view/hd/data/VHDTreatmentStatesData.cpp \ sources/view/vpoweroff.cpp \ \ # ---------- Views - Alarm sources/view/valarmstatus.cpp \ @@ -244,6 +252,9 @@ sources/view/hd/data/VHDOperationModeData.cpp \ sources/view/hd/data/VTreatmentSalineData.cpp \ sources/view/hd/data/VHDAccelerometerData.cpp \ + sources/view/hd/data/VHDTreatmentStatesData.cpp \ + \ # ---------- Views - DG - Adjustment + sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.cpp \ \ # ---------- Views - DG - Data sources/view/dg/data/VDGDrainPumpData.cpp \ sources/view/dg/data/VDGHeatersData.cpp \ Index: denali.pro.user =================================================================== diff -u -rd53c1147c87934b2ac14fbd75d128ee7824f9ff2 -r242ef09c059eac13b036989147f5e2314df54a30 --- denali.pro.user (.../denali.pro.user) (revision d53c1147c87934b2ac14fbd75d128ee7824f9ff2) +++ denali.pro.user (.../denali.pro.user) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -1,6 +1,6 @@ - + EnvironmentId Index: sources/canbus/messageglobals.h =================================================================== diff -u -rae1f28a34d323bd6e301450f22525ca3545c9319 -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/canbus/messageglobals.h (.../messageglobals.h) (revision ae1f28a34d323bd6e301450f22525ca3545c9319) +++ sources/canbus/messageglobals.h (.../messageglobals.h) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -109,6 +109,7 @@ // ---- {Gui::GuiActionType::ID_AdjustVersionsReq , 1 * 4 }, // 1 parameters each 4bytes {Gui::GuiActionType::ID_AdjustHDVersionsRsp , 8 * 4 }, // 8 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustDGVersionsRsp , 8 * 4 }, // 8 parameters each 4bytes // ---- {Gui::GuiActionType::ID_CANBusFaultCount , 1 }, Index: sources/gui/guiglobals.cpp =================================================================== diff -u -rae1f28a34d323bd6e301450f22525ca3545c9319 -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision ae1f28a34d323bd6e301450f22525ca3545c9319) +++ sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -58,6 +58,7 @@ #include "vtreatmentadjustmentultrafiltrationconfirm.h" #include "VTreatmentAdjustmentSaline.h" #include "VTreatmentAdjustmentHDVersions.h" +#include "VTreatmentAdjustmentDGVersions.h" namespace Gui { MainView *_viewer = nullptr; Index: sources/gui/qml/main.qml =================================================================== diff -u -rafac622899f26c9282036411a87af9d99be8698e -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/gui/qml/main.qml (.../main.qml) (revision afac622899f26c9282036411a87af9d99be8698e) +++ sources/gui/qml/main.qml (.../main.qml) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -39,6 +39,7 @@ import VTreatmentAdjustmentUltrafiltrationEdit 0.1; import VTreatmentAdjustmentUltrafiltrationConfirm 0.1; import VTreatmentAdjustmentHDVersions 0.1; +import VTreatmentAdjustmentDGVersions 0.1; import VDGDrainPump 0.1; import VDGHeaters 0.1; @@ -132,6 +133,7 @@ VTreatmentAdjustmentUltrafiltrationConfirm { id: vTreatmentAdjustmentUltrafiltrationConfirm } VTreatmentAdjustmentHDVersions { id: vTreatmentAdjustmentHDVersions } + VTreatmentAdjustmentDGVersions { id: vTreatmentAdjustmentDGVersions } // ----- Follow the below Z order ----- // 1 - Screens Index: sources/gui/qml/pages/ManagerHome.qml =================================================================== diff -u -r1f3b4c2b2ddd2d8f3531377506f75a3a51c0cf1d -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/gui/qml/pages/ManagerHome.qml (.../ManagerHome.qml) (revision 1f3b4c2b2ddd2d8f3531377506f75a3a51c0cf1d) +++ sources/gui/qml/pages/ManagerHome.qml (.../ManagerHome.qml) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -6,8 +6,8 @@ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file ManagerHome.qml - * \author (last) Behrouz NematiPour - * \date (last) 25-Aug-2020 + * \author (last) Peman Montazemi + * \date (last) 10-Dec-2020 * \author (original) Behrouz NematiPour * \date (original) 21-Oct-2019 * @@ -273,6 +273,23 @@ textObjectName: "_HDVersions" } + DebugDataColumn { id: _DGVersionsColumn + x: col(6) + y: row(5.1) + title: qsTr(" DG Ver ") + model: [ "v%1.%2.%3-%4 %5 v%6.%7 %8" + .arg(vTreatmentAdjustmentDGVersions.verMajor) + .arg(vTreatmentAdjustmentDGVersions.verMinor) + .arg(vTreatmentAdjustmentDGVersions.verMicro) + .arg(vTreatmentAdjustmentDGVersions.verBuild) + .arg(vTreatmentAdjustmentDGVersions.verFPGAId) + .arg(vTreatmentAdjustmentDGVersions.verFPGAMajor) + .arg(vTreatmentAdjustmentDGVersions.verFPGAMinor) + .arg(vTreatmentAdjustmentDGVersions.verFPGALab) + ] + textObjectName: "_DGVersions" + } + Text { id : _canbusFaultCountText x: col(0) y: row(6) Index: sources/model/MModel.h =================================================================== diff -u -rf8e19bab7d503d2c9577df9f5b7d9a499ce9b7ee -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/model/MModel.h (.../MModel.h) (revision f8e19bab7d503d2c9577df9f5b7d9a499ce9b7ee) +++ sources/model/MModel.h (.../MModel.h) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -54,6 +54,7 @@ #include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" #include "MTreatmentAdjustSalineResponse.h" #include "MTreatmentAdjustHDVersionsResponse.h" +#include "MTreatmentAdjustDGVersionsResponse.h" /*! * \brief Message interpretation instruction @@ -165,7 +166,8 @@ REGISTER_METATYPE( AdjustUltrafiltrationEditResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmResponseData ) \ REGISTER_METATYPE( AdjustSalineResponseData ) \ - REGISTER_METATYPE( AdjustHDVersionsResponseData ) + REGISTER_METATYPE( AdjustHDVersionsResponseData ) \ + REGISTER_METATYPE( AdjustDGVersionsResponseData ) //===============================================================================// #define ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, BloodFlowData ) \ @@ -203,7 +205,8 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationConfirmResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustSalineResponseData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHDVersionsResponseData ) + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHDVersionsResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDGVersionsResponseData ) // /* Request */ ---------------------------------------------------------// #define ADJUST_TRANSMT_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustBloodDialysateRequestData ) \ @@ -250,7 +253,8 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationConfirmResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustSalineResponseData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHDVersionsResponseData ) + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHDVersionsResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDGVersionsResponseData ) // /* Request */ ---------------------------------------------------------// #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustBloodDialysateRequestData ) \ @@ -315,6 +319,7 @@ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationConfirmResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustSalineResponseData ) \ - ACTION_RECEIVE_SIGNAL( AdjustHDVersionsResponseData ) + ACTION_RECEIVE_SIGNAL( AdjustHDVersionsResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustDGVersionsResponseData ) //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// Index: sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp =================================================================== diff -u --- sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp (revision 0) +++ sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -0,0 +1,65 @@ +/*! + * + * 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 MTreatmentAdjustDGVersionsResponse.cpp + * \author (last) Peman Montazemi + * \date (last) 10-Dec-2020 + * \author (original) Peman Montazemi + * \date (original) 10-Dec-2020 + * + */ +#include "MTreatmentAdjustDGVersionsResponse.h" + +using namespace Model; + + +QVariantList MAdjustDGVersionsResponse::parameters() const { + return { + _data.mMajor .value, + _data.mMinor .value, + _data.mMicro .value, + _data.mBuild .value, + _data.mFPGAId .value, + _data.mFPGAMajor.value, + _data.mFPGAMinor.value, + _data.mFPGALab .value + }; +} + +bool MAdjustDGVersionsResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mMajor )) + if (GetValue(vByteArray, index, _data.mMinor )) + if (GetValue(vByteArray, index, _data.mMicro )) + if (GetValue(vByteArray, index, _data.mBuild )) + if (GetValue(vByteArray, index, _data.mFPGAId )) + if (GetValue(vByteArray, index, _data.mFPGAMajor)) + if (GetValue(vByteArray, index, _data.mFPGAMinor)) + if (GetValue(vByteArray, index, _data.mFPGALab )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +AdjustDGVersionsResponseData MAdjustDGVersionsResponse::data() const { + Data data; + data.mMajor = _data.mMajor .value; + data.mMinor = _data.mMinor .value; + data.mMicro = _data.mMicro .value; + data.mBuild = _data.mBuild .value; + data.mFPGAId = _data.mFPGAId .value; + data.mFPGAMajor = _data.mFPGAMajor.value; + data.mFPGAMinor = _data.mFPGAMinor.value; + data.mFPGALab = _data.mFPGALab .value; + return data; +} Index: sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h =================================================================== diff -u --- sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h (revision 0) +++ sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -0,0 +1,71 @@ +/*! + * + * 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 MTreatmentAdjustDGVersionsResponse.h + * \author (last) Peman Montazemi + * \date (last) 8-Dec-2020 + * \author (original) Peman Montazemi + * \date (original) 8-Dec-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +class MAdjustDGVersionsResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U08 mMajor ; + Types::U08 mMinor ; + Types::U08 mMicro ; + Types::U16 mBuild ; + Types::U08 mFPGAId ; + Types::U08 mFPGAMajor ; + Types::U08 mFPGAMinor ; + Types::U08 mFPGALab ; + } _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("DGVersions") ; } + + struct Data { + quint8 mMajor = 0; /*!< DG Versions Major value of type quint8 extracted out */ + quint8 mMinor = 0; /*!< DG Versions Minor value of type quint8 extracted out */ + quint8 mMicro = 0; /*!< DG Versions Micro value of type quint8 extracted out */ + quint16 mBuild = 0; /*!< DG Versions Build value of type quint16 extracted out */ + quint8 mFPGAId = 0; /*!< DG Versions FPGA ID value of type quint8 extracted out */ + quint8 mFPGAMajor = 0; /*!< DG Versions FPGA Major value of type quint8 extracted out */ + quint8 mFPGAMinor = 0; /*!< DG Versions FPGA Minor value of type quint8 extracted out */ + quint8 mFPGALab = 0; /*!< DG Versions FPGA Lab value of type quint8 extracted out */ + }; + + MAdjustDGVersionsResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustDGVersionsResponse::Data AdjustDGVersionsResponseData; Index: sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h =================================================================== diff -u -rf8e19bab7d503d2c9577df9f5b7d9a499ce9b7ee -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h (.../MTreatmentAdjustHDVersionsResponse.h) (revision f8e19bab7d503d2c9577df9f5b7d9a499ce9b7ee) +++ sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h (.../MTreatmentAdjustHDVersionsResponse.h) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -5,7 +5,7 @@ * 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 MHDVersionResponse.h + * \file MTreatmentAdjustHDVersionsResponse.h * \author (last) Peman Montazemi * \date (last) 6-Nov-2020 * \author (original) Peman Montazemi @@ -51,14 +51,14 @@ QString infoText () const override { return QString("HDVersions") ; } struct Data { - quint8 mMajor = 0; /*!< HD Versions Major value of type quint08 extracted out */ - quint8 mMinor = 0; /*!< HD Versions Minor value of type quint08 extracted out */ - quint8 mMicro = 0; /*!< HD Versions Micro value of type quint08 extracted out */ - quint16 mBuild = 0; /*!< HD Versions Build value of type quint08 extracted out */ - quint8 mFPGAId = 0; /*!< HD Versions FPGA ID value of type quint08 extracted out */ - quint8 mFPGAMajor = 0; /*!< HD Versions FPGA Major value of type quint08 extracted out */ - quint8 mFPGAMinor = 0; /*!< HD Versions FPGA Minor value of type quint08 extracted out */ - quint8 mFPGALab = 0; /*!< HD Versions FPGA Lab value of type quint08 extracted out */ + quint8 mMajor = 0; /*!< HD Versions Major value of type quint8 extracted out */ + quint8 mMinor = 0; /*!< HD Versions Minor value of type quint8 extracted out */ + quint8 mMicro = 0; /*!< HD Versions Micro value of type quint8 extracted out */ + quint16 mBuild = 0; /*!< HD Versions Build value of type quint16 extracted out */ + quint8 mFPGAId = 0; /*!< HD Versions FPGA ID value of type quint8 extracted out */ + quint8 mFPGAMajor = 0; /*!< HD Versions FPGA Major value of type quint8 extracted out */ + quint8 mFPGAMinor = 0; /*!< HD Versions FPGA Minor value of type quint8 extracted out */ + quint8 mFPGALab = 0; /*!< HD Versions FPGA Lab value of type quint8 extracted out */ }; MAdjustHDVersionsResponse () { } Index: sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.cpp =================================================================== diff -u --- sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.cpp (revision 0) +++ sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.cpp (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -0,0 +1,41 @@ +/*! + * + * 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 VTreatmentAdjustmentDGVersions.cpp + * \author (last) Peman Montazemi + * \date (last) 10-Dec-2020 + * \author (original) Peman Montazemi + * \date (original) 10-Dec-2020 + * + */ +#include "VTreatmentAdjustmentDGVersions.h" + +// Project +#include "guicontroller.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentDGVersions, AdjustDGVersionsResponseData) + +void VTreatmentAdjustmentDGVersions::initConnections() { + ACTION_VIEW_CONNECTION(AdjustDGVersionsResponseData); + ADJUST_VIEW_CONNECTION( AdjustVersionsRequestData); +} + +void VTreatmentAdjustmentDGVersions::onActionReceive(const AdjustDGVersionsResponseData &vData) +{ + verMajor (vData.mMajor ); + verMinor (vData.mMinor ); + verMicro (vData.mMicro ); + verBuild (vData.mBuild ); + verFPGAId (vData.mFPGAId ); + verFPGAMajor (vData.mFPGAMajor); + verFPGAMinor (vData.mFPGAMinor); + verFPGALab (vData.mFPGALab ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment(true); // set here only because adjustment parent needs it, but HD Versions does not +} Index: sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.h =================================================================== diff -u --- sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.h (revision 0) +++ sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.h (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -0,0 +1,61 @@ +/*! + * + * 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 VTreatmentAdjustmentDGVersions.h + * \author (last) Peman Montazemi + * \date (last) 8-Dec-2020 + * \author (original) Peman Montazemi + * \date (original) 8-Dec-2020 + * + */ +#pragma once + +#include + +// Project +#include "vtreatmentadjustmentresponsebase.h" + +namespace View { + +class VTreatmentAdjustmentDGVersions : public VTreatmentAdjustmentResponseBase { + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustVersionsRequestData _data; + + // coco begin validated: + // 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) + // coco end + + // DG Versions data + PROPERTY( quint8 , verMajor , 0) + PROPERTY( quint8 , verMinor , 0) + PROPERTY( quint8 , verMicro , 0) + PROPERTY( quint16 , verBuild , 0) + PROPERTY( quint8 , verFPGAId , 0) + PROPERTY( quint8 , verFPGAMajor , 0) + PROPERTY( quint8 , verFPGAMinor , 0) + PROPERTY( quint8 , verFPGALab , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentDGVersions, AdjustDGVersionsResponseData) + +// ---------- DG Version +public slots: + void doAdjustment() { + AdjustVersionsRequestData data; + emit didAdjustment(data); + } + +signals: + void didAdjustment(const AdjustVersionsRequestData &vData); +}; +} Index: sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.cpp =================================================================== diff -u -rf8e19bab7d503d2c9577df9f5b7d9a499ce9b7ee -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.cpp (.../VTreatmentAdjustmentHDVersions.cpp) (revision f8e19bab7d503d2c9577df9f5b7d9a499ce9b7ee) +++ sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.cpp (.../VTreatmentAdjustmentHDVersions.cpp) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -5,7 +5,7 @@ * 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 VTreatmentAdjustmentSaline.cpp + * \file VTreatmentAdjustmentHDVersions.cpp * \author (last) Peman Montazemi * \date (last) 6-Nov-2020 * \author (original) Peman Montazemi Index: sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.h =================================================================== diff -u -rd219d17763767cf70bfa3ef35c56ad9786004f33 -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.h (.../VTreatmentAdjustmentHDVersions.h) (revision d219d17763767cf70bfa3ef35c56ad9786004f33) +++ sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.h (.../VTreatmentAdjustmentHDVersions.h) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -5,7 +5,7 @@ * 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 VTreatmentAdjustmentSaline.h + * \file VTreatmentAdjustmentHDVersions.h * \author (last) Peman Montazemi * \date (last) 6-Nov-2020 * \author (original) Peman Montazemi Index: sources/view/vview.h =================================================================== diff -u -rad1eef71655ce8b819aa1325790cfb8658d56d62 -r242ef09c059eac13b036989147f5e2314df54a30 --- sources/view/vview.h (.../vview.h) (revision ad1eef71655ce8b819aa1325790cfb8658d56d62) +++ sources/view/vview.h (.../vview.h) (revision 242ef09c059eac13b036989147f5e2314df54a30) @@ -124,5 +124,6 @@ REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationEdit ) \ REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationConfirm ) \ REGISTER_TYPE( VTreatmentAdjustmentSaline ) \ - REGISTER_TYPE( VTreatmentAdjustmentHDVersions ) + REGISTER_TYPE( VTreatmentAdjustmentHDVersions ) \ + REGISTER_TYPE( VTreatmentAdjustmentDGVersions ) //--------------------------------------------------------------------------------//