add PVACommonRegister.dbd and iocreftrack.h
Allow use reftrack iocsh commands w/o pulling in server (or client) singleton, or including any .dbd (for P2P).
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
1
src/ioc/PVACommonRegister.dbd
Normal file
1
src/ioc/PVACommonRegister.dbd
Normal file
@@ -0,0 +1 @@
|
||||
registrar("refTrackRegistrar")
|
||||
@@ -1,2 +1,2 @@
|
||||
registrar("registerStartPVAServer")
|
||||
registrar("refTrackRegistrar")
|
||||
include "PVACommonRegister.dbd"
|
||||
|
||||
12
src/ioc/pv/iocreftrack.h
Normal file
12
src/ioc/pv/iocreftrack.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef IOCREFTRACK_H
|
||||
#define IOCREFTRACK_H
|
||||
|
||||
#include <shareLib.h>
|
||||
|
||||
namespace epics {namespace pvAccess {
|
||||
|
||||
epicsShareExtern void refTrackRegistrar();
|
||||
|
||||
}}
|
||||
|
||||
#endif // IOCREFTRACK_H
|
||||
@@ -6,13 +6,15 @@
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include <iocsh.h>
|
||||
|
||||
#include <pv/reftrack.h>
|
||||
#include <pv/iocshelper.h>
|
||||
|
||||
#include <iocsh.h>
|
||||
|
||||
#include <epicsExport.h>
|
||||
|
||||
#include <pv/iocreftrack.h>
|
||||
|
||||
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<int, &refshow>("refshow", "detail level");
|
||||
@@ -83,8 +89,9 @@ void refTrackRegistrar()
|
||||
epics::iocshRegister<double, int, &refmon>("refmon", "update period", "detail level");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
}}
|
||||
|
||||
extern "C" {
|
||||
using namespace epics::pvAccess;
|
||||
epicsExportRegistrar(refTrackRegistrar);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user