areaDetector  3-12-1
EPICS areaDetector framework
ADVimba.h
Go to the documentation of this file.
1 #ifndef ADVMBINNAKER_H
2 #define ADVMBINNAKER_H
3 
4 #include <epicsEvent.h>
5 #include <epicsMessageQueue.h>
6 
7 #include <ADGenICam.h>
8 #include <VimbaFeature.h>
9 
10 #include "VimbaCPP/Include/VimbaCPP.h"
11 
12 using namespace AVT;
13 using namespace AVT::VmbAPI;
14 using namespace std;
15 
16 #define VMBConvertPixelFormatString "VMB_CONVERT_PIXEL_FORMAT" // asynParamInt32, R/W
17 #define VMBTimeStampModeString "VMB_TIME_STAMP_MODE" // asynParamInt32, R/O
18 #define VMBUniqueIdModeString "VMB_UNIQUE_ID_MODE" // asynParamInt32, R/O
19 
20 class ADVimbaFrameObserver : virtual public IFrameObserver {
21 public:
22  ADVimbaFrameObserver(CameraPtr pCamera, class ADVimba *pVimba);
24  virtual void FrameReceived(const FramePtr pFrame);
25  CameraPtr pCamera_;
26  class ADVimba *pVimba_;
27 };
28 
32 class ADVimba : public ADGenICam
33 {
34 public:
35  ADVimba(const char *portName, const char *cameraId,
36  size_t maxMemory, int priority, int stackSize);
37 
38  // virtual methods to override from ADGenICam
39  //virtual asynStatus writeInt32( asynUser *pasynUser, epicsInt32 value);
40  //virtual asynStatus writeFloat64( asynUser *pasynUser, epicsFloat64 value);
41  virtual asynStatus readEnum(asynUser *pasynUser, char *strings[], int values[], int severities[],
42  size_t nElements, size_t *nIn);
43  void report(FILE *fp, int details);
44  virtual GenICamFeature *createFeature(GenICamFeatureSet *set,
45  std::string const & asynName, asynParamType asynType, int asynIndex,
46  std::string const & featureName, GCFeatureType_t featureType);
47 
49  void imageGrabTask();
50  void shutdown();
51  CameraPtr getCamera();
52  asynStatus processFrame(FramePtr pFrame);
53 
54 private:
55  inline asynStatus checkError(VmbErrorType error, const char *functionName, const char *message);
56  int VMBConvertPixelFormat;
57 #define FIRST_VMB_PARAM VMBConvertPixelFormat;
58  int VMBTimeStampMode;
59  int VMBUniqueIdMode;
60 
61  /* Local methods to this class */
62  asynStatus startCapture();
63  asynStatus stopCapture();
64  asynStatus connectCamera();
65  asynStatus disconnectCamera();
66 
67  const char *cameraId_;
68  CameraPtr pCamera_;
69  VimbaSystem & system_;
70 
71  bool exiting_;
72  bool acquiring_;
73  epicsEventId startEventId_;
74  epicsEventId newFrameEventId_;
75  int uniqueId_;
76 
77  std::vector<string> TLStatisticsFeatureNames_;
78 
79 };
80 
81 #endif
82 
GCFeatureType_t
Definition: GenICamFeature.h:12
Definition: ADVimba.h:20
Definition: GenICamFeature.h:40
Main driver class inherited from areaDetectors ADGenICam class.
Definition: ADVimba.h:32
Definition: ListCameras.cpp:41
Definition: GenICamFeature.h:122
CameraPtr pCamera_
Definition: ADVimba.h:25
Definition: ListCameras.cpp:40
class ADVimba * pVimba_
Definition: ADVimba.h:26
Definition: NDFileHDF5Layout.h:44
Definition: ADGenICam.h:24