/*! * * 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 MUIBloodPressureData.h * \author (last) Behrouz NematiPour * \date (last) 14-Jan-2022 * \author (original) Behrouz NematiPour * \date (original) 07-Sep-2021 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MUIBloodPressure class * \details The Bluetooth Cuff Blood Pressure data model * * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:------:|:------:|:----:|:---:|:---:|:----:|:-----------:| * | 0x2a35 | N/A |Mesur | N |BCuff| UI | Bluetooth Cuff Blood PressureData data | * * | Payload || * | || * | # 1:(U08) | \ref Data::mFlags | * | # 2:(U16) | \ref Data::mSystolic | * | # 3:(U16) | \ref Data::mDiastolic | * | # 4:(U16) | \ref Data::mMeanArterial | * | # 5:(U16) | \ref Data::mYear | * | # 6:(U08) | \ref Data::mMonth | * | # 7:(U08) | \ref Data::mDay | * | # 8:(U08) | \ref Data::mHour | * | # 9:(U08) | \ref Data::mMinute | * | #10:(U08) | \ref Data::mSecond | * | #11:(U16) | \ref Data::mPulseRate | * | #12:(U08) | \ref Data::mUserId | * | #13:(U16) | \ref Data::mStatus | * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | UI | * | infoText | UIBP | * */ class MUIBloodPressure : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::U08 mFlags ; Types::U16 mSystolic ; Types::U16 mDiastolic ; Types::U16 mMeanArterial; Types::U16 mYear ; Types::U08 mMonth ; Types::U08 mDay ; Types::U08 mHour ; Types::U08 mMinute ; Types::U08 mSecond ; Types::U16 mPulseRate ; Types::U08 mUserId ; Types::U16 mStatus ; } _data; public: Type_Enum typeText() const override { return Type_Enum::eDatum; } Unit_Enum unitText() const override { return Unit_Enum::eUI ; } QString infoText() const override { return QString("UIBP" ) ; } struct Data { quint16 mSystolic ; quint16 mDiastolic ; quint16 mPulseRate ; }; public: MUIBloodPressure () { } MUIBloodPressure ( quint16 vSystolic , quint16 vDiastolic , quint16 vPulseRate ); bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MUIBloodPressure::Data UIBloodPressureData;