Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -r7077e38c74db9cccb5496ffefcf8936c0916de76 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 7077e38c74db9cccb5496ffefcf8936c0916de76) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * 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 MTreatmentAdjustRequests.h * \author (last) Behrouz NematiPour - * \date (last) 07-Feb-2021 + * \date (last) 31-May-2023 * \author (original) Behrouz NematiPour - * \date (original) 02-Jul-2020 + * \date (original) 11-Apr-2021 * */ @@ -39,7 +39,7 @@ * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | - * |0x0100| 0x020 | 6 | Cmd | N | HD | UI | Power Off | + * |0x0100| 0x020 | 6 | Cmd | N | UI | HD | Power Off | * * | Payload || * | || @@ -50,20 +50,51 @@ class MAdjustPowerOffReq : public MModel { public: quint8 state; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({state}); } + // disabled coco end explicit MAdjustPowerOffReq(quint8 vState) : state(vState) { } - // coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("PowerOff", vParameters); } }; /*! + * \brief The MDuetConfirmUIr class + * \details The power off request model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0100| 0x020 | Rsp | Y | UI | HD | Confirm | + * + * | Payload || + * | || + * | #1:(U08) | \ref state | + * + * + */ +class MDuetConfirmUIr : public MModel { +public: + quint32 mId = 0; /*!< Request ID */ + quint32 mConfirm = 0; /*!< user confirm */ + + // disabled coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({mId, mConfirm}); + } + // disabled coco end + + static QString toString(const QVariantList &vParameters) { + return MModel::toString("Confirm", vParameters); + } +}; + +/*! * \brief The MAdjustBloodDialysateReq class * \details The blood/dialysate rate change request model * @@ -82,12 +113,12 @@ public: quint32 bloodFlow = 0; quint32 dialysateFlow = 0; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({bloodFlow , dialysateFlow}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustBloodDialysate", vParameters); } @@ -109,12 +140,12 @@ class MAdjustDurationReq : public MModel { public: quint32 duration = 0; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({duration}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustDuration", vParameters); } @@ -137,12 +168,12 @@ public: GuiUFCommands requestedState = GuiUFCommands::UF_CMD_PAUSE; // the requested state. Initially it's running => paused. - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({requestedState}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustUFState", vParameters); } @@ -164,12 +195,12 @@ class MAdjustUltrafiltrationEditReq : public MModel { public: float volume = 0; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({volume}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustUFEdit", vParameters); } @@ -200,12 +231,12 @@ float volume = 0; Options option = eDuration; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({volume , option}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustUFConfirm", vParameters); } @@ -231,12 +262,12 @@ class MAdjustSalineReq : public MModel { public: GuiSalineCommands requestedState = GuiSalineCommands::SALINE_CMD_STOP; // the requested state. Initially it's Stop => start. - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({requestedState}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustSaline", vParameters); } @@ -262,12 +293,12 @@ class MAdjustHeparinReq : public MModel { public: GuiHeparinCommands requestedState = GuiHeparinCommands::HEPARIN_CMD_PAUSE ; // the requested state. Initially it's running with Initial Bolus. - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({requestedState}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustHeparin", vParameters); } @@ -283,40 +314,30 @@ * * | Payload ||| * | ||| - * | #1:(S32) | \ref mArterialLimitLow | (mmHg) | - * | #2:(S32) | \ref mArterialLimitHigh | (mmHg) | - * | #3:(S32) | \ref mVenousLimitLow | (mmHg) | - * | #4:(S32) | \ref mVenousLimitHigh | (mmHg) | + * | #1:(S32) | \ref mArterialPressureLimitWindow | (mmHg) | + * | #2:(S32) | \ref mVenousPressureLimitWindow | (mmHg) | + * | #3:(S32) | \ref mVenousPressureLimitAsymtrc | (mmHg) | * * \sa MPressureOcclusion : Pressure data broadcast * \sa MAdjustPressuresResponse : Pressures limit adjustment response * */ class MAdjustPressuresLimitsReq : public MModel { - public: - static const qint32 ArterialLimitLowDef = -300; // PRS354 manufacturing default - static const qint32 ArterialLimitHighDef = 0; // PRS355 manufacturing default - static const qint32 VenousLimitLowDef = +20; // PRS356 manufacturing default - static const qint32 VenousLimitHighDef = +400; // PRS357 manufacturing default + qint32 mArterialPressureLimitWindow = 0; ///< (S32) Arterial Pressure Limit Window (mmHg) + qint32 mVenousPressureLimitWindow = 0; ///< (S32) Venous Pressure Limit Window (mmHg) + qint32 mVenousPressureLimitAsymtrc = 0; ///< (S32) Venous Pressure Limit Asymmetric(mmHg) -public: - qint32 mArterialLimitLow = ArterialLimitLowDef ; ///< (S32) Arterial Pressure Limit Low (mmHg) - qint32 mArterialLimitHigh = ArterialLimitHighDef; ///< (S32) Arterial Pressure Limit High (mmHg) - qint32 mVenousLimitLow = VenousLimitLowDef ; ///< (S32) Venous Pressure Limit Low (mmHg) - qint32 mVenousLimitHigh = VenousLimitHighDef ; ///< (S32) Venous Pressure Limit High (mmHg) - - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString - ({ mArterialLimitLow , - mArterialLimitHigh , - mVenousLimitLow , - mVenousLimitHigh - }); + ({ mArterialPressureLimitWindow , + mVenousPressureLimitWindow , + mVenousPressureLimitAsymtrc + }); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustPressuresLimits", vParameters); } @@ -342,12 +363,12 @@ class MAdjustRinsebackReq : public MModel { public: GuiRinsebackCommands requestedState = GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_CONFIRM_START; // the requested state. - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({requestedState}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustRinseback", vParameters); } @@ -373,12 +394,12 @@ class MAdjustRecirculateReq : public MModel { public: GuiRecirculateCommands requestedState = GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RECONNECT; // the requested state. - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({requestedState}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustRecirculate", vParameters); } @@ -404,46 +425,17 @@ class MAdjustTreatmentEndReq : public MModel { public: GuiTreatmentEndCommands requestedState = GuiTreatmentEndCommands::REQUESTED_USER_ACTION_TX_END_RINSEBACK_START; // the requested state. - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({requestedState}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustTxEnd", vParameters); } }; -/*! - * \brief The MAdjustVersionsReq class - * \details The DG/HD versions request model - * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:------:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------------:| - * | 0x1C00 | 0x200 | 10 | Req | Y | UI | All | DG/HD Versions Request | - * - * | Payload || - * | || - * | #1:(N/A) | \ref None | - * - */ -class MAdjustVersionsReq : public MModel { -public: - - // coco begin validated : Has been validated manually. - // This object is used statically for now, kept the logic for later usage. - QString toString() { - return toString({}); - } - // coco end - static QString toString(const QVariantList &vParameters) { - return MModel::toString("Version", vParameters); - } - - static Can::Can_Id canid () { return Can::eChlid_UI_Sync; } -}; - //// ---------- Alarms /*! @@ -462,12 +454,12 @@ class MAlarmSilenceReq : public MModel { public: quint32 silence = 1; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({silence}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AlarmSilence", vParameters); } @@ -486,22 +478,22 @@ * | #1:(U32) | \ref alarmID | * */ -// coco begin validated: Manually tested. This model class is a placeholder for the message 63(0x3F00) and there is no use case for this now. +// disabled coco begin validated: Manually tested. This model class is a placeholder for the message 63(0x3F00) and there is no use case for this now. class MAlarmClearedConditionReq : public MModel { public: GuiAlarmID alarmID = GuiAlarmID::ALARM_ID_NO_ALARM; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({alarmID}); } - // coco end + // disabled coco end // coco begin validate : static QString toString(const QVariantList &vParameters) { return MModel::toString("AlarmCondition", vParameters); } }; -// coco end +// disabled coco end /*! * \brief The MAlarmUserActionReq class @@ -519,19 +511,20 @@ class MAlarmUserActionReq : public MModel { public: GuiAlarmUserActions action; - // coco begin validated : Has been validated manually. + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({action}); } - // coco end + // disabled coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AlarmUserAction", vParameters); } }; } +typedef Model:: MDuetConfirmUIr DuetConfirmUIrData; typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; typedef Model:: MAdjustBloodDialysateReq AdjustBloodDialysateRequestData; typedef Model:: MAdjustDurationReq AdjustDurationRequestData; @@ -544,7 +537,6 @@ typedef Model:: MAdjustRecirculateReq AdjustRecirculateRequestData; typedef Model:: MAdjustTreatmentEndReq AdjustTreatmentEndRequestData; typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; -typedef Model:: MAdjustVersionsReq AdjustVersionsRequestData; // Alarms typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; typedef Model:: MAlarmClearedConditionReq AlarmClearedConditionRequestData;