make caMonitor a host application

This commit is contained in:
Marty Kraimer
2001-10-15 18:50:16 +00:00
parent 7c86082b23
commit 28282e176d
2 changed files with 13 additions and 3 deletions

View File

@@ -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

View File

@@ -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");