eiger reading master slave top bottom configuration from firmware;not reading from file anymore, serial is hardcoded for each master: also bug changes in gui getting frame from receiver in postprocessing

This commit is contained in:
Dhanya Maliakal 2015-02-23 15:13:14 +01:00
parent b2c7944014
commit d658799b20
16 changed files with 394 additions and 376 deletions

View File

@ -11,7 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include "xfs_types.h"
@ -89,7 +89,7 @@ void BebInfo_Print(struct BebInfo* bebInfo){
}
void Beb_Beb(int arg1){
void Beb_Beb(){
Beb_send_ndata = 0;
Beb_send_buffer_size = 1026;
@ -137,14 +137,32 @@ void Beb_Beb(int arg1){
Beb_SetByteOrder();
/*
}
void Beb_GetModuleCopnfiguration(int* master, int* top){
*top = 0;
*master = 0;
//mapping new memory to read master top module configuration
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");
*/
int ret = Local_GetModuleConfiguration(ll_beb_new_memory,XPAR_PLB_GPIO_SYS_BASEADDR, MODULE_CONFIGURATION);
if(!ret)
printf("Module Configuration FAIL\n");
else{
printf("Module Configuration OK\n");
printf("Beb: value =0x%x\n",ret);
if(ret&0xf){
*top = 1;
// printf("Beb.c: TOP\n\n\n\n");
}//else printf("Beb.c: BOTTOM\n\n\n\n");
if(ret&0x200){
*master = 1;
// printf("Beb.c: MASTER\n\n\n\n");
}//else printf("Beb.c: SLAVE\n\n\n\n");
}
}

View File

@ -40,8 +40,6 @@ struct BebInfo{
void Beb_ClearBebInfos();
int Beb_InitBebInfos();
int Beb_ReadSetUpFromFile(char* file_name);
@ -67,9 +65,7 @@ struct BebInfo{
int Beb_SetByteOrder();
void Beb_Beb(int arg1);
void Beb_Beb();
int Beb_SetBebSrcHeaderInfos(unsigned int beb_number, int ten_gig, char* src_mac, char* src_ip, unsigned int src_port);

View File

@ -53,9 +53,9 @@ unsigned int Feb_Control_trimbit_size;
unsigned int* Feb_Control_last_downloaded_trimbits;
int Feb_Control_current_mod;
int Feb_Control_module_number;
int Feb_Control_current_index;
int Feb_Control_am_i_master;
void Module_Module(struct Module* mod,unsigned int number, unsigned int address_top){
unsigned int i;
@ -151,85 +151,29 @@ int Feb_Control_IsBottomModule(){
int Feb_Control_GetModuleNumber(){
return Feb_Control_current_mod;
return Feb_Control_module_number;
}
void Feb_Control_FebControl(){
Feb_Control_staticBits=Feb_Control_acquireNReadoutMode=Feb_Control_triggerMode=Feb_Control_externalEnableMode=Feb_Control_subFrameMode=0;
Feb_Control_trimbit_size=263680;
Feb_Control_last_downloaded_trimbits = malloc(Feb_Control_trimbit_size * sizeof(int));
/*
printf("\nDefault Settings:\n");
Feb_Control_nimages = 1;
Feb_Control_exposure_time_in_sec = 1;
Feb_Control_exposure_period_in_sec = 0;
Feb_Control_SetTestModeVariable(0);
//SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15);
//SetRateCorrection(0); //deactivate rate correction
Feb_Control_SetDynamicRange(16);
Feb_Control_SetPhotonEnergy(8000);
Feb_Control_SetReadoutMode(0);
Feb_Control_SetReadoutSpeed(0);
Feb_Control_SetTriggerMode(0,1);
Feb_Control_SetExternalEnableMode(0,1);
printf("\n\n");
Feb_Control_Init();
*/
/*
unsigned int reg_nums[1];
unsigned int reg_vals[1];
reg_nums[0]=DAQ_REG_CHIP_CMDS;
reg_vals[0]=(0|Feb_Control_acquireNReadoutMode|Feb_Control_triggerMode|Feb_Control_externalEnableMode|Feb_Control_subFrameMode);
if(!Feb_Interface_WriteRegisters(Feb_Control_AddressToAll(),1,reg_nums,reg_vals,0,0)){
printf("Trouble setting them up as slaves\n");;
}
*/
}
void Feb_Control_ClearModules(){
unsigned int i;
//for(i=0;i<moduleSize;i++) free(modules[i]);
moduleSize = 0;
}
int Feb_Control_Init(){
int Feb_Control_Init(int master, int top){
unsigned int i;
Feb_Control_ClearModules();
///*
Feb_Control_current_mod = 0;
Feb_Control_module_number = 0;
Feb_Control_current_index = 0;
Feb_Control_AddModule(0,0xff);//global send
//global send
Feb_Control_AddModule1(0,1,0xff,0,1);
Feb_Control_PrintModuleList();
//*/
Feb_Control_ReadSetUpFileToAddModules("/home/root/executables/setup.txt");
/*
printf("\nSetting detector defaults:\n");
Feb_Control_ReadSetUpFile(0,"/home/root/executables/setup.txt"); //send defaults to all
/* for(i=1;i<moduleSize;i++){
char st[2000];
sprintf(st,"setup_mod%04d.txt",Module_GetModuleNumber(&modules[i]));
Feb_Control_ReadSetUpFile(Module_GetModuleNumber(&modules[i]),st);
}*/
//get module nummber
int res=0;
char hostname[100];
@ -237,38 +181,66 @@ int Feb_Control_Init(){
puts(hostname);
else
perror("gethostname");
char *pch;
pch = strtok(hostname,"0");
pch = strtok(NULL,"0");
sscanf(pch,"%d",&res);
Feb_Control_module_number = (res & 0xFF);
Feb_Control_current_mod = (res & 0xFF);
//get serial
int serial=1;
switch(Feb_Control_module_number){
case 34: serial = 0; break; //martin
case 31: serial = 0; break; //dhanya
case 26: serial = 0; break; //leo
case 32: serial = 1; break;
case 24: serial = 2; break;
case 25: serial = 3; break;
}
printf("serial: %d\n",serial);
Feb_Control_current_index = 1;
for(i=1;i<moduleSize;i++){
if(Module_GetModuleNumber(&modules[i])==Feb_Control_current_mod)
/*for(i=1;i<moduleSize;i++){
if(Module_GetModuleNumber(&modules[i])==Feb_Control_module_number)
Feb_Control_current_index = i;
}
printf("****current index:%d\n",i);
*/
//Feb_Control_ReadSetUpFileToAddModules("/home/root/executables/setup.txt");
/*Feb_Control_ReadSetUpFile(Feb_Control_current_mod,"/home/root/executables/setup.txt");
printf("Done setting detector defaults\n");*/
//Add the half module
Feb_Control_AddModule1(Feb_Control_module_number,top,serial,serial,1);
Feb_Control_PrintModuleList();
unsigned int nfebs = 0;
unsigned int* feb_list = malloc(moduleSize*4 * sizeof(unsigned int));
for(i=1;i<moduleSize;i++){
if(Module_TopAddressIsValid(&modules[i])){
feb_list[nfebs++] = Module_GetTopRightAddress(&modules[i]);
feb_list[nfebs++] = Module_GetTopLeftAddress(&modules[i]);
}
if(Module_BottomAddressIsValid(&modules[i])){
feb_list[nfebs++] = Module_GetBottomRightAddress(&modules[i]);
feb_list[nfebs++] = Module_GetBottomLeftAddress(&modules[i]);
}
}
Feb_Interface_SendCompleteList(nfebs,feb_list);
free(feb_list);
printf("\n");
Feb_Interface_SetByteOrder();
Feb_Control_am_i_master = 0;
return 1;
}
/*
void Feb_Control_Set_Master(){
Feb_Control_am_i_master = 1;
/*
unsigned int halfmastermodule = 0x80000000;
unsigned int reg_nums[1];
unsigned int reg_vals[1];
@ -280,12 +252,9 @@ void Feb_Control_Set_Master(){
return 0;
}
printf("master is set\n");
*/
}
*/
@ -418,9 +387,9 @@ int Feb_Control_CheckModuleAddresses(struct Module* m){
}
int Feb_Control_AddModule(unsigned int module_number, unsigned int top_address){
return Feb_Control_AddModule1(module_number,0,top_address,0,1);
return Feb_Control_AddModule1(module_number,1,top_address,0,1);
}
int Feb_Control_AddModule1(unsigned int module_number, int bottom_enable, unsigned int top_address, unsigned int bottom_address, int half_module){ //bot_address 0 for half module
int Feb_Control_AddModule1(unsigned int module_number, int top_enable, unsigned int top_address, unsigned int bottom_address, int half_module){ //bot_address 0 for half module
int parameters_ok = 1;
unsigned int pre_module_index = 0;
if(Feb_Control_GetModuleIndex(module_number,&pre_module_index)){
@ -438,7 +407,7 @@ int Feb_Control_AddModule1(unsigned int module_number, int bottom_enable, unsign
/* if((half_module)&& (top_address != 1)) Module_Module(m,module_number,top_address);
else if(half_module) Module_ModuleBottom(m,module_number,top_address);*/
if ((half_module)&& (!bottom_enable)) Module_Module(m,module_number,top_address);
if ((half_module)&& (top_enable)) Module_Module(m,module_number,top_address);
else if (half_module) Module_ModuleBottom(m,module_number,bottom_address);
else Module_Module1(m,module_number,top_address,bottom_address);
@ -726,7 +695,7 @@ float Feb_Control_DACToVoltage(unsigned int digital,unsigned int nsteps,float vm
int Feb_Control_SetHighVoltage(float value){
return Feb_Control_SetHighVoltage1(Feb_Control_current_mod,value);
return Feb_Control_SetHighVoltage1(Feb_Control_module_number,value);
}
int Feb_Control_SetHighVoltage1(unsigned int module_num,float value){

View File

@ -67,9 +67,8 @@ int Module_GetBottomDACValue(struct Module* mod,unsigned int i);
int Feb_Control_IsBottomModule();
int Feb_Control_GetModuleNumber();
void Feb_Control_Set_Master();
void Feb_Control_ClearModules();
void Feb_Control_PrintModuleList();
@ -77,7 +76,7 @@ void Feb_Control_Set_Master();
int Feb_Control_CheckModuleAddresses(struct Module* m);
int Feb_Control_AddModule(unsigned int module_number, unsigned int top_address);
/*int Feb_Control_AddModule(unsigned int module_number, unsigned int top_address, unsigned int bottom_address, int half_module=0);*/
int Feb_Control_AddModule1(unsigned int module_number, int bottom_enable, unsigned int top_address, unsigned int bottom_address, int half_module);
int Feb_Control_AddModule1(unsigned int module_number, int top_enable, unsigned int top_address, unsigned int bottom_address, int half_module);
int Feb_Control_GetDACNumber(char* s, unsigned int* n);
int Feb_Control_SendDACValue(unsigned int dst_num, unsigned int ch, unsigned int* value);
@ -111,9 +110,7 @@ void Feb_Control_Set_Master();
void Feb_Control_FebControl();
int Feb_Control_Init();
int Feb_Control_Init(int master, int top);
int Feb_Control_ReadSetUpFileToAddModules(char* file_name);
int Feb_Control_ReadSetUpFile(unsigned int module_num, char* file_name);
int Feb_Control_CheckSetup();

View File

@ -177,7 +177,7 @@ int Feb_Interface_WriteMemoryInLoops(unsigned int sub_num, unsigned int mem_num,
ndata_countdown-=n_to_send;
ndata_sent +=n_to_send;
start_address +=n_to_send;
usleep(0);//500 works
usleep(500);//500 works
}
return passed;
}

View File

@ -25,51 +25,36 @@ Local_LocalLinkInterface1(struct LocalLinkInterface* ll,unsigned int ll_fifo_bad
Local_Reset(ll);
printf("\tFIFO Status : 0x%08x\n",Local_StatusVector(ll));
}else printf("\tError LocalLink Mappping : 0x%08x\n",ll_fifo_badr);
printf("\n\n");
}
/*~LocalLinkInterface(){};*/
Local_LocalLinkInterface(struct LocalLinkInterface* ll){
printf("Initialize new memory\n");
printf("Initializing new memory\n");
}
int Local_InitNewMemory (struct LocalLinkInterface* ll,unsigned int addr, int ifg){
unsigned int CSP0BASE;
int fd;
/*fd = open("/dev/mem", O_RDWR | O_SYNC, 0);
int Local_GetModuleConfiguration (struct LocalLinkInterface* ll, u_int32_t baseaddr, u_int32_t offset){
int fd = open("/dev/mem", O_RDWR | O_SYNC, 0);
if (fd == -1) {
printf("\nCan't find /dev/mem!\n");
return 0;
}
printf("/dev/mem opened\n");
CSP0BASE = (u_int32_t)mmap(0, 0x1000, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, addr);
u_int32_t CSP0BASE = (u_int32_t)mmap(0, 0x100000, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fd, baseaddr);
if (CSP0BASE == (u_int32_t)MAP_FAILED) {
printf("\nCan't map memmory area!!\n");
return 0;
}
printf("CSP0 mapped\n");
volatile u_int8_t *ptr1;
ptr1=(u_int8_t*)(CSP0BASE);
printf("pointer val=%x\n",(void*)ptr1);
printf("ifg_control=%02x\n",*ptr1);
*ptr1=ifg;
printf("ifg_control new=%02x\n",*ptr1);
volatile u_int32_t *ptr1;
ptr1=(u_int32_t*)(CSP0BASE + offset);
//printf("LocalLinkInterface:: value:%d\n",*ptr1);
close(fd);
*/
return 1;
return *ptr1;
}

View File

@ -6,6 +6,7 @@
#include "xfs_types.h"
#include "HardwareIO.h"
#include <sys/types.h>
/*class LocalLinkInterface: public HardwareIO{ //*/
@ -35,7 +36,7 @@ struct LocalLinkInterface{
int Local_Test(struct LocalLinkInterface* ll,unsigned int buffer_len, void *buffer);
void Local_LocalLinkInterface(struct LocalLinkInterface* ll);
int Local_InitNewMemory (struct LocalLinkInterface* ll,unsigned int addr, int ifg);
int Local_GetModuleConfiguration (struct LocalLinkInterface* ll, u_int32_t baseaddr, u_int32_t offset);
/*
int FiFoReset(unsigned int numb);

View File

@ -56,9 +56,10 @@ int dst_requested[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
int default_dac_values[16] = {0,2480,3300,1400,4000,2556,1000,1000,4000,1000,1000,1000,1000,200,2000,1550};
enum masterFlags masterMode=NO_MASTER;
int bottom = 0;
//enum masterFlags trialMasterMode=NO_MASTER;
enum masterFlags masterMode=IS_SLAVE;
int top = 0;
int master = 0;
int initDetector(){
int imod,i,n;
@ -71,6 +72,7 @@ int initDetector(){
//#endif
//Allocation of memory
detectorModules=malloc(n*sizeof(sls_detector_module));
detectorChips=malloc(n*NCHIP*sizeof(int));
@ -107,23 +109,22 @@ int initDetector(){
sAdc=noneSelected;
*/
//Feb and Beb Initializations
getModuleConfiguration();
Feb_Interface_FebInterface();
Feb_Control_FebControl();
Feb_Control_Init();
printf("FEb control constructor done\n");
Beb_Beb(-1);
printf("BEB constructor done\n");
Feb_Control_Init(master,top);
printf("FEB Initialization done\n");
Beb_Beb();
printf("BEB Initialization done\n");
//get dac values
//Get dac values
int retval[2];
for(i=0;i<(detectorModules)->ndac;i++)
setDAC((enum detDacIndex)i,default_dac_values[i],(detectorModules)->module,0,retval);
/* initialize dynamic range etc. */
//set number of frames to 1
//setting default measurement parameters
setTimer(FRAME_NUMBER,1);
setTimer(ACQUISITION_TIME,1E9);
setTimer(FRAME_PERIOD,1E9);
@ -134,40 +135,42 @@ int initDetector(){
setHighVolage(150,0);
setIODelay(675,0);
setTiming(AUTO_TIMING);
//setMaster(GET_MASTER);
//SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15);
//SetRateCorrection(0); //deactivate rate correction
int enable[2] = {0,1};
setExternalGating(enable);//disable external gating
Feb_Control_SetTestModeVariable(0);
Feb_Control_CheckSetup();
//top or bottom
bottom = Feb_Control_IsBottomModule();
/*if(getDetectorNumber()==0xbeb031)
bottom = 0;
else bottom = 1;
*/
if(bottom)
printf("BOTTOM ***************\n");
else
printf("TOP ***************\n");
//if(getDetectorNumber()==0xbeb031){
// printf("************** master ********************\n");
// trialMasterMode = IS_MASTER;
//Feb_Control_Set_Master();
// }
//else printf("************** slave ********************\n");
printf("\n");
return 1;
}
int initDetectorStop(){
getModuleConfiguration();
Feb_Interface_FebInterface();
Feb_Control_Init(master,top);
printf("FEB Initialization done\n");
/* Beb_Beb(-1);
printf("BEB constructor done\n");*/
printf("\n");
return 1;
}
void getModuleConfiguration(){
int *m=&master;
int *t=&top;
Beb_GetModuleCopnfiguration(m,t);
if(top) printf("*************** TOP ***************\n");
else printf("*************** BOTTOM ***************\n");
if(master) printf("*************** MASTER ***************\n");
else printf("*************** SLAVE ***************\n");
}
int setNMod(int nm, enum dimension dim){
return 1;
@ -483,8 +486,7 @@ enum detectorSettings setSettings(enum detectorSettings sett, int imod){
int startReceiver(int d){
//if(trialMasterMode == IS_MASTER)
if(!bottom)
if(master)
Feb_Control_PrepareForAcquisition();
return OK;
}
@ -492,8 +494,7 @@ int startReceiver(int d){
int startStateMachine(){
int ret;int i=0;
//if(trialMasterMode == IS_MASTER){
if(!bottom){
if(master){
printf("Going to start acquisition\n");
Feb_Control_StartAcquisition();
}
@ -507,7 +508,7 @@ int ret;int i=0;
//if(trialMasterMode == IS_MASTER){
if(!bottom){
if(master){
/*
if(getRunStatus() == IDLE){
for(i=0;i<100000;i++){

View File

@ -49,6 +49,8 @@ XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_BASEADDR
#define XPAR_PLB_GPIO_SYS_BASEADDR 0xD1000000
#define XPAR_PLB_GPIO_SYS_HIGHADDR 0xD100FFFF
/* Master Slave Top Bottom Definition */
#define MODULE_CONFIGURATION 0x84
/* Definitions for peripheral PLB_GPIO_TEST */
#define XPAR_PLB_GPIO_TEST_BASEADDR 0xD1010000
@ -60,7 +62,7 @@ XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_BASEADDR
#define XPAR_PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_LEFT_HIGHADDR 0xC410FFFF
/* Definitions for a new memory */
#define XPAR_PLB_LL_NEW_MEMORY 0xC4200000
//#define XPAR_PLB_LL_NEW_MEMORY 0xD1000000//0xD1000084//0xC4200000
/* Definitions for peripheral PLB_LL_FIFO_AURORA_DUAL_CTRL_FEB_RIGHT */

View File

@ -4542,7 +4542,7 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
return NULL;
}
int n;
int n,complete=OK;
int i,k,offsetX, offsetY, maxX, maxY; double dr;
int* retval=new int[nel];
int *retdet, *p=retval;
@ -4560,9 +4560,11 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
retdet=detectors[id]->readFrameFromReceiver(fName,fIndex);
if(detectors[id]->getErrorMask())
setErrorMask(getErrorMask()|(1<<id));
if ((retdet) &&(fIndex!=-1)) {
if (retdet){
if (fIndex==-1)
complete = FAIL;
else{
n=detectors[id]->getDataBytes();
if(getDetectorsType() == EIGER){
//cout << "fname:"<<fName<<" findex:"<<fIndex<<endl;
//cout<<"n:"<<n<<endl;
@ -4596,6 +4598,7 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
}
}
fullFName.append(getReceiverFileNameToConcatenate(fName));
}
}else {
#ifdef VERBOSE
cout << "Receiver for detector " << id << " does not have data left " << endl;
@ -4607,6 +4610,9 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
}
fullFName.append(ext);
strcpy(fName,fullFName.c_str());
//if some of the receivers did not give data, dont count it
if((getDetectorsType() == EIGER) &&(complete ==FAIL))
fIndex = -1;
return retval;
};

View File

@ -342,14 +342,26 @@ void slsDetectorUtils::acquire(int delflag){
}
pthread_mutex_unlock(&mg);
}else{
pthread_mutex_lock(&mg);
startReceiverReadout();
acquiringDone = 1;
pthread_mutex_unlock(&mg);
// wait until data processing thread has taken the last frame
if (*threadedProcessing) {
sem_wait(&sem_queue);
pthread_mutex_lock(&mg);
acquiringDone = 0;
pthread_mutex_unlock(&mg);
}
pthread_mutex_lock(&mg);
/* startReceiverReadout();
while(getReceiverStatus() != RUN_FINISHED){
pthread_mutex_unlock(&mg);
usleep(50000);
pthread_mutex_lock(&mg);
}
*/
stopReceiver();
pthread_mutex_unlock(&mg);
}

View File

@ -522,6 +522,7 @@ void* postProcessing::processData(int delflag) {
cout<<flush;
usleep(20000);
//get progress
pthread_mutex_lock(&mg);
if(setReceiverOnline() == ONLINE_FLAG)
@ -532,7 +533,27 @@ void* postProcessing::processData(int delflag) {
if(currentfIndex != -1)
setCurrentProgress(currentfIndex+1);
if (checkJoinThread()) break;
/** IF detector acquisition is done, let the acquire() thread know to finish up and force join thread */
if(acquiringDone == 1){
#ifdef VERY_VERY_DEBUG
cout << "acquiring seems to be done" << endl;
#endif
//so that only once it checks for last frame and then next time, checks join thread
pthread_mutex_lock(&mg);
acquiringDone = 2;
pthread_mutex_unlock(&mg);
//newData = true;
}else if (acquiringDone == 2){
#ifdef VERY_VERY_DEBUG
cout << "gonna post for it to end" << endl;
#endif
sem_post(&sem_queue);
#ifdef VERY_VERY_DEBUG
cout << "Sem posted" << endl;
#endif
//newData = false;
}else if (checkJoinThread())
break;
if (dataReady){
@ -544,6 +565,9 @@ void* postProcessing::processData(int delflag) {
}
if(newData){
#ifdef VERY_VERY_DEBUG
cout << "new data" << endl;
#endif
if(setReceiverOnline()==ONLINE_FLAG){
//get data
strcpy(currentfName,"");
@ -569,6 +593,9 @@ void* postProcessing::processData(int delflag) {
//not garbage frame
if (currentfIndex >= 0) {
#ifdef VERY_VERY_DEBUG
cout<<"GOT data"<<endl;
#endif
fdata = decodeData(receiverData);
delete [] receiverData;
if ((fdata) && (dataReady)){
@ -578,13 +605,21 @@ void* postProcessing::processData(int delflag) {
delete thisData;
fdata = NULL;
progress = currentfIndex;
#ifdef VERY_VERY_DEBUG
cout << "progress:" << progress << endl;
#endif
/*if(!nthframe) //unnecessary to read every data, 09.12.2014**/
newData = false;
#ifdef VERY_VERY_DEBUG
cout << "newData set to false" << endl;
#endif
}
}
#ifdef VERY_VERY_DEBUG
else{
;//cout<<"****Detector returned mismatched indices/garbage or acquisition is over. Trying again.***"<<endl;
cout<<"****Detector returned mismatched indices/garbage or acquisition is over. Trying again.***"<<endl;
}
#endif
}
}
}

View File

@ -19,8 +19,9 @@ Here are the definitions, but the actual implementation should be done for each
void getModuleConfiguration();
int initDetector();
int initDetectorStop();
int setNMod(int nm, enum dimension dim);
int getNModBoard(enum dimension arg);

View File

@ -64,6 +64,8 @@ int main(int argc, char *argv[]){
#endif
printf("\nReady...\n\n");
/* waits for connection */
while(retval!=GOODBYE) {
#ifdef VERBOSE

View File

@ -47,18 +47,11 @@ int init_detector(int b) {
#ifdef VIRTUAL
printf("This is a VIRTUAL detector\n");
#endif
//only for control server
if(b){
#ifdef SLS_DETECTOR_FUNCTION_LIST
initDetector();
if(b) initDetector();
else initDetectorStop();
#endif
}else{
Feb_Interface_FebInterface();
Feb_Control_Init();
// printf("FEb control constructor done\n");
/* Beb_Beb(-1);
printf("BEB constructor done\n");*/
}
strcpy(mess,"dummy message");
strcpy(lastClientIP,"none");
strcpy(thisClientIP,"none1");