mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
file permissions problem crash in rxr fixed, increased usleep in postprocessing getting rxr data which gives better gui display, allowed for mythen and gotthard sending module compatibility for 64 bit temp solution
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@496 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
922bc929c8
commit
19ad1ae06e
@ -834,12 +834,22 @@ void slsDetector::deleteModule(sls_detector_module *myMod) {
|
|||||||
|
|
||||||
|
|
||||||
int slsDetector::sendChannel(sls_detector_channel *myChan) {
|
int slsDetector::sendChannel(sls_detector_channel *myChan) {
|
||||||
|
int ts=0;
|
||||||
|
if(thisDetector->myDetectorType == MYTHEN)
|
||||||
return controlSocket->SendDataOnly(myChan, sizeof(sls_detector_channel));
|
return controlSocket->SendDataOnly(myChan, sizeof(sls_detector_channel));
|
||||||
|
else{
|
||||||
|
ts+=controlSocket->SendDataOnly(myChan, 12 );
|
||||||
|
ts+=controlSocket->SendDataOnly(&(myChan->reg), 8 );
|
||||||
|
return(ts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int slsDetector::sendChip(sls_detector_chip *myChip) {
|
int slsDetector::sendChip(sls_detector_chip *myChip) {
|
||||||
int ts=0;
|
int ts=0;
|
||||||
|
if(thisDetector->myDetectorType == MYTHEN)
|
||||||
ts+=controlSocket->SendDataOnly(myChip,sizeof(sls_detector_chip));
|
ts+=controlSocket->SendDataOnly(myChip,sizeof(sls_detector_chip));
|
||||||
|
else
|
||||||
|
ts+=controlSocket->SendDataOnly(myChip,20); // 4 ints + pointless pointer
|
||||||
#ifdef VERY_VERBOSE
|
#ifdef VERY_VERBOSE
|
||||||
std::cout<< "chip structure sent" << std::endl;
|
std::cout<< "chip structure sent" << std::endl;
|
||||||
std::cout<< "now sending " << myChip->nchan << " channles" << std::endl;
|
std::cout<< "now sending " << myChip->nchan << " channles" << std::endl;
|
||||||
@ -855,7 +865,14 @@ int slsDetector::sendChip(sls_detector_chip *myChip) {
|
|||||||
|
|
||||||
int slsDetector::sendModule(sls_detector_module *myMod) {
|
int slsDetector::sendModule(sls_detector_module *myMod) {
|
||||||
int ts=0;
|
int ts=0;
|
||||||
|
if(thisDetector->myDetectorType == MYTHEN)
|
||||||
ts+=controlSocket->SendDataOnly(myMod,sizeof(sls_detector_module));
|
ts+=controlSocket->SendDataOnly(myMod,sizeof(sls_detector_module));
|
||||||
|
else{
|
||||||
|
ts+=controlSocket->SendDataOnly(myMod, 7*sizeof(int) + 16); // 7 ints + 4 useless pointers, considering 32bit os
|
||||||
|
ts+=controlSocket->SendDataOnly(&(myMod->gain), sizeof(double));
|
||||||
|
ts+=controlSocket->SendDataOnly(&(myMod->offset), sizeof(double));
|
||||||
|
}
|
||||||
|
|
||||||
ts+=controlSocket->SendDataOnly(myMod->dacs,sizeof(dacs_t)*(myMod->ndac));
|
ts+=controlSocket->SendDataOnly(myMod->dacs,sizeof(dacs_t)*(myMod->ndac));
|
||||||
ts+=controlSocket->SendDataOnly(myMod->adcs,sizeof(dacs_t)*(myMod->nadc));
|
ts+=controlSocket->SendDataOnly(myMod->adcs,sizeof(dacs_t)*(myMod->nadc));
|
||||||
ts+=controlSocket->SendDataOnly(myMod->chipregs,sizeof(int)*(myMod->nchip));
|
ts+=controlSocket->SendDataOnly(myMod->chipregs,sizeof(int)*(myMod->nchip));
|
||||||
|
@ -412,7 +412,7 @@ void* postProcessing::processData(int delflag) {
|
|||||||
cout.flush();
|
cout.flush();
|
||||||
cout<<flush;
|
cout<<flush;
|
||||||
if (checkJoinThread()) break;
|
if (checkJoinThread()) break;
|
||||||
usleep(20000);
|
usleep(200000);
|
||||||
|
|
||||||
pthread_mutex_lock(&mg);
|
pthread_mutex_lock(&mg);
|
||||||
caught=getReceiverCurrentFrameIndex();
|
caught=getReceiverCurrentFrameIndex();
|
||||||
|
@ -483,7 +483,10 @@ int slsReceiverFunctionList::startWriting(){
|
|||||||
if (cbAction<2) {
|
if (cbAction<2) {
|
||||||
rawDataReadyCallBack(currframenum, wbuf,sfilefd, guiData,pRawDataReady);
|
rawDataReadyCallBack(currframenum, wbuf,sfilefd, guiData,pRawDataReady);
|
||||||
} else {
|
} else {
|
||||||
|
if(sfilefd)
|
||||||
fwrite(wbuf, 1, bufferSize, sfilefd);
|
fwrite(wbuf, 1, bufferSize, sfilefd);
|
||||||
|
else
|
||||||
|
cout << "You do not have permissions to overwrite: " << savefilename << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user