- Enhanced and debugged histogram memory for AMOR
* added PROJECT both in HM and driver code * added single detector support. - Removed several bugs in the AMOR data bit. - Updated documentation
This commit is contained in:
36
SCinter.c
36
SCinter.c
@ -37,6 +37,8 @@
|
||||
MODIFICATIONS.
|
||||
|
||||
M. Zolliker, Sept 2000, introduced formal aliases, modifications marked M.Z
|
||||
Mark Koennecke, August 2001, modified SicsWriteStatus to write motor
|
||||
positions on demand.
|
||||
---------------------------------------------------------------------------*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -45,12 +47,8 @@
|
||||
#include <string.h>
|
||||
#include <tcl.h>
|
||||
#include "fortify.h"
|
||||
#include "conman.h"
|
||||
#include "sics.h"
|
||||
#include "splitter.h"
|
||||
#include "Scommon.h"
|
||||
#include "SCinter.h"
|
||||
#include "obdes.h"
|
||||
#include "devexec.h"
|
||||
#include "servlog.h"
|
||||
#include "macro.h"
|
||||
/* M.Z. */
|
||||
@ -311,12 +309,15 @@ extern char *SkipSpace(char *pPtr);
|
||||
return NULL;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
int WriteSicsStatus(SicsInterp *self, char *file)
|
||||
int WriteSicsStatus(SicsInterp *self, char *file, int iMot)
|
||||
{
|
||||
CommandList *pCurrent = NULL;
|
||||
FILE *fd = NULL;
|
||||
Dummy *pDum = NULL;
|
||||
|
||||
float fVal;
|
||||
pIDrivable pDriv = NULL;
|
||||
void *pTest = NULL;
|
||||
|
||||
assert(self);
|
||||
assert(file);
|
||||
|
||||
@ -346,9 +347,30 @@ extern char *SkipSpace(char *pPtr);
|
||||
if(pDum)
|
||||
{
|
||||
pDum->pDescriptor->SaveStatus(pCurrent->pData,pCurrent->pName,fd);
|
||||
if(iMot)
|
||||
{
|
||||
/*
|
||||
save values of motors but not of environment devices as they
|
||||
may not be present the next time round
|
||||
*/
|
||||
pDriv = pDum->pDescriptor->GetInterface(pDum,DRIVEID);
|
||||
pTest = pDum->pDescriptor->GetInterface(pDum,ENVIRINTERFACE);
|
||||
if(pDriv && !pTest)
|
||||
{
|
||||
fVal = pDriv->GetValue(pDum,pServ->dummyCon);
|
||||
if(fVal > -990.)
|
||||
{
|
||||
fprintf(fd,"run %s %f\n",pCurrent->pName, fVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pCurrent = pCurrent->pNext;
|
||||
}
|
||||
if(iMot)
|
||||
{
|
||||
fprintf(fd,"Success \n");
|
||||
}
|
||||
fclose(fd);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user