From 806df32efbf88afea18b9723578556b7ace9a4c2 Mon Sep 17 00:00:00 2001 From: bergamaschi Date: Thu, 13 Dec 2012 09:28:06 +0000 Subject: [PATCH] revision in version number in getId git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@378 951219d9-93cf-4727-9268-0efd64621fa3 --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 5 ++++- slsDetectorSoftware/slsDetector/slsDetectorUtils.h | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 12f9fa56e..b58bb64dc 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -1576,6 +1576,8 @@ int64_t slsDetector::getId( idMode mode, int imod){ int64_t retval=-1; int fnum=F_GET_ID; int ret=FAIL; + int64_t rev=0; + char mess[100]; @@ -1588,7 +1590,8 @@ int64_t slsDetector::getId( idMode mode, int imod){ #endif if (mode==THIS_SOFTWARE_VERSION) { ret=OK; - retval=thisSoftwareVersion; + sscanf(THIS_REVISION,"$Rev : %x",&rev); + retval=thisSoftwareVersion & rev << 32; } else { if (thisDetector->onlineFlag==ONLINE_FLAG) { if (controlSocket) { diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h index 8288f4d9e..e7fd42fef 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h @@ -43,7 +43,7 @@ using namespace std; #define DEFAULT_HOSTNAME "localhost" #define DEFAULT_SHM_KEY 5678 - +#define THIS_REVISION "$Rev$" /** @short class containing all the possible detector functionalities @@ -642,7 +642,8 @@ virtual int exitReceiver()=0; protected: - static const int64_t thisSoftwareVersion=0x$Rev$20120124; + + static const int64_t thisSoftwareVersion=0x20120124;