#ifndef MPRIMINGDATA_H
#define MPRIMINGDATA_H
// Project
#include "MAbstract.h"
#include "types.h"
// forward declarations
class tst_models;
namespace Model {
/*!
* \brief The MPrimingData class
* \details The priming data model
*
* | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description |
* |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------------------: |
* |0x4300| 0x020 | 9 | 1 Hz | Y | HD | UI | Priming Status |
*
* | Payload ||
* | ||
* | #1:(U32) | \ref Data::currentState |
* | #2:(U32) | \ref Data::secondsRemaining |
* | #3:(U32) | \ref Data::secondsTotal |
*
* \sa Data
*
*
* | ||
* | ||
* | typeText | Dataum |
* | unitText | HD |
* | infoText | PrimingData |
*
*/
class MPrimingData : public MAbstract
{
// friends
friend class ::tst_models;
QVariantList parameters() const override;
struct {
Types::U32 currentState;
Types::U32 secondsRemaining;
Types::U32 secondsTotal;
} _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("PrimingData") ; }
struct Data {
quint32 currentState = 0;
quint32 secondsRemaining = 0;
quint32 secondsTotal = 0;
};
MPrimingData() { }
bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override;
Data data ( ) const ;
};
}
typedef Model::MPrimingData::Data PrimingData;
#endif // MPRIMINGDATA_H