#ifndef HWEXCEPTIONDEF_H #define HWEXCEPTIONDEF_H #include //#include "logger/ESeverityLevel.h" #define HW_NOT_FOUND 0 #define TRX_INIT_FAILED 1 #define SLAVE_PROG_FAILED 2 struct HwErrors { static QString getErrorMessage(quint32 id) { switch(id) { case HW_NOT_FOUND: return "No hardware was detected, please check your hardware is properly powered on and try again."; case TRX_INIT_FAILED: return "Could not init trx board."; case SLAVE_PROG_FAILED: return "Could not program slave FPGAs."; } } static int getSeverityLevel(quint32 id) { switch(id) { case HW_NOT_FOUND: case TRX_INIT_FAILED: case SLAVE_PROG_FAILED: return 0; } } }; #endif //HWEXCEPTIONDEF_H