mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 10:00:40 +02:00
opened the eiger detector server to configuremac commands
This commit is contained in:
parent
1bd69fa18f
commit
28a8a3c79f
@ -359,6 +359,10 @@ int executeTrimming(enum trimMode mode, int par1, int par2, int imod){
|
||||
}
|
||||
|
||||
|
||||
int configureMAC(int ipad, long long int imacadd, long long int iservermacadd, int dtb=0){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int calculateDataBytes(){
|
||||
return 0;
|
||||
|
@ -4917,7 +4917,7 @@ char* slsDetector::setReceiver(string receiverIP){
|
||||
strcpy(thisDetector->receiver_hostname,receiverIP.c_str());
|
||||
|
||||
if(setReceiverOnline(ONLINE_FLAG)==ONLINE_FLAG){
|
||||
//#ifdef VERBOSE
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Setting up receiver with" << endl;
|
||||
std::cout << "detector type:" << slsDetectorBase::getDetectorType(thisDetector->myDetectorType) << endl;
|
||||
std::cout << "detector hostname:" << thisDetector->hostname << endl;
|
||||
@ -4931,7 +4931,7 @@ char* slsDetector::setReceiver(string receiverIP){
|
||||
std::cout << "frame number:" << thisDetector->timerValue[FRAME_NUMBER] << endl;
|
||||
std::cout << "dynamic range:" << thisDetector->dynamicRange << endl << endl;
|
||||
/** enable compresison, */
|
||||
//#endif
|
||||
#endif
|
||||
if(setDetectorType()!= GENERIC){
|
||||
setDetectorHostname();
|
||||
setFilePath(fileIO::getFilePath());
|
||||
@ -4949,9 +4949,7 @@ char* slsDetector::setReceiver(string receiverIP){
|
||||
setTimer(FRAME_NUMBER,thisDetector->timerValue[FRAME_NUMBER]);
|
||||
setDynamicRange(thisDetector->dynamicRange);
|
||||
//set scan tag
|
||||
if(thisDetector->myDetectorType != EIGER){
|
||||
setUDPConnection();
|
||||
}
|
||||
setUDPConnection();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,8 +84,11 @@ int executeTrimming(enum trimMode mode, int par1, int par2, int imod);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef MYTHEND
|
||||
int configureMAC(int ipad, long long int imacadd, long long int iservermacadd, int dtb=0);
|
||||
#endif
|
||||
|
||||
#ifdef GOTTHARDD
|
||||
int configureMAC(int ipad, long long int imacadd, long long int iservermacadd, int dtb);
|
||||
int loadImage(enum imageType index, char *imageVals);
|
||||
int readCounterBlock(int startACQ, char *counterVals);
|
||||
int resetCounterBlock(int startACQ);
|
||||
|
@ -2885,12 +2885,12 @@ int execute_trimming(int file_des) {
|
||||
|
||||
int configure_mac(int file_des) {
|
||||
|
||||
int retval;
|
||||
int retval=-1;
|
||||
int ret=OK,ret1=OK;
|
||||
char arg[3][50];
|
||||
int n;
|
||||
|
||||
#ifdef GOTTHARDD
|
||||
#ifndef MYTHEND
|
||||
int imod=0;//should be in future sent from client as -1, arg[2]
|
||||
int ipad;
|
||||
long long int imacadd;
|
||||
@ -2905,9 +2905,9 @@ int configure_mac(int file_des) {
|
||||
ret=FAIL;
|
||||
}
|
||||
|
||||
#ifndef GOTTHARDD
|
||||
ret = FAIL;
|
||||
strcpy(mess,"Not applicable/implemented for this detector\n");
|
||||
#ifdef MYTHEND
|
||||
ret = FAIL;
|
||||
strcpy(mess,"Not applicable/implemented for this detector\n");
|
||||
#else
|
||||
sscanf(arg[0], "%x", &ipad);
|
||||
sscanf(arg[1], "%llx", &imacadd);
|
||||
@ -2921,7 +2921,7 @@ int configure_mac(int file_des) {
|
||||
#endif
|
||||
#ifdef VERBOSE
|
||||
int i;
|
||||
printf("\ndigital_test_bit in server %d\t",digitalTestBit);
|
||||
/*printf("\ndigital_test_bit in server %d\t",digitalTestBit);for gotthard*/
|
||||
printf("\nipadd %x\t",ipad);
|
||||
printf("destination ip is %d.%d.%d.%d = 0x%x \n",(ipad>>24)&0xff,(ipad>>16)&0xff,(ipad>>8)&0xff,(ipad)&0xff,ipad);
|
||||
printf("macad:%llx\n",imacadd);
|
||||
@ -2936,7 +2936,8 @@ int configure_mac(int file_des) {
|
||||
#ifdef SLS_DETECTOR_FUNCTION_LIST
|
||||
if (ret==OK) {
|
||||
/*retval=configureMAC(ipad,imacadd,iservermacadd,digitalTestBit);*/
|
||||
if(retval==-1) ret=FAIL;
|
||||
retval=configureMAC(ipad,imacadd,iservermacadd);
|
||||
/*if(retval==-1) ret=FAIL;*/
|
||||
}
|
||||
#endif
|
||||
#ifdef VERBOSE
|
||||
|
Loading…
x
Reference in New Issue
Block a user