mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
print receiver configurations for all detectors added
This commit is contained in:
@ -226,7 +226,7 @@ slsDetector::~slsDetector(){
|
||||
} else
|
||||
printf("Shared memory %d detached\n", shmId);
|
||||
|
||||
|
||||
delete thisReceiver;
|
||||
};
|
||||
|
||||
slsDetector::slsDetector(char *name, int id, int cport,multiSlsDetector *p) : slsDetectorUtils(),
|
||||
@ -5030,6 +5030,8 @@ char* slsDetector::setReceiver(string receiverIP){
|
||||
setUDPConnection();
|
||||
if(thisDetector->myDetectorType == EIGER)
|
||||
enableTenGigabitEthernet(thisDetector->tenGigaEnable);
|
||||
|
||||
printReceiverConfiguration();
|
||||
}
|
||||
}
|
||||
|
||||
@ -5504,6 +5506,25 @@ int slsDetector::resetCounterBlock(int startACQ){
|
||||
|
||||
|
||||
|
||||
int slsDetector::printReceiverConfiguration(){
|
||||
|
||||
std::cout << "Detector IP:\t\t" << getNetworkParameter(DETECTOR_IP) << std::endl;
|
||||
std::cout << "Detector MAC:\t\t" << getNetworkParameter(DETECTOR_MAC) << std::endl;
|
||||
|
||||
std::cout << "Receiver Hostname:\t" << getNetworkParameter(RECEIVER_HOSTNAME) << std::endl;
|
||||
std::cout << "Receiver UDP IP:\t" << getNetworkParameter(RECEIVER_UDP_IP) << std::endl;
|
||||
std::cout << "Receiver UDP MAC:\t" << getNetworkParameter(RECEIVER_UDP_MAC) << std::endl;
|
||||
|
||||
|
||||
std::cout << "Receiver UDP Port:\t" << getNetworkParameter(RECEIVER_UDP_PORT) << std::endl;
|
||||
if(thisDetector->myDetectorType == EIGER)
|
||||
std::cout << "Receiver UDP Port2:\t" << getNetworkParameter(RECEIVER_UDP_PORT2) << std::endl;
|
||||
|
||||
std::cout << std::endl;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int slsDetector::readConfigurationFile(string const fname){
|
||||
|
@ -321,6 +321,12 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
||||
*/
|
||||
int configureMAC();
|
||||
|
||||
/**
|
||||
Prints receiver configuration
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
int printReceiverConfiguration();
|
||||
|
||||
/**
|
||||
Reads the configuration file fname
|
||||
\param fname file name
|
||||
|
@ -424,6 +424,11 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
//int setBeamEnergy(int e){return 2*setThresholdEnergy(e/2);};
|
||||
|
||||
|
||||
/**
|
||||
Prints receiver configuration
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int printReceiverConfiguration()=0;
|
||||
|
||||
/**
|
||||
Reads the configuration file fname
|
||||
@ -431,6 +436,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
\returns OK or FAIL
|
||||
*/
|
||||
virtual int readConfigurationFile(string const fname)=0;
|
||||
|
||||
virtual int dumpDetectorSetup(string const fname, int level)=0;
|
||||
int dumpDetectorSetup(string const fname){return dumpDetectorSetup(fname,0);};
|
||||
virtual int retrieveDetectorSetup(string const fname, int level)=0;
|
||||
|
@ -840,6 +840,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration;
|
||||
i++;
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="rx_printconfig";
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration;
|
||||
i++;
|
||||
|
||||
descrToFuncMap[i].m_pFuncName="parameters";
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration;
|
||||
i++;
|
||||
@ -4137,7 +4141,11 @@ string slsDetectorCommand::cmdConfiguration(int narg, char *args[], int action)
|
||||
myDet->writeConfigurationFile(sval);
|
||||
}
|
||||
return sval;
|
||||
} else if (cmd=="parameters") {
|
||||
} else if (cmd=="rx_printconfig"){
|
||||
if (action==PUT_ACTION)
|
||||
return string("cannot put");
|
||||
myDet->printReceiverConfiguration();
|
||||
}else if (cmd=="parameters") {
|
||||
if (action==PUT_ACTION) {
|
||||
sval=string(args[1]);
|
||||
myDet->retrieveDetectorSetup(sval);
|
||||
|
Reference in New Issue
Block a user