Skip to content

Commit 3a69138

Browse files
committed
Upgrade to ADCore R3-0
Fix the plugin constructor arguments to the super constructor by removing numParams and adding maxThreads. (These ADCore changes were introduced in R3-0 in commit 3af87bd.) Fix the super call in processCallbacks to call NDPluginDriver's beginProcessCallbacks method since processCallbacks in NDPluginDriver was renamed to beginProcessCallbacks. (This ADCore change was introduced in R3-0 in commit 3af87bd.) Call start() in adPythonPluginConfigure. (The start method was added in ADCore in R2-5 in commit b1a2f13.)
1 parent a030175 commit 3a69138

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adPythonApp/src/adPythonPlugin.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ adPythonPlugin::adPythonPlugin(const char *portNameArg, const char *filename,
4747
const char *NDArrayPort, int NDArrayAddr, int maxBuffers,
4848
size_t maxMemory, int priority, int stackSize)
4949
: NDPluginDriver(portNameArg, queueSize, blockingCallbacks,
50-
NDArrayPort, NDArrayAddr, 1, NUM_ADPYTHONPLUGIN_PARAMS,
50+
NDArrayPort, NDArrayAddr, 1,
5151
maxBuffers, maxMemory,
5252
asynGenericPointerMask|asynFloat64ArrayMask,
5353
asynGenericPointerMask|asynFloat64ArrayMask,
54-
ASYN_MULTIDEVICE, 1, priority, stackSize)
54+
ASYN_MULTIDEVICE, 1, priority, stackSize, 1)
5555
{
5656
// Initialise some params
5757
this->pInstance = NULL;
@@ -131,7 +131,7 @@ void adPythonPlugin::initThreads()
131131
*/
132132
void adPythonPlugin::processCallbacks(NDArray *pArray) {
133133
// First call the base class method
134-
NDPluginDriver::processCallbacks(pArray);
134+
NDPluginDriver::beginProcessCallbacks(pArray);
135135

136136
// Make sure we are in a good state, otherwise do nothing
137137
if (this->pluginState != GOOD) return;
@@ -848,6 +848,7 @@ static int adPythonPluginConfigure(const char *portNameArg, const char *filename
848848
NDArrayPort, NDArrayAddr, maxBuffers, maxMemory,
849849
priority, stackSize);
850850
adp->initThreads();
851+
adp->start();
851852
return(asynSuccess);
852853
}
853854

0 commit comments

Comments
 (0)