Index: sources/ApplicationPost.h =================================================================== diff -u -re5577fbd781ded0678882680d5d31f08f56c9c68 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/ApplicationPost.h (.../ApplicationPost.h) (revision e5577fbd781ded0678882680d5d31f08f56c9c68) +++ sources/ApplicationPost.h (.../ApplicationPost.h) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2023 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) 22-Sep-2021 + * \author (last) Vy + * \date (last) 13-Apr-2023 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -70,6 +70,20 @@ const QString _postmsg_shasum = "App shasum" ; // POSTMSG_SHASUM="App shasum" const QString _postmsg_cloudsync = "CloudSync" ; // POSTMSG_CLOUDSYNC="CloudSync" + const quint8 _macAddrssLen = 17 ; // ff:ff:ff:ff:ff:ff + const quint8 _macAppearLen = 200 ; // the mac address shall be found within the next 200 characters. + const QString _devEthernet = "eth0:" ; + const QString _devWireless = "wlan0:" ; + const QString _devBluetooth = "hci0:" ; + const QString _macEthernetLabel = "link/ether " ; // the last space is important + const QString _macWirelessLabel = "link/ether " ; // the last space is important + const QString _macBluetoothLabel = "BD Address: "; // the last space is important + QString _macEthernet = "" ; + QString _macWireless = "" ; + QString _macBluetooth = "" ; + + const int _yearMinimum = 2022 ; // The year to check for minimum + // tests // Severity bool _isShaSum = false ; // HIGH: fault: ALARM_ID_UI_POST_FAILURE_SHASUM bool _isCANBus = false ; // HIGH: fault: ALARM_ID_UI_POST_FAILURE_CANBUS @@ -82,7 +96,7 @@ bool _isCloudSync = false ; // HIGH: : ALARM_ID_UI_POST_FAILURE_CLOUDSYNC bool _isEthernet = false ; // HIGH: : ALARM_ID_UI_POST_FAILURE_ETHERNET : this is not a Fault and not required the application to stop. bool _isSound = false ; // HIGH: : ALARM_ID_UI_POST_FAILURE_SOUND : this is not a Fault and not required the application to stop. - + bool _isYearCheck = false ; // HIGH: : ALARM_ID_HD_UI_POST_FAILURE_INVALID_YEAR bool _isDone = false ; bool checkShaSum (); @@ -96,21 +110,26 @@ bool checkCloudSync (); bool checkEthernet (); bool checkSound (); + bool checkYear (); public: - bool isShaSum () { return _isShaSum ; } - 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 isCloudSync () { return _isCloudSync ; } - bool isEthernet () { return _isEthernet ; } - bool isSound () { return _isSound ; } + bool isShaSum () const { return _isShaSum ; } + bool isCANBus () const { return _isCANBus ; } + bool isDisplay () const { return _isDisplay ; } + bool isTouch () const { return _isTouch ; } + bool isSDCard () const { return _isSDCard ; } + bool isRtc () const { return _isRtc ; } + bool isWiFi () const { return _isWiFi ; } + bool isBluetooth () const { return _isBluetooth ; } + bool isCloudSync () const { return _isCloudSync ; } + bool isEthernet () const { return _isEthernet ; } + bool isSound () const { return _isSound ; } + bool isYearCheck () const { return _isYearCheck ; } + bool isDone () const { return _isDone ; } - bool isDone () { return _isDone ; } + QString macEthernet () const { return _macEthernet ; } + QString macWireless () const { return _macWireless ; } + QString macBluetooth () const { return _macBluetooth ; } public: explicit ApplicationPost(QObject *parent = nullptr); @@ -128,6 +147,7 @@ void didCloudSync (bool vPass); void didEthernet (bool vPass); void didSound (bool vPass); + void didYearCheck (bool vPass); void didFail(Gui::GuiAlarmID vAlarmID); void didDone(bool vPass);