/*! * * Copyright (c) 2021-2022 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 MTreatmentStopData.h * \author (last) Behrouz NematiPour * \date (last) 07-Oct-2021 * \author (original) Behrouz NematiPour * \date (original) 07-Oct-2021 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MTreatmentStop class * \details The treatment Stop bolus data model * * | MSG | CAN ID | Type | Ack | Src | Dst | Description | * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------:| * |0x4900| 0x020 | 1 Hz | N | HD | UI | Treatment Stop Progress | * * | Payload || * | || * | #1:(U32) | \ref Data::mTotal | * | #2:(U32) | \ref Data::mCountDown | * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | HD | * | infoText | Stop | * */ class MTreatmentStop : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::U32 mTotal ; Types::U32 mCountDown; } _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("Stop" ) ; } struct Data { quint32 mTotal = 0; ///< Total Timeout of Treatment Blood Stop quint32 mCountDown = 0; ///< Current Timeout count down of Treatment Blood Stop }; public: MTreatmentStop () { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MTreatmentStop::Data TreatmentStopData;