Index: leahi.pro =================================================================== diff -u -r5ed84841f5852381b2e36328c0aeca7bc97b9c03 -re07cde120d7476c4add90c4f86cf55af9ea830de --- leahi.pro (.../leahi.pro) (revision 5ed84841f5852381b2e36328c0aeca7bc97b9c03) +++ leahi.pro (.../leahi.pro) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -216,6 +216,7 @@ sources/device/DeviceModels.h \ \ # ---------- Models - TD - Data //// ----- @LEAHIZED sources/model/td/data/MTDOpModeData.h \ + sources/model/td/data/MTDPowerOffWarning.h \ \ # ---------- Models - TD - Data - Treatment Log sources/model/td/data/treatmentlog/MTreatmentLogAlarmData.h \ sources/model/td/data/treatmentlog/MTreatmentLogEventData.h \ @@ -606,14 +607,14 @@ sources/model/MAbstractDynamic.cpp \ sources/model/MListModel.cpp \ sources/device/DeviceModels.cpp \ + \ # ---------- Models - TD - Data + sources/model/td/data/MTDPowerOffWarning.cpp \ \ # ---------- Models - TD - Data - States sources/model/td/data/MTDOpModeData.cpp \ \ # ---------- Models - TD - Data - Treatment Log sources/model/td/data/treatmentlog/MTreatmentLogAlarmData.cpp \ sources/model/td/data/treatmentlog/MTreatmentLogEventData.cpp \ sources/model/td/data/treatmentlog/MTreatmentLogAvrgeData.cpp \ - \ # ---------- Models - TD - Adjustment - sources/model/td/adjustment/MAdjustPowerOff.h \ \ # ---------- Models - TD - Adjustment - In-Treatment sources/model/td/adjustment/treatment/MTreatmentAdjustBloodPrimeResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustBloodFlowRateResponse.cpp \ @@ -658,8 +659,6 @@ \ # ---------- Models - Data - States sources/model/hd/data/pretreatment/MPreTreatmentStatesData.cpp \ sources/model/hd/data/posttreatment/MPostTreatmentStatesData.cpp \ - \ # ---------- Models - TD - Adjustment - sources/model/td/adjustment/MAdjustPowerOff.cpp \ \ # ---------- Models - TD - Adjustment - Settings sources/model/td/adjustment/settings/MAdjustTDDateTimeResponse.cpp \ sources/model/td/adjustment/settings/MTDInstitutionalRecordResponse.cpp \ Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r5ed84841f5852381b2e36328c0aeca7bc97b9c03 -re07cde120d7476c4add90c4f86cf55af9ea830de --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 5ed84841f5852381b2e36328c0aeca7bc97b9c03) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -49,7 +49,7 @@ // but if the model still needs more the model will fail. // so it is better to keep them next to each other to make sure they are in sync. // ---- - {Gui::GuiActionType::ID_PowerOff , 0 * 4 }, // 0 parameters + {Gui::GuiActionType::ID_PowerOffWarning , 0 * 4 }, // 0 parameters {Gui::GuiActionType::ID_TDCheckIn , 0 }, //// ----- @LEAHIZED // Generic Confirm Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r712b88374d635e38a9ef06ac19118c8a59bebd8c -re07cde120d7476c4add90c4f86cf55af9ea830de --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 712b88374d635e38a9ef06ac19118c8a59bebd8c) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -461,7 +461,7 @@ // ----- Events case Gui::GuiActionType::ID_Acknow : ok = true; /* TODO : implement notify<>() */ break; - case Gui::GuiActionType::ID_PowerOff : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PowerOff ); break; + case Gui::GuiActionType::ID_PowerOffWarning : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PowerOffWarning ); break; case Gui::GuiActionType::ID_DuetConfirmTDi : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DuetConfirmTDi ); break; // ----- POST Index: sources/gui/GuiController.cpp =================================================================== diff -u -rd95ed86d997208024ec79422e350a86a2c52fd85 -re07cde120d7476c4add90c4f86cf55af9ea830de --- sources/gui/GuiController.cpp (.../GuiController.cpp) (revision d95ed86d997208024ec79422e350a86a2c52fd85) +++ sources/gui/GuiController.cpp (.../GuiController.cpp) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -194,7 +194,7 @@ // Process the GuiView Request. // It can be processed in GuiController take action and notify GuiView // switch (vAction) { -// case GuiActionType::ID_PowerOff: +// case GuiActionType::ID_PowerOffWarning: // //qApp->quit(); // // GUI Controller decides (loop back) Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r5ed84841f5852381b2e36328c0aeca7bc97b9c03 -re07cde120d7476c4add90c4f86cf55af9ea830de --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 5ed84841f5852381b2e36328c0aeca7bc97b9c03) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -127,7 +127,7 @@ ID_PostTreatmentStates = 0x770F, // 119 //// ----- @CRAPIZED: had to change to avoid duplication // ----- - ID_PowerOff = 0x2200, // 34 //// ----- @LEAHIZED + ID_PowerOffWarning = 0x2200, // 34 //// ----- @LEAHIZED ID_TreatmentTime = 0x3B00, // 59 //// ----- @LEAHIZED ID_BloodFlow = 0x1100, // 17 //// ----- @LEAHIZED ID_DialysateInletFlow = 0x0800, Index: sources/model/MModel.h =================================================================== diff -u -r5ed84841f5852381b2e36328c0aeca7bc97b9c03 -re07cde120d7476c4add90c4f86cf55af9ea830de --- sources/model/MModel.h (.../MModel.h) (revision 5ed84841f5852381b2e36328c0aeca7bc97b9c03) +++ sources/model/MModel.h (.../MModel.h) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -22,7 +22,7 @@ // models #include "MSettings.h" -#include "MAdjustPowerOff.h" +#include "MTDPowerOffWarning.h" #include "MAlarmStatusData.h" #include "MAlarmTriggered.h" #include "MAlarmCleared.h" Fisheye: Tag e07cde120d7476c4add90c4f86cf55af9ea830de refers to a dead (removed) revision in file `sources/model/td/adjustment/MAdjustPowerOff.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e07cde120d7476c4add90c4f86cf55af9ea830de refers to a dead (removed) revision in file `sources/model/td/adjustment/MAdjustPowerOff.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/td/data/MTDPowerOffWarning.cpp =================================================================== diff -u --- sources/model/td/data/MTDPowerOffWarning.cpp (revision 0) +++ sources/model/td/data/MTDPowerOffWarning.cpp (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -0,0 +1,24 @@ +#include "MTDPowerOffWarning.h" + +using namespace Model; + +QVariantList MPowerOff::parameters() const { + return { }; +} + +bool MPowerOff::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + Q_UNUSED(vByteArray); + Q_UNUSED(vIndex); + + return true ; +} + +/*! + * \brief MPowerOff::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPowerOff::Data MPowerOff::data() const { + Data data; + return data; +} Index: sources/model/td/data/MTDPowerOffWarning.h =================================================================== diff -u --- sources/model/td/data/MTDPowerOffWarning.h (revision 0) +++ sources/model/td/data/MTDPowerOffWarning.h (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -0,0 +1,55 @@ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +namespace Model { + +/*! + * \brief The MTDPowerOffWarning class + * \details The power off warning model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------:| + * |0x2200| 0x020 | 6 | Cmd | N | TD | UI | Power Off | + * + * | Payload || + * | || + * | None || + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | PowerOff | + * + */ +class MPowerOff : public MAbstract { +public: + Type_Enum typeText () const override { return Type_Enum::eEvent; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("PowerOff"); } + QVariantList parameters() const override; + + struct { + } _data; + +public: + struct Data { + }; + + MPowerOff () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPowerOff::Data PowerOffData; Index: sources/view/confirm/VConfirm.h =================================================================== diff -u -re255d4633b338f4f46c3a2fad5a62f982ebfcd18 -re07cde120d7476c4add90c4f86cf55af9ea830de --- sources/view/confirm/VConfirm.h (.../VConfirm.h) (revision e255d4633b338f4f46c3a2fad5a62f982ebfcd18) +++ sources/view/confirm/VConfirm.h (.../VConfirm.h) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) @@ -20,7 +20,7 @@ #include "main.h" // Doxygen : do not remove #include "VAdjustmentResponseBase.h" #include "MDuetConfirmTDi.h" -#include "MAdjustPowerOff.h" +#include "MTDPowerOffWarning.h" #include "MSettings.h" namespace View {