Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -r4d969a04e6d80a6d2f6b756a4b87aecd6356e6a9 -r1284cf3e36ef692c94c38545121c83072626036d --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 4d969a04e6d80a6d2f6b756a4b87aecd6356e6a9) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 1284cf3e36ef692c94c38545121c83072626036d) @@ -5,9 +5,11 @@ * 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 - * \date 2020/06/08 - * \author Behrouz NematiPour + * \file MTreatmentAdjustRequests.h + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 * */ @@ -19,9 +21,10 @@ //project #include "GuiGlobals.h" +using namespace Gui; + namespace Model { - /*! * Simple request models * These are models to send the request for the doAdjustment @@ -148,12 +151,8 @@ */ class MAdjustUltrafiltrationStateReq : public MModel { public: - enum State{ - ePaused = 0, - eRunning = 1, - }; - State requestedState = ePaused; // the requested state. Initially it's running => paused. + GuiUFCommands requestedState = GuiUFCommands::UF_CMD_PAUSE; // the requested state. Initially it's running => paused. // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { @@ -232,9 +231,9 @@ * \brief The MAdjustSalineReq class * \details The model to request the Saline Bolus state * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:--------------------:| - * | 18 | 0x100 | 9 | Req | Y | UI | HD | Saline Bolus Request | + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:--------------------:| + * |0x1200| 0x100 | 9 | Req | Y | UI | HD | Saline Bolus Request | * * | Payload || * | || @@ -247,6 +246,11 @@ */ class MAdjustSalineReq : public MModel { public: + /*! + * \brief The State enum + * \details The saline bolus requested state. + * There is no FW shared enum for this so has been defined here as documented in "Messages List". + */ enum State { eStop = 0, eStart = 1, @@ -265,6 +269,55 @@ }; /*! + * \brief The MAdjustPressuresLimitsReq class + * \details The model to request the pressures limits adjustment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------------:| + * |0x4600| 0x100 | 9 | Req | Y | UI | HD | A/V BP Limit Change Request | + * + * | Payload ||| + * | ||| + * | #1:(S32) | \ref mArterialLimitLow | (mmHg) | + * | #2:(S32) | \ref mArterialLimitHigh | (mmHg) | + * | #3:(S32) | \ref mVenousLimitLow | (mmHg) | + * | #4:(S32) | \ref mVenousLimitHigh | (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 = +100; // PRS355 manufacturing default + static const qint32 VenousLimitLowDef = -100; // PRS356 manufacturing default + static const qint32 VenousLimitHighDef = +400; // PRS357 manufacturing default + +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. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString + ({ mArterialLimitLow , + mArterialLimitHigh , + mVenousLimitLow , + mVenousLimitHigh + }); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustPressuresLimits", vParameters); + } +}; + +/*! * \brief The MAlarmSilenceReq class * \details The model to request alarm silent * @@ -300,5 +353,6 @@ typedef Model:: MAdjustUltrafiltrationEditReq AdjustUltrafiltrationEditRequestData; typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; typedef Model:: MAdjustSalineReq AdjustSalineRequestData; +typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData;