diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile index e36f2fb8d..30cd4d971 100644 --- a/slsDetectorSoftware/Makefile +++ b/slsDetectorSoftware/Makefile @@ -10,7 +10,7 @@ SRC_CLNT= slsDetector/slsDetector.cpp MySocketTCP/MySocketTCP.cxx usersFunctions SRC_MYTHEN_SVC = mythenDetectorServer/server.c mythenDetectorServer/server_funcs.c mythenDetectorServer/communication_funcs.c mythenDetectorServer/firmware_funcs.c mythenDetectorServer/mcb_funcs.c mythenDetectorServer/trimming_funcs.c #mythenDetectorServer/sharedmemory.c -all: package mythenServer doc picassoServer +all: package doc #picassoServer #mythenServer doc: $(SRC_H) $(SRC_CLNT) doxygen doxy.config diff --git a/slsDetectorSoftware/commonFiles/sls_detector_defs.h b/slsDetectorSoftware/commonFiles/sls_detector_defs.h index d6819b266..798a354e2 100755 --- a/slsDetectorSoftware/commonFiles/sls_detector_defs.h +++ b/slsDetectorSoftware/commonFiles/sls_detector_defs.h @@ -478,9 +478,10 @@ enum { 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_UPDATE_CLIENT, /**< Returns all the important parameters to update the shared memory of the client */ + F_CONFIGURE_MAC /**< Configures MAC for Gotthard readout */ + /* Always append functions hereafter!!! */ diff --git a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c index 0d7ddd53d..8fd5dc440 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c @@ -151,6 +151,8 @@ int function_table() { flist[F_SET_SPEED]=&set_speed; flist[F_SET_READOUT_FLAGS]=&set_readout_flags; flist[F_EXECUTE_TRIMMING]=&execute_trimming; + flist[F_CONFIGURE_MAC]=&configure_mac; + #ifdef VERBOSE /* for (i=0;i<256;i++){ printf("function %d located at %x\n",i,flist[i]); diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index b091b6b53..0df919b17 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -6348,6 +6348,10 @@ string slsDetector::executeLine(int narg, char *args[], int action) { } sprintf(answer,"%d", setSpeed(TOT_DUTY_CYCLE)); return string(answer); + //gotthard + }else if (var=="configuremac") { + configureMAC(); + return string("mac configuration completed"); } return ("Unknown command"); @@ -7813,7 +7817,7 @@ int slsDetector::readConfigurationFile(string const fname){ int slsDetector::writeConfigurationFile(string const fname){ - + int nvar; string names[]={ \ "hostname", \ "caldir", \ @@ -7839,12 +7843,16 @@ int slsDetector::writeConfigurationFile(string const fname){ case MYTHEN: names[2]="trimdir"; break; + case GOTTHARD: + names[3]="outdir"; + names[4]="clientip"; + names[5]="clientmac"; + nvar=6; + break; default: - ; + nvar=19; } - - int nvar=19; ofstream outfile; int iv=0; char *args[100]; diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index 5fcf6dadf..9e445ce49 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -374,6 +374,10 @@ typedef struct sharedSlsDetector { */ virtual int writeConfigurationFile(string const fname); + /** + configures mac for gotthard readout + */ + int configureMAC(); /* It should be possible to dump all the settings of the detector (including trimbits, threshold energy, gating/triggering, acquisition time etc.