From dd6a95d0412a2d35a4e8a80cc062faaf88ee0661 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 7 Aug 2019 12:02:59 +0200 Subject: [PATCH] first one --- slsDetectorSoftware/include/Detector.h | 8 +++++++- slsDetectorSoftware/include/multiSlsDetector.h | 8 ++++---- slsDetectorSoftware/src/Detector.cpp | 5 +++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/slsDetectorSoftware/include/Detector.h b/slsDetectorSoftware/include/Detector.h index 9ac13bbec..6640a474b 100644 --- a/slsDetectorSoftware/include/Detector.h +++ b/slsDetectorSoftware/include/Detector.h @@ -124,7 +124,13 @@ class Detector { void setPeriod(ns t, Positions pos = {}); // dhanya - + /** + * Check version compatibility with detector software + * (if hostname/rx_hostname has been set/ sockets created) + * @param p port type control port or receiver port + * @param detPos -1 for all detectors in list or specific detector position + */ + void checkDetectorVersionCompatibility(Positions pos = {}); }; diff --git a/slsDetectorSoftware/include/multiSlsDetector.h b/slsDetectorSoftware/include/multiSlsDetector.h index a420d3b60..d05465887 100755 --- a/slsDetectorSoftware/include/multiSlsDetector.h +++ b/slsDetectorSoftware/include/multiSlsDetector.h @@ -210,7 +210,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * one * @param update true to update last user pid, date etc */ - void setupMultiDetector(bool verify = true, bool update = true); + void setupMultiDetector(bool verify = true, bool update = true); // private /** * Loop through the detectors serially and return the result as a vector @@ -260,7 +260,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @param channelY channel number from detector offset in x direction * @returns detector id or -1 if channel number out of range */ - int decodeNChannel(int offsetX, int offsetY, int &channelX, int &channelY); + int decodeNChannel(int offsetX, int offsetY, int &channelX, int &channelY);// private /** * Set acquiring flag in shared memory @@ -278,7 +278,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * Check if acquiring flag is set, set error if set * @returns FAIL if not ready, OK if ready */ - bool isAcquireReady(); + bool isAcquireReady(); // private /** * Check version compatibility with detector software @@ -286,7 +286,7 @@ class multiSlsDetector : public virtual slsDetectorDefs { * @param p port type control port or receiver port * @param detPos -1 for all detectors in list or specific detector position */ - void checkDetectorVersionCompatibility(int detPos = -1); + void checkDetectorVersionCompatibility(int detPos = -1);// /** * Check version compatibility with receiver software diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index a501e0ebe..eaf1d7ce9 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -126,7 +126,12 @@ Result Detector::getFileOverWrite(Positions pos) const { return pimpl->Parallel(&slsDetector::getFileOverWrite, pos); } + // dhanya +Result Detector::checkDetectorVersionCompatibility(Positions pos) const { + return pimpl->Parallel(&slsDetector::checkDetectorVersionCompatibility, pos); +} + } // namespace sls \ No newline at end of file