- Reworked the connection object and the IO system

- Reworked the support for TRICS
- Added a second generation motor
This commit is contained in:
koennecke
2009-02-03 08:05:39 +00:00
parent f6d595665e
commit 361ee9ebea
119 changed files with 16455 additions and 3674 deletions

View File

@@ -423,7 +423,7 @@ static void ListMesure(pMesure self, char *name, SConnection *pCon)
self->iCounts++;
return 1;
}
}
/*------------------------------------------------------------------------*/
static int getMesureNP(pMesure self, double twoTheta)
{
@@ -671,7 +671,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
AddScanVar(self->pScanner, pServ->pSics,pCon,self->pCOmega,
fStart, stepWidth);
snprintf(pBueffel,131,"Scanning om from %f with step %f", fStart, stepWidth);
SCWrite(pCon,pBueffel,eValue);
SCWrite(pCon,pBueffel,eLog);
/*
Oksana does not want o2t scans to be tightly coupled, this is why we
cannot use the normal o2t scan variable. Instead we calculate new limits and
@@ -688,7 +688,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
AddScanVar(self->pScanner, pServ->pSics,pCon,self->pC2Theta,
fStart, stepWidth);
snprintf(pBueffel,131,"Scanning 2theta from %f with step %f", fStart, stepWidth);
SCWrite(pCon,pBueffel,eValue);
SCWrite(pCon,pBueffel,eLog);
}
/*
@@ -744,7 +744,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
/*
redo scan with preset * 5
*/
SCWrite(pCon,"Remeasuring weak reflection",eWarning);
SCWrite(pCon,"Remeasuring weak reflection",eLog);
iRet = SilentScan(self->pScanner,np,self->CountMode,
fPreset*5.,pServ->pSics,pCon);
@@ -811,7 +811,9 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
/* do the logfile */
strcpy(pFilename,pRoot);
strcat(pFilename,"log");
/* TODO
self->iLogFile = SCAddLogFile(pCon,pFilename);
*/
self->pCon = pCon;
/*
@@ -916,7 +918,9 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
strcat(pFile,"/");
strcat(pFile,fileroot);
strcat(pFile,".log");
/* TODO:
self->iLogFile = SCAddLogFile(pCon,pFile);
*/
self->pCon = pCon;
/*
@@ -960,7 +964,9 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
{
assert(self);
SCDelLogFile(self->pCon,self->iLogFile);
/* TODO
* SCDelLogFile(self->pCon,self->iLogFile);
*/
if(self->psd == 1)
{
self->pCon = NULL;
@@ -1094,7 +1100,7 @@ static double getProtonAverage(pMesure self){
self->fPosition[0], self->fPosition[1],
self->fPosition[2],self->fPosition[3],
fSum,fSigma);
SCWrite(pCon,pBueffel,eStatus);
SCWrite(pCon,pBueffel,eLog);
/* get temperature */
fTemp = -777.77;
@@ -1218,7 +1224,7 @@ static double getProtonAverage(pMesure self){
/* make a mark */
SNXFormatTime(pTime,131);
sprintf(pBueffel,"Starting at list %s at %s",pFile,pTime);
SCWrite(pCon,pBueffel,eStatus);
SCWrite(pCon,pBueffel,eLog);
/* skippy! */
for(i = 0; i < iSkip; i++)
@@ -1272,7 +1278,7 @@ static double getProtonAverage(pMesure self){
/* we are done */
SNXFormatTime(pTime,131);
sprintf(pBueffel,"Finishing list %s at %s",pFile,pTime);
SCWrite(pCon,pBueffel,eStatus);
SCWrite(pCon,pBueffel,eLog);
fclose(fd);
return 1;
@@ -1366,7 +1372,7 @@ static double getProtonAverage(pMesure self){
/* make a mark */
SNXFormatTime(pTime,131);
sprintf(pBueffel,"Starting at list %s at %s",pFile,pTime);
SCWrite(pCon,pBueffel,eStatus);
SCWrite(pCon,pBueffel,eLog);
/* skippy! */
for(i = 0; i < iSkip; i++)
@@ -1409,7 +1415,7 @@ static double getProtonAverage(pMesure self){
/* we are done */
SNXFormatTime(pTime,131);
sprintf(pBueffel,"Finishing list %s at %s",pFile,pTime);
SCWrite(pCon,pBueffel,eStatus);
SCWrite(pCon,pBueffel,eLog);
fclose(fd);
return 1;