Added functions to create the camera driver and init the camera protocol
to site_ansto.c
This commit is contained in:
4
site_ansto/cameradriver.h
Normal file
4
site_ansto/cameradriver.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef CAMERADRIVER_H
|
||||
#define CAMERADRIVER_H
|
||||
void CameraInitProtocol(SicsInterp *pSics);
|
||||
#endif
|
||||
4
site_ansto/hardsup/cameradriver.h
Normal file
4
site_ansto/hardsup/cameradriver.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef CAMERADRIVER_H
|
||||
#define CAMERADRIVER_H
|
||||
void CameraInitProtocol(SicsInterp *pSics);
|
||||
#endif
|
||||
@@ -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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
# Required by server_config.tcl
|
||||
VarMake Instrument Text Internal
|
||||
Instrument echidna
|
||||
Instrument bear
|
||||
Instrument lock
|
||||
|
||||
#START SERVER CONFIGURATION SECTION
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user