mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@446 951219d9-93cf-4727-9268-0efd64621fa3
54 lines
853 B
C++
54 lines
853 B
C++
/*
|
|
* 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_ */
|