/*! * * 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 MAdjustHDRequests.h * \author (last) Behrouz NematiPour * \date (last) 16-Apr-2021 * \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 MAdjustHDDateTime class * \details The model to request starting a treatment * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:----:|:------:|:----:|:---:|:---:|:----:|:-----------:| * | 109 | 0x100 | Req | Y | UI | HD | Set RTC Date and Time | * * | Payload || * | || * | #1:(U32) mEpoch | \ref mEpoch | * */ class MAdjustHDDateTimeReq : public MModel { public: quint32 mEpoch; // coco begin validated : Has been validated manually. QString toString() { return toString({mEpoch}); } // coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustHDDateTime", vParameters); } }; /*! * \brief The MAdjustAlarmVolumeReq class * \details The HD alarm volume request model * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:------:|:------:|:----:|:---:|:---:|:----:|:-----------:| * | 0x4E00 | 0x100 | Req | Y | UI | HD | HD Set Alarm Volume Request | * * | Payload || * | || * | #1:(U32) volume | \ref MAdjustHDAlarmVolumeResponse | * */ class MAdjustHDAlarmVolumeReq : public MModel { public: quint32 volume; // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString( { volume } ); } // coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("AdjustHDAlarmVolume", vParameters); } }; /*! * \brief The MAdjustVersionsReq class * \details The DG/HD versions request model * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:------:|:------:|:----:|:---:|:---:|:----:|:-----------:| * | 0x1C00 | 0x200 | Req | Y | UI | All | DG/HD Versions/SN Request | * * | Payload || * | || * | (N/A) || * */ class MAdjustVersionsReq : public MModel { public: // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({}); } // coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("Version", vParameters); } static Can::Can_Id canid () { return Can::eChlid_UI_Sync; } }; /*! * \brief The MAdjustServiceReq class * \details The DG/HD versions request model * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:------:|:------:|:----:|:---:|:---:|:----:|:---------------------------:| * | 0x8900 | 0x200 | Req | Y | UI | All | DG/HD Service Dates Request | * * | Payload || * | || * | (N/A) || * */ class MAdjustServiceReq : public MModel { public: // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { return toString({}); } // coco end static QString toString(const QVariantList &vParameters) { return MModel::toString("ServiceDates", vParameters); } static Can::Can_Id canid () { return Can::eChlid_UI_Sync; } }; } typedef Model:: MAdjustVersionsReq AdjustVersionsRequestData; typedef Model:: MAdjustServiceReq AdjustServiceRequestData; typedef Model:: MAdjustHDDateTimeReq AdjustHDDateTimeRequestData; typedef Model::MAdjustHDAlarmVolumeReq AdjustHDAlarmVolumeRequestData;