Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to ADCore R3-0 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions adPythonApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ endif

USR_CXXFLAGS += -DDATADIRS=\"$(shell cd ..; pwd):$(shell cd ../../scripts; pwd)\"

include $(ADCORE)/ADApp/commonLibraryMakefile

include $(TOP)/configure/RULES
15 changes: 8 additions & 7 deletions adPythonApp/src/adPythonPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

Expand Down
9 changes: 9 additions & 0 deletions configure/CONFIG_SITE
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ CROSS_COMPILER_TARGET_ARCHS =
# You must rebuild in the iocBoot directory for this to
# take effect.
#IOCS_APPL_TOP = </IOC/path/to/application/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
11 changes: 4 additions & 7 deletions configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -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