diff --git a/site_ansto/cameradriver.h b/site_ansto/cameradriver.h new file mode 100644 index 00000000..3e0d3a01 --- /dev/null +++ b/site_ansto/cameradriver.h @@ -0,0 +1,4 @@ +#ifndef CAMERADRIVER_H +#define CAMERADRIVER_H +void CameraInitProtocol(SicsInterp *pSics); +#endif diff --git a/site_ansto/hardsup/cameradriver.h b/site_ansto/hardsup/cameradriver.h new file mode 100644 index 00000000..3e0d3a01 --- /dev/null +++ b/site_ansto/hardsup/cameradriver.h @@ -0,0 +1,4 @@ +#ifndef CAMERADRIVER_H +#define CAMERADRIVER_H +void CameraInitProtocol(SicsInterp *pSics); +#endif diff --git a/site_ansto/hardsup/makefile b/site_ansto/hardsup/makefile index 33b8c0b4..310c1070 100644 --- a/site_ansto/hardsup/makefile +++ b/site_ansto/hardsup/makefile @@ -32,6 +32,8 @@ HOBJ += sct_rfamp.o HOBJ += sinqhttpprot.o HOBJ += sct_protek608.o HOBJ += sct_lfprot.o +HOBJ += camera.o +HOBJ += cameradriver.o libhlib.a: $(HOBJ) rm -f libhlib.a diff --git a/site_ansto/instrument/barebones.tcl b/site_ansto/instrument/barebones.tcl index 92365c4e..194ab486 100644 --- a/site_ansto/instrument/barebones.tcl +++ b/site_ansto/instrument/barebones.tcl @@ -9,7 +9,7 @@ # Required by server_config.tcl VarMake Instrument Text Internal -Instrument echidna +Instrument bear Instrument lock #START SERVER CONFIGURATION SECTION diff --git a/site_ansto/site_ansto.c b/site_ansto/site_ansto.c index ad07881c..ad4f1dbe 100644 --- a/site_ansto/site_ansto.c +++ b/site_ansto/site_ansto.c @@ -51,6 +51,7 @@ #include "safetyplc.h" #include "lssmonitor.h" #include "beamstopaction.h" +#include "cameradriver.h" /*@observer@*//*@null@*/ pCounterDriver CreateMonCounter(/*@observer@*/SConnection *pCon, /*@observer@*/char *name, char *params); @@ -68,6 +69,7 @@ extern void AddTCPMBProtocol (); extern void AddLFGenProtocol(); extern int ANSTO_MakeHistMemory(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[]); extern int testLogCmd(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[]); +extern pCounterDriver CreateCam(SConnection *pCon, char *name, char *asynq); int SICS_Site(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[]) { @@ -203,6 +205,7 @@ static void AddCommands(SicsInterp *pInter) NHQ200InitProtocol(pInter); ORHVPSInitProtocol(pInter); LS340InitProtocol(pInter); + CameraInitProtocol(pInter); AddCommand(pInter,"InstallProtocolHandler", InstallProtocol,NULL,NULL); AddCommand(pInter,"hostnam",hostNamCmd,NULL,NULL); AddCommand(pInter,"portnum",portNumCmd,NULL,NULL); @@ -294,6 +297,8 @@ static pCounterDriver CreateCounterDriverAnsto(SConnection *pCon, strtolower(argv[2]); if(strcmp(argv[2],"anstomonitor") == 0) { pDriver = CreateMonCounter(pCon, argv[1], argv[3]); + } else if (strcmp(argv[2], "anstocamera") == 0) { + pDriver = CreateCam(pCon, argv[1], argv[3]); } if(!pDriver){ return NULL;