Index: leahi.pro =================================================================== diff -u -r3454906bbb35aa2976572145068980bf691daf1c -r1be319981e75689fbbef03c77f99d788b7e296a1 --- leahi.pro (.../leahi.pro) (revision 3454906bbb35aa2976572145068980bf691daf1c) +++ leahi.pro (.../leahi.pro) (revision 1be319981e75689fbbef03c77f99d788b7e296a1) @@ -198,6 +198,7 @@ sources/model/td/data/treatment/MTreatmentTimeData.h \ sources/model/td/data/treatment/MTreatmentUltrafiltrationData.h \ sources/model/td/data/treatment/MTreatmentVitalsData.h \ + sources/model/td/data/treatment/MTreatmentStopData.h \ sources/storage/Settings.h \ sources/storage/TreatmentLog.h \ sources/bluetooth/BluetoothInterface.h \ @@ -271,6 +272,7 @@ sources/view/td/data/treatment/VTreatmentSalineData.h \ sources/view/td/data/treatment/VTreatmentTime.h \ sources/view/td/data/treatment/VTreatmentUltrafiltrationData.h \ + sources/view/td/data/treatment/VTreatmentStopData.h \ \ # ---------- Views - TD - Adjustment - In-Treatment sources/view/td/adjustment/treatment/VTreatmentAdjustmentBloodFlowRate.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentBloodPrime.h \ @@ -379,7 +381,6 @@ sources/model/hd/data/treatment/MTreatmentHeparinData.h \ sources/model/hd/data/treatment/MTreatmentRinsebackData.h \ sources/model/hd/data/treatment/MTreatmentRecirculateData.h \ - sources/model/hd/data/treatment/MTreatmentStopData.h \ sources/model/hd/data/post/MHDRTCEpochData.h \ sources/model/hd/data/MHDUsageInfoResponse.h \ \ # ---------- Models - HD - Data - Treatment Log @@ -482,7 +483,6 @@ sources/view/hd/data/treatment/VTreatmentHeparinData.h \ sources/view/hd/data/treatment/VTreatmentRinsebackData.h \ sources/view/hd/data/treatment/VTreatmentRecirculateData.h \ - sources/view/hd/data/treatment/VTreatmentStopData.h \ \ # ---------- Views - DG - Data - Pre-Treatment - Progress sources/view/dg/data/pretreatment/VDGFilterFlushData.h \ \ # ---------- Views - DG - Data - Disinfection - Progress @@ -562,6 +562,7 @@ sources/model/td/data/treatment/MTreatmentTimeData.cpp \ sources/model/td/data/treatment/MTreatmentUltrafiltrationData.cpp \ sources/model/td/data/treatment/MTreatmentVitalsData.cpp \ + sources/model/td/data/treatment/MTreatmentStopData.cpp \ sources/model/ui/data/MUIBloodPressureData.cpp \ sources/storage/Settings.cpp \ sources/storage/TreatmentLog.cpp \ @@ -683,7 +684,6 @@ sources/model/hd/data/treatment/MTreatmentHeparinData.cpp \ sources/model/hd/data/treatment/MTreatmentRinsebackData.cpp \ sources/model/hd/data/treatment/MTreatmentRecirculateData.cpp \ - sources/model/hd/data/treatment/MTreatmentStopData.cpp \ sources/model/hd/data/post/MHDRTCEpochData.cpp \ sources/model/hd/data/MHDUsageInfoResponse.cpp \ \ # ---------- Models - HD - Data - Pre-Treatment @@ -751,6 +751,7 @@ sources/view/td/data/treatment/VTreatmentSalineData.cpp \ sources/view/td/data/treatment/VTreatmentTime.cpp \ sources/view/td/data/treatment/VTreatmentUltrafiltrationData.cpp \ + sources/view/td/data/treatment/VTreatmentStopData.cpp \ \ # ---------- Views - TD - Adjustment - In-Treatment sources/view/td/adjustment/treatment/VTreatmentAdjustmentBloodFlowRate.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentBloodPrime.cpp \ @@ -836,7 +837,6 @@ \ # ---------- Views - HD - Data - End-Treatment sources/view/hd/data/treatment/VTreatmentRinsebackData.cpp \ sources/view/hd/data/treatment/VTreatmentRecirculateData.cpp \ - sources/view/hd/data/treatment/VTreatmentStopData.cpp \ \ # ---------- Views - DG - Data - Pre-Treatment - Progress sources/view/dg/data/pretreatment/VDGFilterFlushData.cpp \ \ # ---------- Views - DG - Data - Disinfect - Progress Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r6d7a81af8acbaaf3ee3f722ccace021634507cb4 -r1be319981e75689fbbef03c77f99d788b7e296a1 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 6d7a81af8acbaaf3ee3f722ccace021634507cb4) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 1be319981e75689fbbef03c77f99d788b7e296a1) @@ -141,7 +141,7 @@ ID_Rinseback = 0x8F00, // 143 //// ----- @LEAHIZED ID_Recirculate = 0x5A00, // 90 ID_BloodPrime = 0x9700, // 151 - ID_TreatmentStop = 0x4900, // 73 + ID_TreatmentStop = 0x5B00, // 91 ID_Vitals = 0x6500, // 101 // Alarm Messages Fisheye: Tag 1be319981e75689fbbef03c77f99d788b7e296a1 refers to a dead (removed) revision in file `sources/model/hd/data/treatment/MTreatmentStopData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1be319981e75689fbbef03c77f99d788b7e296a1 refers to a dead (removed) revision in file `sources/model/hd/data/treatment/MTreatmentStopData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/td/data/treatment/MTreatmentStopData.cpp =================================================================== diff -u --- sources/model/td/data/treatment/MTreatmentStopData.cpp (revision 0) +++ sources/model/td/data/treatment/MTreatmentStopData.cpp (revision 1be319981e75689fbbef03c77f99d788b7e296a1) @@ -0,0 +1,49 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentStopData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 07-Oct-2021 + * \author (original) Behrouz NematiPour + * \date (original) 07-Oct-2021 + * + */ +#include "MTreatmentStopData.h" + +using namespace Model; + +QVariantList MTreatmentStop::parameters() const { + return { + _data.mTotal .value, + _data.mCountDown.value, + }; +} + +bool MTreatmentStop::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mTotal )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mCountDown)) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MTreatmentStop::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentStop::Data MTreatmentStop::data() const { + Data data; + data.mTotal = _data.mTotal .value; + data.mCountDown = _data.mCountDown.value; + return data; +} Index: sources/model/td/data/treatment/MTreatmentStopData.h =================================================================== diff -u --- sources/model/td/data/treatment/MTreatmentStopData.h (revision 0) +++ sources/model/td/data/treatment/MTreatmentStopData.h (revision 1be319981e75689fbbef03c77f99d788b7e296a1) @@ -0,0 +1,83 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentStopData.h + * \author (last) Behrouz NematiPour + * \date (last) 09-Mar-2022 + * \author (original) Behrouz NematiPour + * \date (original) 07-Oct-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentStop class + * \details The treatment Stop bolus data model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------:| + * |0x5B00| 0x020 | 1 Hz | N | TD | UI | Treatment Stop Progress | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTotal | + * | #2:(U32) | \ref Data::mCountDown | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | TD | + * | infoText | Stop | + * + */ +class MTreatmentStop : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mTotal ; + Types::U32 mCountDown; + } _data; + +public: + + Type_Enum typeText() const override { return Type_Enum::eDatum ; } + Unit_Enum unitText() const override { return Unit_Enum::eTD ; } + QString infoText() const override { return QString("Stop" ) ; } + + struct Data { + quint32 mTotal = 0; ///< Total Timeout of Treatment Blood Stop + quint32 mCountDown = 0; ///< Current Timeout count down of Treatment Blood Stop + }; + +public: + MTreatmentStop () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentStop::Data TreatmentStopData; Fisheye: Tag 1be319981e75689fbbef03c77f99d788b7e296a1 refers to a dead (removed) revision in file `sources/view/hd/data/treatment/VTreatmentStopData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1be319981e75689fbbef03c77f99d788b7e296a1 refers to a dead (removed) revision in file `sources/view/hd/data/treatment/VTreatmentStopData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/td/data/treatment/VTreatmentStopData.cpp =================================================================== diff -u --- sources/view/td/data/treatment/VTreatmentStopData.cpp (revision 0) +++ sources/view/td/data/treatment/VTreatmentStopData.cpp (revision 1be319981e75689fbbef03c77f99d788b7e296a1) @@ -0,0 +1,26 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentStopData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 07-Oct-2021 + * \author (original) Behrouz NematiPour + * \date (original) 07-Oct-2021 + * + */ +#include "VTreatmentStopData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentStop, TreatmentStopData) + +void VTreatmentStop::onActionReceive(const TreatmentStopData &vData) +{ + total ( vData.mTotal ); + countDown( vData.mCountDown ); +} Index: sources/view/td/data/treatment/VTreatmentStopData.h =================================================================== diff -u --- sources/view/td/data/treatment/VTreatmentStopData.h (revision 0) +++ sources/view/td/data/treatment/VTreatmentStopData.h (revision 1be319981e75689fbbef03c77f99d788b7e296a1) @@ -0,0 +1,44 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentStopData.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Oct-2021 + * \author (original) Behrouz NematiPour + * \date (original) 07-Oct-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VView.h" +#include "MTreatmentStopData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentStop class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentStop + * + */ +class VTreatmentStop : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , total , 0) + PROPERTY( quint32 , countDown, 0) + + VIEW_DEC(VTreatmentStop, TreatmentStopData) +}; +}