diff --git a/slsDetectorSoftware/eigerDetectorServer/Beb.c b/slsDetectorSoftware/eigerDetectorServer/Beb.c index 4d77ac62d..a428774a1 100644 --- a/slsDetectorSoftware/eigerDetectorServer/Beb.c +++ b/slsDetectorSoftware/eigerDetectorServer/Beb.c @@ -42,6 +42,7 @@ short Beb_bit_mode; + void BebInfo_BebInfo(struct BebInfo* bebInfo, unsigned int beb_num){ bebInfo->beb_number=beb_num; bebInfo->serial_address=0; @@ -136,13 +137,14 @@ void Beb_Beb(int arg1){ Beb_SetByteOrder(); +/* ll_beb_new_memory = &ll_beb_new_memory_local; Local_LocalLinkInterface(ll_beb_new_memory); if(!Local_InitNewMemory(ll_beb_new_memory,XPAR_PLB_LL_NEW_MEMORY, arg1)) printf("New Memory FAIL\n"); else printf("New Memory OK\n"); - +*/ } @@ -156,6 +158,7 @@ void Beb_ClearBebInfos(){ int Beb_InitBebInfos(){//file name at some point Beb_ClearBebInfos(); + struct BebInfo b0; BebInfo_BebInfo(&b0,0); if(BebInfo_SetSerialAddress(&b0,0xff)) { //all bebs for reset and possibly get request data? @@ -173,6 +176,7 @@ int Beb_InitBebInfos(){//file name at some point beb_infos.push_back(b); */ + return Beb_CheckSourceStuffBebInfo(); } @@ -182,7 +186,7 @@ int Beb_SetBebSrcHeaderInfos(unsigned int beb_number, int ten_gig, char* src_mac //so that the values can be reset externally for now.... unsigned int i = Beb_GetBebInfoIndex(beb_number); - if(!i){ printf("returning 000\n");return 0;} //i must be greater than 0, zero is the global send + /******* if(!i) return 0;****************************/ //i must be greater than 0, zero is the global send BebInfo_SetHeaderInfo(&beb_infos[i],ten_gig,src_mac,src_ip,src_port); printf("Printing Beb info number (%d) :\n",i); @@ -254,12 +258,13 @@ int Beb_CheckSourceStuffBebInfo(){ } unsigned int Beb_GetBebInfoIndex(unsigned int beb_numb){ - if(!beb_numb) return 0; +/******************** if(!beb_numb) return 0;******************************/ unsigned int i; for(i=1;i0) - sprintf(str,"mod%d::%s",module_num,str); + sprintf(str,"%s",str); /*sprintf(str,"mod%d::%s",module_num,str);*/ if(!Feb_Control_SetDAC(str,f0,1)) printf("error in string: %s",str); } } fclose(fp); - +printf("Done reading set up file\n"); return 1; } int Feb_Control_CheckSetup(){ + printf("Checking Set up\n"); unsigned int i,j; int ok = 1; - for(i=0;inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; i++) { s1=detectors[i]->getRunStatus(); if(detectors[i]->getErrorMask()) setErrorMask(getErrorMask()|(1<