areaDetector  3-13
EPICS areaDetector framework
ADnEDPluginMask.h
Go to the documentation of this file.
1 
5 #ifndef NDPluginMask_H
6 #define NDPluginMask_H
7 
8 #include <epicsTypes.h>
9 #include <asynStandardInterfaces.h>
10 
11 #include "NDPluginDriver.h"
12 
13 typedef struct NDMask {
14  size_t PosX;
15  size_t PosY;
16  size_t SizeX;
17  size_t SizeY;
18  size_t MaskVal;
19  size_t MaskType;
21 
22 #define NDPluginMaskFirstString "MASK_FIRST"
23 #define NDPluginMaskNameString "MASK_NAME" /* Name of this mask */
24 #define NDPluginMaskUseString "MASK_USE" /* Use this mask? */
25 #define NDPluginMaskMaxSizeXString "MASK_MAX_SIZE_X" /* Maximum size of mask in X dimension */
26 #define NDPluginMaskMaxSizeYString "MASK_MAX_SIZE_Y" /* Maximum size of mask in Y dimension */
27 #define NDPluginMaskPosXString "MASK_POS_X" /* X position of mask */
28 #define NDPluginMaskPosYString "MASK_POS_Y" /* Y position of mask */
29 #define NDPluginMaskSizeXString "MASK_SIZE_X" /* X size of mask */
30 #define NDPluginMaskSizeYString "MASK_SIZE_Y" /* Y size of mask */
31 #define NDPluginMaskValString "MASK_VAL" /* The mask value */
32 #define NDPluginMaskTypeString "MASK_TYPE" /* The mask type (Pass, Reject, etc.) */
33 #define NDPluginMaskLastString "MASK_LAST"
34 
35 class epicsShareClass NDPluginMask : public NDPluginDriver {
36 public:
37  NDPluginMask(const char *portName, int queueSize, int blockingCallbacks,
38  const char *NDArrayPort, int NDArrayAddr, int maxMasks,
39  int maxBuffers, size_t maxMemory,
40  int priority, int stackSize);
41 
42  /* These methods override the virtual methods in the base class */
43  void processCallbacks(NDArray *pArray);
44  template <typename epicsType> void doMaskT(NDArray *pArray, NDMask_t *pMask);
45  asynStatus doMask(NDArray *pArray, NDMask_t *pMask);
46 
47 protected:
49  #define FIRST_NDPLUGIN_MASK_PARAM NDPluginMaskFirst
61 
62 private:
63 
64  static const epicsUInt32 s_MASK_TYPE_REJECT;
65  static const epicsUInt32 s_MASK_TYPE_PASS;
66 
67  int maxMasks;
68  NDArrayInfo arrayInfo;
69  NDMask_t *pMasks; /* Array of NDMask structures (indexed by Asyn address) */
70  NDMask_t *pMask;
71  epicsUInt32 xArrayMax;
72  epicsUInt32 yArrayMax;
73 };
74 
75 #endif //NDPluginMask_H
struct NDMask NDMask_t
See .cpp file for more documentation.
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data,...
Definition: NDArray.h:99
Class from which actual plugin drivers are derived; derived from asynNDArrayDriver.
Definition: NDPluginDriver.h:57
virtual void processCallbacks(NDArray *pArray)=0
Definition: ADnEDPluginMask.h:35
int NDPluginMaskPosY
Definition: ADnEDPluginMask.h:55
int NDPluginMaskSizeX
Definition: ADnEDPluginMask.h:56
int NDPluginMaskUse
Definition: ADnEDPluginMask.h:51
int NDPluginMaskName
Definition: ADnEDPluginMask.h:50
int NDPluginMaskSizeY
Definition: ADnEDPluginMask.h:57
int NDPluginMaskVal
Definition: ADnEDPluginMask.h:58
int NDPluginMaskMaxSizeY
Definition: ADnEDPluginMask.h:53
int NDPluginMaskType
Definition: ADnEDPluginMask.h:59
int NDPluginMaskMaxSizeX
Definition: ADnEDPluginMask.h:52
int NDPluginMaskFirst
Definition: ADnEDPluginMask.h:48
int NDPluginMaskPosX
Definition: ADnEDPluginMask.h:54
int NDPluginMaskLast
Definition: ADnEDPluginMask.h:60
Structure returned by NDArray::getInfo.
Definition: NDArray.h:78
See .cpp file for more documentation.
Definition: ADnEDPluginMask.h:13
size_t PosX
Definition: ADnEDPluginMask.h:14
size_t MaskType
Definition: ADnEDPluginMask.h:19
size_t SizeX
Definition: ADnEDPluginMask.h:16
size_t PosY
Definition: ADnEDPluginMask.h:15
size_t MaskVal
Definition: ADnEDPluginMask.h:18
size_t SizeY
Definition: ADnEDPluginMask.h:17