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:
Michael Davidsaver
2017-11-01 11:09:52 -05:00
parent 29edd9a884
commit e7c7d28339
5 changed files with 26 additions and 4 deletions

View File

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

View File

@@ -0,0 +1 @@
registrar("refTrackRegistrar")

View File

@@ -1,2 +1,2 @@
registrar("registerStartPVAServer")
registrar("refTrackRegistrar")
include "PVACommonRegister.dbd"

12
src/ioc/pv/iocreftrack.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef IOCREFTRACK_H
#define IOCREFTRACK_H
#include <shareLib.h>
namespace epics {namespace pvAccess {
epicsShareExtern void refTrackRegistrar();
}}
#endif // IOCREFTRACK_H

View File

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