Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -r1284cf3e36ef692c94c38545121c83072626036d -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 1284cf3e36ef692c94c38545121c83072626036d) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -332,7 +332,7 @@ */ class MAlarmSilenceReq : public MModel { public: - bool state = 0; + quint8 state; // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { @@ -344,6 +344,202 @@ } }; +/*! + * \brief The MAlarmAcknowledgeReq class + * \details The model to tell HD an alarm has been acknowledged + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 63 | 0x100 | N/A | Cmd | Y | UI | HD | Alarm Acknolwedge Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref alarmID | + * + */ +class MAlarmAcknowledgeReq : public MModel { +public: + quint32 alarmID; + // 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 + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AlarmAcknowledgeRequest", vParameters); + } +}; + +/*! + * \brief The MStartTreatmentReq class + * \details The model to request starting a treatment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 56 | 0x100 | 9 | Req | Y | UI | HD | Start Treatment Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref request | + * + */ +class MStartTreatmentReq : public MModel { +public: + enum Options { + eSelectParams = 0, + eCancel = 1, + eStartTreatment = 2 + }; + Options request = eSelectParams; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({request}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("StartTreatment", vParameters); + } +}; + +/*! + * \brief The MConfirmTreatmentReq class + * \details The model to tell HD treatment parameters have been confirmed + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 56 | 0x100 | 9 | Req | Y | UI | HD | Confirm Treatment Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref request | + * + */ +class MConfirmTreatmentReq : public MModel { +public: + enum Options { + eCancel = 0, + eConfirm = 1 + }; + Options request = eConfirm; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({request}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("ConfirmTreatment", vParameters); + } +}; + +/*! + * \brief The MEndTreatmentReq class + * \details The model to request an end to treatment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 60 | 0x100 | 9 | Req | Y | UI | HD | End Treatment Request | + * + * | Payload || + * | || + * | N/A || + * + */ +class MEndTreatmentReq : 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("EndTreatment", vParameters); + } +}; + +/*! + * \brief The MAdjustTreatmentParametersReq class + * \details The model used to request treatment parameters validation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 60 | 0x100 | 9 | Req | Y | UI | HD | New Treatment Parameters Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref bloodFlowRate | + * | #2:(U32) | \ref dialysateFlowRate | + * | #3:(U32) | \ref duration | + * | #4:(U32) | \ref heparinStopTime | + * | #5:(U32) | \ref salineBolus | + * | #6:(U32) | \ref acidConcentrate | + * | #7:(U32) | \ref bicarbonateConcentrate | + * | #8:(U32) | \ref dialyzerType | + * | #9:(U32) | \ref bloodPressureMeasureInterval | + * | #10:(U32) | \ref rinsebackFlowRate | + * | #11:(S32) | \ref arterialPressureLimitLow | + * | #12:(S32) | \ref arterialPressureLimitHigh | + * | #13:(S32) | \ref venousPressureLimitLow | + * | #14:(S32) | \ref venousPressureLimitHigh | + * | #15:(F32) | \ref heparinDispensingRate | + * | #16:(F32) | \ref heparinBolusVolume | + * | #17:(F32) | \ref dialysateTemp | + * + */ +class MAdjustTreatmentParametersReq : public MModel { +public: + + quint32 bloodFlowRate = 0; // mL/min + quint32 dialysateFlowRate = 0; // mL/min + quint32 duration = 0; // minutes + quint32 heparinStopTime = 0; // min + quint32 salineBolus = 0; // mL + quint32 acidConcentrate = 0; // + quint32 bicarbonateConcentrate = 0; // + quint32 dialyzerType = 0; // + quint32 bloodPressureMeasureInterval = 0; // minutes + quint32 rinsebackFlowRate = 0; // mL/min + qint32 arterialPressureLimitLow = 0; // mmHg + qint32 arterialPressureLimitHigh = 0; // mmHg + qint32 venousPressureLimitLow = 0; // mmHg + qint32 venousPressureLimitHigh = 0; // mmHg + float heparinDispensingRate = 0; // mL/hr + float heparinBolusVolume = 0; // mL + float dialysateTemp = 0; // Celsius + + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({ + bloodFlowRate , + dialysateFlowRate , + duration , + heparinStopTime , + salineBolus , + acidConcentrate , + bicarbonateConcentrate , + dialyzerType , + bloodPressureMeasureInterval , + rinsebackFlowRate , + arterialPressureLimitLow , + arterialPressureLimitHigh , + venousPressureLimitLow , + venousPressureLimitHigh , + heparinDispensingRate , + heparinBolusVolume , + dialysateTemp , + }); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustTreatmentParametersRequest", vParameters); + } +}; + } typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; @@ -354,5 +550,9 @@ typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; typedef Model:: MAdjustSalineReq AdjustSalineRequestData; typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; - +typedef Model:: MStartTreatmentReq StartTreatmentRequestData; +typedef Model:: MConfirmTreatmentReq ConfirmTreatmentRequestData; +typedef Model:: MEndTreatmentReq EndTreatmentRequestData; +typedef Model:: MAdjustTreatmentParametersReq AdjustTreatmentParametersRequestData; typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; +typedef Model:: MAlarmAcknowledgeReq AlarmAcknowledgeRequestData;