- Fixed conflicts in ascon.c

- Supressed superfluous message from fmess
- Expanded multicounter to deal with threshold commands nicely
- Fixed an an issue with an uninitialized dummy connection in nserver
- Many changes to simidex to make it work in a more reliable way.
- Added hdbfactory path alias targetpath
- Extended frame to deal with sinqhttp HM
This commit is contained in:
koennecke
2009-03-09 08:28:08 +00:00
parent de4ca7a5e9
commit 10a475f020
21 changed files with 469 additions and 102 deletions

View File

@ -30,6 +30,10 @@
#include "matrix/matrix.h"
#include "cell.h"
#include "fourlib.h"
#include "counter.h"
#include "scanvar.h"
#include "scan.i"
#include "sdynar.h"
extern void SNXFormatTime(char *pBueffel, int iLen);
@ -226,7 +230,6 @@ static int FourMessStart(pSICSOBJ self, SConnection * pCon,
priv->count = 0;
return 1;
}
/*----------------------------------------------------------------------------*/
static int FourMessScanPar(pSICSOBJ self, SConnection * pCon,
pHdb commandNode, pHdb par[], int nPar)
@ -255,7 +258,52 @@ static int FourMessScanPar(pSICSOBJ self, SConnection * pCon,
}
return 1;
}
/*--------------------------------------------------------------------------*/
static int FourMessPrepareScan(pScanData self)
{
pVarEntry pVar = NULL;
void *pDings;
int i, iRet;
float fVal;
char pBueffel[512];
char pMessage[1024];
assert(self);
assert(self->pCon);
/* check boundaries of scan variables and allocate storage */
for (i = 0; i < self->iScanVar; i++) {
DynarGet(self->pScanVar, i, &pDings);
pVar = (pVarEntry) pDings;
if (pVar) {
iRet = CheckScanVar(pVar, self->pCon, self->iNP - 1);
if (!iRet) {
return 0;
}
InitScanVar(pVar);
} else {
SCWrite(self->pCon,
"WARNING: Internal error, no scan variable, I try to continue",
eLog);
}
pVar = NULL;
} /* end for */
/* configure counter */
SetCounterMode((pCounter) self->pCounterData, self->iMode);
SetCounterPreset((pCounter) self->pCounterData, self->fPreset);
self->iCounts = 0;
return 1;
}
/*-----------------------------------------------------------------------------*/
static int FourMessPrepareCmd(pSICSOBJ self, SConnection * pCon,
pHdb commandNode, pHdb par[], int nPar)
{
pFourMess priv = self->pPrivate;
return FourMessPrepareScan(priv->pScanner);
}
/*----------------------------------------------------------------------------*/
static hdbCallbackReturn SetScannerCB(pHdb node, void *userData,
pHdbMessage mm)
@ -780,6 +828,10 @@ void InstallFourMess(SConnection * pCon, SicsInterp * pSics)
AddSICSHdbPar(pNew->objectNode, "close", usUser,
MakeSICSFunc(FourMessClose));
cmd =
AddSICSHdbPar(pNew->objectNode, "prepare", usUser,
MakeSICSFunc(FourMessPrepareCmd));
cmd =
AddSICSHdbPar(pNew->objectNode, "scanpar", usUser,
MakeSICSFunc(FourMessScanPar));