- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
15
perfmon.c
15
perfmon.c
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user