/*! * * Copyright (c) 2021-2022 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 MHDAccelerometerData.h * \author (last) Behrouz NematiPour * \date (last) 15-Feb-2021 * \author (original) Behrouz NematiPour * \date (original) 12-Feb-2021 * */ #pragma once // Qt #include // Project #include "MAbstract.h" #include "types.h" // forward declarations class tst_models; // coco begin validated: // FIXME: this model was only for the Diagnostic use, and has been removed, // Should be removed from the UI Software if not being used anymore namespace Model { /*! * \brief The MHDAccelerometer class * \details The HD accelerometer data model * * * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | * |:------:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| * | 0x3300 | 0x040 | 7 | 1 Hz | N | HD | UI | HD Accelerometer Data | * * | Payload || * | || * | #1:(F32) | \ref Data::mX | * | #2:(F32) | \ref Data::mY | * | #3:(F32) | \ref Data::mZ | * | #4:(F32) | \ref Data::mXMax | * | #5:(F32) | \ref Data::mYMax | * | #6:(F32) | \ref Data::mZMax | * | #7:(F32) | \ref Data::mXTilt | * | #8:(F32) | \ref Data::mYTilt | * | #9:(F32) | \ref Data::mZTilt | * * \sa Data * *

Logging info

* | || * | || * | typeText | Datum | * | unitText | HD | * | infoText | Accel | * */ class MHDAccelerometer : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { Types::F32 mX ; Types::F32 mY ; Types::F32 mZ ; Types::F32 mXMax ; Types::F32 mYMax ; Types::F32 mZMax ; Types::F32 mXTilt ; Types::F32 mYTilt ; Types::F32 mZTilt ; } _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("Accel") ; } struct Data { float mX = 0; /*!< x Magnitude of acceleration vector in x axis in g units */ float mY = 0; /*!< y Magnitude of acceleration vector in y axis in g units */ float mZ = 0; /*!< z Magnitude of acceleration vector in z axis in g units */ float mXMax = 0; /*!< x Max Maximum magnitude of acceleration vector in x axis in g units */ float mYMax = 0; /*!< y Max Maximum magnitude of acceleration vector in y axis in g units */ float mZMax = 0; /*!< z Max Maximum magnitude of acceleration vector in z axis in g units */ float mXTilt = 0; /*!< x Tilt Tilt angle in the x axis in degrees */ float mYTilt = 0; /*!< y Tilt Tilt angle in the y axis in degrees */ float mZTilt = 0; /*!< z Tilt Tilt angle in the z axis in degrees */ }; public: MHDAccelerometer () { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } typedef Model::MHDAccelerometer::Data HDAccelerometerData; // coco end