- 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 SKIPPED: psi/amor2t.c psi/amorstat.c psi/dornier2.c psi/ecb.c psi/el734hp.c psi/fowrite.c psi/libpsi.a psi/make_gen psi/nextrics.c psi/pardef.c psi/pimotor.c psi/pipiezo.c psi/polterwrite.c psi/psi.c psi/scontroller.c psi/serial.c psi/tasinit.c psi/tasscan.c psi/tcpdocho.c psi/tcpdornier.c psi/tricssupport.c psi/velodornier.c
This commit is contained in:
43
scan.c
43
scan.c
@ -1236,7 +1236,8 @@ int isScanVarSoft(pScanData self){
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int ScanInterest(int iEvent, void *pEventData, void *pUser)
|
||||
static int ScanInterest(int iEvent, void *pEventData, void *pUser,
|
||||
commandContext cc)
|
||||
{
|
||||
pScanData self = NULL;
|
||||
SConnection *pCon = NULL;
|
||||
@ -1253,12 +1254,12 @@ int isScanVarSoft(pScanData self){
|
||||
|
||||
if(iEvent == SCANSTART)
|
||||
{
|
||||
SCWrite(pCon,"NewScan",eWarning);
|
||||
SCWriteInContext(pCon,"NewScan",eWarning,cc);
|
||||
return 1;
|
||||
}
|
||||
else if(iEvent == SCANEND)
|
||||
{
|
||||
SCWrite(pCon,"ScanEnd",eWarning);
|
||||
SCWriteInContext(pCon,"ScanEnd",eWarning,cc);
|
||||
return 1;
|
||||
}
|
||||
else if(iEvent == SCANPOINT)
|
||||
@ -1299,7 +1300,8 @@ int isScanVarSoft(pScanData self){
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int ScanDynInterest(int iEvent, void *pEventData, void *pUser)
|
||||
static int ScanDynInterest(int iEvent, void *pEventData, void *pUser,
|
||||
commandContext cc)
|
||||
{
|
||||
pScanData self = NULL;
|
||||
SConnection *pCon = NULL;
|
||||
@ -1319,12 +1321,12 @@ int isScanVarSoft(pScanData self){
|
||||
|
||||
if(iEvent == SCANSTART)
|
||||
{
|
||||
SCWrite(pCon,"NewScan",eWarning);
|
||||
SCWriteInContext(pCon,"NewScan",eWarning,cc);
|
||||
return 1;
|
||||
}
|
||||
else if(iEvent == SCANEND)
|
||||
{
|
||||
SCWrite(pCon,"ScanEnd",eWarning);
|
||||
SCWriteInContext(pCon,"ScanEnd",eWarning,cc);
|
||||
return 1;
|
||||
}
|
||||
else if(iEvent == SCANPOINT)
|
||||
@ -1346,12 +1348,13 @@ int isScanVarSoft(pScanData self){
|
||||
}
|
||||
snprintf(pBueffel,255,"%s.scanpoint = {%d %f %ld}",
|
||||
self->objectName,i,fVal,lVal);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
SCWriteInContext(pCon,pBueffel,eValue,cc);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int ScanUUInterest(int iEvent, void *pEventData, void *pUser)
|
||||
static int ScanUUInterest(int iEvent, void *pEventData, void *pUser,
|
||||
commandContext cc)
|
||||
{
|
||||
pScanData self = NULL;
|
||||
SConnection *pCon = NULL;
|
||||
@ -1368,12 +1371,12 @@ int isScanVarSoft(pScanData self){
|
||||
|
||||
if(iEvent == SCANSTART)
|
||||
{
|
||||
SCWrite(pCon,"NewScan",eWarning);
|
||||
SCWriteInContext(pCon,"NewScan",eWarning,cc);
|
||||
return 1;
|
||||
}
|
||||
else if(iEvent == SCANEND)
|
||||
{
|
||||
SCWrite(pCon,"ScanEnd",eWarning);
|
||||
SCWriteInContext(pCon,"ScanEnd",eWarning,cc);
|
||||
return 1;
|
||||
}
|
||||
else if(iEvent == SCANPOINT)
|
||||
@ -1395,7 +1398,9 @@ int isScanVarSoft(pScanData self){
|
||||
{
|
||||
iData[i] = htonl((int)lData[i]);
|
||||
}
|
||||
SCPushContext2(pCon,cc);
|
||||
SCWriteUUencoded(pCon,"ScanData",iData,self->iNP*sizeof(int));
|
||||
SCPopContext(pCon);
|
||||
free(lData);
|
||||
free(iData);
|
||||
return 1;
|
||||
@ -1896,13 +1901,13 @@ static int DumpScan(pScanData self, SConnection *pCon)
|
||||
/*-------- interest */
|
||||
else if(strcmp(argv[1],"interest") == 0)
|
||||
{
|
||||
lID = RegisterCallback(self->pCall, SCANSTART, ScanInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANSTART, ScanInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
lID = RegisterCallback(self->pCall, SCANEND, ScanInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANEND, ScanInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
lID = RegisterCallback(self->pCall, SCANPOINT, ScanInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANPOINT, ScanInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
SCSendOK(pCon);
|
||||
@ -1911,13 +1916,13 @@ static int DumpScan(pScanData self, SConnection *pCon)
|
||||
/*-------- interest */
|
||||
else if(strcmp(argv[1],"dyninterest") == 0)
|
||||
{
|
||||
lID = RegisterCallback(self->pCall, SCANSTART, ScanDynInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANSTART, ScanDynInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
lID = RegisterCallback(self->pCall, SCANEND, ScanDynInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon), SCANEND, ScanDynInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
lID = RegisterCallback(self->pCall, SCANPOINT, ScanDynInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANPOINT, ScanDynInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
SCSendOK(pCon);
|
||||
@ -1926,13 +1931,13 @@ static int DumpScan(pScanData self, SConnection *pCon)
|
||||
/*-------- uuinterest */
|
||||
else if(strcmp(argv[1],"uuinterest") == 0)
|
||||
{
|
||||
lID = RegisterCallback(self->pCall, SCANSTART, ScanUUInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANSTART, ScanUUInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
lID = RegisterCallback(self->pCall, SCANEND, ScanUUInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANEND, ScanUUInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
lID = RegisterCallback(self->pCall, SCANPOINT, ScanUUInterest,
|
||||
lID = RegisterCallback(self->pCall, SCGetContext(pCon),SCANPOINT, ScanUUInterest,
|
||||
pCon, NULL);
|
||||
SCRegister(pCon,pSics, self->pCall,lID);
|
||||
SCSendOK(pCon);
|
||||
|
Reference in New Issue
Block a user