* g2: new hdi values, write hdi value to reg, set slave/master to reg, able to set master from server config file, server command line and client

* print versions for virtual as well
This commit is contained in:
Dhanya Thattil
2022-08-16 09:31:13 +02:00
committed by GitHub
parent 409a3977db
commit 22b9562629
24 changed files with 251 additions and 241 deletions

View File

@ -385,8 +385,10 @@ int getADC(enum ADCINDEX ind);
int setHighVoltage(int val);
// parameters - timing, extsig
#ifdef EIGERD
#if defined(EIGERD) || defined(GOTTHARD2D)
int setMaster(enum MASTERINDEX m);
#endif
#ifdef EIGERD
int setTop(enum TOPINDEX t);
int isTop(int *retval);
#endif
@ -558,7 +560,7 @@ int setDataStream(enum portPosition port, int enable);
int setPhase(enum CLKINDEX ind, int val, int degrees);
#elif MYTHEN3D
int checkDetectorType();
int checkDetectorType(char *mess);
int powerChip(int on);
int setPhase(enum CLKINDEX ind, int val, int degrees);
int getPhase(enum CLKINDEX ind, int degrees);
@ -574,7 +576,7 @@ int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val,
int getClockDivider(enum CLKINDEX ind);
#elif GOTTHARD2D
int checkDetectorType();
int checkDetectorType(char *mess);
int powerChip(int on);
void setDBITPipeline(int val);
int getDBITPipeline();

View File

@ -114,7 +114,6 @@ int printSocketReadError() {
void init_detector() {
memset(udpDetails, 0, sizeof(udpDetails));
#ifdef VIRTUAL
LOG(logINFO, ("This is a VIRTUAL detector\n"));
udpDetails[0].srcip = LOCALHOSTIP_INT;
udpDetails[0].srcip2 = LOCALHOSTIP_INT;
#endif
@ -3849,27 +3848,14 @@ int power_chip(int file_des) {
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
// check only when powering on
if (arg != -1 && arg != 0) {
if (checkModuleFlag) {
int type_ret = checkDetectorType();
if (type_ret == -1) {
ret = FAIL;
sprintf(mess, "Could not power on chip. Could not open "
"file to get type of module attached.\n");
LOG(logERROR, (mess));
} else if (type_ret == -2) {
ret = FAIL;
sprintf(mess,
"Could not power on chip. No module attached!\n");
LOG(logERROR, (mess));
} else if (type_ret == FAIL) {
ret = FAIL;
sprintf(mess, "Could not power on chip. Wrong module "
"attached!\n");
LOG(logERROR, (mess));
}
if (!checkModuleFlag) {
LOG(logINFOBLUE,
("In No-Module mode: Ignoring module type. Continuing.\n"));
} else {
LOG(logINFOBLUE, ("In No-Module mode: Ignoring module "
"type. Continuing.\n"));
ret = checkDetectorType(mess);
if (ret == FAIL) {
LOG(logERROR, ("Could not power on chip.\n"));
}
}
}
#endif
@ -8270,7 +8256,7 @@ int set_master(int file_des) {
return printSocketReadError();
LOG(logDEBUG1, ("Setting master: %u\n", (int)arg));
#ifndef EIGERD
#if !defined(EIGERD) && !defined(GOTTHARD2D)
functionNotImplemented();
#else
// only set