/*! * * Copyright (c) 2021-2023 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 MTreatmentAdjustUltrafiltrationEditResponse.h * \author (last) Behrouz NematiPour * \date (last) 11-Apr-2021 * \author (original) Behrouz NematiPour * \date (original) 11-Apr-2021 * */ #pragma once // Qt #include // Project #include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MAdjustUltrafiltrationEditResponse class * \details The UF vol. change response model * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | * |0x1300| 0x020 | 6 | Rsp | Y | HD | UI | UF Vol. Change Response | * * | Payload || * | || * | #1:(U32) | \ref Data::mAccepted | * | #2:(U32) | \ref Data::mReason | * | | | * | #3:(F32) | \ref Data::mVolume | * | #4:(U32) | \ref Data::mDuration | * | #5:(S32) | \ref Data::mDurationDiff | * | | | * | #6:(F32) | \ref Data::mRate | * | #7:(F32) | \ref Data::mRateDiff | * | #8:(F32) | \ref Data::mRateOld | * * \sa Data * *

Logging info

* | || * | || * | typeText | Event | * | unitText | HD | * | infoText | AdjustUFEdit | * */ class MAdjustUltrafiltrationEditResponse : public MAdjustUltrafiltrationConfirmResponse { // friends friend class ::tst_models; public: QString stringPrefix = "AdjustUFEdit"; //NOTE: The correct order is followed in cpp to fill in the values regarding the payload byte orders. // The struct here is just the values not in correct order // since has been inherited from the confirm to borrow some struct variables. struct Data : public MAdjustUltrafiltrationConfirmResponse::Data { qint32 mDurationDiff= 0; /*!< durationDiff value of type quint32 extracted out */ float mRateDiff = 0; /*!< rateDiff value of type float extracted out */ float mRateOld = 0; /*!< rateOld value of type float extracted out */ }; private: struct : public MAdjustUltrafiltrationConfirmResponse::_Data { Types::S32 mDurationDiff ; Types::F32 mRateDiff ; Types::F32 mRateOld ; } _data; public: MAdjustUltrafiltrationEditResponse () { } QString toString ( ) const ; void toVariantList ( QVariantList &vData ) const ; bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr); Data data() const; }; } typedef Model::MAdjustUltrafiltrationEditResponse::Data AdjustUltrafiltrationEditResponseData;