- 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

@ -147,8 +147,7 @@
return self->fCPS;
}
/*------------------- The CallBack function for interest ------------------*/
static int InterestCallback(int iEvent, void *pEvent, void *pUser,
commandContext cc)
static int InterestCallback(int iEvent, void *pEvent, void *pUser)
{
float *fPos;
SConnection *pCon;
@ -160,8 +159,13 @@
fPos = (float *)pEvent;
pCon = (SConnection *)pUser;
if(pCon == NULL || !SCisConnected(pCon))
{
return -1;
}
sprintf(pBueffel,"Performance = %f", *fPos);
SCWriteInContext(pCon,pBueffel,eValue,cc);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
/*----------------------------------------------------------------------------
@ -207,10 +211,9 @@
if(strcmp(argv[1],"interest") == 0)
{
lID = RegisterCallback(self->pCall, SCGetContext(pCon),
lID = RegisterCallback(self->pCall,
VALUECHANGE, InterestCallback,
pCon, NULL);
SCRegister(pCon,pSics, self->pCall,lID);
SCCopyConnection(pCon), SCDeleteConnection);
SCSendOK(pCon);
return 1;
}