- ofac.c contains now only the command in initialisation function list - the other functions are moved to sicsutil.c - moved DoubleTime and the content of access.c to sicsutil.c - moved some initialisation code from ofac.c to the corresponding modules
169 lines
6.5 KiB
C
169 lines
6.5 KiB
C
/**
|
|
* Startup commands and definitions
|
|
*
|
|
* copyright: see file COPYRIGHT
|
|
*
|
|
* Mark Koennecke 1996 - ?
|
|
* heavy modifications to separate PSI specific commands into a
|
|
* separate library. Mark Koennecke, June 2003
|
|
*
|
|
* moved all staff except command and initialization list to sicsutil.c
|
|
* Markus Zolliker Jan 2010
|
|
*/
|
|
|
|
#include "ofac.h"
|
|
|
|
/*--------------------------------------------------------------------------*/
|
|
void InitGeneral(void)
|
|
{
|
|
#define INIT(F) { void F(void); F(); }
|
|
|
|
/* insert here initialization routines ... */
|
|
|
|
INIT(StatisticsInit);
|
|
INIT(InitializerInit);
|
|
INIT(SaveHdbInit); /* must be after InitializerInit */
|
|
INIT(SctInit);
|
|
INIT(SctDriveAdapterInit);
|
|
INIT(SctDriveObjInit);
|
|
INIT(SctDriveAdapterInit);
|
|
INIT(LogReaderInit);
|
|
INIT(LogSetupInit);
|
|
INIT(StatusFileInit);
|
|
INIT(InstallBackground);
|
|
INIT(MakeProtocol);
|
|
INIT(CommandLogInit);
|
|
INIT(UdpInit);
|
|
INIT(HelpInit);
|
|
INIT(SiteInit); /* site specific initializations */
|
|
}
|
|
|
|
void InitIniCommands(SicsInterp * pInter)
|
|
{
|
|
|
|
/* declare and add permanent command */
|
|
#define PCMD(NAME, FUN) { \
|
|
int FUN(SConnection * pCon, SicsInterp * pSics, void *pData, \
|
|
int argc, char *argv[]); \
|
|
AddCommandWithFlag(pInter, NAME, FUN, NULL, NULL, 0); \
|
|
}
|
|
|
|
/* declare and add startup command */
|
|
#define SCMD(NAME, FUN) { \
|
|
int FUN(SConnection * pCon, SicsInterp * pSics, void *pData, \
|
|
int argc, char *argv[]); \
|
|
AddCommandWithFlag(pInter, NAME, FUN, NULL, NULL, 1); \
|
|
}
|
|
|
|
/* permanent commands in alphabetic order */
|
|
PCMD("alias", MakeAlias);
|
|
PCMD("broadcast", Broadcast);
|
|
PCMD("Capture", CaptureAction);
|
|
PCMD("ClientPut", ClientPut);
|
|
PCMD("config", ConfigCon);
|
|
PCMD("db", SICSDebug);
|
|
PCMD("DefineAlias", DefineAlias);
|
|
PCMD("Dir", ListObjects);
|
|
PCMD("dolater", MakeCron);
|
|
PCMD("DrivableInvoke", TclDrivableInvoke);
|
|
PCMD("DynSicsObj", InstallSICSOBJ);
|
|
PCMD("EVFactory", EVControlFactory);
|
|
PCMD("FileEval", MacroFileEval);
|
|
PCMD("findalias", LocateAliasAction);
|
|
PCMD("fulltransact", TransactAction);
|
|
PCMD("GetInt", GetSICSInterrupt);
|
|
PCMD("GetLog", LogCapture);
|
|
PCMD("GumPut", GumPut);
|
|
PCMD("InternEval", InternalFileEval);
|
|
PCMD("kill_command", SICSKill);
|
|
PCMD("list", SicsList);
|
|
PCMD("MakeMcStasController", McStasControllerFactory);
|
|
PCMD("MakeMulti", MakeMulti);
|
|
PCMD("MakeOptimise", MakeOptimiser);
|
|
PCMD("Publish", TclPublish);
|
|
PCMD("ResetServer", ResetStatus);
|
|
PCMD("scriptcallback", CallbackScript);
|
|
PCMD("SetInt", SetSICSInterrupt);
|
|
PCMD("SetStatus", SetSICSStatus);
|
|
PCMD("SICSBounds", SICSBounds);
|
|
PCMD("sicscron", MakeCron);
|
|
PCMD("sicsdatafactory", SICSDataFactory);
|
|
PCMD("sicsdescriptor", SICSDescriptor);
|
|
PCMD("sicsprompt", SicsPrompt);
|
|
PCMD("SICSStatus", SICSStatus);
|
|
PCMD("sicstime", SICSTime);
|
|
PCMD("SICSType", SICSType);
|
|
PCMD("Sics_Exitus", SicsExit);
|
|
PCMD("silent", SICSSilent);
|
|
PCMD("status", UserStatus);
|
|
PCMD("TclReplaceDrivable", TclReplaceDrivable);
|
|
PCMD("transact", TransactAction);
|
|
PCMD("wait", UserWait);
|
|
|
|
/* startup commands in alphabetic order */
|
|
SCMD("allowexec", AllowExec);
|
|
SCMD("AntiCollisionInstall", AntiColliderFactory);
|
|
SCMD("ChopperAdapter", CHAdapterFactory);
|
|
SCMD("InstallHdb", InstallSICSHipadaba);
|
|
SCMD("InstallSinfox", InstallSinfox);
|
|
SCMD("MakeAsyncProtocol", AsyncProtocolFactory);
|
|
SCMD("MakeAsyncQueue", AsyncQueueFactory);
|
|
SCMD("MakeBatchManager", MakeExeManager);
|
|
SCMD("MakeChopper", ChocoFactory);
|
|
SCMD("MakeCone", MakeCone);
|
|
SCMD("MakeConfigurableMotor", MakeConfigurableVirtualMotor);
|
|
SCMD("MakeCounter", MakeCounter);
|
|
SCMD("MakeDataNumber", DNFactory);
|
|
SCMD("MakeDiffScan", MakeDiffScan);
|
|
SCMD("MakeDrive", MakeDrive);
|
|
SCMD("MakeEnergy", MakeEnergyVar);
|
|
SCMD("MakeGPIB", MakeGPIB);
|
|
SCMD("MakeHdbTable", HdbTableFactory);
|
|
SCMD("MakeHKL", HKLFactory);
|
|
SCMD("MakeHKLMot", HKLMotInstall);
|
|
SCMD("MakeHM", MakeHistMemory);
|
|
SCMD("MakeHMControl", MakeHMControl);
|
|
SCMD("MakeLin2Ang", MakeLin2Ang);
|
|
SCMD("MakeMaxDetector", LoMaxFactory);
|
|
SCMD("MakeMaximize", MaximizeFactory);
|
|
SCMD("MakeMcStasReader", McStasReaderFactory);
|
|
SCMD("MakeMono", MonoInit);
|
|
SCMD("MakeMultiCounter", MakeMultiCounter);
|
|
SCMD("MakeNXScript", MakeNXScript);
|
|
SCMD("MakeO2T", CreateO2T);
|
|
SCMD("MakeOscillator", MakeOscillator);
|
|
SCMD("MakePeakCenter", FitFactory);
|
|
SCMD("MakeProxy", ProxyFactory);
|
|
SCMD("MakeRefList", MakeReflectionList);
|
|
SCMD("MakeRS232Controller", RS232Factory);
|
|
SCMD("MakeSansBC", SansBCFactory);
|
|
SCMD("MakeScanCommand", ScanFactory);
|
|
SCMD("MakeSecCounter", MakeSecCter);
|
|
SCMD("MakeSecHM", MakeSecHM);
|
|
SCMD("MakeSecMotor", SecMotorFactory);
|
|
SCMD("MakeSecNVS", MakeSecNVS);
|
|
SCMD("MakeSicsObj", InstallSICSOBJ);
|
|
SCMD("MakeSicsPoll", InstallSICSPoll);
|
|
SCMD("MakeSingleX", MakeSingleX);
|
|
SCMD("MakeStateMon", StateMonFactory);
|
|
SCMD("MakeSync", MakeSync);
|
|
SCMD("MakeTasScan", TASUBScanFactory);
|
|
SCMD("MakeTasUB", TasUBFactory);
|
|
SCMD("MakeTclInt", MakeTclInt);
|
|
SCMD("MakeUBCalc", MakeUBCalc);
|
|
SCMD("MakeWaveLength", MakeWaveLengthVar);
|
|
SCMD("MakeXYTable", XYFactory);
|
|
SCMD("Motor", MotorCreate);
|
|
SCMD("Remob", RemobCreate);
|
|
SCMD("ServerOption", IFServerOption);
|
|
SCMD("SicsAlias", SicsAlias);
|
|
SCMD("SicsUser", PWSicsUser);
|
|
SCMD("TokenInit", TokenInit);
|
|
SCMD("UpdateFactory", UpdateFactory);
|
|
SCMD("VarMake", VarFactory);
|
|
SCMD("VelocitySelector", VelSelFactory);
|
|
|
|
}
|
|
|
|
/* all other content moved to sicsutil.c - M.Zolliker Jan 2010 */
|