Remove superfluous trailing white space from C files
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
W E S T 4 1 0 0 . C
|
||||
|
||||
|
||||
This is the implementation for a WEST4100 object derived from a more general
|
||||
environment controller.
|
||||
|
||||
|
||||
Mark Koennecke, August 1997
|
||||
Mark Lesha, January 2006 (based on ITC4 code)
|
||||
Paul Barron, January 2008 (Note: This is based on the old LAKESHORE340 code and
|
||||
Paul Barron, January 2008 (Note: This is based on the old LAKESHORE340 code and
|
||||
not the new LS340 code written by Rodney Davies Feb 08)
|
||||
|
||||
|
||||
Copyright:
|
||||
|
||||
Labor fuer Neutronenstreuung
|
||||
@@ -74,15 +74,15 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
int WEST4100SetPar(pEVControl self, char *name, float fNew, SConnection *pCon)
|
||||
{
|
||||
int iRet;
|
||||
|
||||
|
||||
/* check authorisation */
|
||||
if(!SCMatchRights(pCon,usUser))
|
||||
{
|
||||
SCWrite(pCon,"ERROR: you are not authorised to change this parameter",
|
||||
eError);
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* just catch those three names which we understand */
|
||||
if(strcmp(name,"setpoint") == 0)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if(strcmp(name,"alarm1") == 0)
|
||||
{
|
||||
iRet = SetAlarm1WEST4100(self->pDriv,(int)fNew);
|
||||
@@ -121,7 +121,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if(strcmp(name,"alarm2") == 0)
|
||||
{
|
||||
iRet = SetAlarm2WEST4100(self->pDriv,(int)fNew);
|
||||
@@ -140,7 +140,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if(strcmp(name,"powerlimit") == 0)
|
||||
{
|
||||
iRet = SetPowerLimitWEST4100(self->pDriv,(int)fNew);
|
||||
@@ -159,7 +159,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if(strcmp(name,"ramprate") == 0)
|
||||
{
|
||||
iRet = SetRampRateWEST4100(self->pDriv,(int)fNew);
|
||||
@@ -178,7 +178,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
return EVCSetPar(self,name,fNew,pCon);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
int WEST4100GetPar(pEVControl self, char *name, float *fNew)
|
||||
{
|
||||
int iRet;
|
||||
|
||||
|
||||
/* just catch those two names which we understand */
|
||||
if(strcmp(name,"setpoint") == 0)
|
||||
{
|
||||
@@ -229,7 +229,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
iRet = GetProcessValueWEST4100(self->pDriv); // Furnace only has 1 sensor
|
||||
*fNew = (float)iRet;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
return EVCGetPar(self,name,fNew);
|
||||
}
|
||||
@@ -238,44 +238,44 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
{
|
||||
char pBueffel[132];
|
||||
int iRet;
|
||||
|
||||
|
||||
iRet = EVCList(self,pCon);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.NumSensors = %d",self->pName,1);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.ControlSensor = %s",self->pName,"SensorA");
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.ModbusAddress = %d",self->pName,GetAddressWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.TransactionNumber = %d",self->pName,GetTransactWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.ProcessValue = %d",self->pName,GetProcessValueWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.Setpoint = %d",self->pName,GetSetpointWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.WorkingSetpoint = %d",self->pName,GetWorkingSetpointWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.Alarm1 = %d",self->pName,GetAlarm1WEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.Alarm2 = %d",self->pName,GetAlarm2WEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.PowerLimit = %d",self->pName,GetPowerLimitWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.RampRate = %d",self->pName,GetRampRateWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
return iRet;
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
return iRet;
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int WEST4100Wrapper(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
@@ -287,19 +287,19 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
double fNum;
|
||||
float fVal;
|
||||
int fValue;
|
||||
|
||||
|
||||
self = (pEVControl)pData;
|
||||
assert(self);
|
||||
assert(pCon);
|
||||
assert(pSics);
|
||||
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
return EVControlWrapper(pCon,pSics,pData,argc,argv);
|
||||
}
|
||||
// Set or Get
|
||||
strtolower(argv[1]);
|
||||
if( (strcmp(argv[1],"controlsensor") == 0) || (strcmp(argv[1],"sensorlist") == 0)){
|
||||
if( (strcmp(argv[1],"controlsensor") == 0) || (strcmp(argv[1],"sensorlist") == 0)){
|
||||
sprintf(pBueffel,"%s.%s = %s",self->pName,argv[1],"sensorA");
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
return 1;
|
||||
@@ -317,7 +317,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
sprintf(pBueffel,"ERROR: expected number, got %s",argv[2]);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return WEST4100SetPar(self,argv[1],(float)fNum,pCon);
|
||||
}
|
||||
else /* get case */
|
||||
@@ -329,10 +329,10 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
}
|
||||
}
|
||||
// Write or Query
|
||||
else if(strcmp(argv[1],"parameter") == 0)
|
||||
else if(strcmp(argv[1],"parameter") == 0)
|
||||
{
|
||||
if(argc > 3) /* set case */
|
||||
{
|
||||
{
|
||||
return WEST4100Write(self->pDriv,atoi(argv[2]),atoi(argv[3]));
|
||||
}
|
||||
else /* get case */
|
||||
@@ -345,7 +345,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
}
|
||||
// List
|
||||
else if(strcmp(argv[1],"list") == 0)
|
||||
{
|
||||
{
|
||||
return WEST4100List(self,pCon);
|
||||
}
|
||||
else
|
||||
@@ -353,5 +353,5 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
return EVControlWrapper(pCon,pSics,pData,argc,argv);
|
||||
}
|
||||
/* not reached */
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user