diff --git a/src/ioc/Makefile b/src/ioc/Makefile index 1406613..aea0877 100644 --- a/src/ioc/Makefile +++ b/src/ioc/Makefile @@ -10,7 +10,9 @@ SHRLIB_VERSION ?= $(EPICS_PVA_MAJOR_VERSION).$(EPICS_PVA_MINOR_VERSION).$(EPICS_ INC += pv/syncChannelFind.h INC += pv/iocshelper.h +INC += pv/iocreftrack.h +DBD += PVACommonRegister.dbd DBD += PVAServerRegister.dbd DBD += PVAClientRegister.dbd diff --git a/src/ioc/PVACommonRegister.dbd b/src/ioc/PVACommonRegister.dbd new file mode 100644 index 0000000..6634b19 --- /dev/null +++ b/src/ioc/PVACommonRegister.dbd @@ -0,0 +1 @@ +registrar("refTrackRegistrar") diff --git a/src/ioc/PVAServerRegister.dbd b/src/ioc/PVAServerRegister.dbd index b065342..3397efe 100644 --- a/src/ioc/PVAServerRegister.dbd +++ b/src/ioc/PVAServerRegister.dbd @@ -1,2 +1,2 @@ registrar("registerStartPVAServer") -registrar("refTrackRegistrar") +include "PVACommonRegister.dbd" diff --git a/src/ioc/pv/iocreftrack.h b/src/ioc/pv/iocreftrack.h new file mode 100644 index 0000000..4e783bf --- /dev/null +++ b/src/ioc/pv/iocreftrack.h @@ -0,0 +1,12 @@ +#ifndef IOCREFTRACK_H +#define IOCREFTRACK_H + +#include + +namespace epics {namespace pvAccess { + +epicsShareExtern void refTrackRegistrar(); + +}} + +#endif // IOCREFTRACK_H diff --git a/src/ioc/reftrackioc.cpp b/src/ioc/reftrackioc.cpp index 979b4a6..b5138fb 100644 --- a/src/ioc/reftrackioc.cpp +++ b/src/ioc/reftrackioc.cpp @@ -6,13 +6,15 @@ #include +#include + #include #include -#include - #include +#include + namespace { void showRefs(const epics::RefSnapshot& snap, int lvl, bool delta) @@ -75,6 +77,10 @@ void refmon(double period, int lvl) } } +} // namespace + +namespace epics {namespace pvAccess { + void refTrackRegistrar() { epics::iocshRegister("refshow", "detail level"); @@ -83,8 +89,9 @@ void refTrackRegistrar() epics::iocshRegister("refmon", "update period", "detail level"); } -} // namespace +}} extern "C" { + using namespace epics::pvAccess; epicsExportRegistrar(refTrackRegistrar); }