- 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

@ -480,8 +480,7 @@
return 1;
}
/*------------------------------------------------------------------------*/
static int WaveLengthCallBack(int iEvent, void *pEvent, void *pUser,
commandContext cc)
static int WaveLengthCallBack(int iEvent, void *pEvent, void *pUser)
{
SConnection *pCon = NULL;
pSelVar self = NULL;
@ -493,9 +492,14 @@
assert(pCon);
assert(self);
if(pCon == NULL || !SCisConnected(pCon))
{
return -1;
}
fVal = GetSelValue(self,pCon);
sprintf(pBueffel,"%s.value = %f", self->name, fVal);
SCWriteInContext(pCon,pBueffel,eValue,cc);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
/*--------------------------------------------------------------------------
@ -527,10 +531,9 @@
strtolower(argv[1]);
if(strcmp(argv[1],"interest") == 0)
{
lID = RegisterCallback(self->pCall, SCGetContext(pCon),
lID = RegisterCallback(self->pCall,
WLCHANGE, WaveLengthCallBack,
pCon, NULL);
SCRegister(pCon,pSics, self->pCall,lID);
SCCopyConnection(pCon), SCDeleteConnection);
SCSendOK(pCon);
return 1;
}
@ -570,7 +573,7 @@
{
fWave = GetMonoPosition(self->pSel,pCon);
sprintf(pBueffel,"%s = %f",argv[0],fWave);
SCWrite(pCon,pBueffel,eStatus);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
return 0;
@ -597,10 +600,9 @@
strtolower(argv[1]);
if(strcmp(argv[1],"interest") == 0)
{
lID = RegisterCallback(self->pCall, SCGetContext(pCon),
lID = RegisterCallback(self->pCall,
WLCHANGE, WaveLengthCallBack,
pCon, NULL);
SCRegister(pCon,pSics, self->pCall,lID);
SCSendOK(pCon);
return 1;
}
@ -644,7 +646,7 @@
fWave = 777.77;
}
sprintf(pBueffel,"%s = %f",argv[0],fWave);
SCWrite(pCon,pBueffel,eStatus);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
return 0;