/*! * * Copyright (c) 2021-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 MHDSyringePumpData.h * \author (last) Behrouz NematiPour * \date (last) 10-Mar-2022 * \author (original) Behrouz NematiPour * \date (original) 30-Jul-2021 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MHDSyringePump class * \details The HD SyringePump data model * * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:------:|:------:|:----:|:---:|:---:|:----:|:---------------------:| * | 0x6900 | 0x040 | 1 Hz | N | HD | All | HD SyringePump Data | * * | Payload || * | || * | #1:(U32) | \ref Data::mSyringePumpState | * | #2:(U32) | \ref Data::mHeparinState | * | #3:(F32) | \ref Data::mSetRate | * | #4:(F32) | \ref Data::mMeasuredRate | * | #5:(S32) | \ref Data::mSyringePumpPosition | * | #6:(F32) | \ref Data::mVolumeDelivered | * | #7:(F32) | \ref Data::mHome | * | #8:(F32) | \ref Data::mSwitch | * | #9:(F32) | \ref Data::mForce | * |#10:(F32) | \ref Data::mSafetyVol | * |#11:(U32) | \ref Data::mStatus | * * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | HD | * | infoText | Syringe | * */ class MHDSyringePump : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::U32 mSyringePumpState ; Types::U32 mHeparinState ; Types::F32 mSetRate ; // (mL/hr) Types::F32 mMeasuredRate ; // (mL/hr) Types::S32 mSyringePumpPosition ; Types::F32 mVolumeDelivered ; // (mL) Types::F32 mMeasuredHome ; // (V) Types::F32 mMeasuredSwitch ; // (V) Types::F32 mMeasuredForce ; // (V) Types::F32 mSafetyVol ; // (mL) Types::U32 mStatus ; } _data; public: Type_Enum typeText() const override { return Type_Enum::eDatum ; } Unit_Enum unitText() const override { return Unit_Enum::eTD ; } QString infoText() const override { return QString("Syringe"); } struct Data { quint32 mSyringePumpState = 0; quint32 mHeparinState = 0; float mSetRate = 0; float mMeasuredRate = 0; qint32 mSyringePumpPosition = 0; float mVolumeDelivered = 0; float mMeasuredHome = 0; float mMeasuredSwitch = 0; float mMeasuredForce = 0; float mSafetyVol = 0; quint32 mStatus = 0; }; public: MHDSyringePump () { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MHDSyringePump::Data HDSyringePumpData;