Index: sources/model/hd/adjustment/settings/MAdjustHDRequests.h =================================================================== diff -u -r5d142e2ec2aa4bdfd2567eb521c7208f76e16ae7 -r38ae7b93679d05a54fc460dac68891562d7da72d --- sources/model/hd/adjustment/settings/MAdjustHDRequests.h (.../MAdjustHDRequests.h) (revision 5d142e2ec2aa4bdfd2567eb521c7208f76e16ae7) +++ sources/model/hd/adjustment/settings/MAdjustHDRequests.h (.../MAdjustHDRequests.h) (revision 38ae7b93679d05a54fc460dac68891562d7da72d) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. + * 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 MAdjustHDRequests.h - * \author (last) Behrouz NematiPour - * \date (last) 28-Sep-2022 + * \author (last) Dara Navaei + * \date (last) 06-May-2024 * \author (original) Behrouz NematiPour * \date (original) 16-Apr-2021 * @@ -75,8 +75,8 @@ */ class MAdjustHDAlarmVolumeReq : public MModel { - const int hw2ui = 20; // HD vol range is [1-5] and we show [20%-100%] to user (100 / 5). - quint32 _volume =100; // values in range of [20, 40, 60, 80, 100] or [1..5]*20 + const int hw2ui = 1; // HD vol range is [1-5]; set to 20 if we show [20%-100%] to user (100 / 5). + quint32 _volume = 5; // HD vol range is [1-5]; set to 100 if we show [20%-100%] since values in range of [20, 40, 60, 80, 100] or [1..5]*20 public: @@ -261,12 +261,102 @@ return MModel::toString("UIPOSTDone", vParameters); } }; + +/*! + * \brief The MHDUsageInfoRequest class + * \details The HD usage info request model + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:------:|:------:|:----:|:---:|:---:|:----:|:---------------------------:| + * | 0xA000 | 0x040 | Req | Y | HD | UI | HD Request for Usage Info | + * + * | Payload || + * | || + * | (N/A) || + * + */ +class MHDUsageInfoReq : public MModel { +public: + + // disabled coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // disabled coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("HDUsageInfoReq", vParameters); + } + + static Can::Can_Id canid () { return Can::eChlid_UI_Sync; } +}; + +/*! + * \brief The MAdjustInstitutionalReqclass + * \details The HD Service Mode request model + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:------:|:------:|:----:|:---:|:---:|:----:|:-----------:| + * | 0x8900 | 0x100 | Req | Y | UI | HD | Institutional Record Request | + * + * | Payload || + * | || + * | (N/A) || + * + */ +class MAdjustInstitutionalRecordReq : public MModel { +public: + + // disabled coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // disabled coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("InstitutionalRecord", vParameters); + } + + static Can::Can_Id canid () { return Can::eChlid_UI_HD; } +}; + +/*! + * \brief The MAdjustHDResetReq class + * \details The DG/HD versions request model + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:------:|:------:|:----:|:---:|:---:|:----:|:---------------------------:| + * | 0xB900 | 0x200 | Req | Y | UI | All | HD reset request | + * + * | Payload || + * | || + * | (N/A) || + * + */ +class MAdjustHDResetInSrvceModeReq : public MModel { +public: + + // disabled coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // disabled coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("HDResetInServiceMode", vParameters); + } + + static Can::Can_Id canid () { return Can::eChlid_UI_HD; } +}; } -typedef Model:: MAdjustServiceModeReq AdjustServiceModeRequestData; -typedef Model:: MAdjustVersionsReq AdjustVersionsRequestData; -typedef Model:: MAdjustVersionsRsp AdjustVersionsResponseData; -typedef Model:: MAdjustServiceDatesReq AdjustServiceDatesRequestData; -typedef Model:: MAdjustHDDateTimeReq AdjustHDDateTimeRequestData; -typedef Model:: MAdjustHDAlarmVolumeReq AdjustHDAlarmVolumeRequestData; -typedef Model::MAdjustUIPostFinalResultReq AdjustUIPostFinalResultRequestData; +typedef Model:: MAdjustServiceModeReq AdjustServiceModeRequestData; +typedef Model:: MAdjustVersionsReq AdjustVersionsRequestData; +typedef Model:: MAdjustVersionsRsp AdjustVersionsResponseData; +typedef Model:: MAdjustServiceDatesReq AdjustServiceDatesRequestData; +typedef Model:: MAdjustHDDateTimeReq AdjustHDDateTimeRequestData; +typedef Model:: MAdjustHDAlarmVolumeReq AdjustHDAlarmVolumeRequestData; +typedef Model:: MAdjustUIPostFinalResultReq AdjustUIPostFinalResultRequestData; +typedef Model:: MHDUsageInfoReq HDUsageInfoRequestData; +typedef Model::MAdjustInstitutionalRecordReq AdjustInstitutionalRequestData; +typedef Model:: MAdjustHDResetInSrvceModeReq AdjustHDResetInSrvcRequestData;