diff --git a/slsDetectorSoftware/slsReceiver/eigerReceiver.cpp b/slsDetectorSoftware/slsReceiver/eigerReceiver.cpp index f1180d51d..81836d6b1 100644 --- a/slsDetectorSoftware/slsReceiver/eigerReceiver.cpp +++ b/slsDetectorSoftware/slsReceiver/eigerReceiver.cpp @@ -11,7 +11,7 @@ /* uncomment next line to enable debug output */ -// #define EIGER_DEBUG +#define EIGER_DEBUG /* macro for debug output */ #ifdef EIGER_DEBUG @@ -27,7 +27,7 @@ public: DEBUG("initialize() with: detectorHostName= " << detectorHostName << "."); } - char *getDetectorHostname() { + char *getDetectorHostname() const { const std::string name = "some_host_name"; char *c = new char[name.length()]; name.copy(c, name.length()); @@ -36,7 +36,7 @@ public: return(c); } - char *getFileName() { + char *getFileName() const { const std::string name = "some_file_name"; char *c = new char[name.length()]; name.copy(c, name.length()); @@ -45,7 +45,7 @@ public: return(c); } - char *getFilePath() { + char *getFilePath() const { std::string name = "some_path"; char *c = new char[name.length()]; name.copy(c, name.length()); @@ -54,17 +54,17 @@ public: return(c); } - int getDynamicRange() { + int getDynamicRange() const { DEBUG("getDynamicRange(): Return 16."); return(16); } - int getScanTag() { + int getScanTag() const { DEBUG("getScanTag(): return 4711."); return(4711); } - int getNumberOfFrames() { + int getNumberOfFrames() const { DEBUG("getNumberOfFrames(): return 42."); return(42); } @@ -79,7 +79,7 @@ public: return(this->getFilePath()); } - int getEnableFileWrite() { + int getEnableFileWrite() const { DEBUG("getEnableFileWrite() returns 1."); return(1); } diff --git a/slsDetectorSoftware/slsReceiver/eigerReceiver.h b/slsDetectorSoftware/slsReceiver/eigerReceiver.h index 5aa6a8ef0..32d1ff241 100644 --- a/slsDetectorSoftware/slsReceiver/eigerReceiver.h +++ b/slsDetectorSoftware/slsReceiver/eigerReceiver.h @@ -1,4 +1,4 @@ - +//#define EIGER_RECEIVER #ifdef EIGER_RECEIVER #ifndef EIGERRECEIVER_H @@ -71,7 +71,7 @@ public: * caller needs to deallocate the returned char array. * if uninitialized, it must return NULL */ - virtual char *getDetectorHostname() = 0; + virtual char *getDetectorHostname() const = 0; /** * Returns status of receiver: idle, running or error @@ -84,38 +84,38 @@ public: * Returns File Name * caller is responsible to deallocate the returned char array. */ - virtual char *getFileName() = 0; + virtual char *getFileName() const = 0; /** * Returns File Path * caller is responsible to deallocate the returned char array */ - virtual char *getFilePath() = 0; //FIXME: Does the caller need to free() the returned pointer? + virtual char *getFilePath() const = 0; //FIXME: Does the caller need to free() the returned pointer? /** * Returns the number of bits per pixel */ - virtual int getDynamicRange() = 0; + virtual int getDynamicRange() const = 0; /** * Returns scan tag */ - virtual int getScanTag() = 0; + virtual int getScanTag() const = 0; /* * Returns number of frames to receive * This is the number of frames to expect to receiver from the detector. * The data receiver will change from running to idle when it got this number of frames */ - virtual int getNumberOfFrames() = 0; + virtual int getNumberOfFrames() const = 0; /** * Returns file write enable * 1: YES 0: NO */ - virtual int getEnableFileWrite() = 0; + virtual int getEnableFileWrite() const = 0; /** * Set File Name (without frame index, file index and extension)