From: hadaq Date: Wed, 29 Apr 2009 12:49:13 +0000 (+0000) Subject: adapted to multiple EBs. Sergey X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=24f5fe0e0ac9abdc5bc9b6622a7e5d889a7cf612;p=daqdata.git adapted to multiple EBs. Sergey --- diff --git a/ebctrl/ioc/ebctrlApp/src/evtbuild.c b/ebctrl/ioc/ebctrlApp/src/evtbuild.c index f5a063e..296cbad 100644 --- a/ebctrl/ioc/ebctrlApp/src/evtbuild.c +++ b/ebctrl/ioc/ebctrlApp/src/evtbuild.c @@ -54,7 +54,10 @@ long evtbuild_proc( struct genSubRecord *pgsub ) for( i=0; i<11; i++ ) *out[i] = 0; - if( Worker_getStatistic( "daq_evtbuild", "nrOfMsgs", out[0] ) == -1) { + char buf[_POSIX_PATH_MAX]; + sprintf( buf, "%s%s", "daq_evtbuild", getenv("EBNUM") ); + + if( Worker_getStatistic( buf, "nrOfMsgs", out[0] ) == -1) { *out[7] = 0; /* status: Event Builder is off */ if(evtbuildDebug) printf(" evtbuild.c: Worker_getStatistic failed for nrOfMsgs!\n"); @@ -67,7 +70,7 @@ long evtbuild_proc( struct genSubRecord *pgsub ) } } - if( Worker_getStatistic( "daq_evtbuild", "bytesWritten", out[1] ) == -1) { + if( Worker_getStatistic( buf, "bytesWritten", out[1] ) == -1) { *out[9] = 0; /* zero data rate */ if(evtbuildDebug) printf(" evtbuild.c: Worker_getStatistic failed for bytesWritten!\n"); @@ -85,7 +88,7 @@ long evtbuild_proc( struct genSubRecord *pgsub ) *out[1] = (int)((*out[1])/1024./1024. + 0.5); } - if( Worker_getStatistic( "daq_evtbuild", "evtsComplete", out[2] ) == -1) { + if( Worker_getStatistic( buf, "evtsComplete", out[2] ) == -1) { *out[8] = 0; /* zero evtComp rate */ if(evtbuildDebug) printf(" evtbuild.c: Worker_getStatistic failed for evtsComplete!\n"); @@ -99,7 +102,7 @@ long evtbuild_proc( struct genSubRecord *pgsub ) temp[2] = *out[2]; } - if( Worker_getStatistic( "daq_evtbuild", "evtsDiscarded", out[3] ) == -1) { + if( Worker_getStatistic( buf, "evtsDiscarded", out[3] ) == -1) { *out[10] = 0; /* zero evtDisc rate */ if(evtbuildDebug) printf(" evtbuild.c: Worker_getStatistic failed for evtsDiscarded!\n"); @@ -113,26 +116,26 @@ long evtbuild_proc( struct genSubRecord *pgsub ) temp[3] = *out[3]; } - if( Worker_getStatistic( "daq_evtbuild", "evtsDataError", out[4] ) == -1) + if( Worker_getStatistic( buf, "evtsDataError", out[4] ) == -1) if(evtbuildDebug) printf(" evtbuild.c: Worker_getStatistic failed for evtsDataError!\n"); - if( Worker_getStatistic( "daq_evtbuild", "evtsTagError", out[5] ) == -1) + if( Worker_getStatistic( buf, "evtsTagError", out[5] ) == -1) if(evtbuildDebug) printf(" evtbuild.c: Worker_getStatistic failed for evtsTagError!\n"); - char buf[100]; + char ebbuf[100]; for( i=0; i<(*out[0]); i++ ) { - sprintf( buf, "evtbuildBuff%d", i ); + sprintf( ebbuf, "evtbuildBuff%d", i ); - if( Worker_getStatistic( "daq_evtbuild", buf, out[6] ) == -1) { + if( Worker_getStatistic( buf, ebbuf, out[6] ) == -1) { if(evtbuildDebug) printf(" evtbuild.c: Worker_getStatistic failed for %s!\n", buf); } else { if(evtbuildDebug) - printf("evtbuild.c, %s = %lu\n", buf, *out[6]); + printf("evtbuild.c, %s = %lu\n", ebbuf, *out[6]); out[6]++; } diff --git a/ebctrl/ioc/iocBoot/iocebctrl/envPaths b/ebctrl/ioc/iocBoot/iocebctrl/envPaths index 279023c..698a629 100644 --- a/ebctrl/ioc/iocBoot/iocebctrl/envPaths +++ b/ebctrl/ioc/iocBoot/iocebctrl/envPaths @@ -1,4 +1,4 @@ epicsEnvSet(ARCH,"linux-x86") epicsEnvSet(IOC,"iocebctrl") -epicsEnvSet(TOP,"/home/scs/yurevich/ebctrl/ioc") +epicsEnvSet(TOP,"/home/scs/ebctrl/ioc") epicsEnvSet(EPICS_BASE,"/home/scs/base-3.14.9") diff --git a/ebctrl/ioc/iocBoot/iocebctrl/st.cmd b/ebctrl/ioc/iocBoot/iocebctrl/st.cmd index 1549e4b..0b22a97 100644 --- a/ebctrl/ioc/iocBoot/iocebctrl/st.cmd +++ b/ebctrl/ioc/iocBoot/iocebctrl/st.cmd @@ -6,6 +6,7 @@ < envPaths epicsEnvSet(EBTYPE,"slave") +epicsEnvSet(EBNUM,"1") cd ${TOP}