/*! * * Copyright (c) 2019-2020 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 MDGConductivityData.h * \author (last) Michael Garthwaite * \date (last) 23-Feb-2022 * \author (original) Michael Garthwaite * \date (original) 23-Feb-2022 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MDGConductivityData class * \details The DG conductivity sensors data model * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | * |0x3100| 0x080 | 8 | 1 Hz | N | DG | All | DG Conductivity Data | * * | Payload || * | || * | #1:(F32) | \ref Data::mRORejectioRatio | * | #2:(F32) | \ref Data::mCPi | * | #3:(F32) | \ref Data::mCPo | * | #4:(F32) | \ref Data::mCD1 | * | #5:(F32) | \ref Data::mCD2 | * * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | DG | * | infoText | ConductivityData | * */ class MDGConductivityData : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::F32 mRORejectionRatio; Types::F32 mCPi ; Types::F32 mCPo ; Types::F32 mCD1 ; Types::F32 mCD2 ; } _data; public: Type_Enum typeText () const override { return Type_Enum::eDatum ; } Unit_Enum unitText () const override { return Unit_Enum::eDG ; } QString infoText () const override { return QString("ConductivityData") ; } struct Data{ float mRORejectionRatio = 0; ///< RO Rejection Ratio float mCPi = 0; ///< CPi conductivity float mCPo = 0; ///< CPo conductivity float mCD1 = 0; ///< CP1 conductivity float mCD2 = 0; ///< CP2 conductivity }; MDGConductivityData () { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MDGConductivityData::Data DGConductivityData;