From 436f8215a60dd30726753282923bb1ff1010ff9e Mon Sep 17 00:00:00 2001
From: rivers
areaDetector Plugins
- January 30, 2009
+ July 30, 2009
Mark Rivers
@@ -76,56 +76,9 @@
NDPluginDriver class handles most of the details of processing NDArray callbacks
from the driver. Plugins derived from this class typically need to implement the
processCallbacks method, the drvUser method, and one or more of the write(Int32,
- Float64, Octet) methods. The NDPluginDriver public interface is defined in NDPluginDriver.h
- as follows:
+ Float64, Octet) methods. The
+ NDPluginDriver class documentation describes this class in detail.
class NDPluginDriver : public asynNDArrayDriver {
-public:
- NDPluginDriver(const char *portName, int queueSize, int blockingCallbacks,
- const char *NDArrayPort, int NDArrayAddr, int maxAddr, int paramTableSize,
- int maxBuffers, size_t maxMemory, int interfaceMask, int interruptMask);
-
- /* These are the methods that we override from asynNDArrayDriver */
- virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
- virtual asynStatus writeOctet(asynUser *pasynUser, const char *value, size_t maxChars,
- size_t *nActual);
- virtual asynStatus readInt32Array(asynUser *pasynUser, epicsInt32 *value,
- size_t nElements, size_t *nIn);
- virtual asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo,
- const char **pptypeName, size_t *psize);
-
- /* These are the methods that are new to this class */
- virtual void processCallbacks(NDArray *pArray);
- virtual int createFileName(int maxChars, char *fullFileName);
- virtual int createFileName(int maxChars, char *filePath, char *fileName);
-
-...
-}
-
- - The methods of the NDPluginDriver class are: -
-NDPluginDriver This is the constructor for the class. All parameters
- except queueSize, blockingCallbacks, NDArrayPort, and NDArrayAddr are just passed
- to the constructor for asynNDArrayDriver. NDArrayPort and NDArrayAddr, and blockingCallbacks
- are the initial values for the NDPluginDriverArrayPort, NDPluginDriverArrayAddr
- and NDPluginDriverBlockingCallbacks parameters described in the table below.drvUserCreate This method returns one of the enum values for the
- parameters defined in NDPluginDriver.h if the driverInfo field matches one the strings
- defined in that file. Derived classes will typically provide an implementation of
- drvUserCreate() that searches for parameters that are unique to that plugin. If
- a parameter is not matched, then NDPluginDriver->drvUserCreate() will be called
- to see if it is a standard plugin parameter (defined in NDPluginDriver.h).processCallbacks This method is called each time a driver calls the
- plugin with a new NDArray object. Derived classes typically provide an implementation
- of this method that calls this base class method to perform some bookkeeping chores,
- and then they perform whatever operations are specific to that plugin.createFileName This is a convenience function that constructs a complete
- file name in the ADFullFileName parameter from the ADFilePath, ADFileName, ADFileNumber,
- and ADFileTemplate parameters. There are two variants: the first returns a complete
- file name, including the path. The second returns the path and file name separately.
NDPluginDriver defines parameters that all plugin drivers should implement if possible.
These parameters are defined by enum values with an associated asyn interface, and
@@ -201,6 +154,23 @@ public:
longout
longin
+