12 #include <SapClassBasic.h>
26 ExposureTime = 0x12108,
43 ResourceRtPro = ResourcePixPro,
49 ResourceLast = ResourceAcqDevice
63 float GetLinePeriod ()
const override;
66 float GetExposureTime ()
const override;
69 int GetTriggerMode ()
const override;
75 int GetNumCameras ()
const override;
78 const char* GetCameraID (
int index = 0)
override;
81 int GetNumBitsInPixel ()
const override;
84 int GetNumBytesInPixel ()
const override;
89 bool SetLinePeriod (
float value)
override;
92 bool SetExposureTime (
float value)
override;
95 bool SetTriggerMode (
int value)
override;
98 bool SetCameraFileName (
const char* name)
override;
101 bool InitializeLibrary ()
override;
102 bool ShutDownLibrary ()
override;
105 bool Open (
const char*
id)
override;
108 bool Open (
int id = 0)
override {
return false; }
109 bool Close ()
override;
111 bool ReadParameter (
unsigned int address,
unsigned int* value)
const override;
112 bool WriteParameter (
unsigned int address,
unsigned int value)
override;
114 bool SetParameters ()
override;
115 bool SetParameters (
int height,
int numBuffers)
override;
117 bool StartAcquiring ()
override;
118 bool StopAcquiring (
bool flushBuffers)
override;
120 bool GetBuffer (
void** buffer)
override;
121 bool GetBuffer2 (
unsigned short** buffer)
override;
122 bool GetBufferCopy (
unsigned short* buffer)
override;
123 bool GetBufferAndIndex (
void** buffer,
int** index,
unsigned long* frameNumber)
override;
124 bool GetBufferAndIndex2 (
unsigned short** buffer,
int** index,
unsigned long* frameNumber)
override;
125 bool AbortGetBuffer ()
override;
126 bool RequeueBuffer ()
override;
127 bool RequeueBuffer (
int* bufferHandle)
override;
128 bool FlushBuffers ()
override;
131 bool ResetDevice ()
override;
134 bool DeleteResources ()
override;
137 std::mutex _mutexGetBuffer;
138 std::mutex _mutexCopyBuffer;
140 SapAcquisition* _acquisition;
141 SapLocation* _location;
142 SapBufferWithTrash* _buffers;
145 SapAcqDevice _acqDevice;
148 ServerCategory _serverCategory;
149 bool _saperaItemsInitialized;
150 bool _saperaResourcesCreated;
151 atomic<unsigned long> _frameNumber;
153 static vector<atomic<bool>> _bufferDataReady;
155 char _serverName [CORSERVER_MAX_STRLEN];
156 char _tempServerName [CORSERVER_MAX_STRLEN];
160 bool InitSapera (
const char* serverName,
int numBuffers);
161 bool CreateSaperaResources ();
164 bool GetCurBufferIndex (
int* index);
166 static void XferCallback0 (SapXferCallbackInfo *pInfo);
167 static void XferCallback1 (SapXferCallbackInfo *pInfo);
Interface and implementation of the WPCamera class.
This class is the implementation of IWPOCTCamera.
Definition: CameraLinkCamera.h:20
RegisterAddress
Camera register.
Definition: CameraLinkCamera.h:24
bool Open(int id=0) override
This uses a 0 or 1 and only works for USB cameras.
Definition: CameraLinkCamera.h:108
int GetCameraWidth() const override
Get the width of the camera in pixels.
Definition: CameraLinkCamera.h:72
Class that converts a scanned image from one format to another.
Definition: WPCamera.h:25