mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
forgot to check in error_defs
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@446 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
341e026f4e
commit
09d9e2fd03
53
slsDetectorSoftware/commonFiles/error_defs.h
Normal file
53
slsDetectorSoftware/commonFiles/error_defs.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* error_defs.h
|
||||
*
|
||||
* Created on: Jan 18, 2013
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef ERROR_DEFS_H_
|
||||
#define ERROR_DEFS_H_
|
||||
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
|
||||
|
||||
/** @short class returning all error messages for error mask */
|
||||
class errorDefs {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
/** Constructor */
|
||||
errorDefs(){};
|
||||
|
||||
/** Gets the error message
|
||||
* param errorMask error mask
|
||||
/returns error message from error mask
|
||||
*/
|
||||
static string getErrorMessage(int slsErrorMask){
|
||||
|
||||
string retval = "";
|
||||
|
||||
if(slsErrorMask&CANNOT_CONNECT_TO_DETECTOR)
|
||||
retval.append("Cannot connect to Detector\n");
|
||||
|
||||
if(slsErrorMask&CANNOT_CONNECT_TO_RECEIVER)
|
||||
retval.append("Cannot connect to Receiver\n");
|
||||
|
||||
if(slsErrorMask&COULD_NOT_CONFIGURE_MAC)
|
||||
retval.append("Could not configure mac\n");
|
||||
|
||||
return retval;
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* ERROR_DEFS_H_ */
|
Loading…
x
Reference in New Issue
Block a user