/*! * * 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 ApplicationPost.h * \author (last) Behrouz NematiPour * \date (last) 26-Aug-2020 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * */ #pragma once // Qt #include // Project #include "GuiGlobals.h" class ApplicationPost : public QObject { Q_OBJECT QString _content; const char *_postmsg_canbus = "CANBus passed" ; const char *_postmsg_sdcard = "SD-CARD passed" ; const char *_postmsg_touch = "Touch passed" ; const char *_postmsg_rtc = "RTC passed" ; const char *_postmsg_wifi = "WiFi passed" ; const char *_postmsg_bluetooth = "Bluetooth passed"; bool _isFileSystem = false ; // HIGH : ALARM_ID_UI_POST_FAILURE_FILESYSTEM bool _isCANBus = false ; // HIGH : ALARM_ID_UI_POST_FAILURE_CANBUS bool _isDisplay = false ; // HIGH : ALARM_ID_UI_POST_FAILURE_DISPLAY bool _isTouch = false ; // HIGH : ALARM_ID_UI_POST_FAILURE_TOUCH bool _isSDCard = false ; // HIGH : ALARM_ID_UI_POST_FAILURE_SDCARD bool _isRtc = false ; // MEDIUM : ALARM_ID_UI_POST_FAILURE_RTC bool _isWiFi = false ; // LOW : ALARM_ID_UI_POST_FAILURE_WIFI bool _isBluetooth = false ; // LOW : ALARM_ID_UI_POST_FAILURE_BLUETOOTH bool _isEthernet = false ; // NONE : ALARM_ID_UI_POST_FAILURE_ETHERNET : this is not a Fault and not required the application to stop. bool _isSound = false ; // NONE : ALARM_ID_UI_POST_FAILURE_SOUND : this is not a Fault and not required the application to stop. bool _isDone = false ; // tests // Severity bool checkFileSystem (); // HIGH : ALARM_ID_UI_POST_FAILURE_FILESYSTEM bool checkCANBus (); // HIGH : ALARM_ID_UI_POST_FAILURE_CANBUS bool checkDisplay (); // HIGH : ALARM_ID_UI_POST_FAILURE_DISPLAY bool checkTouch (); // HIGH : ALARM_ID_UI_POST_FAILURE_TOUCH bool checkSDCard (); // HIGH : ALARM_ID_UI_POST_FAILURE_SDCARD bool checkRtc (); // MEDIUM : ALARM_ID_UI_POST_FAILURE_RTC bool checkWiFi (); // LOW : ALARM_ID_UI_POST_FAILURE_WIFI bool checkBluetooth (); // LOW : ALARM_ID_UI_POST_FAILURE_BLUETOOTH bool checkEthernet (); // NONE : ALARM_ID_UI_POST_FAILURE_ETHERNET : this is not a Fault and not required the application to stop. bool checkSound (); // NONE : ALARM_ID_UI_POST_FAILURE_SOUND : this is not a Fault and not required the application to stop. public: bool isFileSystem () { return _isFileSystem ; } bool isCANBus () { return _isCANBus ; } bool isDisplay () { return _isDisplay ; } bool isTouch () { return _isTouch ; } bool isSDCard () { return _isSDCard ; } bool isRtc () { return _isRtc ; } bool isWiFi () { return _isWiFi ; } bool isBluetooth () { return _isBluetooth ; } bool isEthernet () { return _isEthernet ; } bool isSound () { return _isSound ; } bool isDone () { return _isDone ; } public: explicit ApplicationPost(QObject *parent = nullptr); void start(); signals: void didFileSystem (); void didCANBus (); void didDisplay (); void didTouch (); void didSDCard (); void didRtc (); void didWiFi (); void didBluetooth (); void didEthernet (); void didSound (); void didFail(Gui::GuiAlarmID vAlarmID); void didDone(bool vPass); };