manual acq changes for debugging

This commit is contained in:
maliakal_d 2019-02-04 17:31:58 +01:00
parent 133b82ad61
commit 49812a34ae
2 changed files with 16 additions and 23 deletions

View File

@ -2,25 +2,16 @@ hostname bchip065+bchip195+
0:rx_tcpport 1954 0:rx_tcpport 1954
0:rx_udpport 50005 0:rx_udpport 50005
0:detectorip 10.1.1.4 0:detectorip 10.1.2.185
#0:detectorip 10.90.90.4 0:rx_udpip 10.1.2.102
#0:detectorip 129.129.202.4
#0:rx_udpip 129.129.202.92
#0:rx_udpip 129.129.202.110
1:rx_tcpport 1955 1:rx_tcpport 1955
1:rx_udpport 50006 1:rx_udpport 50006
1:detectorip 10.1.1.5 1:detectorip 10.1.2.186
#1:detectorip 10.90.90.53 1:rx_udpip 10.1.2.102
#1:detectorip 129.129.202.5
#1:rx_udpip 129.129.202.92
#1:rx_udpip 129.129.202.110
#rx_udpip 10.90.90.100 rx_hostname pc1875
rx_udpip 10.1.1.100
rx_hostname pcmoench01
#rx_hostname mpc2012
outdir /home/l_msdetect/dhanya/outdir outdir /home/l_msdetect/dhanya/outdir
vhighvoltage 0 vhighvoltage 0

View File

@ -107,7 +107,7 @@ slsDetectorUsers * detector = NULL;
/** Define Colors to print data call back in different colors for different recievers */ /** Define Colors to print data call back in different colors for different recievers */
#define PRINT_IN_COLOR(c,f, ...) printf ("\033[%dm" f RESET, 30 + c+1, ##__VA_ARGS__) #define PRINT_IN_COLOR(c,f, ...) printf ("\033[%dm" f RESET, 30 + c+1, ##__VA_ARGS__)
#define PRINT_SEPARATOR() cprintf(RED, "============================================\n") #define PRINT_SEPARATOR() cprintf(MAGENTA, "============================================\n")
/************************************************************************ /************************************************************************
* \brief cleans the shared memory used by the camera * \brief cleans the shared memory used by the camera
@ -425,13 +425,13 @@ void CreateDetector(void)
} }
// configuration file is used to properly configure advanced settings in the shared memory // configuration file is used to properly configure advanced settings in the shared memory
result = detector->readConfigurationFile(detector_config_file_name); /*result = detector->readConfigurationFile(detector_config_file_name);
if(result == slsDetectorDefs::FAIL) if(result == slsDetectorDefs::FAIL)
{ {
std::cout << "readConfigurationFile failed! Could not initialize the camera!" << std::endl; std::cout << "readConfigurationFile failed! Could not initialize the camera!" << std::endl;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }*/
// set detector in shared memory online (in case no config file was used) */ // set detector in shared memory online (in case no config file was used) */
detector->setOnline(slsDetectorDefs::ONLINE_FLAG); detector->setOnline(slsDetectorDefs::ONLINE_FLAG);
@ -580,8 +580,7 @@ int RunAcquisition(void)
for(;;) for(;;)
{ {
// checking if the hardware acquisition is running // checking if the hardware acquisition is running
int status = detector->getDetectorStatus(); int status = detector->getDetectorStatus();
if((status == slsDetectorDefs::IDLE ) || if((status == slsDetectorDefs::IDLE ) ||
(status == slsDetectorDefs::STOPPED) || (status == slsDetectorDefs::STOPPED) ||
(status == slsDetectorDefs::ERROR )) (status == slsDetectorDefs::ERROR ))
@ -671,12 +670,15 @@ void Test(void)
ReleaseReceivers(); ReleaseReceivers();
PRINT_SEPARATOR(); PRINT_SEPARATOR();
std::cout << "Correct acquisition(s) " << acquisition_nb_ok << "/" << acquisition_nb << std::endl; if (acquisition_nb - acquisition_nb_ok)
cprintf(BOLD RED, "Correct acquisition(s) %d/%d\n", acquisition_nb_ok, acquisition_nb);
else
cprintf(BOLD GREEN, "Correct acquisition(s) %d/%d\n", acquisition_nb_ok, acquisition_nb);
if (acquisition_nb - acquisition_nb_ok) { if (acquisition_nb - acquisition_nb_ok) {
std::cout << "Acquisition(s) gone wrong :" << std::endl; cprintf(RED, "Acquisition(s) gone wrong :\n");
for (int list_index = 0; list_index < acquisition_nb_list.size(); ++list_index) { for (int list_index = 0; list_index < acquisition_nb_list.size(); ++list_index) {
std::cout << acquisition_nb_list[list_index] << std::endl; cprintf(RED, "%d\n", acquisition_nb_list[list_index]);
} }
} }
PRINT_SEPARATOR(); PRINT_SEPARATOR();