Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -r666594860f4ea32da9a2bd362d40325b881b11f9 -r66e87ea403ec12a273553284919684282d87bc6a --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 666594860f4ea32da9a2bd362d40325b881b11f9) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 66e87ea403ec12a273553284919684282d87bc6a) @@ -25,7 +25,6 @@ namespace Model { - /*! * Simple request models * These are models to send the request for the doAdjustment @@ -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,17 +246,7 @@ */ 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, - }; - - State requestedState = eStop; // the requested state. Initially it's Stop => start. + GuiSalineCommands requestedState = GuiSalineCommands::SALINE_CMD_STOP; // the requested state. Initially it's Stop => start. // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { @@ -270,6 +259,86 @@ }; /*! + * \brief The MAdjustHeparinReq class + * \details The model to request the Heparin state + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------:| + * |0x4B00| 0x100 | 9 | Req | Y | UI | HD | Heparin Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + * \sa State + * \sa MTreatmentHeparin : Heparin Data + * \sa MAdjustHeparinResponse : Heparin Response + * + */ +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. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({requestedState}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustHeparin", vParameters); + } +}; + +/*! + * \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 * @@ -493,16 +562,18 @@ }; } -typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; -typedef Model:: MAdjustBloodDialysateReq AdjustBloodDialysateRequestData; -typedef Model:: MAdjustDurationReq AdjustDurationRequestData; -typedef Model:: MAdjustUltrafiltrationStateReq AdjustUltrafiltrationStateRequestData; -typedef Model:: MAdjustUltrafiltrationEditReq AdjustUltrafiltrationEditRequestData; -typedef Model:: MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; -typedef Model:: MTreatmentStartReq TreatmentStartRequestData; -typedef Model:: MTreatmentConfirmReq TreatmentConfirmRequestData; -typedef Model:: MTreatmentEndReq TreatmentEndRequestData; -typedef Model:: MAdjustSalineReq AdjustSalineRequestData; -typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; -typedef Model:: MAdjustTreatmentParametersReq AdjustTreatmentParametersRequestData; -typedef Model:: MAlarmAcknowledgeReq AlarmAcknowledgeRequestData; +typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; +typedef Model:: MAdjustBloodDialysateReq AdjustBloodDialysateRequestData; +typedef Model:: MAdjustDurationReq AdjustDurationRequestData; +typedef Model:: MAdjustUltrafiltrationStateReq AdjustUltrafiltrationStateRequestData; +typedef Model:: MAdjustUltrafiltrationEditReq AdjustUltrafiltrationEditRequestData; +typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; +typedef Model:: MAdjustSalineReq AdjustSalineRequestData; +typedef Model:: MAdjustHeparinReq AdjustHeparinRequestData; +typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; +typedef Model:: MTreatmentStartReq TreatmentStartRequestData; +typedef Model:: MTreatmentConfirmReq TreatmentConfirmRequestData; +typedef Model:: MTreatmentEndReq TreatmentEndRequestData; +typedef Model:: MAdjustTreatmentParametersReq AdjustTreatmentParametersRequestData; +typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; +typedef Model:: MAlarmAcknowledgeReq AlarmAcknowledgeRequestData;