getRunStatus becomes purely virtual in slsDetector and returns already the runStatus type variable

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@14 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2010-04-19 14:46:34 +00:00
parent 26765a30b7
commit 2dd7b2c67b
5 changed files with 58 additions and 25 deletions

View File

@@ -1594,7 +1594,7 @@ int get_run_status(int fnum) {
int n;
int retval;
enum runStatus s;
sprintf(mess,"getting run status\n");
#ifdef VERBOSE
@@ -1603,6 +1603,22 @@ int get_run_status(int fnum) {
retval= runState();
if (retval&0x8000)
s=ERROR;
else if (retval&0x00000001)
if (retval&0x00010000)
s=TRANSMITTING;
else
s=RUNNING;
else if (retval&0x00010000)
s=RUN_FINISHED;
else if (retval&0x00000008)
s=WAITING;
else
s=IDLE;
if (ret!=OK) {
printf("get status failed\n");
}
@@ -1611,7 +1627,7 @@ int get_run_status(int fnum) {
if (ret!=OK) {
n += sendDataOnly(mess,strlen(mess)+1);
} else {
n += sendDataOnly(&retval,sizeof(retval));
n += sendDataOnly(&s,sizeof(s));
}
return ret;