diff --git a/adPythonApp/src/Makefile b/adPythonApp/src/Makefile index 3d1a015..788f127 100644 --- a/adPythonApp/src/Makefile +++ b/adPythonApp/src/Makefile @@ -57,4 +57,6 @@ endif USR_CXXFLAGS += -DDATADIRS=\"$(shell cd ..; pwd):$(shell cd ../../scripts; pwd)\" +include $(ADCORE)/ADApp/commonLibraryMakefile + include $(TOP)/configure/RULES diff --git a/adPythonApp/src/adPythonPlugin.cpp b/adPythonApp/src/adPythonPlugin.cpp index ab8505f..5af1b50 100644 --- a/adPythonApp/src/adPythonPlugin.cpp +++ b/adPythonApp/src/adPythonPlugin.cpp @@ -47,11 +47,11 @@ adPythonPlugin::adPythonPlugin(const char *portNameArg, const char *filename, const char *NDArrayPort, int NDArrayAddr, int maxBuffers, size_t maxMemory, int priority, int stackSize) : NDPluginDriver(portNameArg, queueSize, blockingCallbacks, - NDArrayPort, NDArrayAddr, 1, NUM_ADPYTHONPLUGIN_PARAMS, + NDArrayPort, NDArrayAddr, 1, maxBuffers, maxMemory, asynGenericPointerMask|asynFloat64ArrayMask, asynGenericPointerMask|asynFloat64ArrayMask, - ASYN_MULTIDEVICE, 1, priority, stackSize) + ASYN_MULTIDEVICE, 1, priority, stackSize, 1) { // Initialise some params this->pInstance = NULL; @@ -131,7 +131,7 @@ void adPythonPlugin::initThreads() */ void adPythonPlugin::processCallbacks(NDArray *pArray) { // First call the base class method - NDPluginDriver::processCallbacks(pArray); + NDPluginDriver::beginProcessCallbacks(pArray); // Make sure we are in a good state, otherwise do nothing if (this->pluginState != GOOD) return; @@ -148,8 +148,8 @@ void adPythonPlugin::processCallbacks(NDArray *pArray) { this->lock(); // Store the time at the beginning of processing for profiling - epicsTimeStamp start, end; - epicsTimeGetCurrent(&start); + epicsTimeStamp startTime, endTime; + epicsTimeGetCurrent(&startTime); // Update the attribute dict this->updateAttrDict(pArray); @@ -177,8 +177,8 @@ void adPythonPlugin::processCallbacks(NDArray *pArray) { this->updateAttrList(pArray); // timestamp - epicsTimeGetCurrent(&end); - setDoubleParam(adPythonTime, epicsTimeDiffInSeconds(&end, &start)*1000); + epicsTimeGetCurrent(&endTime); + setDoubleParam(adPythonTime, epicsTimeDiffInSeconds(&endTime, &startTime)*1000); callParamCallbacks(); // release GIL and dict Mutex @@ -848,6 +848,7 @@ static int adPythonPluginConfigure(const char *portNameArg, const char *filename NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize); adp->initThreads(); + adp->start(); return(asynSuccess); } diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index f30c124..e927e13 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -31,3 +31,12 @@ CROSS_COMPILER_TARGET_ARCHS = # You must rebuild in the iocBoot directory for this to # take effect. #IOCS_APPL_TOP = + +# Get settings from AREA_DETECTOR, so that we only have to configure once +-include $(AREA_DETECTOR)/configure/CONFIG_SITE +-include $(AREA_DETECTOR)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH) +-include $(AREA_DETECTOR)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common +ifdef T_A + -include $(AREA_DETECTOR)/configure/CONFIG_SITE.Common.$(T_A) + -include $(AREA_DETECTOR)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A) +endif diff --git a/configure/RELEASE b/configure/RELEASE index 622362f..4f94a63 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -19,18 +19,15 @@ # Build settings that are NOT module paths should appear in a # CONFIG_SITE file. -TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top -SUPPORT=/dls_sw/prod/R3.14.12.3/support +-include $(TOP)/../configure/RELEASE_LIBS_INCLUDE +-include $(TOP)/RELEASE.local +-include $(TOP)/configure/RELEASE.local + WORK=/dls_sw/work/R3.14.12.3/support TOOLS_BASE=/dls_sw/prod/tools/RHEL6-x86_64 -ASYN=$(SUPPORT)/asyn/4-26 -ADCORE=$(SUPPORT)/ADCore/2-4dls8 PYTHON_PREFIX=$(TOOLS_BASE)/Python/2-7-3/prefix -# EPICS_BASE usually appears last so other apps can override stuff: -EPICS_BASE=/dls_sw/epics/R3.14.12.3/base - # Set RULES here if you want to take build rules from somewhere # other than EPICS_BASE: #RULES=/path/to/epics/support/module/rules/x-y