fixed stop server not starting up with setup variables (#949)

* m3: fixed stop server not starting up with setup variables

* all servers except eiger fixed for virtual stop server to start up with setupDetector function called

* virtual tests work

* eiger: versions print neednt be in stop server

* jungfrau: stop server (not virtual) also needs to read config file

* ensuring master is setup for virtual and real servers
This commit is contained in:
2024-09-10 15:24:51 +02:00
committed by GitHub
parent 38d7fb0c38
commit c6477e0ed6
22 changed files with 173 additions and 156 deletions

View File

@ -403,13 +403,7 @@ void initStopServer() {
return;
}
#ifdef VIRTUAL
sharedMemory_setStop(0);
setMaster(OW_MASTER);
if (readConfigFile() == FAIL ||
checkCommandLineConfiguration() == FAIL) {
initCheckDone = 1;
return;
}
setupDetector();
#endif
}
initCheckDone = 1;
@ -460,8 +454,14 @@ void setupDetector() {
memset(vetoGainIndices, 0, sizeof(vetoGainIndices));
memset(adcConfiguration, 0, sizeof(adcConfiguration));
#ifdef VIRTUAL
sharedMemory_setStatus(IDLE);
setupUDPCommParameters();
if (isControlServer) {
sharedMemory_setStatus(IDLE);
setupUDPCommParameters();
} else {
sharedMemory_setStop(0);
}
// ismaster from reg in stop server, so set it in virtual mode
setMaster(OW_MASTER);
#endif
// pll defines
ALTERA_PLL_C10_SetDefines(REG_OFFSET, BASE_READOUT_PLL, BASE_SYSTEM_PLL,
@ -2159,7 +2159,6 @@ int *getDetectorPosition() { return detPos; }
int checkDetectorType(char *mess) {
#ifdef VIRTUAL
setMaster(OW_MASTER);
return OK;
#endif
LOG(logINFO, ("Checking module type\n"));

View File

@ -14,7 +14,11 @@
#define LINKED_SERVER_NAME "gotthard2DetectorServer"
#ifdef VIRTUAL
#define CTRL_SRVR_INIT_TIME_US (3 * 1000 * 1000)
#else
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
#endif
/* Hardware Definitions */
#define NCHAN (128)