From 69d08ac546d267262292e5a20d485a4fba49796d Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Mon, 29 Oct 2012 13:46:22 +0000 Subject: [PATCH] frame index updated for receiver git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@321 951219d9-93cf-4727-9268-0efd64621fa3 --- .../multiSlsDetector/multiSlsDetector.cpp | 16 +++++++++++++++- .../multiSlsDetector/multiSlsDetector.h | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index e02943bce..889001594 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -3672,7 +3672,7 @@ slsDetectorDefs::runStatus multiSlsDetector::getReceiverStatus(){ -int multiSlsDetector::getFramesCaughtByReciver() { +int multiSlsDetector::getFramesCaughtByReceiver() { int ret=0,ret1=0; for (int i=0; inumberOfDetectors; i++) if (detectors[i]) @@ -3687,6 +3687,20 @@ int multiSlsDetector::getFramesCaughtByReciver() { +int multiSlsDetector::getCurrentFrameIndex() { + int ret=0,ret1=0; + for (int i=0; inumberOfDetectors; i++) + if (detectors[i]) + ret1+=detectors[i]->getCurrentFrameIndex(); + + if(!thisMultiDetector->numberOfDetectors) + return ret; + ret=(int)(ret1/thisMultiDetector->numberOfDetectors); + + return ret; +} + + int multiSlsDetector::lockReceiver(int lock) { diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h index e45c0b5b9..4a8204626 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h @@ -1078,6 +1078,12 @@ class multiSlsDetector : public slsDetectorUtils { */ int getFramesCaughtByReceiver(); + /** gets the current frame index of receiver + \returns current frame index of receiver + */ + int getCurrentFrameIndex(); + + /** Locks/Unlocks the connection to the receiver /param lock sets (1), usets (0), gets (-1) the lock /returns lock status of the receiver