/*! * * Copyright (c) 2021-2025 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 MTreatmentStatesData.h * \author (last) Dara Navaei * \date (last) 06-Nov-2024 * \author (original) Behrouz NematiPour * \date (original) 11-Apr-2021 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MTreatmentStates class * \details The treatment states data model * These are states of the current treatment. * It also includes the ultrafiltration states, saline bolus states. * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | * |0x0F00| 0x040 | 7 | 1 Hz | N | HD | All | Treatment States Data | * * | Payload || * | || * | #01:(U32) | \ref Data::mSubMode | * | #02:(U32) | \ref Data::mUFState | * | #03:(U32) | \ref Data::mSalineState | * | #04:(U32) | \ref Data::mHeparinState | * | #05:(U32) | \ref Data::mRinsebackState | * | #06:(U32) | \ref Data::mRecirculateState | * | #07:(U32) | \ref Data::mBloodPrimeState | * | #08:(U32) | \ref Data::mTreatmentEndState | * | #09:(U32) | \ref Data::mTreatmentStopState | * | #10:(U32) | \ref Data::mDialysisState | * | #11:(U32) | \ref Data::mBloodLeakZeoringState | * * \sa Data * \sa Treatment_States * \sa UF_States * \sa Saline_Bolus_States * \sa Heparin_Bolus_States * \sa Rinseback_States * \sa Treatment_Recirc_States * \sa Blood_Prime_States * \sa Treatment_Stop_States * \sa Treatment_End_States * \sa Dialysis States * \sa Blood Leak Zeroing States * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | HD | * | infoText | TreatmentStates | * */ class MTreatmentStates : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::U32 mSubMode ; Types::U32 mUFState ; Types::U32 mSalineState ; Types::U32 mHeparinState ; Types::U32 mRinsebackState ; Types::U32 mRecirculateState ; Types::U32 mBloodPrimeState ; Types::U32 mTreatmentEndState ; Types::U32 mTreatmentStopState ; Types::U32 mDialysisState ; Types::U32 mBloodLeakZeoringState ; } _data; public: Type_Enum typeText () const override { return Type_Enum::eDatum ; } Unit_Enum unitText () const override { return Unit_Enum::eHD ; } QString infoText () const override { return QString("TreatmentStates"); } struct Data { quint32 mSubMode = 0; ///< Sub-Mode State - Treatment_States quint32 mUFState = 0; ///< UF State - UF_States quint32 mSalineState = 0; ///< Saline State - Saline_Bolus_States quint32 mHeparinState = 0; ///< Heparin State - Heparin_Bolus_States quint32 mRinsebackState = 0; ///< Rinseback State - Rinseback_States quint32 mRecirculateState = 0; ///< Recirculate State - Treatment_Recirc_States quint32 mBloodPrimeState = 0; ///< BloodPrime State - Blood_Prime_States quint32 mTreatmentEndState = 0; ///< TreatmentEnd State - Treatment_Stop_States quint32 mTreatmentStopState = 0; ///< TreatmentStop State - Treatment_End_States quint32 mDialysisState = 0; ///< Dialysis State - Dialysis_State quint32 mBloodLeakZeoringState = 0; ///< Blood leak zeroing State - Blood leak zeroing States }; MTreatmentStates() { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MTreatmentStates::Data TreatmentStatesData;