/*! * * Copyright (c) 2020-2024 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 MDDBloodLeakData.h * \author (last) Behrouz NematiPour * \date (last) 27-Mar-2023 * \author (original) Behrouz NemaiPour * \date (original) 02-Jul-2020 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MDDBloodLeak class * \details The DD BloodLeak data model * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | * |0x6100| 0x101 | 8 | 1 Hz | N | DD | All | DD BloodLeak Data | * * | Payload || * | || * | #1:(U32) | \ref Data::mBloodLeakStatus | * | #2:(U32) | \ref Data::mBloodLeakState | * | #3:(U32) | \ref Data::mBloodLeakPersistentCounter | * | #4:(U32) | \ref Data::mBloodLeakSerialCommState | * | #5:(U32) | \ref Data::mBloodLeakIntensity | * | #6:(U32) | \ref Data::mBloodLeakDetect | * | #7:(F32) | \ref Data::mBloodLeakIntensityMovingAvg | * | #8:(U32) | \ref Data::mBloodLeakTimeSinceZeroMS | * | #9:(U32) | \ref Data::mDriftInRangeStatus | * |#10:(U32) | \ref Data::mDriftUpperRangeStatus | * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | DD | * | infoText | BloodLeak | * */ class MDDBloodLeakData : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::U32 mBloodLeakStatus ; Types::U32 mBloodLeakState ; Types::U32 mBloodLeakPersistentCounter ; Types::U32 mBloodLeakSerialCommState ; Types::U32 mBloodLeakIntensity ; Types::U32 mBloodLeakDetect ; Types::F32 mBloodLeakIntensityMovingAvg ; Types::U32 mBloodLeakTimeSinceZeroMS ; Types::U32 mDriftInRangeStatus ; Types::U32 mDriftUpperRangeStatus ; } _data; public: Type_Enum typeText () const override { return Type_Enum::eDatum ; } Unit_Enum unitText () const override { return Unit_Enum::eDD ; } QString infoText () const override { return QString("BloodLeak") ; } struct Data { quint32 mBloodLeakStatus = 0; ///< DD Blood Leak Sensor status quint32 mBloodLeakState = 0; ///< DD Blood Leak Sensor status quint32 mBloodLeakPersistentCounter = 0; ///< DD Blood Leak Sensor status quint32 mBloodLeakSerialCommState = 0; ///< DD Blood Leak Sensor status quint32 mBloodLeakIntensity = 0; ///< DD Blood Leak Sensor status quint32 mBloodLeakDetect = 0; ///< DD Blood Leak Sensor status float mBloodLeakIntensityMovingAvg = 0; ///< DD Blood Leak Sensor status quint32 mBloodLeakTimeSinceZeroMS = 0; ///< DD Blood Leak Sensor status quint32 mDriftInRangeStatus = 0; ///< DD Blood Leak Sensor status quint32 mDriftUpperRangeStatus = 0; ///< DD Blood Leak Sensor status }; MDDBloodLeakData () { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MDDBloodLeakData::Data DDBloodLeakData;