works but usleep required

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@115 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-02-14 10:39:37 +00:00
parent ba833233b9
commit 2e15e9c2db
5 changed files with 80 additions and 39 deletions

View File

@ -94,7 +94,7 @@ int decode_function(int file_des) {
#endif
n = receiveDataOnly(file_des,&fnum,sizeof(fnum));
if (n <= 0) {
printf("ERROR reading from socket %d, %d %d\n", n, fnum, file_des);
//printf("ERROR reading from socket %d, %d %d\n", n, fnum, file_des);
return FAIL;
}
#ifdef VERBOSE
@ -1853,6 +1853,16 @@ int get_run_status(int file_des) {
retval= runState();
printf("\n\nSTATUS=%x\n",retval);
if (retval&0x00000001){
printf("-----------------------------------RUNNING-----------------------------------\n");
s=RUNNING;
}
else{
printf("-----------------------------------IDLE----------------------------------\n");
s=IDLE;
}
/*
if (retval&0x8000)
s=ERROR;
else if (retval&0x00000001)
@ -1867,7 +1877,7 @@ int get_run_status(int file_des) {
s=WAITING;
else
s=IDLE;
*/
if (ret!=OK) {
@ -1995,6 +2005,7 @@ int read_all(int file_des) {
while(read_frame(file_des)==OK) {
//usleep(0);
#ifdef VERBOSE
printf("frame read\n");
#endif