- Added a sinq module for monitoring the Accelerator broadcast
- Added automatic notification via SMS SKIPPED: psi/dgrambroadcast.c psi/dgrambroadcast.h psi/make_gen psi/psi.c psi/sinq.c psi/sinq.h
This commit is contained in:
26
fourtable.c
26
fourtable.c
@ -21,6 +21,7 @@ typedef struct {
|
||||
char scanVar[30];
|
||||
double step;
|
||||
int np;
|
||||
float preset;
|
||||
}FourTableEntry, *pFourTableEntry;
|
||||
/*==================== functions =======================================*/
|
||||
int MakeFourCircleTable(){
|
||||
@ -52,8 +53,8 @@ static void printList(int handle, SConnection *pCon){
|
||||
status = LLDnodePtr2First(handle);
|
||||
while(status == 1) {
|
||||
LLDnodeDataTo(handle,&entry);
|
||||
snprintf(pBueffel,131,"%8.3f %s %8.3f %d\n", entry.twoThetaEnd,
|
||||
entry.scanVar,entry.step, entry.np);
|
||||
snprintf(pBueffel,131,"%8.3f %10s %8.3f %d %8.3f\n", entry.twoThetaEnd,
|
||||
entry.scanVar,entry.step, entry.np,entry.preset);
|
||||
Tcl_DStringAppend(&list,pBueffel,-1);
|
||||
printed = 1;
|
||||
status = LLDnodePtr2Next(handle);
|
||||
@ -153,6 +154,12 @@ static int addToList(int handle, SConnection *pCon, int argc, char *argv[]){
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
entry.preset = -1.0;
|
||||
if(argc > 7){
|
||||
if(isNumeric(argv[7])){
|
||||
entry.preset = atof(argv[7]);
|
||||
}
|
||||
}
|
||||
insertEntry(handle,entry);
|
||||
return 1;
|
||||
}
|
||||
@ -273,6 +280,17 @@ double GetFourCircleStep(int handle, double two_theta){
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
float GetFourCirclePreset(int handle, double two_theta){
|
||||
FourTableEntry entry;
|
||||
|
||||
entry = findEntry(handle,two_theta);
|
||||
if(strcmp(entry.scanVar,"NOT FOUND") == 0){
|
||||
return -999.99;
|
||||
} else {
|
||||
return entry.preset;
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
int GetFourCircleScanNP(int handle, double two_theta){
|
||||
FourTableEntry entry;
|
||||
|
||||
@ -292,9 +310,9 @@ int SaveFourCircleTable(int handle, char *objName, FILE *fd){
|
||||
status = LLDnodePtr2Last(handle);
|
||||
while(status != 0) {
|
||||
LLDnodeDataTo(handle,&entry);
|
||||
fprintf(fd,"%s table add %f %s %f %d\n",objName,
|
||||
fprintf(fd,"%s table add %f %s %f %d %f\n",objName,
|
||||
entry.twoThetaEnd,entry.scanVar,
|
||||
entry.step,entry.np);
|
||||
entry.step,entry.np,entry.preset);
|
||||
status = LLDnodePtr2Prev(handle);
|
||||
}
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user