Index: sources/device/DeviceError.h =================================================================== diff -u -re8262d170bb94046ddb767074a31530bdf4a2319 -r47c8f13876317ba36500400f894d96c9bce9eb17 --- sources/device/DeviceError.h (.../DeviceError.h) (revision e8262d170bb94046ddb767074a31530bdf4a2319) +++ sources/device/DeviceError.h (.../DeviceError.h) (revision 47c8f13876317ba36500400f894d96c9bce9eb17) @@ -40,8 +40,11 @@ enum Scripts_Error_Enum { eDevice_OK = 0 , + // The scripts can use the exit code of each commands they execute and the assumption is most of Linux commands exit codes are less than 1000. + // so any error less that 1000 will be identified as device error eDevice_Scripts_Error_Start = 1000 , // the script itself in system starts from 0 so give it enough gap + eDevice_Scripts_Error_Status , eDevice_Scripts_Error_NotFound , eDevice_Scripts_Error_NotExecutable , eDevice_Scripts_Error_IsRunning , @@ -52,12 +55,18 @@ eDevice_Watch_Error_NotFound , eDevice_Watch_Error_NotAdded , + eDevice_BCuff_Error_Reset , + + eDevice_BCuff_Error_Query , + eDevice_BCuff_Error_Query_Empty , + eDevice_BCuff_Error_Query_Addr , + eDevice_Error_End }; Q_ENUM(Scripts_Error_Enum) - static QString deviceErrorText( DeviceError::Scripts_Error_Enum vError ); + static QString deviceErrorText( DeviceError::Scripts_Error_Enum vError , int vExitCode ); static Scripts_Error_Enum checkScript(QString &vScript, const QString &vShellScript); }; }