Index: sources/ApplicationPost.h =================================================================== diff -u -raa8f2c87c14c68d1fda6da2540d47144990a596c -r3e64d98e243484505a44d99b13826097cb6b01eb --- sources/ApplicationPost.h (.../ApplicationPost.h) (revision aa8f2c87c14c68d1fda6da2540d47144990a596c) +++ sources/ApplicationPost.h (.../ApplicationPost.h) (revision 3e64d98e243484505a44d99b13826097cb6b01eb) @@ -20,45 +20,79 @@ // Project #include "GuiGlobals.h" +/*! + * \brief The ApplicationPost class + * \details The Application POST class is checking for the list of POST items which has been done during the boot-up, + * from withing the run.sh and looks into the post.log to make sure the check items are passed. + * Among the list POST items: + * - Application checksum + * - CANBus + * - Display + * - Touch + * - SDCard + * - RTC + * - WiFi + * - Bluetooth + * - Ethernet + * - Sound + * + * Two items: + * - Ethernet + * - Sound + * are not faults and will not even send the AlarmTrigger. + * + * Two items: + * - WiFi + * - Bluetooth + * are two faults and will send the AlarmTrigger, but will not affect the UI POST final result. + * + * One item: + * - Application checksum + * for now is only done during boot-up and if the checksum is not correct then the UI Application will not even run. + * \todo Later could be a good idea to run another Application, that shows the Fault Screen only (something like a Red Screen Of Death). + * + */ 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"; + // WARNING: these variables has to match with the ones in the run.sh. + const char *_postmsg_canbus = "CANBus passed" ; // POSTMSG_CANBUS="CANBus passed" + const char *_postmsg_sdcard = "SD-CARD passed" ; // POSTMSG_SDCARD="SD-CARD passed" + const char *_postmsg_touch = "Touch passed" ; // POSTMSG_TOUCH="Touch passed" + const char *_postmsg_rtc = "RTC passed" ; // POSTMSG_RTC="RTC passed" + const char *_postmsg_wifi = "WiFi passed" ; // POSTMSG_WIFI="WiFi passed" + const char *_postmsg_bluetooth = "Bluetooth passed" ; // POSTMSG_BLUETOOTH="Bluetooth passed" + const char *_postmsg_shasum = "App shasum passed" ; // POSTMSG_SHASUM="App shasum passed" - bool _isFileSystem = false ; // HIGH : ALARM_ID_UI_POST_FAILURE_FILESYSTEM + bool _isShaSum = false ; // HIGH : ALARM_ID_UI_POST_FAILURE_SHASUM 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 _isWiFi = false ; // LOW : ALARM_ID_UI_POST_FAILURE_WIFI : this is a fault but will not affect the final UI POST result. will just send AlarmTrigger. + bool _isBluetooth = false ; // LOW : ALARM_ID_UI_POST_FAILURE_BLUETOOTH : this is a fault but will not affect the final UI POST result. will just send AlarmTrigger. + 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 checkShaSum (); // HIGH : ALARM_ID_UI_POST_FAILURE_SHASUM 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. + bool checkWiFi (); // LOW : ALARM_ID_UI_POST_FAILURE_WIFI : this is a fault but will not affect the final UI POST result. will just send AlarmTrigger. + bool checkBluetooth (); // LOW : ALARM_ID_UI_POST_FAILURE_BLUETOOTH : this is a fault but will not affect the final UI POST result. will just send AlarmTrigger. + 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 isShaSum () { return _isShaSum ; } bool isCANBus () { return _isCANBus ; } bool isDisplay () { return _isDisplay ; } bool isTouch () { return _isTouch ; } @@ -76,16 +110,16 @@ void start(); signals: - void didFileSystem (bool vPass); - void didCANBus (bool vPass); - void didDisplay (bool vPass); - void didTouch (bool vPass); - void didSDCard (bool vPass); - void didRtc (bool vPass); - void didWiFi (bool vPass); - void didBluetooth (bool vPass); - void didEthernet (bool vPass); - void didSound (bool vPass); + void didShaSum (bool vPass); + void didCANBus (bool vPass); + void didDisplay (bool vPass); + void didTouch (bool vPass); + void didSDCard (bool vPass); + void didRtc (bool vPass); + void didWiFi (bool vPass); + void didBluetooth (bool vPass); + void didEthernet (bool vPass); + void didSound (bool vPass); void didFail(Gui::GuiAlarmID vAlarmID); void didDone(bool vPass);