PSI sics-cvs-psi-2008-10-02
This commit is contained in:
74
ofac.c
74
ofac.c
@@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
|
||||
Mark Koennecke, November 1996 -- ????
|
||||
Mark Koennecke, November 1996 -- ????
|
||||
|
||||
heavy modifications to separate PSI specific commands into a
|
||||
separate library. Mark Koennecke, June 2003
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "servlog.h"
|
||||
#include "nserver.h"
|
||||
#include "status.h"
|
||||
#include "statusfile.h"
|
||||
#include "configfu.h"
|
||||
#include "devexec.h"
|
||||
#include "mumo.h"
|
||||
@@ -118,6 +119,16 @@
|
||||
#include "sinfox.h"
|
||||
#include "sicslist.h"
|
||||
#include "cone.h"
|
||||
#include "sicshipadaba.h"
|
||||
#include "multicounter.h"
|
||||
#include "sicspoll.h"
|
||||
#include "statemon.h"
|
||||
#include "asyncqueue.h"
|
||||
#include "asyncprotocol.h"
|
||||
#include "sicsobj.h"
|
||||
#include "hdbqueue.h"
|
||||
#include "genericcontroller.h"
|
||||
#include "proxy.h"
|
||||
/*----------------------- Server options creation -------------------------*/
|
||||
static int IFServerOption(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[])
|
||||
@@ -199,6 +210,7 @@
|
||||
assert(pInter);
|
||||
|
||||
pExe = CreateExeList(pTask);
|
||||
pServ->pExecutor = pExe;
|
||||
pEnv = CreateEnvMon();
|
||||
|
||||
assert(pExe);
|
||||
@@ -207,9 +219,10 @@
|
||||
/* permanent commands */
|
||||
AddCommand(pInter,"Sics_Exitus",SicsExit,NULL,NULL);
|
||||
AddCommand(pInter,"FileEval",MacroFileEval,NULL,NULL);
|
||||
|
||||
AddCommand(pInter,"InternEval",InternalFileEval,NULL,NULL);
|
||||
AddCommand(pInter,"FileWhere",MacroWhere,WhereKill,NULL);
|
||||
AddCommand(pInter,"ClientPut",ClientPut,NULL,NULL);
|
||||
AddCommand(pInter,"GumPut",GumPut,NULL,NULL);
|
||||
AddCommand(pInter,"broadcast",Broadcast,NULL,NULL);
|
||||
AddCommand(pInter,"transact",TransactAction,NULL,NULL);
|
||||
AddCommand(pInter,"fulltransact",TransactAction,NULL,NULL);
|
||||
@@ -221,8 +234,6 @@
|
||||
AddCommand(pInter,"status", UserStatus,NULL,NULL);
|
||||
AddCommand(pInter,"ResetServer",ResetStatus,NULL,NULL);
|
||||
AddCommand(pInter,"Dir",ListObjects,NULL,NULL);
|
||||
AddCommand(pInter,"Backup",BackupStatus,NULL,NULL);
|
||||
AddCommand(pInter,"Restore",RestoreStatus,NULL,NULL);
|
||||
AddCommand(pInter,"SetInt", SetSICSInterrupt,NULL,NULL);
|
||||
AddCommand(pInter,"GetInt",GetSICSInterrupt,NULL,NULL);
|
||||
AddCommand(pInter,"SICSType",SICSType,NULL,NULL);
|
||||
@@ -237,11 +248,15 @@
|
||||
AddCommand(pInter,"commandlog",CommandLog,CommandLogClose,NULL);
|
||||
AddCommand(pInter,"udpquieck",QuieckAction,KillQuieck,NULL);
|
||||
AddCommand(pInter,"alias",MakeAlias,NULL,NULL);
|
||||
AddCommand(pInter,"findalias",LocateAliasAction,NULL,NULL);
|
||||
AddCommand(pInter,"sicscron",MakeCron,NULL,NULL);
|
||||
AddCommand(pInter,"dolater",MakeCron,NULL,NULL);
|
||||
AddCommand(pInter,"sicsdatafactory",SICSDataFactory,NULL,NULL);
|
||||
AddCommand(pInter,"scriptcallback",CallbackScript,NULL,NULL);
|
||||
AddCommand(pInter,"help",SicsHelp,KillHelp,NULL);
|
||||
AddCommand(pInter,"list",SicsList,NULL,NULL);
|
||||
AddCommand(pInter,"InstallHdb",InstallSICSHipadaba,NULL,NULL);
|
||||
MakeProtocol(pInter);
|
||||
|
||||
/* commands to do with the executor. Only StopExe carries the
|
||||
DeleteFunction in order to avoid double deletion. All the
|
||||
@@ -268,7 +283,7 @@
|
||||
AddCommand(pInter,"MakeEnergy",MakeEnergyVar,NULL,NULL);
|
||||
AddCommand(pInter,"MakeCounter",MakeCounter,NULL,NULL);
|
||||
AddCommand(pInter,"MakeO2T",CreateO2T,NULL,NULL);
|
||||
AddCommand(pInter,"SicsAlias",SicsAlias,NULL,NULL);
|
||||
AddCommand(pInter,"SicsAlias",SicsAlias,NULL,NULL);
|
||||
AddCommand(pInter,"DefineAlias",DefineAlias,NULL,NULL); /* M.Z. */
|
||||
AddCommand(pInter,"MakeHM",MakeHistMemory,NULL,NULL);
|
||||
AddCommand(pInter,"VelocitySelector",VelSelFactory,NULL,NULL);
|
||||
@@ -317,12 +332,24 @@
|
||||
McStasReaderFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeMcStasController",
|
||||
McStasControllerFactory,NULL,NULL);
|
||||
AddCommand(pInter,"InstallProtocolHandler",
|
||||
InstallProtocol,NULL,NULL);
|
||||
AddCommand(pInter,"InstallSinfox",
|
||||
InstallSinfox,NULL,NULL);
|
||||
AddCommand(pInter,"MakeCone",
|
||||
MakeCone,NULL,NULL);
|
||||
AddCommand(pInter,"MakeMultiCounter",
|
||||
MakeMultiCounter,NULL,NULL);
|
||||
AddCommand(pInter,"MakeSicsPoll",
|
||||
InstallSICSPoll,NULL,NULL);
|
||||
AddCommand(pInter,"MakeStateMon",
|
||||
StateMonFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeAsyncProtocol",AsyncProtocolFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeAsyncQueue",AsyncQueueFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeSicsObj",InstallSICSOBJ,NULL,NULL);
|
||||
AddCommand(pInter,"DynSicsObj",InstallSICSOBJ,NULL,NULL);
|
||||
/* AddCommand(pInter,"MakeHdbQueue",MakeHDBQueue,NULL,NULL); */
|
||||
AddCommand(pInter,"MakeGenController",GenControllerFactory,NULL,NULL);
|
||||
AddCommand(pInter,"genconfigure",GenControllerConfigure,NULL,NULL);
|
||||
AddCommand(pInter,"MakeProxy",ProxyFactory,NULL,NULL);
|
||||
|
||||
/*
|
||||
install site specific commands
|
||||
@@ -371,7 +398,7 @@
|
||||
RemoveCommand(pSics,"MakeLin2Ang");
|
||||
RemoveCommand(pSics,"MakeSync");
|
||||
RemoveCommand(pSics,"MakeHMControl");
|
||||
/* RemoveCommand(pSics,"MakeRS232Controller"); */
|
||||
RemoveCommand(pSics,"MakeRS232Controller");
|
||||
RemoveCommand(pSics,"MakeMaxDetector");
|
||||
RemoveCommand(pSics,"AntiColliderInstall");
|
||||
RemoveCommand(pSics,"MakeGPIB");
|
||||
@@ -388,9 +415,16 @@
|
||||
RemoveCommand(pSics,"MakeTasUB");
|
||||
RemoveCommand(pSics,"MakeTasScan");
|
||||
RemoveCommand(pSics,"MakemcStasReader");
|
||||
RemoveCommand(pSics,"InstallProtocolHandler");
|
||||
RemoveCommand(pSics,"InstallSinfox");
|
||||
RemoveCommand(pSics,"MakeCone");
|
||||
RemoveCommand(pSics,"MakeMultiCounter");
|
||||
RemoveCommand(pSics,"MakeStateMon");
|
||||
RemoveCommand(pSics,"MakeAsyncQueue");
|
||||
RemoveCommand(pSics,"MakeAsyncProtocol");
|
||||
RemoveCommand(pSics,"MakeSicsObject");
|
||||
RemoveCommand(pSics,"MakeGenController");
|
||||
RemoveCommand(pSics,"genconfigure");
|
||||
RemoveCommand(pSics,"MakeProxy");
|
||||
/*
|
||||
remove site specific installation commands
|
||||
*/
|
||||
@@ -406,9 +440,17 @@
|
||||
|
||||
/* insert here initialization routines ... */
|
||||
|
||||
INIT(SiteInit); /* site specific initializations */
|
||||
INIT(StatisticsInit);
|
||||
INIT(InitializerInit);
|
||||
INIT(SaveHdbInit); /* must be after InitializerInit */
|
||||
INIT(SctInit);
|
||||
INIT(SctDriveInit);
|
||||
INIT(LogReaderInit);
|
||||
INIT(LogSetupInit);
|
||||
INIT(StatusFileInit);
|
||||
|
||||
}
|
||||
INIT(SiteInit); /* site specific initializations */
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int InitObjectCommands(pServer pServ, char *file)
|
||||
{
|
||||
@@ -423,18 +465,16 @@
|
||||
InitGeneral();
|
||||
|
||||
/* general initialization */
|
||||
InitIniCommands(pSics,pServ->pTasker);
|
||||
|
||||
/* create a connection */
|
||||
pCon = SCCreateDummyConnection(pSics);
|
||||
if(!pCon)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/* removed (gives double output to stdout)
|
||||
pCon->iFiles = 1;
|
||||
pCon->pFiles[0] = stdout;
|
||||
*/
|
||||
MakeExeManager(pCon,pSics,NULL,1, NULL);
|
||||
InitIniCommands(pSics,pServ->pTasker);
|
||||
InstallBckRestore(pCon,pSics);
|
||||
|
||||
pCon->iFiles = 0;
|
||||
|
||||
/* evaluate the file */
|
||||
|
||||
Reference in New Issue
Block a user