Index: sources/model/td/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h =================================================================== diff -u -raa03f07a386a12895435facfff9f4bff9f7a45f0 -r3ba0ffbe79f453701c0e7f55e4dae72ca3e45142 --- sources/model/td/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h (.../MTreatmentAdjustUltrafiltrationEditResponse.h) (revision aa03f07a386a12895435facfff9f4bff9f7a45f0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h (.../MTreatmentAdjustUltrafiltrationEditResponse.h) (revision 3ba0ffbe79f453701c0e7f55e4dae72ca3e45142) @@ -18,7 +18,7 @@ #include // Project -#include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" +#include "MAbstract.h" #include "types.h" // forward declarations @@ -30,9 +30,9 @@ * \brief The MAdjustUltrafiltrationEditResponse class * \details The UF vol. change response model * - * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | - * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | - * |0x4200| 0x040 | 6 | Rsp | Y | HD | UI | UF Vol. Change Response | + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x4200| 0x040 | Rsp | Y | TD | UI | UF Vol. Change Response | * * | Payload || * | || @@ -53,42 +53,52 @@ * | || * | || * | typeText | Event | - * | unitText | HD | + * | unitText | TD | * | infoText | AdjustUFEdit | * */ -class MAdjustUltrafiltrationEditResponse : public MAdjustUltrafiltrationConfirmResponse +class MAdjustUltrafiltrationEditResponse : public MAbstract { - // friends friend class ::tst_models; + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::F32 mVolume ; + Types::U32 mDuration ; + Types::S32 mDurationDiff ; + Types::F32 mRate ; + Types::F32 mRateDiff ; + Types::F32 mRateOld ; + } _data; + public: - QString stringPrefix = "AdjustUFEdit"; + Type_Enum typeText() const override { return Type_Enum::eEvent ; } + Unit_Enum unitText() const override { return Unit_Enum::eTD ; } + QString infoText() const override { return QString("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 { + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + float mVolume = 0; /*!< volume value of type float extracted out */ + quint32 mDuration = 0; /*!< duration value of type quint32 extracted out */ qint32 mDurationDiff= 0; /*!< durationDiff value of type quint32 extracted out */ + float mRate = 0; /*!< rate value of type float 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; + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; }; }