- Adding first working version of the McStas SICS connection to cvs

This commit is contained in:
koennecke
2005-06-22 07:10:09 +00:00
parent 348ef0e81b
commit b12e896286

View File

@ -22,6 +22,7 @@
#include "motor.h"
#include "sicsvar.h"
#include "polterwrite.h"
#include "sicsvar.h"
/*
diaphragm1 - chopper
@ -152,20 +153,31 @@ static void writeDiaphragm2(NXhandle hfil, NXdict hdict,
static void writeSample(NXhandle hfil, NXdict hdict,
SConnection *pCon)
{
pSicsVariable active = NULL;
int iActive;
SNXSPutVariable(pServ->pSics,pCon,hfil,hdict,"sdist","dia2_sample");
SNXSPutVariable(pServ->pSics,pCon,hfil,hdict,"chopperdist","chopper_sample");
SNXSPutVariable(pServ->pSics,pCon,hfil,hdict,"saname","sample");
SNXSPutVariable(pServ->pSics,pCon,hfil,hdict,"senvir","environment");
/*
SNXSPutEVVar(hfil,hdict,"temperature",pCon,"stemp","stddev");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "srsu", "rsu");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "srsu0", "rsu");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "srsl", "rsl");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "srsl0", "rsl");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "srsa", "rsa");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "srsa0", "rsa");
*/
if(FindCommandData(pServ->pSics,"temperature","Environment Controller")
!= NULL){
SNXSPutEVVar(hfil,hdict,"temperature",pCon,"stemp","stddev");
}
active = FindCommandData(pServ->pSics,"activetable","SicsVariable");
if(active != NULL){
VarGetInt(active,&iActive);
if(iActive == 1){
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "srsu", "rsu");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "srsu0", "rsu");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "srsl", "rsl");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "srsl0", "rsl");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "srsa", "rsa");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "srsa0", "rsa");
}
}
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "sshu", "shu");
SNXSPutMotorNull(pServ->pSics, pCon, hfil, hdict, "sshu0", "shu");
SNXSPutMotor(pServ->pSics, pCon, hfil, hdict, "sshl", "shl");