merge feature/changesAfter3_0_2; resolve conflicts
This commit is contained in:
32
Makefile
32
Makefile
@ -1,25 +1,27 @@
|
|||||||
# Makefile for the EPICS V4 pvDatabase module
|
#Makefile at top of application tree
|
||||||
|
|
||||||
TOP = .
|
TOP = .
|
||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
|
DIRS := $(DIRS) $(filter-out $(DIRS), configure)
|
||||||
|
DIRS := $(DIRS) $(filter-out $(DIRS), src)
|
||||||
|
DIRS := $(DIRS) $(filter-out $(DIRS), test)
|
||||||
|
DIRS := $(DIRS) $(filter-out $(DIRS), arrayPerformance)
|
||||||
|
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard example*))
|
||||||
|
|
||||||
DIRS := configure
|
EMBEDDED_TOPS := $(EMBEDDED_TOPS) $(filter-out $(EMBEDDED_TOPS), test)
|
||||||
|
EMBEDDED_TOPS := $(EMBEDDED_TOPS) $(filter-out $(EMBEDDED_TOPS), arrayPerformance)
|
||||||
|
EMBEDDED_TOPS := $(EMBEDDED_TOPS) $(filter-out $(EMBEDDED_TOPS), $(wildcard example*))
|
||||||
|
|
||||||
DIRS += src
|
define DIR_template
|
||||||
src_DEPEND_DIRS = configure
|
$(1)_DEPEND_DIRS = configure
|
||||||
|
endef
|
||||||
|
$(foreach dir, $(filter-out configure,$(DIRS)),$(eval $(call DIR_template,$(dir))))
|
||||||
|
|
||||||
EMBEDDED_TOPS := $(wildcard *Top)
|
define EMB_template
|
||||||
EMBEDDED_TOPS += $(wildcard example*)
|
|
||||||
|
|
||||||
DIRS += $(EMBEDDED_TOPS)
|
|
||||||
|
|
||||||
define dir_DEP
|
|
||||||
$(1)_DEPEND_DIRS = src
|
$(1)_DEPEND_DIRS = src
|
||||||
endef
|
endef
|
||||||
|
$(foreach dir, $(EMBEDDED_TOPS),$(eval $(call EMB_template,$(dir))))
|
||||||
|
|
||||||
$(foreach dir, $(EMBEDDED_TOPS), $(eval $(call dir_DEP,$(dir))))
|
#exampleDatabase_DEPEND_DIRS += test
|
||||||
|
#examplePowerSupply_DEPEND_DIRS += test
|
||||||
exampleDatabase_DEPEND_DIRS += testTop
|
|
||||||
examplePowerSupply_DEPEND_DIRS += testTop
|
|
||||||
|
|
||||||
include $(TOP)/configure/RULES_TOP
|
include $(TOP)/configure/RULES_TOP
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#Makefile at top of application tree
|
#Makefile at top of application tree
|
||||||
|
|
||||||
TOP = .
|
TOP = .
|
||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
|
|
||||||
DIRS += configure
|
DIRS += configure
|
||||||
|
|
||||||
DIRS += src
|
DIRS += src
|
@ -14,11 +14,26 @@
|
|||||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||||
# continue building anyway if conflicts are found.
|
# continue building anyway if conflicts are found.
|
||||||
CHECK_RELEASE = YES
|
#CHECK_RELEASE = YES
|
||||||
|
|
||||||
|
# Set this when you only want to compile this application
|
||||||
|
# for a subset of the cross-compiled target architectures
|
||||||
|
# that Base is built for.
|
||||||
|
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||||
|
|
||||||
# To install files into a location other than $(TOP) define
|
# To install files into a location other than $(TOP) define
|
||||||
# INSTALL_LOCATION here.
|
# INSTALL_LOCATION here.
|
||||||
#INSTALL_LOCATION=</path/name/to/install/top>
|
#INSTALL_LOCATION=</path/name/to/install/top>
|
||||||
|
|
||||||
-include $(TOP)/../configure/CONFIG_SITE.local
|
# Set this when your IOC and the host use different paths
|
||||||
-include $(TOP)/../../CONFIG.local
|
# to access the application. This will be needed to boot
|
||||||
|
# from a Microsoft FTP server or with some NFS mounts.
|
||||||
|
# You must rebuild in the iocBoot directory for this to
|
||||||
|
# take effect.
|
||||||
|
#IOCS_APPL_TOP = </IOC/path/to/application/top>
|
||||||
|
|
||||||
|
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||||
|
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||||
|
|
||||||
|
-include $(TOP)/configure/CONFIG_SITE.local
|
||||||
|
-include $(TOP)/../CONFIG.local
|
@ -1,4 +1,4 @@
|
|||||||
# pvDatabaseCPP/arrayPerfTop RELEASE - Location of external support modules
|
# pvDatabaseCPP/arrayPerformance RELEASE - Location of external support modules
|
||||||
#
|
#
|
||||||
# IF YOU CHANGE this file or any file it includes you must
|
# IF YOU CHANGE this file or any file it includes you must
|
||||||
# subsequently do a "gnumake rebuild" in the application's
|
# subsequently do a "gnumake rebuild" in the application's
|
||||||
@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
# EPICS V4 Developers: Do not edit the locations in this file!
|
# EPICS V4 Developers: Do not edit the locations in this file!
|
||||||
#
|
#
|
||||||
# Create a file RELEASE.local pointing to your PVASRV, PVACCESS,
|
# Create a file RELEASE.local pointing to your places
|
||||||
# PVDATA, PVCOMMON and EPICS_BASE build directories, e.g.
|
# for the dependencies, e.g.
|
||||||
# PVASRV = /path/to/epics/pvaSrvCPP
|
|
||||||
# PVACCESS = /path/to/epics/pvAccessCPP
|
# PVACCESS = /path/to/epics/pvAccessCPP
|
||||||
# PVDATA = /path/to/epics/pvDataCPP
|
# PVDATA = /path/to/epics/pvDataCPP
|
||||||
# PVCOMMON = /path/to/epics/pvCommonCPP
|
# PVCOMMON = /path/to/epics/pvCommonCPP
|
||||||
@ -28,14 +27,14 @@
|
|||||||
# use the following definitions:
|
# use the following definitions:
|
||||||
|
|
||||||
PVDATABASE = $(TOP)/..
|
PVDATABASE = $(TOP)/..
|
||||||
|
|
||||||
-include $(TOP)/../configure/RELEASE.local
|
|
||||||
-include $(TOP)/../../RELEASE.local
|
-include $(TOP)/../../RELEASE.local
|
||||||
|
-include $(TOP)/../configure/RELEASE.local
|
||||||
|
|
||||||
# If you copied this example from pvDatabaseCPP to be built as a
|
# If you copied this example from pvDatabaseCPP to be built as a
|
||||||
# standalone TOP, adjust and use the following definitions:
|
# standalone TOP, define
|
||||||
|
|
||||||
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
||||||
|
# in the appropriate RELEASE[.local],
|
||||||
|
# and use the following definitions instead:
|
||||||
|
|
||||||
#-include $(TOP)/configure/RELEASE.local
|
|
||||||
#-include $(TOP)/../RELEASE.local
|
#-include $(TOP)/../RELEASE.local
|
||||||
|
#-include $(TOP)/configure/RELEASE.local
|
@ -14,11 +14,15 @@
|
|||||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||||
# continue building anyway if conflicts are found.
|
# continue building anyway if conflicts are found.
|
||||||
CHECK_RELEASE = YES
|
#CHECK_RELEASE = YES
|
||||||
|
|
||||||
# To install files into a location other than $(TOP) define
|
# To install files into a location other than $(TOP) define
|
||||||
# INSTALL_LOCATION here.
|
# INSTALL_LOCATION here.
|
||||||
#INSTALL_LOCATION=</path/name/to/install/top>
|
#INSTALL_LOCATION=</path/name/to/install/top>
|
||||||
|
|
||||||
|
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||||
|
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||||
|
|
||||||
|
-include $(TOP)/../CONFIG_SITE.local
|
||||||
-include $(TOP)/configure/CONFIG_SITE.local
|
-include $(TOP)/configure/CONFIG_SITE.local
|
||||||
-include $(TOP)/../CONFIG.local
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
# Sample RELEASE.local file
|
|
||||||
|
|
||||||
V4 = /home/install/epics/v4
|
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
|
||||||
|
|
||||||
PVASRV = $(V4)/pvaSrv
|
|
||||||
PVACCESS = $(V4)/pvAccessCPP
|
|
||||||
PVDATA = $(V4)/pvDataCPP
|
|
||||||
PVCOMMON = $(V4)/pvCommonCPP
|
|
||||||
|
|
||||||
EPICS_BASE = /home/install/epics/base-3.14.12.3
|
|
||||||
|
|
||||||
|
EPICS_BASE=/home/install/epics/base
|
||||||
|
PVCOMMON=/home/hg/pvCommonCPP
|
||||||
|
PVDATA=/home/hg/pvDataCPP
|
||||||
|
PVACCESS=/home/hg/pvAccessCPP
|
||||||
|
PVASRV=/home/hg/pvaSrv
|
||||||
|
@ -24,5 +24,5 @@
|
|||||||
# PVCOMMON = /path/to/epics/pvCommonCPP
|
# PVCOMMON = /path/to/epics/pvCommonCPP
|
||||||
# EPICS_BASE = /path/to/epics/base
|
# EPICS_BASE = /path/to/epics/base
|
||||||
|
|
||||||
-include $(TOP)/configure/RELEASE.local
|
|
||||||
-include $(TOP)/../RELEASE.local
|
-include $(TOP)/../RELEASE.local
|
||||||
|
-include $(TOP)/configure/RELEASE.local
|
||||||
|
@ -20,5 +20,9 @@ CHECK_RELEASE = WARN
|
|||||||
# INSTALL_LOCATION here.
|
# INSTALL_LOCATION here.
|
||||||
#INSTALL_LOCATION=</path/name/to/install/top>
|
#INSTALL_LOCATION=</path/name/to/install/top>
|
||||||
|
|
||||||
|
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||||
|
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||||
|
|
||||||
-include $(TOP)/../configure/CONFIG_SITE.local
|
-include $(TOP)/../configure/CONFIG_SITE.local
|
||||||
-include $(TOP)/../../CONFIG_SITE.local
|
-include $(TOP)/../../CONFIG_SITE.local
|
||||||
|
-include $(TOP)/../CONFIG.local
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# If this example is built in a directory under pvDatabaseCPP,
|
# If this example is built in a directory under pvDatabaseCPP,
|
||||||
# use the following definitions:
|
# use the following definitions:
|
||||||
|
|
||||||
PVDATABASETEST = $(TOP)/../testTop
|
PVDATABASETEST = $(TOP)/../test
|
||||||
PVDATABASE = $(TOP)/..
|
PVDATABASE = $(TOP)/..
|
||||||
|
|
||||||
-include $(TOP)/../configure/RELEASE.local
|
-include $(TOP)/../configure/RELEASE.local
|
||||||
|
@ -3,23 +3,26 @@ TOP=../..
|
|||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
#=============================
|
||||||
|
|
||||||
|
#==================================================
|
||||||
|
# Build an IOC support library
|
||||||
|
#
|
||||||
|
|
||||||
DBD += exampleDatabase.dbd
|
DBD += exampleDatabase.dbd
|
||||||
|
|
||||||
exampleDatabase_DBD += base.dbd
|
#=============================
|
||||||
exampleDatabase_DBD += PVAServerRegister.dbd
|
# build an ioc application
|
||||||
exampleDatabase_DBD += registerChannelProviderLocal.dbd
|
|
||||||
exampleDatabase_DBD += dbPv.dbd
|
|
||||||
exampleDatabase_DBD += powerSupplyRegister.dbd
|
|
||||||
exampleDatabase_DBD += exampleDatabaseRegister.dbd
|
|
||||||
|
|
||||||
PROD_IOC += exampleDatabase
|
PROD_IOC += exampleDatabase
|
||||||
|
|
||||||
|
|
||||||
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
||||||
exampleDatabase_SRCS += exampleDatabase_registerRecordDeviceDriver.cpp
|
exampleDatabase_SRCS += exampleDatabase_registerRecordDeviceDriver.cpp
|
||||||
exampleDatabase_SRCS_DEFAULT += exampleDatabaseMain.cpp
|
exampleDatabase_SRCS_DEFAULT += exampleDatabaseMain.cpp
|
||||||
exampleDatabase_SRCS_vxWorks += -nil-
|
exampleDatabase_SRCS_vxWorks += -nil-
|
||||||
|
|
||||||
|
|
||||||
# The following adds support from base/src/vxWorks
|
# The following adds support from base/src/vxWorks
|
||||||
exampleDatabase_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
exampleDatabase_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||||
|
|
||||||
|
7
exampleDatabase/ioc/src/exampleDatabaseInclude.dbd
Normal file
7
exampleDatabase/ioc/src/exampleDatabaseInclude.dbd
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
include "base.dbd"
|
||||||
|
include "PVAServerRegister.dbd"
|
||||||
|
include "registerChannelProviderLocal.dbd"
|
||||||
|
include "dbPv.dbd"
|
||||||
|
include "powerSupplyRegister.dbd"
|
||||||
|
registrar("exampleDatabaseRegister")
|
||||||
|
registrar("exampleMonitorPluginRegister")
|
@ -4,17 +4,20 @@ include $(TOP)/configure/CONFIG
|
|||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
|
||||||
DBD += exampleDatabaseRegister.dbd
|
DBD += exampleDatabase.dbd
|
||||||
|
|
||||||
INC += exampleDatabase.h
|
INC += exampleDatabase.h
|
||||||
|
INC += exampleMonitorPlugin.h
|
||||||
|
|
||||||
LIBRARY += exampleDatabase
|
LIBRARY += exampleDatabase
|
||||||
exampleDatabase_SRCS += exampleDatabase.cpp
|
exampleDatabase_SRCS += exampleDatabase.cpp
|
||||||
|
exampleDatabase_SRCS += exampleMonitorPlugin.cpp
|
||||||
exampleDatabase_SRCS += exampleDatabaseRegister.cpp
|
exampleDatabase_SRCS += exampleDatabaseRegister.cpp
|
||||||
exampleDatabase_LIBS += powerSupply
|
exampleDatabase_SRCS += exampleMonitorPluginRegister.cpp
|
||||||
exampleDatabase_LIBS += pvDatabase
|
exampleDatabase_LIBS += pvDatabase
|
||||||
exampleDatabase_LIBS += pvAccess
|
exampleDatabase_LIBS += pvAccess
|
||||||
exampleDatabase_LIBS += pvData
|
exampleDatabase_LIBS += pvData
|
||||||
|
exampleDatabase_LIBS += Com
|
||||||
exampleDatabase_LIBS += $(EPICS_BASE_IOC_LIBS)
|
exampleDatabase_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||||
|
|
||||||
PROD_HOST += exampleDatabaseMain
|
PROD_HOST += exampleDatabaseMain
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
#include <pv/recordList.h>
|
#include <pv/recordList.h>
|
||||||
#include <pv/traceRecord.h>
|
#include <pv/traceRecord.h>
|
||||||
|
|
||||||
#include <powerSupply.h>
|
#include <pv/powerSupply.h>
|
||||||
#include <exampleDatabase.h>
|
#include <pv/exampleDatabase.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using std::tr1::static_pointer_cast;
|
using std::tr1::static_pointer_cast;
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
#include <pv/channelProviderLocal.h>
|
#include <pv/channelProviderLocal.h>
|
||||||
#include <pv/serverContext.h>
|
#include <pv/serverContext.h>
|
||||||
|
|
||||||
#include <exampleDatabase.h>
|
#include <pv/exampleDatabase.h>
|
||||||
|
#include <pv/exampleMonitorPlugin.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using std::tr1::static_pointer_cast;
|
using std::tr1::static_pointer_cast;
|
||||||
@ -36,6 +37,7 @@ int main(int argc,char *argv[])
|
|||||||
PVDatabasePtr master = PVDatabase::getMaster();
|
PVDatabasePtr master = PVDatabase::getMaster();
|
||||||
ChannelProviderLocalPtr channelProvider = getChannelProviderLocal();
|
ChannelProviderLocalPtr channelProvider = getChannelProviderLocal();
|
||||||
ExampleDatabase::create();
|
ExampleDatabase::create();
|
||||||
|
ExampleMonitorPlugin::create();
|
||||||
ServerContext::shared_pointer ctx =
|
ServerContext::shared_pointer ctx =
|
||||||
startPVAServer(PVACCESS_ALL_PROVIDERS,0,true,true);
|
startPVAServer(PVACCESS_ALL_PROVIDERS,0,true,true);
|
||||||
cout << "exampleDatabase\n";
|
cout << "exampleDatabase\n";
|
||||||
@ -55,4 +57,3 @@ int main(int argc,char *argv[])
|
|||||||
channelProvider->destroy();
|
channelProvider->destroy();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <epicsExport.h>
|
#include <epicsExport.h>
|
||||||
|
|
||||||
#include <exampleDatabase.h>
|
#include <pv/exampleDatabase.h>
|
||||||
|
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
using namespace epics::pvAccess;
|
using namespace epics::pvAccess;
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#Makefile at top of application tree
|
#Makefile at top of application tree
|
||||||
|
|
||||||
TOP = .
|
TOP = .
|
||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
|
|
||||||
DIRS += configure
|
DIRS += configure
|
||||||
|
|
||||||
DIRS += src
|
DIRS += src
|
||||||
@ -12,7 +10,6 @@ DIRS += ioc
|
|||||||
ioc_DEPEND_DIRS = src
|
ioc_DEPEND_DIRS = src
|
||||||
|
|
||||||
DIRS += iocBoot
|
DIRS += iocBoot
|
||||||
iocBoot_DEPEND_DIRS = src
|
|
||||||
|
|
||||||
include $(TOP)/configure/RULES_TOP
|
include $(TOP)/configure/RULES_TOP
|
||||||
|
|
||||||
|
@ -14,11 +14,26 @@
|
|||||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||||
# continue building anyway if conflicts are found.
|
# continue building anyway if conflicts are found.
|
||||||
CHECK_RELEASE = WARN
|
#CHECK_RELEASE = YES
|
||||||
|
|
||||||
|
# Set this when you only want to compile this application
|
||||||
|
# for a subset of the cross-compiled target architectures
|
||||||
|
# that Base is built for.
|
||||||
|
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||||
|
|
||||||
# To install files into a location other than $(TOP) define
|
# To install files into a location other than $(TOP) define
|
||||||
# INSTALL_LOCATION here.
|
# INSTALL_LOCATION here.
|
||||||
#INSTALL_LOCATION=</path/name/to/install/top>
|
#INSTALL_LOCATION=</path/name/to/install/top>
|
||||||
|
|
||||||
-include $(TOP)/../configure/CONFIG_SITE.local
|
# Set this when your IOC and the host use different paths
|
||||||
-include $(TOP)/../../CONFIG_SITE.local
|
# to access the application. This will be needed to boot
|
||||||
|
# from a Microsoft FTP server or with some NFS mounts.
|
||||||
|
# You must rebuild in the iocBoot directory for this to
|
||||||
|
# take effect.
|
||||||
|
#IOCS_APPL_TOP = </IOC/path/to/application/top>
|
||||||
|
|
||||||
|
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||||
|
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||||
|
|
||||||
|
-include $(TOP)/configure/CONFIG_SITE.local
|
||||||
|
-include $(TOP)/../CONFIG.local
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
# EPICS V4 Developers: Do not edit the locations in this file!
|
# EPICS V4 Developers: Do not edit the locations in this file!
|
||||||
#
|
#
|
||||||
# Create a file RELEASE.local pointing to your PVASRV, PVACCESS,
|
# Create a file RELEASE.local pointing to your places
|
||||||
# PVDATA, PVCOMMON and EPICS_BASE build directories, e.g.
|
# for the dependencies, e.g.
|
||||||
# PVASRV = /path/to/epics/pvaSrvCPP
|
|
||||||
# PVACCESS = /path/to/epics/pvAccessCPP
|
# PVACCESS = /path/to/epics/pvAccessCPP
|
||||||
# PVDATA = /path/to/epics/pvDataCPP
|
# PVDATA = /path/to/epics/pvDataCPP
|
||||||
# PVCOMMON = /path/to/epics/pvCommonCPP
|
# PVCOMMON = /path/to/epics/pvCommonCPP
|
||||||
@ -28,14 +27,14 @@
|
|||||||
# use the following definitions:
|
# use the following definitions:
|
||||||
|
|
||||||
PVDATABASE = $(TOP)/..
|
PVDATABASE = $(TOP)/..
|
||||||
|
|
||||||
-include $(TOP)/../configure/RELEASE.local
|
|
||||||
-include $(TOP)/../../RELEASE.local
|
-include $(TOP)/../../RELEASE.local
|
||||||
|
-include $(TOP)/../configure/RELEASE.local
|
||||||
|
|
||||||
# If you copied this example from pvDatabaseCPP to be built as a
|
# If you copied this example from pvDatabaseCPP to be built as a
|
||||||
# standalone TOP, adjust and use the following definitions:
|
# standalone TOP, define
|
||||||
|
|
||||||
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
||||||
|
# in the appropriate RELEASE[.local],
|
||||||
|
# and use the following definitions instead:
|
||||||
|
|
||||||
#-include $(TOP)/configure/RELEASE.local
|
|
||||||
#-include $(TOP)/../RELEASE.local
|
#-include $(TOP)/../RELEASE.local
|
||||||
|
#-include $(TOP)/configure/RELEASE.local
|
||||||
|
@ -3,22 +3,27 @@ TOP=../..
|
|||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
#=============================
|
||||||
|
|
||||||
|
#==================================================
|
||||||
|
# Build an IOC support library
|
||||||
|
#
|
||||||
|
|
||||||
|
#=============================
|
||||||
|
# build an ioc application
|
||||||
|
|
||||||
|
|
||||||
DBD += exampleLink.dbd
|
DBD += exampleLink.dbd
|
||||||
|
|
||||||
exampleLink_DBD += base.dbd
|
|
||||||
exampleLink_DBD += PVAServerRegister.dbd
|
|
||||||
exampleLink_DBD += PVAClientRegister.dbd
|
|
||||||
exampleLink_DBD += registerChannelProviderLocal.dbd
|
|
||||||
exampleLink_DBD += exampleLinkRegister.dbd
|
|
||||||
|
|
||||||
PROD_IOC += exampleLink
|
PROD_IOC += exampleLink
|
||||||
|
|
||||||
|
|
||||||
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
||||||
exampleLink_SRCS += exampleLink_registerRecordDeviceDriver.cpp
|
exampleLink_SRCS += exampleLink_registerRecordDeviceDriver.cpp
|
||||||
exampleLink_SRCS_DEFAULT += exampleLinkMain.cpp
|
exampleLink_SRCS_DEFAULT += exampleLinkMain.cpp
|
||||||
exampleLink_SRCS_vxWorks += -nil-
|
exampleLink_SRCS_vxWorks += -nil-
|
||||||
|
|
||||||
|
|
||||||
# The following adds support from base/src/vxWorks
|
# The following adds support from base/src/vxWorks
|
||||||
exampleLink_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
exampleLink_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||||
|
|
||||||
@ -27,6 +32,7 @@ exampleLink_LIBS += pvDatabase
|
|||||||
exampleLink_LIBS += pvaSrv
|
exampleLink_LIBS += pvaSrv
|
||||||
exampleLink_LIBS += pvAccess
|
exampleLink_LIBS += pvAccess
|
||||||
exampleLink_LIBS += pvData
|
exampleLink_LIBS += pvData
|
||||||
|
exampleLink_LIBS += Com
|
||||||
exampleLink_LIBS += $(EPICS_BASE_IOC_LIBS)
|
exampleLink_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||||
|
|
||||||
#===========================
|
#===========================
|
||||||
|
5
exampleLink/ioc/src/exampleLinkInclude.dbd
Normal file
5
exampleLink/ioc/src/exampleLinkInclude.dbd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
include "base.dbd"
|
||||||
|
include "PVAServerRegister.dbd"
|
||||||
|
include "PVAClientRegister.dbd"
|
||||||
|
include "registerChannelProviderLocal.dbd"
|
||||||
|
registrar("exampleLinkRegister")
|
@ -3,8 +3,13 @@ TOP=..
|
|||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
#=============================
|
||||||
|
|
||||||
DBD += exampleLinkRegister.dbd
|
#==================================================
|
||||||
|
# Build an IOC support library
|
||||||
|
#
|
||||||
|
|
||||||
|
DBD += exampleLink.dbd
|
||||||
|
|
||||||
INC += exampleLink.h
|
INC += exampleLink.h
|
||||||
|
|
||||||
|
@ -9,13 +9,10 @@
|
|||||||
* @date 2013.08.02
|
* @date 2013.08.02
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <pv/exampleLink.h>
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
#include <pv/convert.h>
|
#include <pv/convert.h>
|
||||||
|
|
||||||
#define epicsExportSharedSymbols
|
|
||||||
#include <exampleLink.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace epics { namespace pvDatabase {
|
namespace epics { namespace pvDatabase {
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
using namespace epics::pvAccess;
|
using namespace epics::pvAccess;
|
||||||
|
@ -8,15 +8,11 @@
|
|||||||
* @author mrk
|
* @author mrk
|
||||||
* @date 2013.08.02
|
* @date 2013.08.02
|
||||||
*/
|
*/
|
||||||
#ifndef EXAMPLELINK_H
|
#ifndef EXAMPLEPVADOUBLEARRAYGET_H
|
||||||
#define EXAMPLELINK_H
|
#define EXAMPLEPVADOUBLEARRAYGET_H
|
||||||
|
|
||||||
#ifdef epicsExportSharedSymbols
|
#include <shareLib.h>
|
||||||
# define examplelinkEpicsExportSharedSymbols
|
|
||||||
# undef epicsExportSharedSymbols
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#include <shareLib.h>
|
|
||||||
#include <pv/timeStamp.h>
|
#include <pv/timeStamp.h>
|
||||||
#include <pv/pvTimeStamp.h>
|
#include <pv/pvTimeStamp.h>
|
||||||
#include <pv/alarm.h>
|
#include <pv/alarm.h>
|
||||||
@ -26,14 +22,6 @@
|
|||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include <pv/serverContext.h>
|
#include <pv/serverContext.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef examplelinkEpicsExportSharedSymbols
|
|
||||||
# define epicsExportSharedSymbols
|
|
||||||
# undef examplelinkEpicsExportSharedSymbols
|
|
||||||
# include <shareLib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace epics { namespace pvDatabase {
|
namespace epics { namespace pvDatabase {
|
||||||
|
|
||||||
|
|
||||||
@ -102,4 +90,4 @@ private:
|
|||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif /* EXAMPLELINK_H */
|
#endif /* EXAMPLEPVADOUBLEARRAYGET_H */
|
||||||
|
1
exampleLink/src/exampleLinkInclude.dbd
Normal file
1
exampleLink/src/exampleLinkInclude.dbd
Normal file
@ -0,0 +1 @@
|
|||||||
|
registrar("exampleLinkRegister")
|
@ -27,16 +27,15 @@
|
|||||||
#include <epicsThread.h>
|
#include <epicsThread.h>
|
||||||
#include <iocsh.h>
|
#include <iocsh.h>
|
||||||
|
|
||||||
|
#include <epicsExport.h>
|
||||||
|
|
||||||
#include <pv/pvIntrospect.h>
|
#include <pv/pvIntrospect.h>
|
||||||
#include <pv/pvData.h>
|
#include <pv/pvData.h>
|
||||||
#include <pv/standardField.h>
|
#include <pv/standardField.h>
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include <pv/pvDatabase.h>
|
#include <pv/pvDatabase.h>
|
||||||
|
#include <pv/exampleLink.h>
|
||||||
#include <epicsExport.h>
|
|
||||||
|
|
||||||
#include <exampleLink.h>
|
|
||||||
|
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
using namespace epics::pvAccess;
|
using namespace epics::pvAccess;
|
||||||
@ -83,7 +82,4 @@ static void exampleLinkRegister(void)
|
|||||||
iocshRegister(&exampleLinkFuncDef, exampleLinkCallFunc);
|
iocshRegister(&exampleLinkFuncDef, exampleLinkCallFunc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
epicsExportRegistrar(exampleLinkRegister);
|
epicsExportRegistrar(exampleLinkRegister);
|
||||||
}
|
|
||||||
|
@ -14,11 +14,26 @@
|
|||||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||||
# continue building anyway if conflicts are found.
|
# continue building anyway if conflicts are found.
|
||||||
CHECK_RELEASE = WARN
|
#CHECK_RELEASE = YES
|
||||||
|
|
||||||
|
# Set this when you only want to compile this application
|
||||||
|
# for a subset of the cross-compiled target architectures
|
||||||
|
# that Base is built for.
|
||||||
|
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||||
|
|
||||||
# To install files into a location other than $(TOP) define
|
# To install files into a location other than $(TOP) define
|
||||||
# INSTALL_LOCATION here.
|
# INSTALL_LOCATION here.
|
||||||
#INSTALL_LOCATION=</path/name/to/install/top>
|
#INSTALL_LOCATION=</path/name/to/install/top>
|
||||||
|
|
||||||
-include $(TOP)/../configure/CONFIG_SITE.local
|
# Set this when your IOC and the host use different paths
|
||||||
-include $(TOP)/../../CONFIG_SITE.local
|
# to access the application. This will be needed to boot
|
||||||
|
# from a Microsoft FTP server or with some NFS mounts.
|
||||||
|
# You must rebuild in the iocBoot directory for this to
|
||||||
|
# take effect.
|
||||||
|
#IOCS_APPL_TOP = </IOC/path/to/application/top>
|
||||||
|
|
||||||
|
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||||
|
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||||
|
|
||||||
|
-include $(TOP)/configure/CONFIG_SITE.local
|
||||||
|
-include $(TOP)/../CONFIG.local
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
# EPICS V4 Developers: Do not edit the locations in this file!
|
# EPICS V4 Developers: Do not edit the locations in this file!
|
||||||
#
|
#
|
||||||
# Create a file RELEASE.local pointing to your PVASRV, PVACCESS,
|
# Create a file RELEASE.local pointing to your places
|
||||||
# PVDATA, PVCOMMON and EPICS_BASE build directories, e.g.
|
# for the dependencies, e.g.
|
||||||
# PVASRV = /path/to/epics/pvaSrvCPP
|
|
||||||
# PVACCESS = /path/to/epics/pvAccessCPP
|
# PVACCESS = /path/to/epics/pvAccessCPP
|
||||||
# PVDATA = /path/to/epics/pvDataCPP
|
# PVDATA = /path/to/epics/pvDataCPP
|
||||||
# PVCOMMON = /path/to/epics/pvCommonCPP
|
# PVCOMMON = /path/to/epics/pvCommonCPP
|
||||||
@ -27,17 +26,17 @@
|
|||||||
# If this example is built in a directory under pvDatabaseCPP,
|
# If this example is built in a directory under pvDatabaseCPP,
|
||||||
# use the following definitions:
|
# use the following definitions:
|
||||||
|
|
||||||
PVDATABASETEST = $(TOP)/../testTop
|
|
||||||
PVDATABASE = $(TOP)/..
|
PVDATABASE = $(TOP)/..
|
||||||
|
PVDATABASETEST = $(TOP)/../test
|
||||||
-include $(TOP)/../configure/RELEASE.local
|
|
||||||
-include $(TOP)/../../RELEASE.local
|
-include $(TOP)/../../RELEASE.local
|
||||||
|
-include $(TOP)/../configure/RELEASE.local
|
||||||
|
|
||||||
# If you copied this example from pvDatabaseCPP to be built as a
|
# If you copied this example from pvDatabaseCPP to be built as a
|
||||||
# standalone TOP, adjust and use the following definitions:
|
# standalone TOP, define
|
||||||
|
|
||||||
#PVDATABASETEST = /path/to/epics/pvDatabaseCPP/testTop
|
|
||||||
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
||||||
|
# PVDATABASETEST = /path/to/epics/pvDatabaseCPP/test
|
||||||
|
# in the appropriate RELEASE[.local],
|
||||||
|
# and use the following definitions instead:
|
||||||
|
|
||||||
#-include $(TOP)/../RELEASE.local
|
#-include $(TOP)/../RELEASE.local
|
||||||
#-include $(TOP)/configure/RELEASE.local
|
#-include $(TOP)/configure/RELEASE.local
|
||||||
|
@ -3,22 +3,26 @@ TOP=../..
|
|||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
#=============================
|
||||||
|
|
||||||
|
#==================================================
|
||||||
|
# Build an IOC support library
|
||||||
|
#
|
||||||
|
|
||||||
DBD += powerSupply.dbd
|
DBD += powerSupply.dbd
|
||||||
|
|
||||||
powerSupply_DBD += base.dbd
|
#=============================
|
||||||
powerSupply_DBD += PVAServerRegister.dbd
|
# build an ioc application
|
||||||
powerSupply_DBD += registerChannelProviderLocal.dbd
|
|
||||||
powerSupply_DBD += dbPv.dbd
|
|
||||||
powerSupply_DBD += powerSupplyRegister.dbd
|
|
||||||
|
|
||||||
PROD_IOC += powerSupply
|
PROD_IOC += powerSupply
|
||||||
|
|
||||||
|
|
||||||
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
||||||
powerSupply_SRCS += powerSupply_registerRecordDeviceDriver.cpp
|
powerSupply_SRCS += powerSupply_registerRecordDeviceDriver.cpp
|
||||||
powerSupply_SRCS_DEFAULT += powerSupplyMain.cpp
|
powerSupply_SRCS_DEFAULT += powerSupplyMain.cpp
|
||||||
powerSupply_SRCS_vxWorks += -nil-
|
powerSupply_SRCS_vxWorks += -nil-
|
||||||
|
|
||||||
|
|
||||||
# The following adds support from base/src/vxWorks
|
# The following adds support from base/src/vxWorks
|
||||||
powerSupply_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
powerSupply_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||||
|
|
||||||
|
5
examplePowerSupply/ioc/src/powerSupplyInclude.dbd
Normal file
5
examplePowerSupply/ioc/src/powerSupplyInclude.dbd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
include "base.dbd"
|
||||||
|
include "PVAServerRegister.dbd"
|
||||||
|
include "registerChannelProviderLocal.dbd"
|
||||||
|
include "dbPv.dbd"
|
||||||
|
include "powerSupplyRegister.dbd"
|
@ -3,14 +3,21 @@ TOP=..
|
|||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
#=============================
|
||||||
|
|
||||||
|
#==================================================
|
||||||
|
# Build an IOC support library
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
PROD_HOST += powerSupplyMain
|
PROD_HOST += powerSupplyMain
|
||||||
powerSupplyMain_SRCS += powerSupplyMain.cpp
|
powerSupplyMain_SRCS += powerSupplyMain.cpp
|
||||||
powerSupplyMain_LIBS += powerSupply
|
|
||||||
powerSupplyMain_LIBS += pvDatabase
|
powerSupplyMain_LIBS += pvDatabase
|
||||||
powerSupplyMain_LIBS += pvAccess
|
powerSupplyMain_LIBS += pvAccess
|
||||||
powerSupplyMain_LIBS += pvData
|
powerSupplyMain_LIBS += pvData
|
||||||
powerSupplyMain_LIBS += Com
|
powerSupplyMain_LIBS += Com
|
||||||
|
powerSupplyMain_LIBS += powerSupply
|
||||||
|
|
||||||
#===========================
|
#===========================
|
||||||
|
|
||||||
|
@ -20,12 +20,11 @@
|
|||||||
|
|
||||||
#include <pv/standardField.h>
|
#include <pv/standardField.h>
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
|
#include <pv/powerSupply.h>
|
||||||
#include <pv/traceRecord.h>
|
#include <pv/traceRecord.h>
|
||||||
#include <pv/channelProviderLocal.h>
|
#include <pv/channelProviderLocal.h>
|
||||||
#include <pv/serverContext.h>
|
#include <pv/serverContext.h>
|
||||||
|
|
||||||
#include <powerSupply.h>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using std::tr1::static_pointer_cast;
|
using std::tr1::static_pointer_cast;
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#Makefile at top of application tree
|
#Makefile at top of application tree
|
||||||
|
|
||||||
TOP = .
|
TOP = .
|
||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
|
|
||||||
DIRS += configure
|
DIRS += configure
|
||||||
|
|
||||||
DIRS += src
|
DIRS += src
|
||||||
@ -12,7 +10,6 @@ DIRS += ioc
|
|||||||
ioc_DEPEND_DIRS = src
|
ioc_DEPEND_DIRS = src
|
||||||
|
|
||||||
DIRS += iocBoot
|
DIRS += iocBoot
|
||||||
iocBoot_DEPEND_DIRS = src
|
|
||||||
|
|
||||||
include $(TOP)/configure/RULES_TOP
|
include $(TOP)/configure/RULES_TOP
|
||||||
|
|
||||||
|
@ -14,11 +14,26 @@
|
|||||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||||
# continue building anyway if conflicts are found.
|
# continue building anyway if conflicts are found.
|
||||||
CHECK_RELEASE = WARN
|
#CHECK_RELEASE = YES
|
||||||
|
|
||||||
|
# Set this when you only want to compile this application
|
||||||
|
# for a subset of the cross-compiled target architectures
|
||||||
|
# that Base is built for.
|
||||||
|
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||||
|
|
||||||
# To install files into a location other than $(TOP) define
|
# To install files into a location other than $(TOP) define
|
||||||
# INSTALL_LOCATION here.
|
# INSTALL_LOCATION here.
|
||||||
#INSTALL_LOCATION=</path/name/to/install/top>
|
#INSTALL_LOCATION=</path/name/to/install/top>
|
||||||
|
|
||||||
-include $(TOP)/../configure/CONFIG_SITE.local
|
# Set this when your IOC and the host use different paths
|
||||||
-include $(TOP)/../../CONFIG_SITE.local
|
# to access the application. This will be needed to boot
|
||||||
|
# from a Microsoft FTP server or with some NFS mounts.
|
||||||
|
# You must rebuild in the iocBoot directory for this to
|
||||||
|
# take effect.
|
||||||
|
#IOCS_APPL_TOP = </IOC/path/to/application/top>
|
||||||
|
|
||||||
|
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||||
|
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||||
|
|
||||||
|
-include $(TOP)/configure/CONFIG_SITE.local
|
||||||
|
-include $(TOP)/../CONFIG.local
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
# EPICS V4 Developers: Do not edit the locations in this file!
|
# EPICS V4 Developers: Do not edit the locations in this file!
|
||||||
#
|
#
|
||||||
# Create a file RELEASE.local pointing to your PVASRV, PVACCESS,
|
# Create a file RELEASE.local pointing to your places
|
||||||
# PVDATA, PVCOMMON and EPICS_BASE build directories, e.g.
|
# for the dependencies, e.g.
|
||||||
# PVASRV = /path/to/epics/pvaSrvCPP
|
|
||||||
# PVACCESS = /path/to/epics/pvAccessCPP
|
# PVACCESS = /path/to/epics/pvAccessCPP
|
||||||
# PVDATA = /path/to/epics/pvDataCPP
|
# PVDATA = /path/to/epics/pvDataCPP
|
||||||
# PVCOMMON = /path/to/epics/pvCommonCPP
|
# PVCOMMON = /path/to/epics/pvCommonCPP
|
||||||
@ -28,14 +27,14 @@
|
|||||||
# use the following definitions:
|
# use the following definitions:
|
||||||
|
|
||||||
PVDATABASE = $(TOP)/..
|
PVDATABASE = $(TOP)/..
|
||||||
|
|
||||||
-include $(TOP)/../configure/RELEASE.local
|
|
||||||
-include $(TOP)/../../RELEASE.local
|
-include $(TOP)/../../RELEASE.local
|
||||||
|
-include $(TOP)/../configure/RELEASE.local
|
||||||
|
|
||||||
# If you copied this example from pvDatabaseCPP to be built as a
|
# If you copied this example from pvDatabaseCPP to be built as a
|
||||||
# standalone TOP, adjust and use the following definitions:
|
# standalone TOP, define
|
||||||
|
|
||||||
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
||||||
|
# in the appropriate RELEASE[.local],
|
||||||
|
# and use the following definitions instead:
|
||||||
|
|
||||||
#-include $(TOP)/configure/RELEASE.local
|
|
||||||
#-include $(TOP)/../RELEASE.local
|
#-include $(TOP)/../RELEASE.local
|
||||||
|
#-include $(TOP)/configure/RELEASE.local
|
||||||
|
@ -3,22 +3,26 @@ TOP=../..
|
|||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
#=============================
|
||||||
|
|
||||||
|
#==================================================
|
||||||
|
# Build an IOC support library
|
||||||
|
#
|
||||||
|
|
||||||
DBD += exampleServer.dbd
|
DBD += exampleServer.dbd
|
||||||
|
|
||||||
exampleServer_DBD += base.dbd
|
#=============================
|
||||||
exampleServer_DBD += PVAServerRegister.dbd
|
# build an ioc application
|
||||||
exampleServer_DBD += registerChannelProviderLocal.dbd
|
|
||||||
exampleServer_DBD += dbPv.dbd
|
|
||||||
exampleServer_DBD += exampleServerRegister.dbd
|
|
||||||
|
|
||||||
PROD_IOC += exampleServer
|
PROD_IOC += exampleServer
|
||||||
|
|
||||||
|
|
||||||
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
||||||
exampleServer_SRCS += exampleServer_registerRecordDeviceDriver.cpp
|
exampleServer_SRCS += exampleServer_registerRecordDeviceDriver.cpp
|
||||||
exampleServer_SRCS_DEFAULT += exampleServerMain.cpp
|
exampleServer_SRCS_DEFAULT += exampleServerMain.cpp
|
||||||
exampleServer_SRCS_vxWorks += -nil-
|
exampleServer_SRCS_vxWorks += -nil-
|
||||||
|
|
||||||
|
|
||||||
# The following adds support from base/src/vxWorks
|
# The following adds support from base/src/vxWorks
|
||||||
exampleServer_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
exampleServer_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||||
|
|
||||||
|
5
exampleServer/ioc/src/exampleServerInclude.dbd
Normal file
5
exampleServer/ioc/src/exampleServerInclude.dbd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
include "base.dbd"
|
||||||
|
include "PVAServerRegister.dbd"
|
||||||
|
include "registerChannelProviderLocal.dbd"
|
||||||
|
include "dbPv.dbd"
|
||||||
|
include "exampleServer.dbd"
|
@ -3,8 +3,14 @@ TOP=..
|
|||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||||
|
#=============================
|
||||||
|
|
||||||
DBD += exampleServerRegister.dbd
|
#==================================================
|
||||||
|
# Build an IOC support library
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
DBD += exampleServer.dbd
|
||||||
|
|
||||||
INC += exampleServer.h
|
INC += exampleServer.h
|
||||||
|
|
||||||
@ -14,6 +20,7 @@ exampleServer_SRCS += exampleServerRegister.cpp
|
|||||||
exampleServer_LIBS += pvDatabase
|
exampleServer_LIBS += pvDatabase
|
||||||
exampleServer_LIBS += pvAccess
|
exampleServer_LIBS += pvAccess
|
||||||
exampleServer_LIBS += pvData
|
exampleServer_LIBS += pvData
|
||||||
|
exampleServer_LIBS += Com
|
||||||
exampleServer_LIBS += $(EPICS_BASE_IOC_LIBS)
|
exampleServer_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||||
|
|
||||||
PROD_HOST += exampleServerMain
|
PROD_HOST += exampleServerMain
|
||||||
|
@ -10,10 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
|
#include <pv/exampleServer.h>
|
||||||
#define epicsExportSharedSymbols
|
|
||||||
|
|
||||||
#include <exampleServer.h>
|
|
||||||
|
|
||||||
namespace epics { namespace exampleServer {
|
namespace epics { namespace exampleServer {
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
|
@ -8,26 +8,15 @@
|
|||||||
* @author mrk
|
* @author mrk
|
||||||
* @date 2013.04.02
|
* @date 2013.04.02
|
||||||
*/
|
*/
|
||||||
#ifndef EXAMPLESERVER_H
|
#ifndef EXAMPLECOUNTER_H
|
||||||
#define EXAMPLESERVER_H
|
#define EXAMPLECOUNTER_H
|
||||||
|
|
||||||
#ifdef epicsExportSharedSymbols
|
|
||||||
# define exampleServerEpicsExportSharedSymbols
|
|
||||||
# undef epicsExportSharedSymbols
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <shareLib.h>
|
#include <shareLib.h>
|
||||||
|
|
||||||
#include <pv/pvDatabase.h>
|
#include <pv/pvDatabase.h>
|
||||||
#include <pv/timeStamp.h>
|
#include <pv/timeStamp.h>
|
||||||
#include <pv/pvTimeStamp.h>
|
#include <pv/pvTimeStamp.h>
|
||||||
|
|
||||||
#ifdef exampleServerEpicsExportSharedSymbols
|
|
||||||
# define epicsExportSharedSymbols
|
|
||||||
# undef exampleServerEpicsExportSharedSymbols
|
|
||||||
# include <shareLib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace epics { namespace exampleServer {
|
namespace epics { namespace exampleServer {
|
||||||
|
|
||||||
|
|
||||||
@ -58,4 +47,4 @@ private:
|
|||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif /* EXAMPLESERVER_H */
|
#endif /* EXAMPLECOUNTER_H */
|
||||||
|
1
exampleServer/src/exampleServerInclude.dbd
Normal file
1
exampleServer/src/exampleServerInclude.dbd
Normal file
@ -0,0 +1 @@
|
|||||||
|
registrar("exampleServerRegister")
|
@ -20,12 +20,11 @@
|
|||||||
|
|
||||||
#include <pv/standardField.h>
|
#include <pv/standardField.h>
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
|
#include <pv/exampleServer.h>
|
||||||
#include <pv/traceRecord.h>
|
#include <pv/traceRecord.h>
|
||||||
#include <pv/channelProviderLocal.h>
|
#include <pv/channelProviderLocal.h>
|
||||||
#include <pv/serverContext.h>
|
#include <pv/serverContext.h>
|
||||||
|
|
||||||
#include <exampleServer.h>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using std::tr1::static_pointer_cast;
|
using std::tr1::static_pointer_cast;
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
|
@ -27,14 +27,13 @@
|
|||||||
#include <epicsThread.h>
|
#include <epicsThread.h>
|
||||||
#include <iocsh.h>
|
#include <iocsh.h>
|
||||||
|
|
||||||
|
#include <epicsExport.h>
|
||||||
|
|
||||||
#include <pv/pvIntrospect.h>
|
#include <pv/pvIntrospect.h>
|
||||||
#include <pv/pvData.h>
|
#include <pv/pvData.h>
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include <pv/pvDatabase.h>
|
#include <pv/pvDatabase.h>
|
||||||
|
#include <pv/exampleServer.h>
|
||||||
#include <epicsExport.h>
|
|
||||||
|
|
||||||
#include <exampleServer.h>
|
|
||||||
|
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
using namespace epics::pvAccess;
|
using namespace epics::pvAccess;
|
||||||
@ -65,7 +64,4 @@ static void exampleServerRegister(void)
|
|||||||
iocshRegister(&exampleServerFuncDef, exampleServerCallFunc);
|
iocshRegister(&exampleServerFuncDef, exampleServerCallFunc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
epicsExportRegistrar(exampleServerRegister);
|
epicsExportRegistrar(exampleServerRegister);
|
||||||
}
|
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
TOP = ..
|
TOP = ..
|
||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
|
|
||||||
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
|
||||||
USR_INCLUDES += -I$(INSTALL_LOCATION)/include
|
|
||||||
|
|
||||||
PVDATABASE_SRC = $(TOP)/src
|
PVDATABASE_SRC = $(TOP)/src
|
||||||
|
|
||||||
LIBRARY += pvDatabase
|
LIBRARY += pvDatabase
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
SRC_DIRS += $(PVDATABASE_SRC)/pvAccess
|
SRC_DIRS += $(PVDATABASE_SRC)/pvAccess
|
||||||
|
|
||||||
INC += channelProviderLocal.h
|
INC += channelProviderLocal.h
|
||||||
INC += pvCopy.h
|
INC += pvCopyMonitor.h
|
||||||
INC += monitorAlgorithm.h
|
|
||||||
|
|
||||||
DBD += registerChannelProviderLocal.dbd
|
DBD += registerChannelProviderLocal.dbd
|
||||||
|
|
||||||
LIBSRCS += channelProviderLocal.cpp
|
LIBSRCS += channelProviderLocal.cpp
|
||||||
LIBSRCS += pvCopy.cpp
|
|
||||||
LIBSRCS += monitorFactory.cpp
|
|
||||||
LIBSRCS += channelLocal.cpp
|
LIBSRCS += channelLocal.cpp
|
||||||
|
LIBSRCS += pvCopyMonitor.cpp
|
||||||
|
LIBSRCS += monitorFactory.cpp
|
||||||
LIBSRCS += registerChannelProviderLocal.cpp
|
LIBSRCS += registerChannelProviderLocal.cpp
|
||||||
|
|
||||||
|
@ -14,13 +14,10 @@
|
|||||||
#include <epicsThread.h>
|
#include <epicsThread.h>
|
||||||
|
|
||||||
#include <pv/timeStamp.h>
|
#include <pv/timeStamp.h>
|
||||||
|
#include <pv/channelProviderLocal.h>
|
||||||
#include <pv/convert.h>
|
#include <pv/convert.h>
|
||||||
#include <pv/pvSubArrayCopy.h>
|
#include <pv/pvSubArrayCopy.h>
|
||||||
|
|
||||||
#define epicsExportSharedSymbols
|
|
||||||
|
|
||||||
#include <pv/channelProviderLocal.h>
|
|
||||||
|
|
||||||
namespace epics { namespace pvDatabase {
|
namespace epics { namespace pvDatabase {
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
using namespace epics::pvAccess;
|
using namespace epics::pvAccess;
|
||||||
@ -30,6 +27,26 @@ using std::cout;
|
|||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
static ConvertPtr convert = getConvert();
|
static ConvertPtr convert = getConvert();
|
||||||
|
static StructureConstPtr nullStructure;
|
||||||
|
static PVStructurePtr nullPVStructure;
|
||||||
|
static BitSetPtr nullBitSet;
|
||||||
|
static Status channelDestroyedStatus(
|
||||||
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
|
"was destroyed"
|
||||||
|
);
|
||||||
|
static Status illegalOffsetStatus(
|
||||||
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
|
"count must be >0"
|
||||||
|
);
|
||||||
|
static Status illegalCountStatus(
|
||||||
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
|
"count must be >0"
|
||||||
|
);
|
||||||
|
static Status illegalStrideStatus(
|
||||||
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
|
"stride must be >0"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
class ChannelProcessLocal;
|
class ChannelProcessLocal;
|
||||||
typedef std::tr1::shared_ptr<ChannelProcessLocal> ChannelProcessLocalPtr;
|
typedef std::tr1::shared_ptr<ChannelProcessLocal> ChannelProcessLocalPtr;
|
||||||
@ -49,7 +66,7 @@ typedef std::tr1::shared_ptr<ChannelArrayLocal> ChannelArrayLocalPtr;
|
|||||||
static bool getProcess(PVStructurePtr pvRequest,bool processDefault)
|
static bool getProcess(PVStructurePtr pvRequest,bool processDefault)
|
||||||
{
|
{
|
||||||
PVFieldPtr pvField = pvRequest->getSubField("record._options.process");
|
PVFieldPtr pvField = pvRequest->getSubField("record._options.process");
|
||||||
if(pvField.get()==NULL || pvField->getField()->getType()!=scalar) {
|
if(pvField==NULL || pvField->getField()->getType()!=scalar) {
|
||||||
return processDefault;
|
return processDefault;
|
||||||
}
|
}
|
||||||
ScalarConstPtr scalar = static_pointer_cast<const Scalar>(
|
ScalarConstPtr scalar = static_pointer_cast<const Scalar>(
|
||||||
@ -82,8 +99,12 @@ public:
|
|||||||
ChannelProcessRequester::shared_pointer const & channelProcessRequester,
|
ChannelProcessRequester::shared_pointer const & channelProcessRequester,
|
||||||
PVStructurePtr const & pvRequest,
|
PVStructurePtr const & pvRequest,
|
||||||
PVRecordPtr const &pvRecord);
|
PVRecordPtr const &pvRecord);
|
||||||
virtual void process(bool lastRequest);
|
virtual void process();
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
virtual std::tr1::shared_ptr<Channel> getChannel()
|
||||||
|
{return channelLocal;}
|
||||||
|
virtual void cancel(){}
|
||||||
|
virtual void lastRequest() {}
|
||||||
virtual void lock() {mutex.lock();}
|
virtual void lock() {mutex.lock();}
|
||||||
virtual void unlock() {mutex.unlock();}
|
virtual void unlock() {mutex.unlock();}
|
||||||
private:
|
private:
|
||||||
@ -105,7 +126,6 @@ private:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
bool isDestroyed;
|
bool isDestroyed;
|
||||||
bool callProcess;
|
|
||||||
ChannelLocalPtr channelLocal;
|
ChannelLocalPtr channelLocal;
|
||||||
ChannelProcessRequester::shared_pointer channelProcessRequester;
|
ChannelProcessRequester::shared_pointer channelProcessRequester;
|
||||||
PVRecordPtr pvRecord;
|
PVRecordPtr pvRecord;
|
||||||
@ -167,13 +187,11 @@ void ChannelProcessLocal::destroy()
|
|||||||
channelLocal.reset();
|
channelLocal.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelProcessLocal::process(bool lastRequest)
|
|
||||||
|
void ChannelProcessLocal::process()
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelProcessRequester->processDone(channelDestroyedStatus,getPtrSelf());
|
||||||
Status::STATUSTYPE_ERROR,
|
|
||||||
"was destroyed");
|
|
||||||
channelProcessRequester->processDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
@ -193,8 +211,7 @@ void ChannelProcessLocal::process(bool lastRequest)
|
|||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
}
|
}
|
||||||
channelProcessRequester->processDone(Status::Ok);
|
channelProcessRequester->processDone(Status::Ok,getPtrSelf());
|
||||||
if(lastRequest) destroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChannelGetLocal :
|
class ChannelGetLocal :
|
||||||
@ -215,8 +232,12 @@ public:
|
|||||||
ChannelGetRequester::shared_pointer const & channelGetRequester,
|
ChannelGetRequester::shared_pointer const & channelGetRequester,
|
||||||
PVStructurePtr const & pvRequest,
|
PVStructurePtr const & pvRequest,
|
||||||
PVRecordPtr const &pvRecord);
|
PVRecordPtr const &pvRecord);
|
||||||
virtual void get(bool lastRequest);
|
virtual void get();
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
virtual std::tr1::shared_ptr<Channel> getChannel()
|
||||||
|
{return channelLocal;}
|
||||||
|
virtual void cancel(){}
|
||||||
|
virtual void lastRequest() {}
|
||||||
virtual void lock() {mutex.lock();}
|
virtual void lock() {mutex.lock();}
|
||||||
virtual void unlock() {mutex.unlock();}
|
virtual void unlock() {mutex.unlock();}
|
||||||
private:
|
private:
|
||||||
@ -263,21 +284,18 @@ ChannelGetLocalPtr ChannelGetLocal::create(
|
|||||||
PVRecordPtr const &pvRecord)
|
PVRecordPtr const &pvRecord)
|
||||||
{
|
{
|
||||||
PVCopyPtr pvCopy = PVCopy::create(
|
PVCopyPtr pvCopy = PVCopy::create(
|
||||||
pvRecord,
|
pvRecord->getPVRecordStructure()->getPVStructure(),
|
||||||
pvRequest,
|
pvRequest,
|
||||||
"");
|
"");
|
||||||
if(pvCopy.get()==NULL) {
|
if(pvCopy==NULL) {
|
||||||
Status status(
|
Status status(
|
||||||
Status::STATUSTYPE_ERROR,
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
"invalid pvRequest");
|
"invalid pvRequest");
|
||||||
ChannelGet::shared_pointer channelGet;
|
ChannelGet::shared_pointer channelGet;
|
||||||
PVStructurePtr pvStructure;
|
|
||||||
BitSetPtr bitSet;
|
|
||||||
channelGetRequester->channelGetConnect(
|
channelGetRequester->channelGetConnect(
|
||||||
status,
|
status,
|
||||||
channelGet,
|
channelGet,
|
||||||
pvStructure,
|
nullStructure);
|
||||||
bitSet);
|
|
||||||
ChannelGetLocalPtr localGet;
|
ChannelGetLocalPtr localGet;
|
||||||
return localGet;
|
return localGet;
|
||||||
}
|
}
|
||||||
@ -296,7 +314,8 @@ ChannelGetLocalPtr ChannelGetLocal::create(
|
|||||||
cout << "ChannelGetLocal::create";
|
cout << "ChannelGetLocal::create";
|
||||||
cout << " recordName " << pvRecord->getRecordName() << endl;
|
cout << " recordName " << pvRecord->getRecordName() << endl;
|
||||||
}
|
}
|
||||||
channelGetRequester->channelGetConnect(Status::Ok, get, pvStructure,bitSet);
|
channelGetRequester->channelGetConnect(
|
||||||
|
Status::Ok,get,pvStructure->getStructure());
|
||||||
return get;
|
return get;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,13 +335,11 @@ void ChannelGetLocal::destroy()
|
|||||||
channelLocal.reset();
|
channelLocal.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelGetLocal::get(bool lastRequest)
|
void ChannelGetLocal::get()
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelGetRequester->getDone(
|
||||||
Status::STATUSTYPE_ERROR,
|
channelDestroyedStatus,getPtrSelf(),nullPVStructure,nullBitSet);
|
||||||
"was destroyed");
|
|
||||||
channelGetRequester->getDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bitSet->clear();
|
bitSet->clear();
|
||||||
@ -344,12 +361,15 @@ void ChannelGetLocal::get(bool lastRequest)
|
|||||||
bitSet->set(0);
|
bitSet->set(0);
|
||||||
firstTime = false;
|
firstTime = false;
|
||||||
}
|
}
|
||||||
channelGetRequester->getDone(Status::Ok);
|
channelGetRequester->getDone(
|
||||||
|
Status::Ok,
|
||||||
|
getPtrSelf(),
|
||||||
|
pvStructure,
|
||||||
|
bitSet);
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelGetLocal::get" << endl;
|
cout << "ChannelGetLocal::get" << endl;
|
||||||
}
|
}
|
||||||
if(lastRequest) destroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChannelPutLocal :
|
class ChannelPutLocal :
|
||||||
@ -370,9 +390,13 @@ public:
|
|||||||
ChannelPutRequester::shared_pointer const & channelPutRequester,
|
ChannelPutRequester::shared_pointer const & channelPutRequester,
|
||||||
PVStructurePtr const & pvRequest,
|
PVStructurePtr const & pvRequest,
|
||||||
PVRecordPtr const &pvRecord);
|
PVRecordPtr const &pvRecord);
|
||||||
virtual void put(bool lastRequest);
|
virtual void put(PVStructurePtr const &pvStructure,BitSetPtr const &bitSet);
|
||||||
virtual void get();
|
virtual void get();
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
virtual std::tr1::shared_ptr<Channel> getChannel()
|
||||||
|
{return channelLocal;}
|
||||||
|
virtual void cancel(){}
|
||||||
|
virtual void lastRequest() {}
|
||||||
virtual void lock() {mutex.lock();}
|
virtual void lock() {mutex.lock();}
|
||||||
virtual void unlock() {mutex.unlock();}
|
virtual void unlock() {mutex.unlock();}
|
||||||
private:
|
private:
|
||||||
@ -385,8 +409,6 @@ private:
|
|||||||
ChannelLocalPtr const &channelLocal,
|
ChannelLocalPtr const &channelLocal,
|
||||||
ChannelPutRequester::shared_pointer const & channelPutRequester,
|
ChannelPutRequester::shared_pointer const & channelPutRequester,
|
||||||
PVCopyPtr const &pvCopy,
|
PVCopyPtr const &pvCopy,
|
||||||
PVStructurePtr const&pvStructure,
|
|
||||||
BitSetPtr const & bitSet,
|
|
||||||
PVRecordPtr const &pvRecord)
|
PVRecordPtr const &pvRecord)
|
||||||
:
|
:
|
||||||
isDestroyed(false),
|
isDestroyed(false),
|
||||||
@ -394,8 +416,6 @@ private:
|
|||||||
channelLocal(channelLocal),
|
channelLocal(channelLocal),
|
||||||
channelPutRequester(channelPutRequester),
|
channelPutRequester(channelPutRequester),
|
||||||
pvCopy(pvCopy),
|
pvCopy(pvCopy),
|
||||||
pvStructure(pvStructure),
|
|
||||||
bitSet(bitSet),
|
|
||||||
pvRecord(pvRecord)
|
pvRecord(pvRecord)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -404,8 +424,6 @@ private:
|
|||||||
ChannelLocalPtr channelLocal;
|
ChannelLocalPtr channelLocal;
|
||||||
ChannelPutRequester::shared_pointer channelPutRequester;
|
ChannelPutRequester::shared_pointer channelPutRequester;
|
||||||
PVCopyPtr pvCopy;
|
PVCopyPtr pvCopy;
|
||||||
PVStructurePtr pvStructure;
|
|
||||||
BitSetPtr bitSet;
|
|
||||||
PVRecordPtr pvRecord;
|
PVRecordPtr pvRecord;
|
||||||
Mutex mutex;
|
Mutex mutex;
|
||||||
};
|
};
|
||||||
@ -417,12 +435,12 @@ ChannelPutLocalPtr ChannelPutLocal::create(
|
|||||||
PVRecordPtr const &pvRecord)
|
PVRecordPtr const &pvRecord)
|
||||||
{
|
{
|
||||||
PVCopyPtr pvCopy = PVCopy::create(
|
PVCopyPtr pvCopy = PVCopy::create(
|
||||||
pvRecord,
|
pvRecord->getPVRecordStructure()->getPVStructure(),
|
||||||
pvRequest,
|
pvRequest,
|
||||||
"");
|
"");
|
||||||
if(pvCopy.get()==NULL) {
|
if(pvCopy==NULL) {
|
||||||
Status status(
|
Status status(
|
||||||
Status::STATUSTYPE_ERROR,
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
"invalid pvRequest");
|
"invalid pvRequest");
|
||||||
ChannelPut::shared_pointer channelPut;
|
ChannelPut::shared_pointer channelPut;
|
||||||
PVStructurePtr pvStructure;
|
PVStructurePtr pvStructure;
|
||||||
@ -430,22 +448,18 @@ ChannelPutLocalPtr ChannelPutLocal::create(
|
|||||||
channelPutRequester->channelPutConnect(
|
channelPutRequester->channelPutConnect(
|
||||||
status,
|
status,
|
||||||
channelPut,
|
channelPut,
|
||||||
pvStructure,
|
nullStructure);
|
||||||
bitSet);
|
|
||||||
ChannelPutLocalPtr localPut;
|
ChannelPutLocalPtr localPut;
|
||||||
return localPut;
|
return localPut;
|
||||||
}
|
}
|
||||||
PVStructurePtr pvStructure = pvCopy->createPVStructure();
|
|
||||||
BitSetPtr bitSet(new BitSet(pvStructure->getNumberFields()));
|
|
||||||
ChannelPutLocalPtr put(new ChannelPutLocal(
|
ChannelPutLocalPtr put(new ChannelPutLocal(
|
||||||
getProcess(pvRequest,true),
|
getProcess(pvRequest,true),
|
||||||
channelLocal,
|
channelLocal,
|
||||||
channelPutRequester,
|
channelPutRequester,
|
||||||
pvCopy,
|
pvCopy,
|
||||||
pvStructure,
|
|
||||||
bitSet,
|
|
||||||
pvRecord));
|
pvRecord));
|
||||||
channelPutRequester->channelPutConnect(Status::Ok, put, pvStructure,bitSet);
|
channelPutRequester->channelPutConnect(
|
||||||
|
Status::Ok, put, pvCopy->getStructure());
|
||||||
if(pvRecord->getTraceLevel()>0)
|
if(pvRecord->getTraceLevel()>0)
|
||||||
{
|
{
|
||||||
cout << "ChannelPutLocal::create";
|
cout << "ChannelPutLocal::create";
|
||||||
@ -472,12 +486,12 @@ void ChannelPutLocal::destroy()
|
|||||||
void ChannelPutLocal::get()
|
void ChannelPutLocal::get()
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelPutRequester->getDone(
|
||||||
Status::STATUSTYPE_ERROR,
|
channelDestroyedStatus,getPtrSelf(),nullPVStructure,nullBitSet);
|
||||||
"was destroyed");
|
|
||||||
channelPutRequester->getDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
PVStructurePtr pvStructure = pvCopy->createPVStructure();
|
||||||
|
BitSetPtr bitSet(new BitSet(pvStructure->getNumberFields()));
|
||||||
bitSet->clear();
|
bitSet->clear();
|
||||||
bitSet->set(0);
|
bitSet->set(0);
|
||||||
pvRecord->lock();
|
pvRecord->lock();
|
||||||
@ -488,26 +502,25 @@ void ChannelPutLocal::get()
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
channelPutRequester->getDone(Status::Ok);
|
channelPutRequester->getDone(
|
||||||
|
Status::Ok,getPtrSelf(),pvStructure,bitSet);
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelPutLocal::get" << endl;
|
cout << "ChannelPutLocal::get" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelPutLocal::put(bool lastRequest)
|
void ChannelPutLocal::put(
|
||||||
|
PVStructurePtr const &pvStructure,BitSetPtr const &bitSet)
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelPutRequester->putDone(channelDestroyedStatus,getPtrSelf());
|
||||||
Status::STATUSTYPE_ERROR,
|
|
||||||
"was destroyed");
|
|
||||||
channelPutRequester->getDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pvRecord->lock();
|
pvRecord->lock();
|
||||||
try {
|
try {
|
||||||
pvRecord->beginGroupPut();
|
pvRecord->beginGroupPut();
|
||||||
pvCopy->updateRecord(pvStructure, bitSet);
|
pvCopy->updateMaster(pvStructure, bitSet);
|
||||||
if(callProcess) {
|
if(callProcess) {
|
||||||
pvRecord->process();
|
pvRecord->process();
|
||||||
}
|
}
|
||||||
@ -517,12 +530,11 @@ void ChannelPutLocal::put(bool lastRequest)
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
channelPutRequester->putDone(Status::Ok);
|
channelPutRequester->putDone(Status::Ok,getPtrSelf());
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelPutLocal::put" << endl;
|
cout << "ChannelPutLocal::put" << endl;
|
||||||
}
|
}
|
||||||
if(lastRequest) destroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -544,10 +556,16 @@ public:
|
|||||||
ChannelPutGetRequester::shared_pointer const & channelPutGetRequester,
|
ChannelPutGetRequester::shared_pointer const & channelPutGetRequester,
|
||||||
PVStructurePtr const & pvRequest,
|
PVStructurePtr const & pvRequest,
|
||||||
PVRecordPtr const &pvRecord);
|
PVRecordPtr const &pvRecord);
|
||||||
virtual void putGet(bool lastRequest);
|
virtual void putGet(
|
||||||
|
PVStructurePtr const &pvPutStructure,
|
||||||
|
BitSetPtr const &putBitSet);
|
||||||
virtual void getPut();
|
virtual void getPut();
|
||||||
virtual void getGet();
|
virtual void getGet();
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
virtual std::tr1::shared_ptr<Channel> getChannel()
|
||||||
|
{return channelLocal;}
|
||||||
|
virtual void cancel(){}
|
||||||
|
virtual void lastRequest() {}
|
||||||
virtual void lock() {mutex.lock();}
|
virtual void lock() {mutex.lock();}
|
||||||
virtual void unlock() {mutex.unlock();}
|
virtual void unlock() {mutex.unlock();}
|
||||||
private:
|
private:
|
||||||
@ -561,9 +579,7 @@ private:
|
|||||||
ChannelPutGetRequester::shared_pointer const & channelPutGetRequester,
|
ChannelPutGetRequester::shared_pointer const & channelPutGetRequester,
|
||||||
PVCopyPtr const &pvPutCopy,
|
PVCopyPtr const &pvPutCopy,
|
||||||
PVCopyPtr const &pvGetCopy,
|
PVCopyPtr const &pvGetCopy,
|
||||||
PVStructurePtr const&pvPutStructure,
|
|
||||||
PVStructurePtr const&pvGetStructure,
|
PVStructurePtr const&pvGetStructure,
|
||||||
BitSetPtr const & putBitSet,
|
|
||||||
BitSetPtr const & getBitSet,
|
BitSetPtr const & getBitSet,
|
||||||
PVRecordPtr const &pvRecord)
|
PVRecordPtr const &pvRecord)
|
||||||
:
|
:
|
||||||
@ -573,9 +589,7 @@ private:
|
|||||||
channelPutGetRequester(channelPutGetRequester),
|
channelPutGetRequester(channelPutGetRequester),
|
||||||
pvPutCopy(pvPutCopy),
|
pvPutCopy(pvPutCopy),
|
||||||
pvGetCopy(pvGetCopy),
|
pvGetCopy(pvGetCopy),
|
||||||
pvPutStructure(pvPutStructure),
|
|
||||||
pvGetStructure(pvGetStructure),
|
pvGetStructure(pvGetStructure),
|
||||||
putBitSet(putBitSet),
|
|
||||||
getBitSet(getBitSet),
|
getBitSet(getBitSet),
|
||||||
pvRecord(pvRecord)
|
pvRecord(pvRecord)
|
||||||
{
|
{
|
||||||
@ -586,9 +600,7 @@ private:
|
|||||||
ChannelPutGetRequester::shared_pointer channelPutGetRequester;
|
ChannelPutGetRequester::shared_pointer channelPutGetRequester;
|
||||||
PVCopyPtr pvPutCopy;
|
PVCopyPtr pvPutCopy;
|
||||||
PVCopyPtr pvGetCopy;
|
PVCopyPtr pvGetCopy;
|
||||||
PVStructurePtr pvPutStructure;
|
|
||||||
PVStructurePtr pvGetStructure;
|
PVStructurePtr pvGetStructure;
|
||||||
BitSetPtr putBitSet;
|
|
||||||
BitSetPtr getBitSet;
|
BitSetPtr getBitSet;
|
||||||
PVRecordPtr pvRecord;
|
PVRecordPtr pvRecord;
|
||||||
Mutex mutex;
|
Mutex mutex;
|
||||||
@ -601,50 +613,35 @@ ChannelPutGetLocalPtr ChannelPutGetLocal::create(
|
|||||||
PVRecordPtr const &pvRecord)
|
PVRecordPtr const &pvRecord)
|
||||||
{
|
{
|
||||||
PVCopyPtr pvPutCopy = PVCopy::create(
|
PVCopyPtr pvPutCopy = PVCopy::create(
|
||||||
pvRecord,
|
pvRecord->getPVRecordStructure()->getPVStructure(),
|
||||||
pvRequest,
|
pvRequest,
|
||||||
"putField");
|
"putField");
|
||||||
PVCopyPtr pvGetCopy = PVCopy::create(
|
PVCopyPtr pvGetCopy = PVCopy::create(
|
||||||
pvRecord,
|
pvRecord->getPVRecordStructure()->getPVStructure(),
|
||||||
pvRequest,
|
pvRequest,
|
||||||
"getField");
|
"getField");
|
||||||
if(pvPutCopy.get()==NULL || pvGetCopy.get()==NULL) {
|
if(pvPutCopy==NULL || pvGetCopy==NULL) {
|
||||||
Status status(
|
Status status(
|
||||||
Status::STATUSTYPE_ERROR,
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
"invalid pvRequest");
|
"invalid pvRequest");
|
||||||
ChannelPutGet::shared_pointer channelPutGet;
|
ChannelPutGet::shared_pointer channelPutGet;
|
||||||
PVStructurePtr pvStructure;
|
|
||||||
BitSetPtr bitSet;
|
|
||||||
channelPutGetRequester->channelPutGetConnect(
|
channelPutGetRequester->channelPutGetConnect(
|
||||||
status,
|
status,
|
||||||
channelPutGet,
|
channelPutGet,
|
||||||
pvStructure,
|
nullStructure,
|
||||||
pvStructure);
|
nullStructure);
|
||||||
ChannelPutGetLocalPtr localPutGet;
|
ChannelPutGetLocalPtr localPutGet;
|
||||||
return localPutGet;
|
return localPutGet;
|
||||||
}
|
}
|
||||||
PVStructurePtr pvPutStructure = pvPutCopy->createPVStructure();
|
|
||||||
PVStructurePtr pvGetStructure = pvGetCopy->createPVStructure();
|
PVStructurePtr pvGetStructure = pvGetCopy->createPVStructure();
|
||||||
BitSetPtr putBitSet(new BitSet(pvPutStructure->getNumberFields()));
|
|
||||||
BitSetPtr getBitSet(new BitSet(pvGetStructure->getNumberFields()));
|
BitSetPtr getBitSet(new BitSet(pvGetStructure->getNumberFields()));
|
||||||
pvRecord->lock();
|
|
||||||
try {
|
|
||||||
pvPutCopy->initCopy(pvPutStructure,putBitSet);
|
|
||||||
pvGetCopy->initCopy(pvGetStructure,getBitSet);
|
|
||||||
} catch(...) {
|
|
||||||
pvRecord->unlock();
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
pvRecord->unlock();
|
|
||||||
ChannelPutGetLocalPtr putGet(new ChannelPutGetLocal(
|
ChannelPutGetLocalPtr putGet(new ChannelPutGetLocal(
|
||||||
getProcess(pvRequest,true),
|
getProcess(pvRequest,true),
|
||||||
channelLocal,
|
channelLocal,
|
||||||
channelPutGetRequester,
|
channelPutGetRequester,
|
||||||
pvPutCopy,
|
pvPutCopy,
|
||||||
pvGetCopy,
|
pvGetCopy,
|
||||||
pvPutStructure,
|
|
||||||
pvGetStructure,
|
pvGetStructure,
|
||||||
putBitSet,
|
|
||||||
getBitSet,
|
getBitSet,
|
||||||
pvRecord));
|
pvRecord));
|
||||||
if(pvRecord->getTraceLevel()>0)
|
if(pvRecord->getTraceLevel()>0)
|
||||||
@ -653,7 +650,7 @@ ChannelPutGetLocalPtr ChannelPutGetLocal::create(
|
|||||||
cout << " recordName " << pvRecord->getRecordName() << endl;
|
cout << " recordName " << pvRecord->getRecordName() << endl;
|
||||||
}
|
}
|
||||||
channelPutGetRequester->channelPutGetConnect(
|
channelPutGetRequester->channelPutGetConnect(
|
||||||
Status::Ok, putGet, pvPutStructure,pvGetStructure);
|
Status::Ok, putGet, pvPutCopy->getStructure(),pvGetCopy->getStructure());
|
||||||
return putGet;
|
return putGet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -673,22 +670,20 @@ void ChannelPutGetLocal::destroy()
|
|||||||
channelLocal.reset();
|
channelLocal.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelPutGetLocal::putGet(bool lastRequest)
|
void ChannelPutGetLocal::putGet(
|
||||||
|
PVStructurePtr const &pvPutStructure,BitSetPtr const &putBitSet)
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelPutGetRequester->putGetDone(
|
||||||
Status::STATUSTYPE_ERROR,
|
channelDestroyedStatus,getPtrSelf(),nullPVStructure,nullBitSet);
|
||||||
"was destroyed");
|
|
||||||
channelPutGetRequester->putGetDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
putBitSet->clear();
|
|
||||||
putBitSet->set(0);
|
|
||||||
pvRecord->lock();
|
pvRecord->lock();
|
||||||
try {
|
try {
|
||||||
pvRecord->beginGroupPut();
|
pvRecord->beginGroupPut();
|
||||||
pvPutCopy->updateRecord(pvPutStructure, putBitSet);
|
pvPutCopy->updateMaster(pvPutStructure, putBitSet);
|
||||||
if(callProcess) pvRecord->process();
|
if(callProcess) pvRecord->process();
|
||||||
|
getBitSet->clear();
|
||||||
pvGetCopy->updateCopySetBitSet(pvGetStructure, getBitSet);
|
pvGetCopy->updateCopySetBitSet(pvGetStructure, getBitSet);
|
||||||
pvRecord->endGroupPut();
|
pvRecord->endGroupPut();
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
@ -696,36 +691,33 @@ void ChannelPutGetLocal::putGet(bool lastRequest)
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
getBitSet->clear();
|
channelPutGetRequester->putGetDone(
|
||||||
getBitSet->set(0);
|
Status::Ok,getPtrSelf(),pvGetStructure,getBitSet);
|
||||||
channelPutGetRequester->putGetDone(Status::Ok);
|
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelPutGetLocal::putGet" << endl;
|
cout << "ChannelPutGetLocal::putGet" << endl;
|
||||||
}
|
}
|
||||||
if(lastRequest) destroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelPutGetLocal::getPut()
|
void ChannelPutGetLocal::getPut()
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelPutGetRequester->getPutDone(
|
||||||
Status::STATUSTYPE_ERROR,
|
channelDestroyedStatus,getPtrSelf(),nullPVStructure,nullBitSet);
|
||||||
"was destroyed");
|
|
||||||
channelPutGetRequester->getPutDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
PVStructurePtr pvPutStructure = pvPutCopy->createPVStructure();
|
||||||
|
BitSetPtr putBitSet(new BitSet(pvPutStructure->getNumberFields()));
|
||||||
pvRecord->lock();
|
pvRecord->lock();
|
||||||
try {
|
try {
|
||||||
pvPutCopy->updateCopySetBitSet(pvPutStructure, putBitSet);
|
pvPutCopy->initCopy(pvPutStructure, putBitSet);
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
putBitSet->clear();
|
channelPutGetRequester->getPutDone(
|
||||||
putBitSet->set(0);
|
Status::Ok,getPtrSelf(),pvPutStructure,putBitSet);
|
||||||
channelPutGetRequester->getPutDone(Status::Ok);
|
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelPutGetLocal::getPut" << endl;
|
cout << "ChannelPutGetLocal::getPut" << endl;
|
||||||
@ -735,12 +727,11 @@ void ChannelPutGetLocal::getPut()
|
|||||||
void ChannelPutGetLocal::getGet()
|
void ChannelPutGetLocal::getGet()
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelPutGetRequester->getGetDone(
|
||||||
Status::STATUSTYPE_ERROR,
|
channelDestroyedStatus,getPtrSelf(),nullPVStructure,nullBitSet);
|
||||||
"was destroyed");
|
|
||||||
channelPutGetRequester->getGetDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
getBitSet->clear();
|
||||||
pvRecord->lock();
|
pvRecord->lock();
|
||||||
try {
|
try {
|
||||||
pvGetCopy->updateCopySetBitSet(pvGetStructure, getBitSet);
|
pvGetCopy->updateCopySetBitSet(pvGetStructure, getBitSet);
|
||||||
@ -749,9 +740,8 @@ void ChannelPutGetLocal::getGet()
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
getBitSet->clear();
|
channelPutGetRequester->getGetDone(
|
||||||
getBitSet->set(0);
|
Status::Ok,getPtrSelf(),pvGetStructure,getBitSet);
|
||||||
channelPutGetRequester->getGetDone(Status::Ok);
|
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelPutGetLocal::getGet" << endl;
|
cout << "ChannelPutGetLocal::getGet" << endl;
|
||||||
@ -778,10 +768,17 @@ public:
|
|||||||
ChannelArrayRequester::shared_pointer const & channelArrayRequester,
|
ChannelArrayRequester::shared_pointer const & channelArrayRequester,
|
||||||
PVStructurePtr const & pvRequest,
|
PVStructurePtr const & pvRequest,
|
||||||
PVRecordPtr const &pvRecord);
|
PVRecordPtr const &pvRecord);
|
||||||
virtual void getArray(bool lastRequest,int offset, int count);
|
virtual void getArray(size_t offset, size_t count, size_t stride);
|
||||||
virtual void putArray(bool lastRequest,int offset, int count);
|
virtual void putArray(
|
||||||
virtual void setLength(bool lastRequest,int length, int capacity);
|
PVArrayPtr const &putArray,
|
||||||
|
size_t offset, size_t count, size_t stride);
|
||||||
|
virtual void getLength();
|
||||||
|
virtual void setLength(size_t length, size_t capacity);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
virtual std::tr1::shared_ptr<Channel> getChannel()
|
||||||
|
{return channelLocal;}
|
||||||
|
virtual void cancel(){}
|
||||||
|
virtual void lastRequest() {}
|
||||||
virtual void lock() {mutex.lock();}
|
virtual void lock() {mutex.lock();}
|
||||||
virtual void unlock() {mutex.unlock();}
|
virtual void unlock() {mutex.unlock();}
|
||||||
private:
|
private:
|
||||||
@ -797,7 +794,6 @@ private:
|
|||||||
PVRecordPtr const &pvRecord)
|
PVRecordPtr const &pvRecord)
|
||||||
:
|
:
|
||||||
isDestroyed(false),
|
isDestroyed(false),
|
||||||
callProcess(callProcess),
|
|
||||||
channelLocal(channelLocal),
|
channelLocal(channelLocal),
|
||||||
channelArrayRequester(channelArrayRequester),
|
channelArrayRequester(channelArrayRequester),
|
||||||
pvArray(pvArray),
|
pvArray(pvArray),
|
||||||
@ -806,7 +802,6 @@ private:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
bool isDestroyed;
|
bool isDestroyed;
|
||||||
bool callProcess;
|
|
||||||
ChannelLocalPtr channelLocal;
|
ChannelLocalPtr channelLocal;
|
||||||
ChannelArrayRequester::shared_pointer channelArrayRequester;
|
ChannelArrayRequester::shared_pointer channelArrayRequester;
|
||||||
PVArrayPtr pvArray;
|
PVArrayPtr pvArray;
|
||||||
@ -825,10 +820,10 @@ ChannelArrayLocalPtr ChannelArrayLocal::create(
|
|||||||
PVFieldPtrArray const & pvFields = pvRequest->getPVFields();
|
PVFieldPtrArray const & pvFields = pvRequest->getPVFields();
|
||||||
if(pvFields.size()!=1) {
|
if(pvFields.size()!=1) {
|
||||||
Status status(
|
Status status(
|
||||||
Status::STATUSTYPE_ERROR,"invalid pvRequest");
|
Status::Status::STATUSTYPE_ERROR,"invalid pvRequest");
|
||||||
ChannelArrayLocalPtr channelArray;
|
ChannelArrayLocalPtr channelArray;
|
||||||
PVScalarArrayPtr pvArray;
|
ArrayConstPtr array;
|
||||||
channelArrayRequester->channelArrayConnect(status,channelArray,pvArray);
|
channelArrayRequester->channelArrayConnect(status,channelArray,array);
|
||||||
return channelArray;
|
return channelArray;
|
||||||
}
|
}
|
||||||
PVFieldPtr pvField = pvFields[0];
|
PVFieldPtr pvField = pvFields[0];
|
||||||
@ -845,19 +840,21 @@ ChannelArrayLocalPtr ChannelArrayLocal::create(
|
|||||||
pvField = pvRecord->getPVRecordStructure()->getPVStructure()->getSubField(fieldName);
|
pvField = pvRecord->getPVRecordStructure()->getPVStructure()->getSubField(fieldName);
|
||||||
if(pvField==NULL) {
|
if(pvField==NULL) {
|
||||||
Status status(
|
Status status(
|
||||||
Status::STATUSTYPE_ERROR,fieldName +" not found");
|
Status::Status::STATUSTYPE_ERROR,fieldName +" not found");
|
||||||
ChannelArrayLocalPtr channelArray;
|
ChannelArrayLocalPtr channelArray;
|
||||||
PVScalarArrayPtr pvArray;
|
ArrayConstPtr array;
|
||||||
channelArrayRequester->channelArrayConnect(status,channelArray,pvArray);
|
channelArrayRequester->channelArrayConnect(
|
||||||
|
status,channelArray,array);
|
||||||
return channelArray;
|
return channelArray;
|
||||||
}
|
}
|
||||||
if(pvField->getField()->getType()!=scalarArray && pvField->getField()->getType()!=structureArray)
|
if(pvField->getField()->getType()!=scalarArray && pvField->getField()->getType()!=structureArray)
|
||||||
{
|
{
|
||||||
Status status(
|
Status status(
|
||||||
Status::STATUSTYPE_ERROR,fieldName +" not array");
|
Status::Status::STATUSTYPE_ERROR,fieldName +" not array");
|
||||||
ChannelArrayLocalPtr channelArray;
|
ChannelArrayLocalPtr channelArray;
|
||||||
PVArrayPtr pvArray;
|
ArrayConstPtr array;
|
||||||
channelArrayRequester->channelArrayConnect(status,channelArray,pvArray);
|
channelArrayRequester->channelArrayConnect(
|
||||||
|
status,channelArray,array);
|
||||||
return channelArray;
|
return channelArray;
|
||||||
}
|
}
|
||||||
PVArrayPtr pvArray = static_pointer_cast<PVArray>(pvField);
|
PVArrayPtr pvArray = static_pointer_cast<PVArray>(pvField);
|
||||||
@ -866,12 +863,6 @@ ChannelArrayLocalPtr ChannelArrayLocal::create(
|
|||||||
PVScalarArrayPtr xxx = static_pointer_cast<PVScalarArray>(pvField);
|
PVScalarArrayPtr xxx = static_pointer_cast<PVScalarArray>(pvField);
|
||||||
pvCopy = getPVDataCreate()->createPVScalarArray(
|
pvCopy = getPVDataCreate()->createPVScalarArray(
|
||||||
xxx->getScalarArray()->getElementType());
|
xxx->getScalarArray()->getElementType());
|
||||||
} else {
|
|
||||||
PVStructureArrayPtr xxx = static_pointer_cast<PVStructureArray>(pvField);
|
|
||||||
pvCopy = getPVDataCreate()->createPVStructureArray(
|
|
||||||
xxx->getStructureArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
ChannelArrayLocalPtr array(new ChannelArrayLocal(
|
ChannelArrayLocalPtr array(new ChannelArrayLocal(
|
||||||
channelLocal,
|
channelLocal,
|
||||||
channelArrayRequester,
|
channelArrayRequester,
|
||||||
@ -884,9 +875,36 @@ ChannelArrayLocalPtr ChannelArrayLocal::create(
|
|||||||
cout << " recordName " << pvRecord->getRecordName() << endl;
|
cout << " recordName " << pvRecord->getRecordName() << endl;
|
||||||
}
|
}
|
||||||
channelArrayRequester->channelArrayConnect(
|
channelArrayRequester->channelArrayConnect(
|
||||||
Status::Ok, array, pvCopy);
|
Status::Ok, array, pvCopy->getArray());
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
if(pvField->getField()->getType()==structureArray) {
|
||||||
|
PVStructureArrayPtr xxx = static_pointer_cast<PVStructureArray>(pvField);
|
||||||
|
pvCopy = getPVDataCreate()->createPVStructureArray(
|
||||||
|
xxx->getStructureArray()->getStructure());
|
||||||
|
ChannelArrayLocalPtr array(new ChannelArrayLocal(
|
||||||
|
channelLocal,
|
||||||
|
channelArrayRequester,
|
||||||
|
pvArray,
|
||||||
|
pvCopy,
|
||||||
|
pvRecord));
|
||||||
|
if(pvRecord->getTraceLevel()>0)
|
||||||
|
{
|
||||||
|
cout << "ChannelArrayLocal::create";
|
||||||
|
cout << " recordName " << pvRecord->getRecordName() << endl;
|
||||||
|
}
|
||||||
|
channelArrayRequester->channelArrayConnect(
|
||||||
|
Status::Ok, array, pvCopy->getArray());
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status status(Status::Status::STATUSTYPE_ERROR,
|
||||||
|
"Sorry only ScalarArray and Structure Array are supported");
|
||||||
|
ChannelArrayLocalPtr channelArray;
|
||||||
|
ArrayConstPtr array;
|
||||||
|
channelArrayRequester->channelArrayConnect(status,channelArray,array);
|
||||||
|
return channelArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ChannelArrayLocal::destroy()
|
void ChannelArrayLocal::destroy()
|
||||||
@ -904,72 +922,120 @@ void ChannelArrayLocal::destroy()
|
|||||||
channelLocal.reset();
|
channelLocal.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelArrayLocal::getArray(bool lastRequest,int offset, int count)
|
void ChannelArrayLocal::getArray(size_t offset, size_t count, size_t stride)
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelArrayRequester->getArrayDone(channelDestroyedStatus,getPtrSelf(),pvCopy);
|
||||||
Status::STATUSTYPE_ERROR,
|
|
||||||
"was destroyed");
|
|
||||||
channelArrayRequester->getArrayDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelArrayLocal::getArray" << endl;
|
cout << "ChannelArrayLocal::getArray" << endl;
|
||||||
}
|
}
|
||||||
|
if(offset<0) {
|
||||||
|
channelArrayRequester->getArrayDone(illegalOffsetStatus,getPtrSelf(),pvCopy);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(stride<0) {
|
||||||
|
channelArrayRequester->getArrayDone(illegalStrideStatus,getPtrSelf(),pvCopy);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const char *exceptionMessage = NULL;
|
||||||
pvRecord->lock();
|
pvRecord->lock();
|
||||||
try {
|
try {
|
||||||
if(count<0) count = pvArray->getLength();
|
bool ok = false;
|
||||||
size_t capacity = pvArray->getCapacity();
|
while(true) {
|
||||||
if(capacity!=0) {
|
size_t length = pvArray->getLength();
|
||||||
pvCopy->setCapacity(capacity);
|
if(length<=0) break;
|
||||||
|
if(count<=0) {
|
||||||
|
count = -offset + length/stride;
|
||||||
|
if(count>0) ok = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
size_t maxcount = -offset + length/stride;
|
||||||
|
if(count>maxcount) count = maxcount;
|
||||||
|
ok = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(ok) {
|
||||||
pvCopy->setLength(count);
|
pvCopy->setLength(count);
|
||||||
copy(*pvArray.get(),offset,*pvCopy.get(),0,count);
|
copy(pvArray,offset,stride,pvCopy,0,1,count);
|
||||||
}
|
}
|
||||||
} catch(...) {
|
} catch(std::exception e) {
|
||||||
pvRecord->unlock();
|
exceptionMessage = e.what();
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
channelArrayRequester->getArrayDone(Status::Ok);
|
Status status = Status::Ok;
|
||||||
if(lastRequest) destroy();
|
if(exceptionMessage!=NULL) {
|
||||||
|
status = Status(Status::Status::STATUSTYPE_ERROR,exceptionMessage);
|
||||||
|
}
|
||||||
|
channelArrayRequester->getArrayDone(status,getPtrSelf(),pvCopy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelArrayLocal::putArray(bool lastRequest,int offset, int count)
|
void ChannelArrayLocal::putArray(
|
||||||
|
PVArrayPtr const & pvArray, size_t offset, size_t count, size_t stride)
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelArrayRequester->putArrayDone(channelDestroyedStatus,getPtrSelf());
|
||||||
Status::STATUSTYPE_ERROR,
|
|
||||||
"was destroyed");
|
|
||||||
channelArrayRequester->putArrayDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
{
|
{
|
||||||
cout << "ChannelArrayLocal::putArray" << endl;
|
cout << "ChannelArrayLocal::putArray" << endl;
|
||||||
}
|
}
|
||||||
|
if(offset<0) {
|
||||||
|
channelArrayRequester->putArrayDone(illegalOffsetStatus,getPtrSelf());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(count<0) {
|
||||||
|
channelArrayRequester->putArrayDone(illegalCountStatus,getPtrSelf());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(stride<0) {
|
||||||
|
channelArrayRequester->putArrayDone(illegalStrideStatus,getPtrSelf());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
size_t newLength = offset + count*stride;
|
||||||
|
pvArray->setLength(newLength);
|
||||||
|
const char *exceptionMessage = NULL;
|
||||||
pvRecord->lock();
|
pvRecord->lock();
|
||||||
try {
|
try {
|
||||||
if(count<=0) count = pvCopy->getLength();
|
copy(pvArray,0,1,this->pvArray,offset,stride,count);
|
||||||
if(pvArray->getCapacity()<count) pvArray->setCapacity(count);
|
} catch(std::exception e) {
|
||||||
if(pvArray->getLength()<count) pvArray->setLength(count);
|
exceptionMessage = e.what();
|
||||||
copy(*pvCopy.get(),0,*pvArray.get(),offset,count);
|
|
||||||
} catch(...) {
|
|
||||||
pvRecord->unlock();
|
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
channelArrayRequester->putArrayDone(Status::Ok);
|
Status status = Status::Ok;
|
||||||
if(lastRequest) destroy();
|
if(exceptionMessage!=NULL) {
|
||||||
|
status = Status(Status::Status::STATUSTYPE_ERROR,exceptionMessage);
|
||||||
|
}
|
||||||
|
channelArrayRequester->putArrayDone(status,getPtrSelf());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelArrayLocal::setLength(bool lastRequest,int length, int capacity)
|
void ChannelArrayLocal::getLength()
|
||||||
|
{
|
||||||
|
size_t length = 0;
|
||||||
|
size_t capacity = 0;
|
||||||
|
const char *exceptionMessage = NULL;
|
||||||
|
pvRecord->lock();
|
||||||
|
try {
|
||||||
|
length = pvArray->getLength();
|
||||||
|
capacity = pvArray->getCapacity();
|
||||||
|
} catch(std::exception e) {
|
||||||
|
exceptionMessage = e.what();
|
||||||
|
}
|
||||||
|
pvRecord->unlock();
|
||||||
|
Status status = Status::Ok;
|
||||||
|
if(exceptionMessage!=NULL) {
|
||||||
|
status = Status(Status::Status::STATUSTYPE_ERROR,exceptionMessage);
|
||||||
|
}
|
||||||
|
channelArrayRequester->getLengthDone(status,getPtrSelf(),length,capacity);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChannelArrayLocal::setLength(size_t length, size_t capacity)
|
||||||
{
|
{
|
||||||
if(isDestroyed) {
|
if(isDestroyed) {
|
||||||
Status status(
|
channelArrayRequester->setLengthDone(channelDestroyedStatus,getPtrSelf());
|
||||||
Status::STATUSTYPE_ERROR,
|
|
||||||
"was destroyed");
|
|
||||||
channelArrayRequester->setLengthDone(status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(pvRecord->getTraceLevel()>1)
|
if(pvRecord->getTraceLevel()>1)
|
||||||
@ -980,16 +1046,16 @@ void ChannelArrayLocal::setLength(bool lastRequest,int length, int capacity)
|
|||||||
try {
|
try {
|
||||||
if(capacity>=0 && !pvArray->isCapacityMutable()) {
|
if(capacity>=0 && !pvArray->isCapacityMutable()) {
|
||||||
Status status(
|
Status status(
|
||||||
Status::STATUSTYPE_ERROR,
|
Status::Status::STATUSTYPE_ERROR,
|
||||||
"capacityImnutable");
|
"capacityImnutable");
|
||||||
channelArrayRequester->setLengthDone(status);
|
channelArrayRequester->setLengthDone(status,getPtrSelf());
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(capacity>0) {
|
if(capacity>=0) {
|
||||||
if(pvArray->getCapacity()!=capacity) pvArray->setCapacity(capacity);
|
if(pvArray->getCapacity()!=capacity) pvArray->setCapacity(capacity);
|
||||||
}
|
}
|
||||||
if(length>0) {
|
if(length>=0) {
|
||||||
if(pvArray->getLength()!=length) pvArray->setLength(length);
|
if(pvArray->getLength()!=length) pvArray->setLength(length);
|
||||||
}
|
}
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
@ -997,7 +1063,7 @@ void ChannelArrayLocal::setLength(bool lastRequest,int length, int capacity)
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
pvRecord->unlock();
|
pvRecord->unlock();
|
||||||
channelArrayRequester->setLengthDone(Status::Ok);
|
channelArrayRequester->setLengthDone(Status::Ok,getPtrSelf());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,14 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef CHANNELPROVIDERLOCAL_H
|
#ifndef CHANNELPROVIDERLOCAL_H
|
||||||
#define CHANNELPROVIDERLOCAL_H
|
#define CHANNELPROVIDERLOCAL_H
|
||||||
|
|
||||||
|
|
||||||
#ifdef epicsExportSharedSymbols
|
|
||||||
# define channelProviderLocalEpicsExportSharedSymbols
|
|
||||||
# undef epicsExportSharedSymbols
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -29,17 +21,11 @@
|
|||||||
#include <pv/lock.h>
|
#include <pv/lock.h>
|
||||||
#include <pv/pvType.h>
|
#include <pv/pvType.h>
|
||||||
#include <pv/pvData.h>
|
#include <pv/pvData.h>
|
||||||
|
#include <pv/monitorPlugin.h>
|
||||||
|
#include <pv/pvCopy.h>
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include <pv/status.h>
|
|
||||||
|
|
||||||
#ifdef channelProviderLocalEpicsExportSharedSymbols
|
|
||||||
# define epicsExportSharedSymbols
|
|
||||||
# undef channelProviderLocalEpicsExportSharedSymbols
|
|
||||||
# include <shareLib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <pv/pvDatabase.h>
|
#include <pv/pvDatabase.h>
|
||||||
#include <pv/monitorAlgorithm.h>
|
#include <pv/status.h>
|
||||||
|
|
||||||
|
|
||||||
namespace epics { namespace pvDatabase {
|
namespace epics { namespace pvDatabase {
|
||||||
@ -69,15 +55,10 @@ public:
|
|||||||
PVRecordPtr const & pvRecord,
|
PVRecordPtr const & pvRecord,
|
||||||
epics::pvData::MonitorRequester::shared_pointer const & monitorRequester,
|
epics::pvData::MonitorRequester::shared_pointer const & monitorRequester,
|
||||||
epics::pvData::PVStructurePtr const & pvRequest);
|
epics::pvData::PVStructurePtr const & pvRequest);
|
||||||
void registerMonitorAlgorithmCreate(
|
|
||||||
MonitorAlgorithmCreatePtr const &monitorAlgorithmCreate);
|
|
||||||
MonitorAlgorithmCreatePtr getMonitorAlgorithmCreate(
|
|
||||||
epics::pvData::String algorithmName);
|
|
||||||
private:
|
private:
|
||||||
MonitorFactory();
|
MonitorFactory();
|
||||||
friend class MonitorLocal;
|
friend class MonitorLocal;
|
||||||
friend MonitorFactoryPtr getMonitorFactory();
|
friend MonitorFactoryPtr getMonitorFactory();
|
||||||
std::multiset<MonitorAlgorithmCreatePtr> monitorAlgorithmCreateList;
|
|
||||||
bool isDestroyed;
|
bool isDestroyed;
|
||||||
epics::pvData::Mutex mutex;
|
epics::pvData::Mutex mutex;
|
||||||
};
|
};
|
||||||
@ -97,6 +78,8 @@ public:
|
|||||||
virtual epics::pvAccess::ChannelFind::shared_pointer channelFind(
|
virtual epics::pvAccess::ChannelFind::shared_pointer channelFind(
|
||||||
epics::pvData::String const &channelName,
|
epics::pvData::String const &channelName,
|
||||||
epics::pvAccess::ChannelFindRequester::shared_pointer const & channelFindRequester);
|
epics::pvAccess::ChannelFindRequester::shared_pointer const & channelFindRequester);
|
||||||
|
virtual epics::pvAccess::ChannelFind::shared_pointer channelList(
|
||||||
|
epics::pvAccess::ChannelListRequester::shared_pointer const & channelListRequester);
|
||||||
virtual epics::pvAccess::Channel::shared_pointer createChannel(
|
virtual epics::pvAccess::Channel::shared_pointer createChannel(
|
||||||
epics::pvData::String const &channelName,
|
epics::pvData::String const &channelName,
|
||||||
epics::pvAccess::ChannelRequester::shared_pointer const &channelRequester,
|
epics::pvAccess::ChannelRequester::shared_pointer const &channelRequester,
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <shareLib.h>
|
#include <shareLib.h>
|
||||||
|
|
||||||
|
#include <pv/monitorPlugin.h>
|
||||||
#include <pv/pvCopy.h>
|
#include <pv/pvCopy.h>
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include <pv/pvDatabase.h>
|
#include <pv/pvDatabase.h>
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#Makefile at top of application tree
|
#Makefile at top of application tree
|
||||||
|
|
||||||
TOP = .
|
TOP = .
|
||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
|
|
||||||
DIRS += configure
|
DIRS += configure
|
||||||
|
|
||||||
DIRS += src
|
DIRS += src
|
@ -14,11 +14,26 @@
|
|||||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||||
# continue building anyway if conflicts are found.
|
# continue building anyway if conflicts are found.
|
||||||
CHECK_RELEASE = WARN
|
#CHECK_RELEASE = YES
|
||||||
|
|
||||||
|
# Set this when you only want to compile this application
|
||||||
|
# for a subset of the cross-compiled target architectures
|
||||||
|
# that Base is built for.
|
||||||
|
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||||
|
|
||||||
# To install files into a location other than $(TOP) define
|
# To install files into a location other than $(TOP) define
|
||||||
# INSTALL_LOCATION here.
|
# INSTALL_LOCATION here.
|
||||||
#INSTALL_LOCATION=</path/name/to/install/top>
|
#INSTALL_LOCATION=</path/name/to/install/top>
|
||||||
|
|
||||||
-include $(TOP)/../configure/CONFIG_SITE.local
|
# Set this when your IOC and the host use different paths
|
||||||
-include $(TOP)/../../CONFIG_SITE.local
|
# to access the application. This will be needed to boot
|
||||||
|
# from a Microsoft FTP server or with some NFS mounts.
|
||||||
|
# You must rebuild in the iocBoot directory for this to
|
||||||
|
# take effect.
|
||||||
|
#IOCS_APPL_TOP = </IOC/path/to/application/top>
|
||||||
|
|
||||||
|
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||||
|
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||||
|
|
||||||
|
-include $(TOP)/configure/CONFIG_SITE.local
|
||||||
|
-include $(TOP)/../CONFIG.local
|
@ -6,4 +6,3 @@ TARGETS = $(CONFIG_TARGETS)
|
|||||||
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
|
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
|
||||||
|
|
||||||
include $(TOP)/configure/RULES
|
include $(TOP)/configure/RULES
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
# pvDatabaseCPP/testTop RELEASE - Location of external support modules
|
# pvDatabaseCPP/test RELEASE - Location of external support modules
|
||||||
#
|
#
|
||||||
# IF YOU CHANGE this file or any file it includes you must
|
# IF YOU CHANGE this file or any file it includes you must
|
||||||
# subsequently do a "gnumake rebuild" in the application's
|
# subsequently do a "gnumake rebuild" in the application's
|
||||||
@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
# EPICS V4 Developers: Do not edit the locations in this file!
|
# EPICS V4 Developers: Do not edit the locations in this file!
|
||||||
#
|
#
|
||||||
# Create a file RELEASE.local pointing to your PVASRV, PVACCESS,
|
# Create a file RELEASE.local pointing to your places
|
||||||
# PVDATA, PVCOMMON and EPICS_BASE build directories, e.g.
|
# for the dependencies, e.g.
|
||||||
# PVASRV = /path/to/epics/pvaSrvCPP
|
|
||||||
# PVACCESS = /path/to/epics/pvAccessCPP
|
# PVACCESS = /path/to/epics/pvAccessCPP
|
||||||
# PVDATA = /path/to/epics/pvDataCPP
|
# PVDATA = /path/to/epics/pvDataCPP
|
||||||
# PVCOMMON = /path/to/epics/pvCommonCPP
|
# PVCOMMON = /path/to/epics/pvCommonCPP
|
||||||
@ -28,14 +27,14 @@
|
|||||||
# use the following definitions:
|
# use the following definitions:
|
||||||
|
|
||||||
PVDATABASE = $(TOP)/..
|
PVDATABASE = $(TOP)/..
|
||||||
|
|
||||||
-include $(TOP)/../configure/RELEASE.local
|
|
||||||
-include $(TOP)/../../RELEASE.local
|
-include $(TOP)/../../RELEASE.local
|
||||||
|
-include $(TOP)/../configure/RELEASE.local
|
||||||
|
|
||||||
# If you copied these tests from pvDatabaseCPP to be built as a
|
# If you copied these tests from pvDatabaseCPP to be built as a
|
||||||
# standalone TOP, adjust and use the following definitions:
|
# standalone TOP, define
|
||||||
|
|
||||||
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
# PVDATABASE = /path/to/epics/pvDatabaseCPP
|
||||||
|
# in the appropriate RELEASE[.local],
|
||||||
|
# and use the following definitions instead:
|
||||||
|
|
||||||
#-include $(TOP)/configure/RELEASE.local
|
|
||||||
#-include $(TOP)/../RELEASE.local
|
#-include $(TOP)/../RELEASE.local
|
||||||
|
#-include $(TOP)/configure/RELEASE.local
|
@ -9,13 +9,10 @@
|
|||||||
* @date 2013.04.02
|
* @date 2013.04.02
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "powerSupply.h"
|
||||||
#include <pv/standardField.h>
|
#include <pv/standardField.h>
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
|
|
||||||
#define epicsExportSharedSymbols
|
|
||||||
#include "powerSupply.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace epics { namespace pvDatabase {
|
namespace epics { namespace pvDatabase {
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
|
|
@ -11,32 +11,19 @@
|
|||||||
#ifndef POWERSUPPLY_H
|
#ifndef POWERSUPPLY_H
|
||||||
#define POWERSUPPLY_H
|
#define POWERSUPPLY_H
|
||||||
|
|
||||||
//#include <shareLib.h>
|
|
||||||
|
|
||||||
#ifdef epicsExportSharedSymbols
|
|
||||||
# define powersupplyEpicsExportSharedSymbols
|
|
||||||
# undef epicsExportSharedSymbols
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <pv/timeStamp.h>
|
|
||||||
#include <pv/pvTimeStamp.h>
|
|
||||||
#include <pv/pvDatabase.h>
|
|
||||||
#include <pv/alarm.h>
|
|
||||||
#include <pv/pvAlarm.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef powersupplyEpicsExportSharedSymbols
|
|
||||||
# define epicsExportSharedSymbols
|
|
||||||
# undef powersupplyEpicsExportSharedSymbols
|
|
||||||
#include <shareLib.h>
|
#include <shareLib.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#include <pv/pvDatabase.h>
|
||||||
|
#include <pv/timeStamp.h>
|
||||||
|
#include <pv/alarm.h>
|
||||||
|
#include <pv/pvTimeStamp.h>
|
||||||
|
#include <pv/pvAlarm.h>
|
||||||
|
|
||||||
namespace epics { namespace pvDatabase {
|
namespace epics { namespace pvDatabase {
|
||||||
|
|
||||||
epicsShareExtern epics::pvData::PVStructurePtr createPowerSupply();
|
epicsShareExtern epics::pvData::PVStructurePtr createPowerSupply();
|
||||||
|
|
||||||
class epicsShareClass PowerSupply;
|
class PowerSupply;
|
||||||
typedef std::tr1::shared_ptr<PowerSupply> PowerSupplyPtr;
|
typedef std::tr1::shared_ptr<PowerSupply> PowerSupplyPtr;
|
||||||
|
|
||||||
class PowerSupply :
|
class PowerSupply :
|
@ -27,14 +27,13 @@
|
|||||||
#include <epicsThread.h>
|
#include <epicsThread.h>
|
||||||
#include <iocsh.h>
|
#include <iocsh.h>
|
||||||
|
|
||||||
|
#include <epicsExport.h>
|
||||||
|
|
||||||
#include <pv/pvIntrospect.h>
|
#include <pv/pvIntrospect.h>
|
||||||
#include <pv/pvData.h>
|
#include <pv/pvData.h>
|
||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include <pv/pvDatabase.h>
|
#include <pv/pvDatabase.h>
|
||||||
|
#include <pv/powerSupply.h>
|
||||||
#include <epicsExport.h>
|
|
||||||
|
|
||||||
#include <powerSupply.h>
|
|
||||||
|
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
||||||
using namespace epics::pvAccess;
|
using namespace epics::pvAccess;
|
||||||
@ -67,7 +66,4 @@ static void powerSupplyRegister(void)
|
|||||||
iocshRegister(&powerSupplyFuncDef, powerSupplyCallFunc);
|
iocshRegister(&powerSupplyFuncDef, powerSupplyCallFunc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
epicsExportRegistrar(powerSupplyRegister);
|
epicsExportRegistrar(powerSupplyRegister);
|
||||||
}
|
|
1
test/src/powerSupplyRegister.dbd
Normal file
1
test/src/powerSupplyRegister.dbd
Normal file
@ -0,0 +1 @@
|
|||||||
|
registrar("powerSupplyRegister")
|
@ -23,6 +23,7 @@
|
|||||||
#include <epicsEvent.h>
|
#include <epicsEvent.h>
|
||||||
#include <epicsThread.h>
|
#include <epicsThread.h>
|
||||||
|
|
||||||
|
#include <epicsExport.h>
|
||||||
|
|
||||||
#include <pv/standardField.h>
|
#include <pv/standardField.h>
|
||||||
#include <pv/standardPVField.h>
|
#include <pv/standardPVField.h>
|
||||||
@ -30,10 +31,6 @@
|
|||||||
#include <pv/pvAccess.h>
|
#include <pv/pvAccess.h>
|
||||||
#include "powerSupply.h"
|
#include "powerSupply.h"
|
||||||
|
|
||||||
#define epicsExportSharedSymbols
|
|
||||||
#include <epicsExport.h>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using std::tr1::static_pointer_cast;
|
using std::tr1::static_pointer_cast;
|
||||||
using namespace epics::pvData;
|
using namespace epics::pvData;
|
Reference in New Issue
Block a user