/*! * * Copyright (c) 2023-2023 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 MHDUsageInfoResponse.h * \author (last) Vy * \date (last) 08-Sep-2023 * \author (original) Vy * \date (original) 08-Sep-2023 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MHDUsageInfoResponse class * \details The HD Usage information data model * * | MSG | CAN ID | Type | Ack | Src | Dst | Description | * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | * |0x8B00| 0x040 | 1 Hz | N | HD | UI | HD Usage information data | * * | Payload || * | || * | #1:(F32) | \ref Data::mTotalTxHours | * | #2:(F32) | \ref Data::mTotalTxHoursSinceLastService | * | #3:(U32) | \ref Data::mEpochOfStartOfLastTx | * | #4:(U32) | \ref Data::mEpochOfLastRecordReset | * | #5:(U16) | \ref Data::mCrc | * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | HD | * | infoText | HDUsageInfo | * */ class MHDUsageInfoResponse : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::F32 mTotalTxHours ; Types::F32 mTotalTxHoursSinceLastService ; Types::U32 mEpochOfStartOfLastTx ; Types::U32 mEpochOfLastRecordReset ; Types::U16 mCrc ; } _data; public: Type_Enum typeText () const override { return Type_Enum::eDatum; } Unit_Enum unitText () const override { return Unit_Enum::eHD ; } QString infoText () const override { return QString("HDUsageInfo"); } struct Data { float mTotalTxHours ; float mTotalTxHoursSinceLastService ; quint32 mEpochOfStartOfLastTx ; quint32 mEpochOfLastRecordReset ; quint16 mCrc ; }; MHDUsageInfoResponse () {} bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MHDUsageInfoResponse::Data HDUsageInfoResponseData;