Add ORHVPS initialisation

r2274 | dcl | 2008-01-15 12:29:35 +1100 (Tue, 15 Jan 2008) | 2 lines
This commit is contained in:
Douglas Clowes
2008-01-15 12:29:35 +11:00
parent 722fd4b539
commit 24621a0562

View File

@@ -35,6 +35,8 @@
#include "hmcontrol_ansto.h" // extends hmcontrol.h
/* Added code for NHQ200 HV Power Supply */
#include "nhq200.h"
/* Added code for Oak Ridge High Voltage Power Supply */
#include "orhvps.h"
#include "safetyplc.h"
@@ -63,6 +65,7 @@ static void AddCommands(SicsInterp *pInter)
DMC2280InitProtocol(pInter);
SafetyPLCInitProtocol(pInter);
NHQ200InitProtocol(pInter);
ORHVPSInitProtocol(pInter);
AddCommand(pInter,"MakeTCPSelector",VelSelTcpFactory,NULL,NULL);
AddCommand(pInter,"portnum",portNumCmd,NULL,NULL);
AddCommand(pInter,"abortbatch",AbortBatch,NULL,NULL);
@@ -80,7 +83,6 @@ static void RemoveCommands(SicsInterp *pSics){
{
MotorDriver *pDriver = NULL;
pMotor pNew = NULL;
Tcl_Interp *pTcl = NULL;
char pBueffel[132];
/* create the motor */
@@ -204,6 +206,19 @@ static pEVControl InstallEnvironmentController(SicsInterp *pSics,
}
}
/* Added code for new Oak Ridge High Voltage Power Supply driver */
if(strcmp(argv[3],"orhvps") == 0) {
pDriv = CreateORHVPSDriver(argc-4,&argv[4]);
if(pDriv){
pNew = CreateEVController(pDriv,argv[2],&status);
if(pNew != NULL){
ORHVPSRegister(pNew, pDriv);
AddCommand(pSics,argv[2],ORHVPSWrapper,DeleteEVController,
pNew);
}
}
}
return pNew;
}
/*-----------------------------------------------------------------*/