Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -r074b32b5cc08f41f2d9ce0d021f2151b76bba5ad -r846a9ebc350e33be4affab3cc4c136248900015d --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 074b32b5cc08f41f2d9ce0d021f2151b76bba5ad) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 846a9ebc350e33be4affab3cc4c136248900015d) @@ -2,13 +2,14 @@ * * Copyright (c) 2019-2020 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. + * 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) 10-Aug-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 * */ @@ -25,8 +26,8 @@ /*! * Simple request models - * These are models to send the request for the doAdjustmet - * The the only reason thy have been defined to help overloadding the adjusmtent methods + * These are models to send the request for the doAdjustment + * The the only reason thy have been defined to help overloading the adjustment methods * Otherwise the parameters are so tiny models. */ @@ -67,7 +68,7 @@ } // coco end static QString toString(const QVariantList &vParameters) { - return MModel::toString("AdjustBloodDialisate", vParameters); + return MModel::toString("AdjustBloodDialysate", vParameters); } }; @@ -136,6 +137,24 @@ } }; +class MAdjustSalineReq : public MModel { +public: + enum State { + eStop = 0, + eStart = 1, + }; + State requestedState = eStop; // 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() { + return toString({requestedState}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustSaline", vParameters); + } +}; + class MAlarmSilenceReq : public MModel { public: bool state = 0; @@ -208,5 +227,5 @@ typedef Model:: MStartTreatmentReq StartTreatmentRequestData; typedef Model:: MConfirmTreatmentReq ConfirmTreatmentRequestData; typedef Model:: MEndTreatmentReq EndTreatmentRequestData; +typedef Model:: MAdjustSalineReq AdjustSalineRequestData; typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; -