From d1611f676af1e5e5806794626464bb0d3960b94c Mon Sep 17 00:00:00 2001 From: Jure Varlec Date: Tue, 24 Feb 2026 15:20:00 +0000 Subject: [PATCH] Pass asyn flags through the constructor This is needed for derived drivers to be able to declare that they are destructible. The new constructor parameter is given a default value to keep API compatibility with existing derived classes. --- GenICamApp/src/ADGenICam.cpp | 5 +++-- GenICamApp/src/ADGenICam.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/GenICamApp/src/ADGenICam.cpp b/GenICamApp/src/ADGenICam.cpp index 94bb84c..c19cc78 100644 --- a/GenICamApp/src/ADGenICam.cpp +++ b/GenICamApp/src/ADGenICam.cpp @@ -39,11 +39,12 @@ static const char *driverName = "ADGenICam"; * \param[in] priority The EPICS thread priority for this driver. 0=use asyn default. * \param[in] stackSize The size of the stack for the EPICS port thread. 0=use asyn default. */ -ADGenICam::ADGenICam(const char *portName, size_t maxMemory, int priority, int stackSize) +ADGenICam::ADGenICam(const char *portName, size_t maxMemory, int priority, int stackSize, int asynFlags) : ADDriver(portName, 1, 0, 0, maxMemory, asynInt64Mask | asynEnumMask, asynInt64Mask | asynEnumMask, - ASYN_CANBLOCK, 1, priority, stackSize), + asynFlags | ASYN_CANBLOCK, + 1, priority, stackSize), mGCFeatureSet(this, pasynUserSelf), mFirstDrvUserCreateCall(true) { //static const char *functionName = "ADGenICam"; diff --git a/GenICamApp/src/ADGenICam.h b/GenICamApp/src/ADGenICam.h index 9a19630..fb769f6 100644 --- a/GenICamApp/src/ADGenICam.h +++ b/GenICamApp/src/ADGenICam.h @@ -24,7 +24,7 @@ typedef struct { class ADGENICAM_API ADGenICam : public ADDriver { public: - ADGenICam(const char *portName, size_t maxMemory, int priority, int stackSize); + ADGenICam(const char *portName, size_t maxMemory, int priority, int stackSize, int asynFlags = 0); // virtual methods to override from ADDriver virtual asynStatus writeInt32( asynUser *pasynUser, epicsInt32 value);