/*! * * 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 MDGDebugText.h * \date 7/9/2020 * \author Behrouz NematiPour * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; namespace Model { /*! * \brief The MDGDebugText class * \details the Debug Text Message from DG * * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | Payload | * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------------------------:|:----------------------------------------------------------:| * |0xFFF2| 0x070 | 17 | Event| N | DG | UI | DG debug text for UI to log ASCII text | 40 bytes, null term text + msg overhead will take 6 frames | * * \sa Data */ class MDGDebugText : public MAbstract { // friends friend class ::tst_models; // DG Drain Pump Data (U32) Set pt. RPM (U32) DAC value QVariantList parameters() const override; QString _data; public: Type_Enum typeText () const override { return Type_Enum::eEvent; } Unit_Enum unitText () const override { return Unit_Enum::eDG ; } QString infoText () const override { return QString("Debug") ; } struct Data { QString text; }; bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MDGDebugText::Data DGDebugTextData;