/*! * * Copyright (c) 2021-2024 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 MAdjustDGRequests.h * \author (last) Behrouz NematiPour * \date (last) 27-May-2023 * \author (original) Behrouz NematiPour * \date (original) 16-Apr-2021 * */ #pragma once // Qt //project #include "MAdjustRequestsBase.h" using namespace Gui; namespace Model { /*! * Simple request models * These are models to send the request for the doAdjustment * The the only reason thy have been defined to help overloading the adjustment methods * Otherwise the parameters are so tiny models. */ /*! * \brief The MAdjustDDDateTimeReq class * \details The model to request starting a treatment * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:----:|:------:|:----:|:---:|:---:|:----:|:-----------:| * | 0x6E | 0x110 | Req | Y | UI | DG | Set RTC Date and Time | * * | Payload || * | || * | #1:(U32) | \ref mEpoch | * */ class MAdjustDDDateTimeReq : public MModel { public: quint32 mEpoch; static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustDDDateTime", vParameters); } static Can::Can_Id canid () { return Can::Can_Id::eChlid_UI_DD; } }; /*! * \brief The MAdjustDGCleaningUsageReq class * \details The model to request DG Cleaning Usage * * | MSG | Type | Ack | Src | Dest | Description | * |:----:|:----:|:---:|:---:|:----:|:-----------:| * | 0xB8 | Req | Y | UI | DG | DGCleaningUsage | * * | Payload || * | || * */ class MAdjustDGCleaningUsageReq : public MModel { public: static QString toString(const QVariantList &vParameters) { return MModel::toString("DGCleaningUsage", vParameters); } static Can::Can_Id canid () { return Can::Can_Id::eChlid_UI_DD; } }; /*! * \brief The MDDCalibrationPressureReq class * \details The model to request DD Calibration Pressure * * | MSG | Type | Ack | Src | Dest | Description | * |:----:|:----:|:---:|:---:|:----:|:-----------: | * | 0x118 | Req | Y | UI | DG | DDCalibrationPressure | * * | Payload || * | || * | #1: (U32) | \ref Data::mIndex | * */ class MDDCalibrationPressureReq : public MModel { public: quint32 mIndex = 0; QString toString() { return toString({ mIndex }); } static QString toString(const QVariantList &vParameters) { return MModel::toString("DDCalPressureReq", vParameters); } static Can::Can_Id canid () { return Can::Can_Id::eChlid_UI_DD; } }; /*! * \brief The MAdjustDDCalibrationPressureReq class * \details The model to request Adjust DD Calibration Pressure * * | MSG | Type | Ack | Src | Dest | Description | * |:----:|:----:|:---:|:---:|:----:|:-----------: | * | 0x11A | Req | Y | UI | DG | AdjustDDCalibrationPressure | * * | Payload || * | || * | #1: (U32) | \ref Data::mIndex | * | #2: (F32) | \ref Data::mGain | * | #3: (F32) | \ref Data::mOffset | * | #4: (U32) | \ref Data::mCalibrationTime | * */ class MAdjustDDCalibrationPressureReq : public MModel { public: quint32 mIndex = 0; float mGain = 0; float mOffset = 0; quint32 mCalibrationTime = 0; QString toString() { return toString({ mIndex , mGain , mOffset , mCalibrationTime , }); } static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustDDCalPressureReq", vParameters); } static Can::Can_Id canid () { return Can::Can_Id::eChlid_UI_DD; } }; } typedef Model::MAdjustDDDateTimeReq AdjustDDDateTimeRequestData; typedef Model::MAdjustDGCleaningUsageReq AdjustDGCleaningUsageRequestData; typedef Model::MDDCalibrationPressureReq DDCalibrationPressureRequestData; typedef Model::MAdjustDDCalibrationPressureReq AdjustDDCalibrationPressureRequestData;