removed update shared memory from detector, check if eiger firmware >=26: have same top and bottom addresses

This commit is contained in:
2020-04-07 17:19:47 +02:00
parent 9f3ad4e2f4
commit 07cd71f0c7
17 changed files with 19 additions and 135 deletions

View File

@ -579,10 +579,6 @@ int Server_VerifyLock() {
int Server_SendResult(int fileDes, intType itype, int update, void* retval, int retvalSize) {
// update if different clients (ret can be ok or acquisition finished), not fail to not overwrite e message
if (update && isControlServer && ret != FAIL && differentClients)
ret = FORCE_UPDATE;
// send success of operation
int ret1 = ret;
sendData(fileDes, &ret1,sizeof(ret1), INT32);

View File

@ -108,7 +108,6 @@ const char* getRetName() {
switch(ret) {
case OK: return "OK";
case FAIL: return "FAIL";
case FORCE_UPDATE: return "FORCE_UPDATE";
case GOODBYE: return "GOODBYE";
case REBOOT: return "REBOOT";
default: return "unknown";
@ -194,7 +193,6 @@ const char* getFunctionName(enum detFuncs func) {
case F_LOCK_SERVER: return "F_LOCK_SERVER";
case F_GET_LAST_CLIENT_IP: return "F_GET_LAST_CLIENT_IP";
case F_SET_PORT: return "F_SET_PORT";
case F_UPDATE_CLIENT: return "F_UPDATE_CLIENT";
case F_ENABLE_TEN_GIGA: return "F_ENABLE_TEN_GIGA";
case F_SET_ALL_TRIMBITS: return "F_SET_ALL_TRIMBITS";
case F_SET_PATTERN_IO_CONTROL: return "F_SET_PATTERN_IO_CONTROL";
@ -388,7 +386,6 @@ void function_table() {
flist[F_LOCK_SERVER] = &lock_server;
flist[F_GET_LAST_CLIENT_IP] = &get_last_client_ip;
flist[F_SET_PORT] = &set_port;
flist[F_UPDATE_CLIENT] = &update_client;
flist[F_ENABLE_TEN_GIGA] = &enable_ten_giga;
flist[F_SET_ALL_TRIMBITS] = &set_all_trimbits;
flist[F_SET_PATTERN_IO_CONTROL] = &set_pattern_io_control;
@ -2830,58 +2827,6 @@ int set_port(int file_des) {
}
int update_client(int file_des) {
ret = FORCE_UPDATE;
memset(mess, 0, sizeof(mess));
Server_SendResult(file_des, INT32, NO_UPDATE, NULL, 0);
return send_update(file_des);
}
int send_update(int file_des) {
ret = OK;
int n = 0;
int i32 = -1;
i32 = lastClientIP;
i32 = __builtin_bswap32(i32);
n = sendData(file_des, &i32,sizeof(i32),INT32);
if (n < 0) return printSocketReadError();
// number of channels
#if defined(MOENCHD) || defined(CHIPTESTBOARDD)
{
int nx = 0, ny = 0;
getNumberOfChannels(&nx, &ny);
i32 = nx;
n = sendData(file_des,&i32,sizeof(i32),INT32);
if (n < 0) return printSocketReadError();
i32 = ny;
n = sendData(file_des,&i32,sizeof(i32),INT32);
if (n < 0) return printSocketReadError();
}
#endif
// num udp interfaces
#ifdef JUNGFRAUD
i32 = getNumberofUDPInterfaces();
n = sendData(file_des,&i32,sizeof(i32),INT32);
if (n < 0) return printSocketReadError();
#endif
if (lockStatus == 0) {
lastClientIP = thisClientIP;
}
return ret;
}
int enable_ten_giga(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
@ -3853,7 +3798,6 @@ int reset_fpga(int file_des) {
initControlServer();
}
else initStopServer(); //remapping of stop server
ret = FORCE_UPDATE;
}
#endif
return Server_SendResult(file_des, INT32, UPDATE, NULL, 0);