mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
virtual servers: redundant declarations fixed
This commit is contained in:
parent
5192dae9c5
commit
ac1c40d6f9
@ -23,7 +23,6 @@ add_subdirectory(ctbDetectorServer)
|
|||||||
add_subdirectory(eigerDetectorServer)
|
add_subdirectory(eigerDetectorServer)
|
||||||
add_subdirectory(gotthardDetectorServer)
|
add_subdirectory(gotthardDetectorServer)
|
||||||
add_subdirectory(jungfrauDetectorServer)
|
add_subdirectory(jungfrauDetectorServer)
|
||||||
#add_subdirectory(moenchDetectorServer)
|
|
||||||
add_subdirectory(mythen3DetectorServer)
|
add_subdirectory(mythen3DetectorServer)
|
||||||
add_subdirectory(gotthard2DetectorServer)
|
add_subdirectory(gotthard2DetectorServer)
|
||||||
add_subdirectory(moenchDetectorServer)
|
add_subdirectory(moenchDetectorServer)
|
||||||
|
@ -5,13 +5,11 @@
|
|||||||
#include "communication_funcs_UDP.h"
|
#include "communication_funcs_UDP.h"
|
||||||
#include "UDPPacketHeaderGenerator.h"
|
#include "UDPPacketHeaderGenerator.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
|
||||||
#include "AD7689.h" // slow adcs
|
#include "AD7689.h" // slow adcs
|
||||||
#include "LTC2620.h" // dacs
|
#include "LTC2620.h" // dacs
|
||||||
#include "MAX1932.h" // hv
|
#include "MAX1932.h" // hv
|
||||||
#include "INA226.h" // i2c
|
#include "INA226.h" // i2c
|
||||||
#include "ALTERA_PLL.h" // pll
|
#include "ALTERA_PLL.h" // pll
|
||||||
#include "blackfin.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h> // usleep
|
#include <unistd.h> // usleep
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#include "RegisterDefs.h"
|
#include "RegisterDefs.h"
|
||||||
#include "versionAPI.h"
|
#include "versionAPI.h"
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
#include "nios.h"
|
|
||||||
#include "DAC6571.h"
|
#include "DAC6571.h"
|
||||||
#include "LTC2620_Driver.h"
|
#include "LTC2620_Driver.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -3,10 +3,8 @@
|
|||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
#include "RegisterDefs.h"
|
#include "RegisterDefs.h"
|
||||||
|
|
||||||
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
|
||||||
#include "AD9252.h" // old board compatibility
|
#include "AD9252.h" // old board compatibility
|
||||||
#include "LTC2620.h" // dacs
|
#include "LTC2620.h" // dacs
|
||||||
#include "blackfin.h"
|
|
||||||
|
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include <unistd.h> // usleep
|
#include <unistd.h> // usleep
|
||||||
|
@ -2,11 +2,9 @@
|
|||||||
#include "versionAPI.h"
|
#include "versionAPI.h"
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
|
|
||||||
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
|
||||||
#include "LTC2620.h" // dacs
|
#include "LTC2620.h" // dacs
|
||||||
#include "MAX1932.h" // hv
|
#include "MAX1932.h" // hv
|
||||||
#include "ALTERA_PLL.h" // pll
|
#include "ALTERA_PLL.h" // pll
|
||||||
#include "blackfin.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
#include "communication_funcs_UDP.h"
|
#include "communication_funcs_UDP.h"
|
||||||
|
@ -4,12 +4,9 @@
|
|||||||
|
|
||||||
#include "communication_funcs_UDP.h"
|
#include "communication_funcs_UDP.h"
|
||||||
#include "UDPPacketHeaderGenerator.h"
|
#include "UDPPacketHeaderGenerator.h"
|
||||||
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
|
||||||
#include "LTC2620.h" // dacs
|
#include "LTC2620.h" // dacs
|
||||||
#include "MAX1932.h" // hv
|
#include "MAX1932.h" // hv
|
||||||
#include "ALTERA_PLL.h" // pll
|
#include "ALTERA_PLL.h" // pll
|
||||||
#include "blackfin.h"
|
|
||||||
#include "readDefaultPattern.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "slsDetectorFunctionList.h"
|
#include "slsDetectorFunctionList.h"
|
||||||
#include "versionAPI.h"
|
#include "versionAPI.h"
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
#include "nios.h"
|
|
||||||
#include "DAC6571.h"
|
#include "DAC6571.h"
|
||||||
#include "LTC2620_Driver.h"
|
#include "LTC2620_Driver.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -3,14 +3,26 @@
|
|||||||
#ifdef GOTTHARDD
|
#ifdef GOTTHARDD
|
||||||
#include "clogger.h" // runState(enum TLogLevel)
|
#include "clogger.h" // runState(enum TLogLevel)
|
||||||
#endif
|
#endif
|
||||||
#ifndef VIRTUAL
|
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||||
|
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
||||||
|
#endif
|
||||||
|
#ifdef MOENCHD
|
||||||
|
#include "readDefaultPattern.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||||
#include "programFpgaNios.h"
|
#include "programFpgaNios.h"
|
||||||
#elif defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
#elif defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
||||||
#include "programFpgaBlackfin.h"
|
#include "programFpgaBlackfin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||||
|
#include "nios.h"
|
||||||
|
#elif defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||||
|
#include "blackfin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h> // FILE
|
#include <stdio.h> // FILE
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -107,9 +119,6 @@ int readRegister(uint32_t offset, uint32_t* retval);
|
|||||||
#elif GOTTHARDD
|
#elif GOTTHARDD
|
||||||
uint32_t writeRegister16And32(uint32_t offset, uint32_t data); //FIXME its not there in ctb or moench?
|
uint32_t writeRegister16And32(uint32_t offset, uint32_t data); //FIXME its not there in ctb or moench?
|
||||||
uint32_t readRegister16And32(uint32_t offset);
|
uint32_t readRegister16And32(uint32_t offset);
|
||||||
#else
|
|
||||||
extern u_int32_t writeRegister(u_int32_t offset, u_int32_t data); // blackfin.h or nios.h
|
|
||||||
extern u_int32_t readRegister(u_int32_t offset); // blackfin.h or nios.h
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -271,16 +280,6 @@ int setThresholdEnergy(int ev);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// parameters - dac, adc, hv
|
// parameters - dac, adc, hv
|
||||||
#ifdef GOTTHARDD
|
|
||||||
extern void AD9252_Set(int addr, int val); // AD9252.h (old board)
|
|
||||||
#endif
|
|
||||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
|
||||||
extern void AD9257_Set(int addr, int val); // AD9257.h
|
|
||||||
#endif
|
|
||||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
|
||||||
extern int AD9257_GetVrefVoltage(int mV); // AD9257.h
|
|
||||||
extern int AD9257_SetVrefVoltage(int val, int mV); // AD9257.h
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef GOTTHARD2D
|
#ifdef GOTTHARD2D
|
||||||
int setOnChipDAC(enum ONCHIP_DACINDEX ind, int chipIndex, int val);
|
int setOnChipDAC(enum ONCHIP_DACINDEX ind, int chipIndex, int val);
|
||||||
@ -382,10 +381,6 @@ int getFrequency(enum CLKINDEX ind);
|
|||||||
void configureSyncFrequency(enum CLKINDEX ind);
|
void configureSyncFrequency(enum CLKINDEX ind);
|
||||||
void setPipeline(enum CLKINDEX ind, int val);
|
void setPipeline(enum CLKINDEX ind, int val);
|
||||||
int getPipeline(enum CLKINDEX ind);
|
int getPipeline(enum CLKINDEX ind);
|
||||||
extern void eraseFlash(); // programFpgaBlackfin.h
|
|
||||||
extern int startWritingFPGAprogram(FILE** filefp); // programFpgaBlackfin.h
|
|
||||||
extern void stopWritingFPGAprogram(FILE* filefp); // programFpgaBlackfin.h
|
|
||||||
extern int writeFPGAProgram(char* fpgasrc, uint64_t fsize, FILE* filefp); // programFpgaBlackfin.h
|
|
||||||
// patterns
|
// patterns
|
||||||
uint64_t writePatternIOControl(uint64_t word);
|
uint64_t writePatternIOControl(uint64_t word);
|
||||||
uint64_t writePatternClkControl(uint64_t word);
|
uint64_t writePatternClkControl(uint64_t word);
|
||||||
@ -403,9 +398,6 @@ uint64_t getPatternMask();
|
|||||||
void setPatternBitMask(uint64_t mask);
|
void setPatternBitMask(uint64_t mask);
|
||||||
uint64_t getPatternBitMask();
|
uint64_t getPatternBitMask();
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOENCHD
|
|
||||||
extern int loadDefaultPattern(char* fname); // readDefaultPattern.h
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// jungfrau specific - powerchip, autocompdisable, clockdiv, asictimer, clock, pll, flashing firmware
|
// jungfrau specific - powerchip, autocompdisable, clockdiv, asictimer, clock, pll, flashing firmware
|
||||||
#ifdef JUNGFRAUD
|
#ifdef JUNGFRAUD
|
||||||
@ -422,10 +414,6 @@ int validatePhaseinDegrees(enum CLKINDEX ind, int val, int retval);
|
|||||||
int setThresholdTemperature(int val);
|
int setThresholdTemperature(int val);
|
||||||
int setTemperatureControl(int val);
|
int setTemperatureControl(int val);
|
||||||
int setTemperatureEvent(int val);
|
int setTemperatureEvent(int val);
|
||||||
extern void eraseFlash(); // programFpgaBlackfin.h
|
|
||||||
extern int startWritingFPGAprogram(FILE** filefp); // programFpgaBlackfin.h
|
|
||||||
extern void stopWritingFPGAprogram(FILE* filefp); // programFpgaBlackfin.h
|
|
||||||
extern int writeFPGAProgram(char* fpgasrc, uint64_t fsize, FILE* filefp); // programFpgaBlackfin.h
|
|
||||||
void alignDeserializer();
|
void alignDeserializer();
|
||||||
|
|
||||||
// eiger specific - iodelay, pulse, rate, temp, activate, delay nw parameter
|
// eiger specific - iodelay, pulse, rate, temp, activate, delay nw parameter
|
||||||
@ -504,18 +492,6 @@ void setTimingSource(enum timingSourceType value);
|
|||||||
enum timingSourceType getTimingSource();
|
enum timingSourceType getTimingSource();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
|
||||||
extern void NotifyServerStartSuccess();
|
|
||||||
extern void CreateNotificationForCriticalTasks();
|
|
||||||
extern void rebootControllerAndFPGA(); // programFpgaNios.h
|
|
||||||
extern int findFlash(char* mess); // programFpgaNios.h
|
|
||||||
extern void eraseFlash(); // programFpgaNios.h
|
|
||||||
extern int eraseAndWriteToFlash(char* mess, char* fpgasrc, uint64_t fsize); // programFpgaNios.h
|
|
||||||
extern int writeFPGAProgram(char* mess, char* fpgasrc, uint64_t fsize, FILE* filefp); // programFpgaNios.h
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(JUNGFRAUD) || defined(EIGERD)
|
#if defined(JUNGFRAUD) || defined(EIGERD)
|
||||||
int getTenGigaFlowControl();
|
int getTenGigaFlowControl();
|
||||||
int setTenGigaFlowControl(int value);
|
int setTenGigaFlowControl(int value);
|
||||||
|
@ -20,7 +20,7 @@ void validate64(int64_t arg, int64_t retval, char* modename, enum numberMode num
|
|||||||
int executeCommand(char* command, char* result, enum TLogLevel level);
|
int executeCommand(char* command, char* result, enum TLogLevel level);
|
||||||
int M_nofunc(int);
|
int M_nofunc(int);
|
||||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||||
extern void rebootControllerAndFPGA();
|
void rebootNiosControllerAndFPGA();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// functions called by client
|
// functions called by client
|
||||||
|
@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
|
|||||||
FILE_LOG(logINFORED,("Rebooting!\n"));
|
FILE_LOG(logINFORED,("Rebooting!\n"));
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||||
rebootControllerAndFPGA();
|
rebootNiosControllerAndFPGA();
|
||||||
#else
|
#else
|
||||||
system("reboot");
|
system("reboot");
|
||||||
#endif
|
#endif
|
||||||
|
@ -611,6 +611,11 @@ int M_nofunc(int file_des) {
|
|||||||
return Server_SendResult(file_des, OTHER, NO_UPDATE, NULL, 0);
|
return Server_SendResult(file_des, OTHER, NO_UPDATE, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||||
|
void rebootNiosControllerAndFPGA() {
|
||||||
|
rebootControllerAndFPGA();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int exec_command(int file_des) {
|
int exec_command(int file_des) {
|
||||||
ret = OK;
|
ret = OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user