/*! * * Copyright (c) 2020-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 AlarmGenerator.h * \author (last) Behrouz NematiPour * \date (last) 29-Jul-2023 * \author (original) Behrouz NematiPour * \date (original) 22-Dec-2020 * */ #pragma once // Qt #include // Project #include "MAlarmTriggered.h" #include "MAlarmStatusData.h" // forward declarations class tst_messaging; /*! * \brief The AlarmGenerator class * \details This class is a helper class for the UI generated Alarms */ class AlarmGenerator { // friends friend class ::tst_messaging; static Model::MAlarmTriggered _model; // typedef /*! \brief quint16 depends on the Alarm_State_Flag_Bit_Positions length. * quint16 is currently used to cover 256 Alarm ID * ( but I guess it should be S32 regarding ti RM46 arch * unless has been defined otherwise and since we started from 0 (signed not used) * then quint16 would be enough) */ typedef quint16 TAlarms ; typedef QList TBits ; // member variables static const quint8 _len = Gui::GuiAlarmFlags::NUM_OF_ALARM_STATE_FLAG_BIT_POS; // member functions static QBitArray setBits(TBits vBits); public: AlarmGenerator() {} static QString toString() { return _model.toString(); } // Generators section : // please follow the format: // static const AlarmStatusData (); // is the enum from GuiAlarmID like ALARM_ID_TD_COMM_TIMEOUT static const AlarmStatusData ALARM_ID_TD_COMM_TIMEOUT(); static const AlarmTriggeredData ALARM_ID_NO_ALARM(); };