- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
26
tasscanub.c
26
tasscanub.c
@ -200,7 +200,7 @@ static int TASUBHeader(pScanData self)
|
||||
self->fd = fopen(self->pFile,"w");
|
||||
if(!self->fd)
|
||||
{
|
||||
SCWrite(self->pCon,"ERROR: cannot write data file",eError);
|
||||
SCWrite(self->pCon,"ERROR: cannot write data file",eLogError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ static int TASUBHeader(pScanData self)
|
||||
}
|
||||
else
|
||||
{
|
||||
SCWrite(self->pCon,"WARNING: failed to decode file number",eWarning);
|
||||
SCWrite(self->pCon,"WARNING: failed to decode file number",eLog);
|
||||
}
|
||||
|
||||
/* the bizarre R, A, V header */
|
||||
@ -561,7 +561,7 @@ static int TASUBHeader(pScanData self)
|
||||
/*
|
||||
write header to screen as well
|
||||
*/
|
||||
SCWrite(self->pCon,pHeader,eWarning);
|
||||
SCWrite(self->pCon,pHeader,eLog);
|
||||
|
||||
/*
|
||||
close the file, we will reopen later with append for the data
|
||||
@ -598,7 +598,7 @@ static int TASUBScanPoint(pScanData self, int iPoint)
|
||||
self->fd = fopen(self->pFile,"a");
|
||||
if(!self->fd)
|
||||
{
|
||||
SCWrite(self->pCon,"ERROR: cannot append to data file",eError);
|
||||
SCWrite(self->pCon,"ERROR: cannot append to data file",eLogError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -660,7 +660,7 @@ static int TASUBScanPoint(pScanData self, int iPoint)
|
||||
write both to file and onto screen
|
||||
*/
|
||||
fprintf(self->fd,"%s\n",pBueffel);
|
||||
SCWrite(self->pCon,pBueffel,eWarning);
|
||||
SCWrite(self->pCon,pBueffel,eLog);
|
||||
|
||||
/*
|
||||
close the file
|
||||
@ -785,12 +785,12 @@ static int TASUBScanCount(pScanData self, int iPoint)
|
||||
iRet = Wait4Success(GetExecutor());
|
||||
if(iRet == DEVINT)
|
||||
{
|
||||
SCWrite(self->pCon,"Counting aborted due to Interrupt",eStatus);
|
||||
SCWrite(self->pCon,"Counting aborted due to Interrupt",eLog);
|
||||
status = 0;
|
||||
}
|
||||
else if(iRet == DEVERROR)
|
||||
{
|
||||
SCWrite(self->pCon,"Counting finished with Problems",eStatus);
|
||||
SCWrite(self->pCon,"Counting finished with Problems",eLog);
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
@ -833,7 +833,7 @@ static int TASUBScanCount(pScanData self, int iPoint)
|
||||
{
|
||||
snprintf(pError,131,"WARNING: failed to read %s",
|
||||
ScanVarName(pVar));
|
||||
SCWrite(self->pCon,pError,eWarning);
|
||||
SCWrite(self->pCon,pError,eLog);
|
||||
}
|
||||
AppendScanVar(pVar,fVal);
|
||||
}
|
||||
@ -972,7 +972,7 @@ int TASUBPrepare(pScanData self)
|
||||
GetVarText("instrument"),
|
||||
pTAS->pScan->iNP, pTAS->pScan->iScanVar,
|
||||
pWork);
|
||||
SCWrite(self->pCon,pLine,eWarning);
|
||||
SCWrite(self->pCon,pLine,eLog);
|
||||
|
||||
if(GetCounterMode(pTAS->pScan->pCounterData) == eTimer)
|
||||
{
|
||||
@ -985,9 +985,9 @@ int TASUBPrepare(pScanData self)
|
||||
GetCounterPreset(pTAS->pScan->pCounterData));
|
||||
|
||||
}
|
||||
SCWrite(self->pCon,pLine,eWarning);
|
||||
SCWrite(self->pCon," ",eWarning);
|
||||
SCWrite(self->pCon," ",eWarning);
|
||||
SCWrite(self->pCon,pLine,eLog);
|
||||
SCWrite(self->pCon," ",eLog);
|
||||
SCWrite(self->pCon," ",eLog);
|
||||
|
||||
/*
|
||||
snprintf(pLine,1023,
|
||||
@ -1016,7 +1016,7 @@ int TASUBPrepare(pScanData self)
|
||||
getTasPar(pTAS->ub->current,KF),
|
||||
getTasPar(pTAS->ub->current,EF));
|
||||
}
|
||||
SCWrite(self->pCon,pLine,eWarning);
|
||||
SCWrite(self->pCon,pLine,eLog);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user