diff --git a/slsDetectorSoftware/include/Detector.h b/slsDetectorSoftware/include/Detector.h index 4eab2c339..0794a5dda 100644 --- a/slsDetectorSoftware/include/Detector.h +++ b/slsDetectorSoftware/include/Detector.h @@ -299,14 +299,13 @@ class Detector { // Erik - Result getFramesCaughtByReceiver(Positions pos = {}) const; Result getReceiverCurrentFrameIndex(Positions pos = {}) const; void resetFramesCaught(Positions pos = {}); - //TODO! + // TODO! // int createReceivingDataSockets(const bool destroy = false); // void readFrameFromReceiver(); @@ -448,6 +447,33 @@ class Detector { * @param delay delay in ps(1 bit=25ps, max of 775 ps) */ void setDigitalIODelay(uint64_t pinMask, int delay, Positions pos = {}); + + Result getFileIndex(Positions pos = {}) const; + + void setFileIndex(int i, Positions pos = {}); + + Result getFileFormat(Positions pos = {}) const; + + void setFileFormat(defs::fileFormat f, Positions pos = {}); + + Result getPartialFramesPadding(Positions pos = {}) const; + + void setPartialFramesPadding(bool value, Positions pos = {}); + + void setReceiverFrameDiscardPolicy(defs::frameDiscardPolicy f, + Positions pos = {}); + + Result + getReceiverFrameDiscardPolicy(Positions pos = {}) const; + + void setFramesPerFile(int n, Positions pos = {}); + + Result getFramesPerFile(Positions pos = {}) const; + + // void execReceiverCommand(const std::string &cmd, int detPos = -1); + // void exitReceiver(int detPos = -1); + + Result getReceiverLastClientIP(Positions pos = {}) const; }; } // namespace sls \ No newline at end of file diff --git a/slsDetectorSoftware/include/multiSlsDetector.h b/slsDetectorSoftware/include/multiSlsDetector.h index 5ee7c340e..18f48261b 100755 --- a/slsDetectorSoftware/include/multiSlsDetector.h +++ b/slsDetectorSoftware/include/multiSlsDetector.h @@ -1782,7 +1782,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @param detPos -1 for all detectors in list or specific detector position * @returns IP of last client connecting to receiver */ - std::string getReceiverLastClientIP(int detPos = -1); + std::string getReceiverLastClientIP(int detPos = -1); // /** * Turns off the receiver server! @@ -1834,14 +1834,14 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @param detPos -1 for all detectors in list or specific detector position * @returns max frames per file in receiver */ - int setFramesPerFile(int f = -1, int detPos = -1); + int setFramesPerFile(int f = -1, int detPos = -1); // /** * Gets the max frames per file in receiver * @param detPos -1 for all detectors in list or specific detector position * @returns max frames per file in receiver */ - int getFramesPerFile(int detPos = -1) const; + int getFramesPerFile(int detPos = -1) const; // /** * Sets the frames discard policy in receiver @@ -1850,7 +1850,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @returns frames discard policy set in receiver */ frameDiscardPolicy setReceiverFramesDiscardPolicy( - frameDiscardPolicy f = GET_FRAME_DISCARD_POLICY, int detPos = -1); + frameDiscardPolicy f = GET_FRAME_DISCARD_POLICY, int detPos = -1); // /** * Sets the partial frames padding enable in receiver @@ -1858,16 +1858,16 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @param detPos -1 for all detectors in list or specific detector position * @returns partial frames padding enable in receiver */ - int setPartialFramesPadding(bool padding, int detPos = -1); + int setPartialFramesPadding(bool padding, int detPos = -1); // - int getPartialFramesPadding(int detPos = -1) const; + int getPartialFramesPadding(int detPos = -1) const; // /** * Returns file format * @param detPos -1 for all detectors in list or specific detector position * @returns file name */ - fileFormat getFileFormat(int detPos = -1); + fileFormat getFileFormat(int detPos = -1); // /** * Sets up the file format @@ -1875,7 +1875,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @param detPos -1 for all detectors in list or specific detector position * @returns file format */ - fileFormat setFileFormat(fileFormat f, int detPos = -1); + fileFormat setFileFormat(fileFormat f, int detPos = -1); // /** * Sets up the file index @@ -1883,7 +1883,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @param detPos -1 for all detectors in list or specific detector position * @returns file index */ - int setFileIndex(int i, int detPos = -1); + int setFileIndex(int i, int detPos = -1); // /** * Get File index @@ -1891,7 +1891,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * position * @returns file index */ - int getFileIndex(int detPos = -1) const; + int getFileIndex(int detPos = -1) const; // /** * Receiver starts listening to packets diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 88fe7634d..8c5894c9e 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -230,7 +230,7 @@ void Detector::setReadNLines(const int value, Positions pos) { // Erik -Result Detector::getFramesCaughtByReceiver(Positions pos) const{ +Result Detector::getFramesCaughtByReceiver(Positions pos) const { return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos); } @@ -359,4 +359,51 @@ void Detector::setDigitalIODelay(uint64_t pinMask, int delay, Positions pos) { pimpl->Parallel(&slsDetector::setDigitalIODelay, pos, pinMask, delay); } +Result Detector::getFileIndex(Positions pos) const { + return pimpl->Parallel(&slsDetector::getFileIndex, pos); +} + +void Detector::setFileIndex(int i, Positions pos) { + pimpl->Parallel(&slsDetector::setFileIndex, pos, i); +} + +Result Detector::getFileFormat(Positions pos) const { + return pimpl->Parallel(&slsDetector::getFileFormat, pos); +} + +void Detector::setFileFormat(defs::fileFormat f, Positions pos) { + pimpl->Parallel(&slsDetector::setFileFormat, pos, f); +} + +Result Detector::getPartialFramesPadding(Positions pos) const { + return pimpl->Parallel(&slsDetector::getPartialFramesPadding, pos); +} + +void Detector::setPartialFramesPadding(bool value, Positions pos) { + pimpl->Parallel(&slsDetector::setPartialFramesPadding, pos, value); +} + +void Detector::setReceiverFrameDiscardPolicy(defs::frameDiscardPolicy f, + Positions pos) { + pimpl->Parallel(&slsDetector::setReceiverFramesDiscardPolicy, pos, f); +} + +Result +Detector::getReceiverFrameDiscardPolicy(Positions pos) const { + return pimpl->Parallel(&slsDetector::setReceiverFramesDiscardPolicy, pos, + defs::GET_FRAME_DISCARD_POLICY); +} + +void Detector::setFramesPerFile(int n, Positions pos) { + pimpl->Parallel(&slsDetector::setFramesPerFile, pos, n); +} + +Result Detector::getFramesPerFile(Positions pos) const { + return pimpl->Parallel(&slsDetector::getFramesPerFile, pos); +} + +Result Detector::getReceiverLastClientIP(Positions pos) const{ + return pimpl->Parallel(&slsDetector::getReceiverLastClientIP, pos); +} + } // namespace sls \ No newline at end of file