- 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

@@ -345,8 +345,7 @@
}
}
/*--------------------------------------------------------------------*/
static int VarInterestCallback(int iEvent, void *pEvent, void *pUser,
commandContext cc)
static int VarInterestCallback(int iEvent, void *pEvent, void *pUser)
{
SConnection *pCon;
char pBueffel[512];
@@ -360,7 +359,13 @@
pVar = (pSicsVariable)pEvent;
pCon = (SConnection *)pUser;
SCPushContext2(pCon,cc);
/* check kill conditions */
if(pCon == NULL || !SCisConnected(pCon))
{
return -1;
}
switch(pVar->eType)
{
case veInt:
@@ -386,7 +391,6 @@
status = 1;
break;
}
SCPopContext(pCon);
return status;
}
/*----------------------------------------------------------------------*/
@@ -536,17 +540,16 @@ static int VarSetFromText(pSicsVariable self, SConnection *pCon, char *text)
}
else if(strcmp(pCurrent->text,"interest") == 0) /* interest */
{
lID = RegisterCallback(pVar->pCall, SCGetContext(pCon),
lID = RegisterCallback(pVar->pCall,
VALUECHANGE, VarInterestCallback,
pCon, NULL);
SCRegister(pCon,pInterp, pVar->pCall,lID);
SCCopyConnection(pCon), SCDeleteConnection);
DeleteTokenList(pList);
SCSendOK(pCon);
return 1;
}
else if(strcmp(pCurrent->text,"uninterest") == 0)
{
RemoveCallback2(pVar->pCall,pCon);
RemoveCallbackCon(pVar->pCall,pCon);
DeleteTokenList(pList);
SCSendOK(pCon);
return 1;