/*! * * 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 MDDDialysatePumpData.h * \author (last) Dara Navaei * \date (last) 05-Feb-2024 * \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 MDDDialysatePump class * \details The DD DialysatePump data model * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | * |0x2700| 0x101 | 8 | 1 Hz | N | DD | All | DD DialysatePump Data | * * | Payload || * | || * | #01:(F32) | \ref Data::mD12PumpTargetRPM | * | #02:(F32) | \ref Data::mD48PumpTargetRPM | * | #03:(F32) | \ref Data::mD12PumpMeasuredSpeed | * | #04:(F32) | \ref Data::mD48PumpMeasuredSpeed | * | #05:(U32) | \ref Data::mD12PumpCurrentSpeed | * | #06:(U32) | \ref Data::mD48PumpCurrentSpeed | * | #07:(U32) | \ref Data::mD12PumpState | * | #08:(U32) | \ref Data::mD48PumpState | * | #09:(U32) | \ref Data::mD12PumpTargetPressure | * | #10:(U32) | \ref Data::mD48PumpTargetPressure | * | #11:(F32) | \ref Data::mD12PumpMeasuredPressure | * | #12:(F32) | \ref Data::mD48PumpMeasuredPressure | * | #13:(F32) | \ref Data::mD12PumpMeasuredCurrent | * | #14:(F32) | \ref Data::mD48PumpMeasuredCurrent | * | #15:(U32) | \ref Data::mD12PumpControl | * | #16:(U32) | \ref Data::mD48PumpControl | * | #17:(U32) | \ref Data::mD12PumpDirErrCnt | * | #18:(U32) | \ref Data::mD48PumpDirErrCnt | * | #19:(F32) | \ref Data::mD12PumpMeasuredDir | * | #20:(F32) | \ref Data::mD48PumpMeasuredDir | * * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | DD | * | infoText | DialysatePump | * */ class MDDDialysatePump : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::F32 mD12PumpTargetRPM ; ///< Fresh dialysate pump speed set point. Types::F32 mD48PumpTargetRPM ; ///< Spent dialysate pump speed set point. Types::F32 mD12PumpMeasuredSpeed ; ///< Fresh dialysate pump measured speed. Types::F32 mD48PumpMeasuredSpeed ; ///< Spent dialysate pump measured speed. Types::F32 mD12PumpCurrentSpeed ; ///< Fresh dialysate pump current speed. Types::F32 mD48PumpCurrentSpeed ; ///< Spent dialysate pump current speed. Types::U32 mD12PumpState ; ///< Fresh dialysate pump state machine state. Types::U32 mD48PumpState ; ///< Spent state machine state. Types::F32 mD12PumpTargetPressure ; ///< Fresh dialysate pump target pressure. Types::F32 mD48PumpTargetPressure ; ///< Spent dialysate pump target pressure. Types::F32 mD12PumpMeasuredPressure ; ///< Fresh dialysate pump measured pressure. Types::F32 mD48PumpMeasuredPressure ; ///< Spent dialysate pump measured pressure. Types::F32 mD12PumpMeasuredCurrent ; ///< Fresh dialysate pump measured current. Types::F32 mD48PumpMeasuredCurrent ; ///< Spent dialysate pump measured current. Types::U32 mD12PumpControl ; ///< Fresh dialysate pump control to check run/stop state. Types::U32 mD48PumpControl ; ///< Spent dialysate pump control to check run/stop state. Types::U32 mD12PumpDirErrCnt ; ///< Fresh dialysate pump direction error count. Types::U32 mD48PumpDirErrCnt ; ///< Spent dialysate pump direction error count. Types::U32 mD12PumpMeasuredDir ; ///< Fresh dialysate pump direction. Types::U32 mD48PumpMeasuredDir ; ///< Spent dialysate pump direction. } _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("DialysatePump"); } struct Data { float mD12PumpTargetRPM = 0; ///< Dialysate pump D11_Pump current set speed float mD48PumpTargetRPM = 0; ///< Dialysate pump D11_Pump measured speed float mD12PumpMeasuredSpeed = 0; ///< Dialysate pump D10_Pump current set speed float mD48PumpMeasuredSpeed = 0; ///< Dialysate pump D10_Pump measured speed float mD12PumpCurrentSpeed = 0; ///< Dialysate pump D11_Pump target revolution count float mD48PumpCurrentSpeed = 0; ///< Dialysate pump D11_Pump measured revolution count quint32 mD12PumpState = 0; ///< Dialysate pump D10_Pump target revolution count quint32 mD48PumpState = 0; ///< Dialysate pump D10_Pump measured revolution count float mD12PumpTargetPressure = 0; ///< Dialysate pump D11_Pump current state float mD48PumpTargetPressure = 0; ///< Dialysate pump D10_Pump current state float mD12PumpMeasuredPressure = 0; ///< Dialysate pump D11_Pump pulse in microseconds float mD48PumpMeasuredPressure = 0; ///< Dialysate pump D10_Pump pulse in microseconds float mD12PumpMeasuredCurrent = 0; ///< Dialysate pump D11_Pump target speed float mD48PumpMeasuredCurrent = 0; ///< Dialysate pump D10_Pump target speed quint32 mD12PumpControl = 0; ///< Dialysate pump D11_Pump parked status quint32 mD48PumpControl = 0; ///< Dialysate pump D10_Pump parked status quint32 mD12PumpDirErrCnt = 0; ///< Dialysate pump D11_Pump park fault status quint32 mD48PumpDirErrCnt = 0; ///< Dialysate pump D10_Pump park fault status quint32 mD12PumpMeasuredDir = 0; ///< Dialysate pump D76_Pump target speed quint32 mD48PumpMeasuredDir = 0; ///< Dialysate pump D76_Pump current set speed }; MDDDialysatePump() { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MDDDialysatePump::Data DDDialysatePumpData;