- Added Sycamore protocol and command context to SICS
- Added sinfo to SICS - Added driver for TCP/IP Astrium velocity selector - Added driver for TCP/IP Astrium chopper controller
This commit is contained in:
18
tasinit.c
18
tasinit.c
@ -261,7 +261,8 @@ static int TasSaveStatus(void *self, char *name, FILE *fd)
|
||||
used on the variables which switch the counter box into the appropriate
|
||||
mode.
|
||||
-----------------------------------------------------------------------*/
|
||||
static int MonitorCallback(int iEvent, void *pEvent, void *pUser)
|
||||
static int MonitorCallback(int iEvent, void *pEvent, void *pUser,
|
||||
commandContext cc)
|
||||
{
|
||||
pTASdata self = (pTASdata)pUser;
|
||||
assert(self);
|
||||
@ -274,7 +275,8 @@ static int MonitorCallback(int iEvent, void *pEvent, void *pUser)
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
static int TimerCallback(int iEvent, void *pEvent, void *pUser)
|
||||
static int TimerCallback(int iEvent, void *pEvent, void *pUser,
|
||||
commandContext cc)
|
||||
{
|
||||
pTASdata self = (pTASdata)pUser;
|
||||
assert(self);
|
||||
@ -309,7 +311,8 @@ static int RecalcAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
to allow for the analyzer shielding to settle down. This is done
|
||||
through this callback function
|
||||
---------------------------------------------------------------------------*/
|
||||
static int A6WaitCallback(int iEvent, void *pEventData, void *pUserData)
|
||||
static int A6WaitCallback(int iEvent, void *pEventData, void *pUserData,
|
||||
commandContext cc)
|
||||
{
|
||||
if(iEvent == MOTEND)
|
||||
{
|
||||
@ -340,6 +343,7 @@ int TASFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
pSicsVariable pVar = NULL;
|
||||
CommandList *pCom = NULL;
|
||||
pMotor pMot = NULL;
|
||||
commandContext comCon;
|
||||
|
||||
/* check arguments*/
|
||||
if(argc < 2)
|
||||
@ -404,14 +408,16 @@ int TASFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
the variables should have been accessed earlier on.
|
||||
*/
|
||||
pVar = FindVariable(pSics,"MN");
|
||||
comCon.transID = 0;
|
||||
strncpy(comCon.deviceID,"internal",SCDEVIDLEN);
|
||||
if(pVar)
|
||||
{
|
||||
RegisterCallback(pVar->pCall,VALUECHANGE,MonitorCallback,pNew,NULL);
|
||||
RegisterCallback(pVar->pCall,comCon,VALUECHANGE,MonitorCallback,pNew,NULL);
|
||||
}
|
||||
pVar = FindVariable(pSics,"TI");
|
||||
if(pVar)
|
||||
{
|
||||
RegisterCallback(pVar->pCall,VALUECHANGE,TimerCallback,pNew,NULL);
|
||||
RegisterCallback(pVar->pCall,comCon,VALUECHANGE,TimerCallback,pNew,NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -420,7 +426,7 @@ int TASFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
pMot = FindMotor(pSics,"a6");
|
||||
if(pMot != NULL)
|
||||
{
|
||||
RegisterCallback(pMot->pCall,MOTEND,A6WaitCallback,NULL,NULL);
|
||||
RegisterCallback(pMot->pCall,comCon,MOTEND,A6WaitCallback,NULL,NULL);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user