mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
fixing merge conflict in error_Defs
This commit is contained in:
commit
03a2f979a9
@ -80,7 +80,10 @@ using namespace std;
|
||||
#define RECEIVER_FLIPPED_DATA_NOT_SET 0x0000000020000000ULL
|
||||
#define THRESHOLD_NOT_SET 0x0000000040000000ULL
|
||||
#define RECEIVER_FILE_FORMAT 0x0000000080000000ULL
|
||||
#define RECEIVER_TIMER_NOT_SET 0x0000000100000000ULL
|
||||
#define RECEIVER_SUBF_TIME_NOT_SET 0x0000000100000000ULL
|
||||
#define RECEIVER_SILENT_MODE_NOT_SET 0x0000000200000000ULL
|
||||
#define RECEIVER_TIMER_NOT_SET 0x0000000400000000ULL
|
||||
|
||||
// 0x0000000FFFFFFFFFULL
|
||||
|
||||
/** @short class returning all error messages for error mask */
|
||||
@ -259,8 +262,16 @@ public:
|
||||
if(slsErrorMask&RECEIVER_FILE_FORMAT)
|
||||
retval.append("Could not set receiver file format\n");
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(slsErrorMask&RECEIVER_TIMER_NOT_SET)
|
||||
retval.append("Could not set timer in receiver.\n");
|
||||
=======
|
||||
if(slsErrorMask&RECEIVER_SUBF_TIME_NOT_SET)
|
||||
retval.append("Could not set sub exposure time in receiver.\n");
|
||||
|
||||
if(slsErrorMask&RECEIVER_SILENT_MODE_NOT_SET)
|
||||
retval.append("Could not set silent mode in receiver.\n");
|
||||
>>>>>>> 3.0.1
|
||||
|
||||
//------------------------------------------------------ length of message
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repsitory UUID: 0fb1ff01209ad1aa975f39285814c2cc42db2678
|
||||
Revision: 1556
|
||||
Repsitory UUID: 1fd03e9cdd01efd75e3ab8641be71d61b2e1aa10
|
||||
Revision: 1566
|
||||
Branch: 3.0.1
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 1561
|
||||
Last Changed Date: 2017-09-20 18:27:25.000000002 +0200 ./slsDetectorAnalysis/postProcessing.cpp
|
||||
Last Changed Rev: 1571
|
||||
Last Changed Date: 2017-10-03 14:12:22.000000002 +0200 ./slsDetector/slsDetector.cpp
|
||||
|
@ -6233,6 +6233,20 @@ int multiSlsDetector::setReceiverFifoDepth(int i){
|
||||
}
|
||||
|
||||
|
||||
int multiSlsDetector::setReceiverSilentMode(int i){
|
||||
int ret=-100,ret1;
|
||||
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; ++idet)
|
||||
if (detectors[idet]){
|
||||
ret1=detectors[idet]->setReceiverSilentMode(i);
|
||||
if(detectors[idet]->getErrorMask())
|
||||
setErrorMask(getErrorMask()|(1<<idet));
|
||||
if(ret==-100)
|
||||
ret=ret1;
|
||||
else if (ret!=ret1)
|
||||
ret=-1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1374,6 +1374,12 @@ class multiSlsDetector : public slsDetectorUtils {
|
||||
*/
|
||||
int setReceiverFifoDepth(int i = -1);
|
||||
|
||||
/** set/get receiver silent mode
|
||||
* @param i is -1 to get, 0 unsets silent mode, 1 sets silent mode
|
||||
/returns the receiver silent mode enable
|
||||
*/
|
||||
int setReceiverSilentMode(int i = -1);
|
||||
|
||||
|
||||
|
||||
/******** CTB funcs */
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUIDLIB "0fb1ff01209ad1aa975f39285814c2cc42db2678"
|
||||
//#define SVNREV 0x1561
|
||||
#define SVNREPUUIDLIB "1fd03e9cdd01efd75e3ab8641be71d61b2e1aa10"
|
||||
//#define SVNREV 0x1571
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTHLIB "Dhanya_Maliakal"
|
||||
#define SVNREVLIB 0x1561
|
||||
#define SVNDATELIB 0x20170920
|
||||
#define SVNREVLIB 0x1571
|
||||
#define SVNDATELIB 0x20171003
|
||||
//
|
||||
|
@ -6038,6 +6038,14 @@ string slsDetector::setDetectorIP(string detectorIP){
|
||||
|
||||
|
||||
string slsDetector::setReceiver(string receiverIP){
|
||||
|
||||
if(receiverIP == "none") {
|
||||
memset(thisDetector->receiver_hostname, 0, MAX_STR_LENGTH);
|
||||
strcpy(thisDetector->receiver_hostname,"none");
|
||||
thisDetector->receiverOnlineFlag = OFFLINE_FLAG;
|
||||
return string(thisDetector->receiver_hostname);
|
||||
}
|
||||
|
||||
if(getRunStatus()==RUNNING){
|
||||
cprintf(RED,"Acquisition already running, Stopping it.\n");
|
||||
stopAcquisition();
|
||||
@ -7653,13 +7661,12 @@ slsDetectorDefs::synchronizationMode slsDetector::setSynchronization(synchroniza
|
||||
/*receiver*/
|
||||
int slsDetector::setReceiverOnline(int off) {
|
||||
if (off!=GET_ONLINE_FLAG) {
|
||||
// setting flag to offline
|
||||
if (off == OFFLINE_FLAG)
|
||||
// no receiver
|
||||
if(!strcmp(thisDetector->receiver_hostname,"none"))
|
||||
thisDetector->receiverOnlineFlag = OFFLINE_FLAG;
|
||||
else
|
||||
thisDetector->receiverOnlineFlag = off;
|
||||
// set flag to online only if hostname not none
|
||||
else if(strcmp(thisDetector->receiver_hostname,"none")){
|
||||
thisDetector->receiverOnlineFlag=off;
|
||||
}
|
||||
// check receiver online
|
||||
if (thisDetector->receiverOnlineFlag==ONLINE_FLAG){
|
||||
setReceiverTCPSocket();
|
||||
// error in connecting
|
||||
@ -7668,6 +7675,7 @@ int slsDetector::setReceiverOnline(int off) {
|
||||
setErrorMask((getErrorMask())|(CANNOT_CONNECT_TO_RECEIVER));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return thisDetector->receiverOnlineFlag;
|
||||
}
|
||||
@ -8717,9 +8725,9 @@ int slsDetector::enableTenGigabitEthernet(int i){
|
||||
//must also configuremac
|
||||
if((i != -1)&&(retval == i))
|
||||
if(configureMAC() != FAIL){
|
||||
if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){
|
||||
ret = FAIL;
|
||||
retval=-1;
|
||||
if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Enabling / Disabling 10Gbe in receiver: " << i << std::endl;
|
||||
#endif
|
||||
@ -8766,6 +8774,29 @@ int slsDetector::setReceiverFifoDepth(int i){
|
||||
|
||||
|
||||
|
||||
int slsDetector::setReceiverSilentMode(int i){
|
||||
int fnum=F_SET_RECEIVER_SILENT_MODE;
|
||||
int ret = FAIL;
|
||||
int retval=-1;
|
||||
|
||||
|
||||
if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){
|
||||
#ifdef VERBOSE
|
||||
if(i ==-1)
|
||||
std::cout<< "Getting Receiver Silent Mode" << endl;
|
||||
else
|
||||
std::cout<< "Setting Receiver Silent Mode to " << i << endl;
|
||||
#endif
|
||||
if (connectData() == OK){
|
||||
ret=thisReceiver->sendInt(fnum,retval,i);
|
||||
disconnectData();
|
||||
}
|
||||
if(ret==FAIL)
|
||||
setErrorMask((getErrorMask())|(RECEIVER_SILENT_MODE_NOT_SET));
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******** CTB funcs */
|
||||
|
@ -1811,6 +1811,12 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
||||
*/
|
||||
int setReceiverFifoDepth(int i = -1);
|
||||
|
||||
/** set/get receiver silent mode
|
||||
* @param i is -1 to get, 0 unsets silent mode, 1 sets silent mode
|
||||
/returns the receiver silent mode enable
|
||||
*/
|
||||
int setReceiverSilentMode(int i = -1);
|
||||
|
||||
/******** CTB funcs */
|
||||
|
||||
/** opens pattern file and sends pattern to CTB
|
||||
|
@ -2041,6 +2041,14 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver;
|
||||
++i;
|
||||
|
||||
/*! \page receiver
|
||||
- <b>r_silent [i]</b> sets/gets receiver in silent mode, ie. it will not print anything during real time acquisition. 1 sets, 0 unsets. \c Returns \c (int)
|
||||
*/
|
||||
descrToFuncMap[i].m_pFuncName="r_silent"; //
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver;
|
||||
++i;
|
||||
|
||||
|
||||
|
||||
|
||||
/* pattern generator */
|
||||
@ -5996,6 +6004,19 @@ string slsDetectorCommand::cmdReceiver(int narg, char *args[], int action) {
|
||||
|
||||
}
|
||||
|
||||
else if(cmd=="r_silent"){
|
||||
if (action==PUT_ACTION){
|
||||
if (!sscanf(args[1],"%d",&ival))
|
||||
return string("Could not scan r_online input ")+string(args[1]);
|
||||
if(ival>=0)
|
||||
sprintf(answer,"%d",myDet->setReceiverSilentMode(ival));
|
||||
}else
|
||||
sprintf(answer,"%d",myDet->setReceiverSilentMode());
|
||||
return string(answer);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return string("could not decode command");
|
||||
|
||||
}
|
||||
@ -6011,6 +6032,7 @@ string slsDetectorCommand::helpReceiver(int narg, char *args[], int action) {
|
||||
os << "r_readfreq \t sets the gui read frequency of the receiver, 0 if gui requests frame, >0 if receiver sends every nth frame to gui" << std::endl;
|
||||
os << "tengiga \t sets system to be configure for 10Gbe if set to 1, else 1Gbe if set to 0" << std::endl;
|
||||
os << "rx_fifodepth [val]\t sets receiver fifo depth to val" << std::endl;
|
||||
os << "r_silent [i]\t sets receiver in silent mode, ie. it will not print anything during real time acquisition. 1 sets, 0 unsets." << std::endl;
|
||||
}
|
||||
if (action==GET_ACTION || action==HELP_ACTION){
|
||||
os << "receiver \t returns the status of receiver - can be running or idle" << std::endl;
|
||||
@ -6019,6 +6041,7 @@ string slsDetectorCommand::helpReceiver(int narg, char *args[], int action) {
|
||||
os << "r_readfreq \t returns the gui read frequency of the receiver" << std::endl;
|
||||
os << "tengiga \t returns 1 if the system is configured for 10Gbe else 0 for 1Gbe" << std::endl;
|
||||
os << "rx_fifodepth \t returns receiver fifo depth" << std::endl;
|
||||
os << "r_silent \t returns receiver silent mode enable. 1 is silent, 0 not silent." << std::endl;
|
||||
}
|
||||
return os.str();
|
||||
|
||||
|
@ -345,3 +345,7 @@ int slsDetectorUsers::stopReceiver() {
|
||||
int slsDetectorUsers::startAcquisition() {
|
||||
return myDetector->startAcquisition();
|
||||
}
|
||||
|
||||
int slsDetectorUsers::setReceiverSilentMode(int i) {
|
||||
return myDetector->setReceiverSilentMode(i);
|
||||
}
|
||||
|
@ -603,6 +603,13 @@ class slsDetectorUsers
|
||||
*/
|
||||
int startAcquisition();
|
||||
|
||||
/**
|
||||
* set receiver in silent mode
|
||||
* @param i 1 sets, 0 unsets (-1 gets)
|
||||
* @return silent mode of receiver
|
||||
*/
|
||||
int setReceiverSilentMode(int i);
|
||||
|
||||
/************************************************************************
|
||||
|
||||
STATIC FUNCTIONS
|
||||
|
@ -774,6 +774,12 @@ virtual int enableTenGigabitEthernet(int i = -1)=0;
|
||||
*/
|
||||
virtual int setReceiverFifoDepth(int i = -1)=0;
|
||||
|
||||
/** set/get receiver silent mode
|
||||
* @param i is -1 to get, 0 unsets silent mode, 1 sets silent mode
|
||||
/returns the receiver silent mode enable
|
||||
*/
|
||||
virtual int setReceiverSilentMode(int i = -1)=0;
|
||||
|
||||
/******** CTB funcs */
|
||||
|
||||
/** opens pattern file and sends pattern to CTB
|
||||
|
Loading…
x
Reference in New Issue
Block a user