changed all variables from svn to git, included --version for receiver binary

This commit is contained in:
Dhanya Maliakal
2017-12-06 10:29:57 +01:00
parent 7436d6c8d3
commit c4a242e10a
39 changed files with 154 additions and 243 deletions

View File

@ -12,7 +12,7 @@
#include <getopt.h>
#include "slsReceiver.h"
//#include "UDPInterface.h"
#include "gitInfoReceiver.h"
using namespace std;
@ -36,6 +36,7 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success):
// These options dont set a flag. We distinguish them by their indices.
{"config", required_argument, 0, 'f'},
{"rx_tcpport", required_argument, 0, 't'},
{"version", no_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@ -44,8 +45,10 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success):
int c=0;
optind = 1;
int64_t tempval = 0;
while ( c != -1 ){
c = getopt_long (argc, argv, "hf:t:", long_options, &option_index);
c = getopt_long (argc, argv, "hvf:t:", long_options, &option_index);
// Detect the end of the options.
if (c == -1)
@ -60,6 +63,13 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success):
#endif
break;
case 'v':
tempval = GITREV;
tempval = (tempval <<32) | GITDATE;
cout << "SLS Receiver " << GITBRANCH << " (0x" << hex << tempval << ")" << endl;
success = FAIL; // to exit
break;
case 't':
sscanf(optarg, "%d", &tcpip_port_no);
break;

View File

@ -152,8 +152,8 @@ void slsReceiverTCPIPInterface::stop(){
int64_t slsReceiverTCPIPInterface::getReceiverVersion(){
int64_t retval = SVNREV;
retval= (retval <<32) | SVNDATE;
int64_t retval = GITREV;
retval= (retval <<32) | GITDATE;
return retval;
}