make caMonitor a host application
This commit is contained in:
@@ -8,14 +8,19 @@ include $(TOP)/configure/CONFIG
|
||||
#USR_CFLAGS +=
|
||||
|
||||
PROD_HOST += caExample
|
||||
|
||||
caExample_SRCS += caExample.c
|
||||
caExample_LIBS += ca
|
||||
caExample_LIBS += Com
|
||||
|
||||
PROD_HOST += caMonitor
|
||||
caMonitor_SRCS += caMonitor.c
|
||||
caMonitor_LIBS += ca
|
||||
caMonitor_LIBS += Com
|
||||
|
||||
ca_DIR = $(EPICS_BASE_LIB)
|
||||
Com_DIR = $(EPICS_BASE_LIB)
|
||||
|
||||
|
||||
#=============================
|
||||
|
||||
# xxxRecord.h will be created from xxxRecord.dbd
|
||||
@@ -30,7 +35,6 @@ PROD_IOC = example
|
||||
|
||||
example_SRCS += xxxRecord.c
|
||||
example_SRCS += devXxxSoft.c
|
||||
example_SRCS += caMonitor.c
|
||||
|
||||
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
||||
example_SRCS += example_registerRecordDeviceDriver.cpp
|
||||
|
||||
@@ -70,8 +70,9 @@ static void eventCallback(struct event_handler_args eha)
|
||||
}
|
||||
}
|
||||
|
||||
int caMonitor(char *filename)
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
char *filename;
|
||||
int npv = 0;
|
||||
MYNODE *pmynode[MAX_PV];
|
||||
char *pname[MAX_PV];
|
||||
@@ -80,6 +81,11 @@ int caMonitor(char *filename)
|
||||
char *pstr;
|
||||
FILE *fp;
|
||||
|
||||
if(argc != 2) {
|
||||
fprintf(stderr,"usage: caMonitor filename\n");
|
||||
exit(1);
|
||||
}
|
||||
filename = argv[1];
|
||||
fp = fopen(filename,"r");
|
||||
if(!fp) {
|
||||
perror("fopen failed");
|
||||
|
||||
Reference in New Issue
Block a user