From b82fca2c8ef9ba7cb9c80b245e4d725cda75be1d Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Thu, 11 Oct 2018 13:32:24 +0200 Subject: [PATCH 1/2] removed warnings --- slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp | 2 -- slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 2096d62c4..62c23f896 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -3516,8 +3516,6 @@ int multiSlsDetector::setCTBPatWaitTime(int level, uint64_t t, int detPos) { int multiSlsDetector::retrieveDetectorSetup(std::string const fname1, int level){ - slsDetectorCommand *cmd; - int skip=0; std::string fname; std::string str; diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index 01fecab75..720ef4ae9 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -1213,8 +1213,9 @@ int slsReceiverTCPIPInterface::set_file_dir() { FILE_LOG(logERROR) << mess; } } - if (retval != NULL) + if (retval != NULL) { FILE_LOG(logDEBUG1) << "file path:" << retval; + } clientInterface->Server_SendResult(mySock->differentClients, ret, retval, (retval == NULL) ? 0 : MAX_STR_LENGTH, mess); From c24a9b223cbb066d3851599f4d977ae835feffe4 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Thu, 11 Oct 2018 13:57:47 +0200 Subject: [PATCH 2/2] combined all the funcs into one, servers need to be recompiled --- slsDetectorSoftware/CMakeLists.txt | 2 +- slsDetectorSoftware/Makefile | 2 +- slsDetectorSoftware/doxy.config | 1 - .../multiSlsDetector/multiSlsDetector.cpp | 2 +- .../multiSlsDetector/multiSlsDetectorClient.h | 2 +- .../sharedMemory/SharedMemory.cpp | 2 +- .../slsDetector/slsDetector.cpp | 2 +- slsReceiverSoftware/CMakeLists.txt | 4 +- slsReceiverSoftware/Makefile | 2 +- .../include/slsReceiverTCPIPInterface.h | 2 +- .../src/slsReceiverTCPIPInterface.cpp | 35 ++-- slsSupportLib/include/genericSocket.h | 2 +- slsSupportLib/include/sls_detector_defs.h | 1 - ...exceptions.h => sls_detector_exceptions.h} | 2 +- slsSupportLib/include/sls_detector_funcs.h | 191 +++++++++++------- slsSupportLib/include/sls_receiver_funcs.h | 78 ------- 16 files changed, 146 insertions(+), 184 deletions(-) rename slsSupportLib/include/{sls_receiver_exceptions.h => sls_detector_exceptions.h} (96%) delete mode 100644 slsSupportLib/include/sls_receiver_funcs.h diff --git a/slsDetectorSoftware/CMakeLists.txt b/slsDetectorSoftware/CMakeLists.txt index f12cce7bd..186f0828c 100644 --- a/slsDetectorSoftware/CMakeLists.txt +++ b/slsDetectorSoftware/CMakeLists.txt @@ -41,7 +41,7 @@ set(PUBLICHEADERS ../slsSupportLib/include/sls_detector_funcs.h ../slsSupportLib/include/error_defs.h ../slsSupportLib/include/versionAPI.h - ../slsSupportLib/include/sls_receiver_exceptions.h + ../slsSupportLib/include/sls_detector_exceptions.h ../slsSupportLib/include/utilties.h ../slsSupportLib/include/container_utils.h sharedMemory/SharedMemory.h diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile index ad1e26037..55067fdd9 100644 --- a/slsDetectorSoftware/Makefile +++ b/slsDetectorSoftware/Makefile @@ -17,7 +17,7 @@ LIBZMQDIR = ../slsSupportLib/include LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq SRC_CLNT= slsDetector/slsDetectorCommand.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp ../slsSupportLib/include/ReceiverInterface.cpp slsDetector/slsDetectorUsers.cpp sharedMemory/SharedMemory.cpp ../slsSupportLib/include/utilities.cpp -DEPSINCLUDES = ../slsSupportLib/include/sls_receiver_funcs.h ../slsSupportLib/include/ansi.h ../slsSupportLib/include/sls_detector_defs.h ../slsSupportLib/include/sls_detector_funcs.h ../slsSupportLib/include/error_defs.h slsDetector/detectorData.h sharedMemory/SharedMemory.h ../slsSupportLib/include/sls_receiver_exceptions.h ../slsSupportLib/include/versionAPI.h ../slsSupportLib/include/utilities.h ../slsSupportLib/include/container_utils.h +DEPSINCLUDES = ../slsSupportLib/include/ansi.h ../slsSupportLib/include/sls_detector_defs.h ../slsSupportLib/include/sls_detector_funcs.h ../slsSupportLib/include/error_defs.h slsDetector/detectorData.h sharedMemory/SharedMemory.h ../slsSupportLib/include/sls_detector_exceptions.h ../slsSupportLib/include/versionAPI.h ../slsSupportLib/include/utilities.h ../slsSupportLib/include/container_utils.h diff --git a/slsDetectorSoftware/doxy.config b/slsDetectorSoftware/doxy.config index a527dc28c..c770b9cf0 100644 --- a/slsDetectorSoftware/doxy.config +++ b/slsDetectorSoftware/doxy.config @@ -88,7 +88,6 @@ INPUT = ../slsSupportLib/include/communication_funcs.h \ ../slsSupportLib/include/genericSocket.h \ ../slsSupportLib/include/logger.h \ ../slsSupportLib/include/MySocketTCP.h \ - ../slsSupportLib/include/sls_receiver_funcs.h \ ../slsSupportLib/include/utilities.h \ ../slsSupportLib/include/ZmqSocket.h \ multiSlsDetector/multiSlsDetectorClient.h \ diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 62c23f896..0fba62814 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -1,7 +1,7 @@ #include "multiSlsDetector.h" #include "SharedMemory.h" #include "slsDetector.h" -#include "sls_receiver_exceptions.h" +#include "sls_detector_exceptions.h" #include "ZmqSocket.h" #include "multiSlsDetectorClient.h" #include "multiSlsDetectorCommand.h" diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetectorClient.h b/slsDetectorSoftware/multiSlsDetector/multiSlsDetectorClient.h index 743ac6b66..f36be73df 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetectorClient.h +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetectorClient.h @@ -4,7 +4,7 @@ #include "multiSlsDetector.h" #include "multiSlsDetectorCommand.h" -#include "sls_receiver_exceptions.h" +#include "sls_detector_exceptions.h" #include diff --git a/slsDetectorSoftware/sharedMemory/SharedMemory.cpp b/slsDetectorSoftware/sharedMemory/SharedMemory.cpp index 84b0ee846..0dc645545 100644 --- a/slsDetectorSoftware/sharedMemory/SharedMemory.cpp +++ b/slsDetectorSoftware/sharedMemory/SharedMemory.cpp @@ -1,5 +1,5 @@ #include "SharedMemory.h" -#include "sls_receiver_exceptions.h" +#include "sls_detector_exceptions.h" #include "ansi.h" #include diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 79f0f8e25..33216161e 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -1,6 +1,6 @@ #include "slsDetector.h" #include "multiSlsDetector.h" -#include "sls_receiver_exceptions.h" +#include "sls_detector_exceptions.h" #include "SharedMemory.h" #include "ClientInterface.h" #include "gitInfoLib.h" diff --git a/slsReceiverSoftware/CMakeLists.txt b/slsReceiverSoftware/CMakeLists.txt index f59d16e84..ed85f8a98 100644 --- a/slsReceiverSoftware/CMakeLists.txt +++ b/slsReceiverSoftware/CMakeLists.txt @@ -58,11 +58,11 @@ add_library(slsReceiverShared SHARED set(PUBLICHEADERS ../slsSupportLib/include/sls_detector_defs.h ../slsSupportLib/include/ansi.h - ../slsSupportLib/include/sls_receiver_funcs.h + ../slsSupportLib/include/sls_detector_funcs.h ../slsSupportLib/include/MySocketTCP.h ../slsSupportLib/include/genericSocket.h ../slsSupportLib/include/logger.h - ../slsSupportLib/include/sls_receiver_exceptions.h + ../slsSupportLib/include/sls_detector_exceptions.h ../slsSupportLib/include/utilities.h ) diff --git a/slsReceiverSoftware/Makefile b/slsReceiverSoftware/Makefile index 83052353a..70a5c2d67 100644 --- a/slsReceiverSoftware/Makefile +++ b/slsReceiverSoftware/Makefile @@ -27,7 +27,7 @@ LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq SRC_CLNT = ThreadObject.cpp Listener.cpp DataProcessor.cpp DataStreamer.cpp Fifo.cpp File.cpp BinaryFile.cpp slsReceiverImplementation.cpp slsReceiverTCPIPInterface.cpp slsReceiver.cpp slsReceiverUsers.cpp $(COMMONDIR)/utilities.cpp -DEPSINCLUDES = $(COMMONDIR)/ansi.h $(COMMONDIR)/sls_detector_defs.h $(COMMONDIR)/sls_receiver_funcs.h $(COMMONDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(COMMONDIR)/genericSocket.h $(COMMONDIR)/logger.h $(INCDIR)/receiver_defs.h $(COMMONDIR)/utilities.h $(COMMONDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(COMMONDIR)/sls_receiver_exceptions.h +DEPSINCLUDES = $(COMMONDIR)/ansi.h $(COMMONDIR)/sls_detector_defs.h $(COMMONDIR)/sls_detector_funcs.h $(COMMONDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(COMMONDIR)/genericSocket.h $(COMMONDIR)/logger.h $(INCDIR)/receiver_defs.h $(COMMONDIR)/utilities.h $(COMMONDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(COMMONDIR)/sls_detector_exceptions.h ifeq ($(HDF5),yes) diff --git a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h index b6189eecb..82b028304 100644 --- a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h +++ b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h @@ -107,7 +107,7 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs { void startTCPServer(); /** retuns function name with function index */ - const char* getFunctionName(enum recFuncs func); + const char* getFunctionName(enum detFuncs func); /** assigns functions to the fnum enum */ int function_table(); diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index 720ef4ae9..b88d16257 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -177,7 +177,7 @@ void slsReceiverTCPIPInterface::startTCPServer(){ } -const char* slsReceiverTCPIPInterface::getFunctionName(enum recFuncs func) { +const char* slsReceiverTCPIPInterface::getFunctionName(enum detFuncs func) { switch (func) { case F_EXEC_RECEIVER_COMMAND: return "F_EXEC_RECEIVER_COMMAND"; case F_EXIT_RECEIVER: return "F_EXIT_RECEIVER"; @@ -282,9 +282,9 @@ int slsReceiverTCPIPInterface::function_table(){ flist[F_RECEIVER_PADDING_ENABLE] = &slsReceiverTCPIPInterface::set_padding_enable; flist[F_RECEIVER_DEACTIVATED_PADDING_ENABLE] = &slsReceiverTCPIPInterface::set_deactivated_receiver_padding_enable; - for (int i = 0; i < NUM_REC_FUNCTIONS ; i++) { + for (int i = NUM_DET_FUNCTIONS + 1; i < NUM_REC_FUNCTIONS ; i++) { FILE_LOG(logDEBUG1) << "function fnum: " << i << " (" << - getFunctionName((enum recFuncs)i) << ") located at " << flist[i]; + getFunctionName((enum detFuncs)i) << ") located at " << flist[i]; } return OK; @@ -301,26 +301,27 @@ int slsReceiverTCPIPInterface::decode_function(){ if (n <= 0) { FILE_LOG(logDEBUG1) << "ERROR reading from socket. " "Received " << n << " bytes," << - "fnum:" << fnum << " " - "(" << getFunctionName((enum recFuncs)fnum) << ")"; + "fnum:" << fnum << " " + "(" << getFunctionName((enum detFuncs)fnum) << ")"; return FAIL; } else FILE_LOG(logDEBUG1) << "Received " << n << " bytes"; - FILE_LOG(logDEBUG1) << "calling function fnum: "<< fnum << " " - "(" << getFunctionName((enum recFuncs)fnum) << ") " - "located at " << flist[fnum]; - if (fnum < REC_FUNC_START_INDEX || fnum >= NUM_REC_FUNCTIONS) { + if (fnum <= NUM_DET_FUNCTIONS || fnum >= NUM_REC_FUNCTIONS) { FILE_LOG(logERROR) << "Unknown function enum " << fnum; - ret=(this->M_nofunc)(); + ret = (this->M_nofunc)(); } else{ - ret=(this->*flist[fnum])(); - } - if (ret == FAIL) { - FILE_LOG(logERROR) << "Failed to execute function = " << fnum << " (" - << getFunctionName((enum recFuncs)fnum) << ")"; + FILE_LOG(logDEBUG1) << "calling function fnum: "<< fnum << " " + "(" << getFunctionName((enum detFuncs)fnum) << ") " + "located at " << flist[fnum]; + ret = (this->*flist[fnum])(); + + if (ret == FAIL) { + FILE_LOG(logERROR) << "Failed to execute function = " << fnum << " (" + << getFunctionName((enum detFuncs)fnum) << ")"; + } } return ret; } @@ -350,14 +351,14 @@ void slsReceiverTCPIPInterface::receiverlocked() { void slsReceiverTCPIPInterface::receiverNotIdle() { ret = FAIL; sprintf(mess,"Can not execute %s when receiver is not idle\n", - getFunctionName((enum recFuncs)fnum)); + getFunctionName((enum detFuncs)fnum)); FILE_LOG(logERROR) << mess; } void slsReceiverTCPIPInterface::functionNotImplemented() { ret = FAIL; sprintf(mess, "Function (%s) is not implemented for this detector\n", - getFunctionName((enum recFuncs)fnum)); + getFunctionName((enum detFuncs)fnum)); FILE_LOG(logERROR) << mess; } diff --git a/slsSupportLib/include/genericSocket.h b/slsSupportLib/include/genericSocket.h index 1a49e9bad..7801757b6 100644 --- a/slsSupportLib/include/genericSocket.h +++ b/slsSupportLib/include/genericSocket.h @@ -9,7 +9,7 @@ */ #include "ansi.h" -#include "sls_receiver_exceptions.h" +#include "sls_detector_exceptions.h" #ifdef __CINT__ //class sockaddr_in; diff --git a/slsSupportLib/include/sls_detector_defs.h b/slsSupportLib/include/sls_detector_defs.h index 0e5bdfcb7..1f936c570 100755 --- a/slsSupportLib/include/sls_detector_defs.h +++ b/slsSupportLib/include/sls_detector_defs.h @@ -882,7 +882,6 @@ protected: #ifndef MYROOT #include "sls_detector_funcs.h" -#include "sls_receiver_funcs.h" #endif #ifdef __cplusplus diff --git a/slsSupportLib/include/sls_receiver_exceptions.h b/slsSupportLib/include/sls_detector_exceptions.h similarity index 96% rename from slsSupportLib/include/sls_receiver_exceptions.h rename to slsSupportLib/include/sls_detector_exceptions.h index bc888d932..aaed1d854 100644 --- a/slsSupportLib/include/sls_receiver_exceptions.h +++ b/slsSupportLib/include/sls_detector_exceptions.h @@ -1,6 +1,6 @@ #pragma once /************************************************ - * @file sls_receiver_exceptions.h + * @file sls_detector_exceptions.h * @short exceptions defined ***********************************************/ /** diff --git a/slsSupportLib/include/sls_detector_funcs.h b/slsSupportLib/include/sls_detector_funcs.h index 648622b81..2f3ee8516 100644 --- a/slsSupportLib/include/sls_detector_funcs.h +++ b/slsSupportLib/include/sls_detector_funcs.h @@ -1,81 +1,122 @@ -/** - @internal +#pragma once +/************************************************ + * @file sls_detector_funcs.h + * @short functions indices to call on server (detector/receiver) + ***********************************************/ +/** + *@short functions indices to call on server (detector/receiver) + */ - function indexes to call on the server - All set functions with argument -1 work as get, when possible - -*/ -#ifndef SLS_DETECTOR_FUNCS_H -#define SLS_DETECTOR_FUNCS_H enum detFuncs{ - F_EXEC_COMMAND=0, /**< command is executed */ - F_GET_DETECTOR_TYPE, /**< return detector type */ - F_SET_EXTERNAL_SIGNAL_FLAG, /**< set/get flag for external signal */ - F_SET_EXTERNAL_COMMUNICATION_MODE, /**< set/get external communication mode (obsolete) */ - F_GET_ID, /**< get detector id of version */ - F_DIGITAL_TEST, /**< digital test of the detector */ - F_SET_DAC, /**< set DAC value */ - F_GET_ADC, /**< get ADC value */ - F_WRITE_REGISTER, /**< write to register */ - F_READ_REGISTER, /**< read register */ - F_SET_MODULE, /**< initialize module */ - F_GET_MODULE, /**< get module status */ - F_SET_SETTINGS, /**< set detector settings */ - F_GET_THRESHOLD_ENERGY, /**< get detector threshold (in eV) */ - F_START_ACQUISITION, /**< start acquisition */ - F_STOP_ACQUISITION, /**< stop acquisition */ - F_START_READOUT, /**< start readout */ - F_GET_RUN_STATUS, /**< get acquisition status */ - F_START_AND_READ_ALL, /**< start acquisition and read all frames*/ - F_READ_ALL, /**< read alla frames */ - F_SET_TIMER, /**< set/get timer value */ - F_GET_TIME_LEFT, /**< get current value of the timer (time left) */ - F_SET_DYNAMIC_RANGE, /**< set/get detector dynamic range */ - F_SET_READOUT_FLAGS, /**< set/get readout flags */ - F_SET_ROI, /**< set/get region of interest */ - F_SET_SPEED, /**< set/get readout speed parameters */ - F_EXIT_SERVER, /**< turn off detector server */ - F_LOCK_SERVER, /**< Locks/Unlocks server communication to the given client */ - F_GET_LAST_CLIENT_IP, /**< returns the IP of the client last connected to the detector */ - F_SET_PORT, /**< Changes communication port of the server */ - F_UPDATE_CLIENT, /**< Returns all the important parameters to update the shared memory of the client */ - F_CONFIGURE_MAC, /**< Configures MAC for Gotthard readout */ - F_LOAD_IMAGE, /**< Loads Dark/Gain image to the Gotthard detector */ - F_READ_COUNTER_BLOCK, /**< reads the counter block memory for gotthard */ - F_RESET_COUNTER_BLOCK, /**< resets the counter block memory for gotthard */ - F_CALIBRATE_PEDESTAL, /**< starts acquistion, calibrates pedestal and write back to fpga */ - F_ENABLE_TEN_GIGA, /**< enable 10Gbe */ - F_SET_ALL_TRIMBITS, /** < set all trimbits to this value */ - F_SET_CTB_PATTERN, /** < loads a pattern in the CTB */ - F_WRITE_ADC_REG, /** < writes an ADC register */ - F_SET_COUNTER_BIT, /** < set/reset counter bit in detector for eiger */ - F_PULSE_PIXEL,/** < pulse pixel n number of times in eiger at (x,y) */ - F_PULSE_PIXEL_AND_MOVE,/** < pulse pixel n number of times and move relatively by x and y */ - F_PULSE_CHIP, /** < pulse chip n number of times */ - F_SET_RATE_CORRECT,/** < set/reset rate correction tau */ - F_GET_RATE_CORRECT,/** < get rate correction tau */ - F_SET_NETWORK_PARAMETER,/**< set network parameters such as transmission delay, flow control */ - F_PROGRAM_FPGA,/**< program FPGA */ - F_RESET_FPGA, /**< reset FPGA */ - F_POWER_CHIP, /**< power chip */ - F_ACTIVATE,/** < activate */ - F_PREPARE_ACQUISITION,/** < prepare acquisition */ - F_THRESHOLD_TEMP, /** < set threshold temperature */ - F_TEMP_CONTROL, /** < set temperature control */ - F_TEMP_EVENT, /** < set temperature event */ - F_AUTO_COMP_DISABLE, /** < auto comp disable mode */ - F_STORAGE_CELL_START, /** < storage cell start */ - F_CHECK_VERSION,/** < check version compatibility */ - F_SOFTWARE_TRIGGER,/** < software trigger */ - /* Always append functions hereafter!!! */ - - /* Always append functions before!!! */ - NUM_DET_FUNCTIONS, - TOO_MANY_FUNCTIONS_DEFINED=127 //you should get a compilation error if there are already so many functions defined. It conflicts with sls_receiver_funcs.h - + F_EXEC_COMMAND=0, /**< command is executed */ + F_GET_DETECTOR_TYPE, /**< return detector type */ + F_SET_EXTERNAL_SIGNAL_FLAG, /**< set/get flag for external signal */ + F_SET_EXTERNAL_COMMUNICATION_MODE, /**< set/get external communication mode (obsolete) */ + F_GET_ID, /**< get detector id of version */ + F_DIGITAL_TEST, /**< digital test of the detector */ + F_SET_DAC, /**< set DAC value */ + F_GET_ADC, /**< get ADC value */ + F_WRITE_REGISTER, /**< write to register */ + F_READ_REGISTER, /**< read register */ + F_SET_MODULE, /**< initialize module */ + F_GET_MODULE, /**< get module status */ + F_SET_SETTINGS, /**< set detector settings */ + F_GET_THRESHOLD_ENERGY, /**< get detector threshold (in eV) */ + F_START_ACQUISITION, /**< start acquisition */ + F_STOP_ACQUISITION, /**< stop acquisition */ + F_START_READOUT, /**< start readout */ + F_GET_RUN_STATUS, /**< get acquisition status */ + F_START_AND_READ_ALL, /**< start acquisition and read all frames*/ + F_READ_ALL, /**< read alla frames */ + F_SET_TIMER, /**< set/get timer value */ + F_GET_TIME_LEFT, /**< get current value of the timer (time left) */ + F_SET_DYNAMIC_RANGE, /**< set/get detector dynamic range */ + F_SET_READOUT_FLAGS, /**< set/get readout flags */ + F_SET_ROI, /**< set/get region of interest */ + F_SET_SPEED, /**< set/get readout speed parameters */ + F_EXIT_SERVER, /**< turn off detector server */ + F_LOCK_SERVER, /**< Locks/Unlocks server communication to the given client */ + F_GET_LAST_CLIENT_IP, /**< returns the IP of the client last connected to the detector */ + F_SET_PORT, /**< Changes communication port of the server */ + F_UPDATE_CLIENT, /**< Returns all the important parameters to update the shared memory of the client */ + F_CONFIGURE_MAC, /**< Configures MAC for Gotthard readout */ + F_LOAD_IMAGE, /**< Loads Dark/Gain image to the Gotthard detector */ + F_READ_COUNTER_BLOCK, /**< reads the counter block memory for gotthard */ + F_RESET_COUNTER_BLOCK, /**< resets the counter block memory for gotthard */ + F_CALIBRATE_PEDESTAL, /**< starts acquistion, calibrates pedestal and write back to fpga */ + F_ENABLE_TEN_GIGA, /**< enable 10Gbe */ + F_SET_ALL_TRIMBITS, /** < set all trimbits to this value */ + F_SET_CTB_PATTERN, /** < loads a pattern in the CTB */ + F_WRITE_ADC_REG, /** < writes an ADC register */ + F_SET_COUNTER_BIT, /** < set/reset counter bit in detector for eiger */ + F_PULSE_PIXEL,/** < pulse pixel n number of times in eiger at (x,y) */ + F_PULSE_PIXEL_AND_MOVE,/** < pulse pixel n number of times and move relatively by x and y */ + F_PULSE_CHIP, /** < pulse chip n number of times */ + F_SET_RATE_CORRECT,/** < set/reset rate correction tau */ + F_GET_RATE_CORRECT,/** < get rate correction tau */ + F_SET_NETWORK_PARAMETER,/**< set network parameters such as transmission delay, flow control */ + F_PROGRAM_FPGA,/**< program FPGA */ + F_RESET_FPGA, /**< reset FPGA */ + F_POWER_CHIP, /**< power chip */ + F_ACTIVATE,/** < activate */ + F_PREPARE_ACQUISITION,/** < prepare acquisition */ + F_THRESHOLD_TEMP, /** < set threshold temperature */ + F_TEMP_CONTROL, /** < set temperature control */ + F_TEMP_EVENT, /** < set temperature event */ + F_AUTO_COMP_DISABLE, /** < auto comp disable mode */ + F_STORAGE_CELL_START, /** < storage cell start */ + F_CHECK_VERSION,/** < check version compatibility */ + F_SOFTWARE_TRIGGER,/** < software trigger */ + NUM_DET_FUNCTIONS, + F_EXEC_RECEIVER_COMMAND,/**< command is executed */ + F_EXIT_RECEIVER,/**< turn off receiver server */ + F_LOCK_RECEIVER,/**< Locks/Unlocks server communication to the given client */ + F_GET_LAST_RECEIVER_CLIENT_IP,/**< returns the IP of the client last connected to the receiver */ + F_SET_RECEIVER_PORT, /**< Changes communication port of the receiver */ + F_UPDATE_RECEIVER_CLIENT, /**< Returns all the important parameters to update the shared memory of the client */ + F_GET_RECEIVER_ID, /**< get receiver id of version */ + F_GET_RECEIVER_TYPE, /**< return receiver type */ + F_SEND_RECEIVER_DETHOSTNAME, /**< set detector hostname to receiver */ + F_RECEIVER_SET_ROI, /**< Sets receiver ROI */ + F_SETUP_RECEIVER_UDP, /**< sets the receiver udp connection and returns receiver mac address */ + F_SET_RECEIVER_TIMER, /**< set/get timer value */ + F_SET_RECEIVER_DYNAMIC_RANGE, /**< set/get detector dynamic range */ + F_RECEIVER_STREAMING_FREQUENCY, /**< sets the frequency of receiver sending frames to gui */ + F_GET_RECEIVER_STATUS, /**< gets the status of receiver listening mode */ + F_START_RECEIVER, /**< starts the receiver listening mode */ + F_STOP_RECEIVER, /**< stops the receiver listening mode */ + F_SET_RECEIVER_FILE_PATH, /**< sets receiver file directory */ + F_SET_RECEIVER_FILE_NAME, /**< sets receiver file name */ + F_SET_RECEIVER_FILE_INDEX, /**< sets receiver file index */ + F_GET_RECEIVER_FRAME_INDEX, /**< gets the receiver frame index */ + F_GET_RECEIVER_FRAMES_CAUGHT, /**< gets the number of frames caught by receiver */ + F_RESET_RECEIVER_FRAMES_CAUGHT, /**< resets the frames caught by receiver */ + F_ENABLE_RECEIVER_FILE_WRITE, /**< sets the receiver file write */ + F_ENABLE_RECEIVER_OVERWRITE, /**< set overwrite flag in receiver */ + F_ENABLE_RECEIVER_TEN_GIGA, /**< enable 10Gbe in receiver */ + F_SET_RECEIVER_FIFO_DEPTH, /**< set receiver fifo depth */ + F_RECEIVER_ACTIVATE, /** < activate/deactivate readout */ + F_STREAM_DATA_FROM_RECEIVER, /**< stream data from receiver to client */ + F_RECEIVER_STREAMING_TIMER, /** < sets the timer between each data stream in receiver */ + F_SET_FLIPPED_DATA_RECEIVER, /** < sets the enable to flip data across x/y axis (bottom/top) */ + F_SET_RECEIVER_FILE_FORMAT, /** < sets the receiver file format */ + F_SEND_RECEIVER_DETPOSID, /** < sets the detector position id in the reveiver */ + F_SEND_RECEIVER_MULTIDETSIZE, /** < sets the multi detector size to the receiver */ + F_SET_RECEIVER_STREAMING_PORT, /** < sets the receiver streaming port */ + F_RECEIVER_STREAMING_SRC_IP, /** < sets the receiver streaming source IP */ + F_SET_RECEIVER_SILENT_MODE, /** < sets the receiver silent mode */ + F_ENABLE_GAPPIXELS_IN_RECEIVER, /** < sets gap pixels in the receiver */ + F_RESTREAM_STOP_FROM_RECEIVER, /** < restream stop from receiver */ + F_ADDITIONAL_JSON_HEADER, /** < additional json header */ + F_RECEIVER_UDP_SOCK_BUF_SIZE, /** < UDP socket buffer size */ + F_RECEIVER_REAL_UDP_SOCK_BUF_SIZE, /** < real UDP socket buffer size */ + F_SET_RECEIVER_FRAMES_PER_FILE, /** < receiver frames per file */ + F_RECEIVER_CHECK_VERSION, /** < check receiver version compatibility */ + F_RECEIVER_DISCARD_POLICY, /** < frames discard policy */ + F_RECEIVER_PADDING_ENABLE, /** < partial frames padding enable */ + F_RECEIVER_DEACTIVATED_PADDING_ENABLE, /** < deactivated receiver padding enable */ + NUM_REC_FUNCTIONS }; -#endif -/** @endinternal */ diff --git a/slsSupportLib/include/sls_receiver_funcs.h b/slsSupportLib/include/sls_receiver_funcs.h deleted file mode 100644 index c118bcf2a..000000000 --- a/slsSupportLib/include/sls_receiver_funcs.h +++ /dev/null @@ -1,78 +0,0 @@ -#pragma once -/** - @internal - function indexes to call on the server - All set functions with argument -1 work as get, when possible - */ - -#define REC_FUNC_START_INDEX 128 - -enum recFuncs{ - //General functions - F_EXEC_RECEIVER_COMMAND=REC_FUNC_START_INDEX, /**< command is executed */ - F_EXIT_RECEIVER, /**< turn off receiver server */ - F_LOCK_RECEIVER, /**< Locks/Unlocks server communication to the given client */ - F_GET_LAST_RECEIVER_CLIENT_IP, /**< returns the IP of the client last connected to the receiver */ - F_SET_RECEIVER_PORT, /**< Changes communication port of the receiver */ - F_UPDATE_RECEIVER_CLIENT, /**< Returns all the important parameters to update the shared memory of the client */ - - // Identification - F_GET_RECEIVER_ID, /**< get receiver id of version */ - F_GET_RECEIVER_TYPE, /**< return receiver type */ - F_SEND_RECEIVER_DETHOSTNAME, /**< set detector hostname to receiver */ - - //network functions - F_RECEIVER_SET_ROI, /**< Sets receiver ROI */ - F_SETUP_RECEIVER_UDP, /**< sets the receiver udp connection and returns receiver mac address */ - - //Acquisition setup functions - F_SET_RECEIVER_TIMER, /**< set/get timer value */ - F_SET_RECEIVER_DYNAMIC_RANGE, /**< set/get detector dynamic range */ - F_RECEIVER_STREAMING_FREQUENCY, /**< sets the frequency of receiver sending frames to gui */ - - // Acquisition functions - F_GET_RECEIVER_STATUS, /**< gets the status of receiver listening mode */ - F_START_RECEIVER, /**< starts the receiver listening mode */ - F_STOP_RECEIVER, /**< stops the receiver listening mode */ - - //file functions - F_SET_RECEIVER_FILE_PATH, /**< sets receiver file directory */ - F_SET_RECEIVER_FILE_NAME, /**< sets receiver file name */ - F_SET_RECEIVER_FILE_INDEX, /**< sets receiver file index */ - F_GET_RECEIVER_FRAME_INDEX, /**< gets the receiver frame index */ - F_GET_RECEIVER_FRAMES_CAUGHT, /**< gets the number of frames caught by receiver */ - F_RESET_RECEIVER_FRAMES_CAUGHT, /**< resets the frames caught by receiver */ - F_ENABLE_RECEIVER_FILE_WRITE, /**< sets the receiver file write */ - F_ENABLE_RECEIVER_OVERWRITE, /**< set overwrite flag in receiver */ - - F_ENABLE_RECEIVER_TEN_GIGA, /**< enable 10Gbe in receiver */ - F_SET_RECEIVER_FIFO_DEPTH, /**< set receiver fifo depth */ - - F_RECEIVER_ACTIVATE, /** < activate/deactivate readout */ - F_STREAM_DATA_FROM_RECEIVER, /**< stream data from receiver to client */ - F_RECEIVER_STREAMING_TIMER, /** < sets the timer between each data stream in receiver */ - F_SET_FLIPPED_DATA_RECEIVER, /** < sets the enable to flip data across x/y axis (bottom/top) */ - F_SET_RECEIVER_FILE_FORMAT, /** < sets the receiver file format */ - - F_SEND_RECEIVER_DETPOSID, /** < sets the detector position id in the reveiver */ - F_SEND_RECEIVER_MULTIDETSIZE, /** < sets the multi detector size to the receiver */ - F_SET_RECEIVER_STREAMING_PORT, /** < sets the receiver streaming port */ - F_RECEIVER_STREAMING_SRC_IP, /** < sets the receiver streaming source IP */ - F_SET_RECEIVER_SILENT_MODE, /** < sets the receiver silent mode */ - F_ENABLE_GAPPIXELS_IN_RECEIVER, /** < sets gap pixels in the receiver */ - F_RESTREAM_STOP_FROM_RECEIVER, /** < restream stop from receiver */ - F_ADDITIONAL_JSON_HEADER, /** < additional json header */ - F_RECEIVER_UDP_SOCK_BUF_SIZE, /** < UDP socket buffer size */ - F_RECEIVER_REAL_UDP_SOCK_BUF_SIZE, /** < real UDP socket buffer size */ - F_SET_RECEIVER_FRAMES_PER_FILE, /** < receiver frames per file */ - F_RECEIVER_CHECK_VERSION, /** < check receiver version compatibility */ - F_RECEIVER_DISCARD_POLICY, /** < frames discard policy */ - F_RECEIVER_PADDING_ENABLE, /** < partial frames padding enable */ - F_RECEIVER_DEACTIVATED_PADDING_ENABLE, /** < deactivated receiver padding enable */ - /* Always append functions hereafter!!! */ - - - /* Always append functions before!!! */ - NUM_REC_FUNCTIONS -}; -