PvApi.h
Go to the documentation of this file.
1 /*
2 |==============================================================================
3 | Copyright (C) 2006-2011 Allied Vision Technologies. All Rights Reserved.
4 |
5 | Redistribution of this header file, in original or modified form, without
6 | prior written consent of Allied Vision Technologies is prohibited.
7 |
8 |=============================================================================
9 |
10 | File: PvApi.h
11 |
12 | Project/lib: PvAPI
13 |
14 | Targets: Win32, Linux, QNX, OSX
15 |
16 | Description: Main header file for PvAPI, the programming interface for
17 | Prosilica Series and Manta cameras.
18 |
19 |
20 |------------------------------------------------------------------------------
21 |
22 | Example basic functions:
23 |
24 | PvInitialize() - load and initialize the PvApi module
25 | PvUnInitialize() - shut down the module
26 |
27 | PvCameraList() - list the cameras available
28 |
29 | PvCameraOpen() - open & close your cameras
30 | PvCameraClose()
31 |
32 | PvCaptureStart() - start & end image capture
33 | PvCaptureEnd()
34 |
35 | PvCaptureQueueFrame() - queue a frame buffer for image capture
36 |
37 | PvCaptureQueueClear() - clear all frames off the queue (i.e. abort)
38 |
39 | PvAttrList() - list all attributes for this camera
40 | PvAttrInfo() - get information on an attribute
41 |
42 | Example basic attributes:
43 |
44 | Width - Uint32 - RW : image width in pixels
45 | Height - Uint32 - RW : image height in pixels
46 | PixelFormat - Enum - RW : image data format. Eg. mono8, mono16
47 | TotalBytesPerFrame - Uint32 - R : number of bytes per image
48 | ExposureValue - Uint32 - RW : camera exposure time
49 |
50 | See AVT "GigE Camera and Driver Attributes" document for full attribute description
51 |
52 |==============================================================================
53 |
54 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
55 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
56 | NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
57 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
58 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
59 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
60 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
61 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
62 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
63 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64 |
65 |==============================================================================
66 | dd/mon/yy Notes
67 |------------------------------------------------------------------------------
68 | 27/Jun/05 Original.
69 | 04/Jun/07 Licence changes
70 | 27/Jun/07 Added function PvCaptureAdjustPacketSize
71 | 09/Jul/07 Added error code ePvErrFirewall
72 | 17/Aug/07 Added new pixel formats
73 | 26/Feb/09 Release 1.22
74 | 05/Apr/10 Added support for int64 and boolean attributes
75 | 03/May/11 Added FrameCount, AncillaryBuffer notes
76 |==============================================================================
77 */
78 
79 #ifndef PVAPI_H_INCLUDE
80 #define PVAPI_H_INCLUDE
81 
82 #ifdef __cplusplus
83 extern "C" {
84 #endif
85 
86 //===== INCLUDE FILES =========================================================
87 
88 //===== #DEFINES ==============================================================
89 
90 #ifndef PVDECL
91  #ifdef _MSC_VER
92  #define PVDECL __stdcall
93  #else
94  #if defined(_LINUX) || defined(_QNX) || defined(_OSX)
95  #define PVDECL
96  #else
97  #error Define PVDECL to be your compiler keyword for "standard call"
98  #endif
99  #endif
100 #endif
101 
102 #define PVINFINITE 0xFFFFFFFF // Never timeout
103 
104 
105 //===== TYPE DEFINITIONS ======================================================
106 
107 typedef void* tPvHandle; // Camera handle
108 
109 
110 //
111 // Error codes, returned by most functions:
112 //
113 typedef enum
114 {
115  ePvErrSuccess = 0, // No error
116  ePvErrCameraFault = 1, // Unexpected camera fault
117  ePvErrInternalFault = 2, // Unexpected fault in PvApi or driver
118  ePvErrBadHandle = 3, // Camera handle is invalid
119  ePvErrBadParameter = 4, // Bad parameter to API call
120  ePvErrBadSequence = 5, // Sequence of API calls is incorrect
121  ePvErrNotFound = 6, // Camera or attribute not found
122  ePvErrAccessDenied = 7, // Camera cannot be opened in the specified mode
123  ePvErrUnplugged = 8, // Camera was unplugged
124  ePvErrInvalidSetup = 9, // Setup is invalid (an attribute is invalid)
125  ePvErrResources = 10, // System/network resources or memory not available
126  ePvErrBandwidth = 11, // 1394 bandwidth not available
127  ePvErrQueueFull = 12, // Too many frames on queue
128  ePvErrBufferTooSmall= 13, // Frame buffer is too small
129  ePvErrCancelled = 14, // Frame cancelled by user
130  ePvErrDataLost = 15, // The data for the frame was lost
131  ePvErrDataMissing = 16, // Some data in the frame is missing
132  ePvErrTimeout = 17, // Timeout during wait
133  ePvErrOutOfRange = 18, // Attribute value is out of the expected range
134  ePvErrWrongType = 19, // Attribute is not this type (wrong access function)
135  ePvErrForbidden = 20, // Attribute write forbidden at this time
136  ePvErrUnavailable = 21, // Attribute is not available at this time
137  ePvErrFirewall = 22, // A firewall is blocking the traffic (Windows only)
138  __ePvErr_force_32 = 0xFFFFFFFF
139 
140 } tPvErr;
141 
142 
143 //----- Camera Enumeration & Information --------------------------------------
144 
145 //
146 // Camera access mode. Used as flags in tPvCameraInfo data, and as the access
147 // mode in PvOpenCamera().
148 //
149 typedef enum
150 {
151  ePvAccessMonitor = 2, // Monitor access: no control, read & listen only
152  ePvAccessMaster = 4, // Master access: full control
153  __ePvAccess_force_32 = 0xFFFFFFFF
154 
156 
157 
158 //
159 // Camera interface type (i.e. firewire, ethernet):
160 //
161 typedef enum
162 {
166 
167 } tPvInterface;
168 
169 
170 //
171 // Camera information type (extended)
172 //
173 typedef struct
174 {
175  unsigned long StructVer; // Version of this structure
176  //---- Version 1 ----
177  unsigned long UniqueId; // Unique value for each camera
178  char CameraName[32]; // People-friendly camera name (usually part name)
179  char ModelName[32]; // Name of camera part
180  char PartNumber[32]; // Manufacturer's part number
181  char SerialNumber[32]; // Camera's serial number
182  char FirmwareVersion[32]; // Camera's firmware version
183  unsigned long PermittedAccess; // A combination of tPvAccessFlags
184  unsigned long InterfaceId; // Unique value for each interface or bus
185  tPvInterface InterfaceType; // Interface type; see tPvInterface
186 
188 
189 //
190 // Camera information type (deprecated)
191 //
192 typedef struct
193 {
194  unsigned long UniqueId; // Unique value for each camera
195  char SerialString[32]; // Camera's serial number
196  unsigned long PartNumber; // Camera part number
197  unsigned long PartVersion; // Camera part version
198  unsigned long PermittedAccess; // A combination of tPvAccessFlags
199  unsigned long InterfaceId; // Unique value for each interface or bus
200  tPvInterface InterfaceType; // Interface type; see tPvInterface
201  char DisplayName[16]; // People-friendly camera name
202  unsigned long _reserved[4]; // Always zero
203 
204 } tPvCameraInfo;
205 
206 //
207 // IP configuration mode for ethernet cameras.
208 //
209 typedef enum
210 {
211  ePvIpConfigPersistent = 1, // Use persistent IP settings
212  ePvIpConfigDhcp = 2, // Use DHCP, fallback to AutoIP
213  ePvIpConfigAutoIp = 4, // Use AutoIP only
215 
216 } tPvIpConfig;
217 
218 
219 //
220 // Structure used for PvCameraIpSettingsGet() and PvCameraIpSettingsChange().
221 //
222 typedef struct
223 {
224  // IP configuration mode: persistent, DHCP & AutoIp, or AutoIp only.
226  // IP configuration mode supported by the camera
227  unsigned long ConfigModeSupport;
228 
229  // Current IP configuration. Ignored for PvCameraIpSettingsChange(). All
230  // values are in network byte order (i.e. big endian).
231  unsigned long CurrentIpAddress;
232  unsigned long CurrentIpSubnet;
233  unsigned long CurrentIpGateway;
234 
235  // Persistent IP configuration. See "ConfigMode" to enable persistent IP
236  // settings. All values are in network byte order.
237  unsigned long PersistentIpAddr;
238  unsigned long PersistentIpSubnet;
239  unsigned long PersistentIpGateway;
240 
241  unsigned long _reserved1[8];
242 
243 } tPvIpSettings;
244 
245 
246 //----- Interface-Link Callback -----------------------------------------------
247 
248 //
249 // Link (aka interface) event type
250 //
251 typedef enum
252 {
253  ePvLinkAdd = 1, // camera first detected after PvInitialize
254  ePvLinkRemove = 2, // camera removed
256  __ePvLink_force_32 = 0xFFFFFFFF
257 
258 } tPvLinkEvent;
259 
260 
261 //
262 // Link (aka interface) event Callback type
263 //
264 // Arguments:
265 //
266 // [i] void* Context, Context, as provided to PvLinkCallbackRegister
267 // [i] tPvInterface Interface, Interface on which the event occurred
268 // [i] tPvLinkEvent Event, Event which occurred
269 // [i] unsigned long UniqueId, Unique ID of the camera related to the event
270 //
271 typedef void (PVDECL *tPvLinkCallback)(void* Context,
272  tPvInterface Interface,
273  tPvLinkEvent Event,
274  unsigned long UniqueId);
275 
276 //----- Camera-Event Callback -----------------------------------------------
277 
278 //
279 // Camera event type
280 //
281 typedef struct
282 {
283  unsigned long EventId; // Event ID
284  unsigned long TimestampLo; // Time stamp, lower 32-bits
285  unsigned long TimestampHi; // Time stamp, upper 32-bits
286  unsigned long Data[4]; // Event data
287  const void* ExtraData; // Event extra-data (NULL if none)
288 
290 
291 //
292 // Camera-event Callback type
293 //
294 // Arguments:
295 //
296 // [i] void* Context, Context, as provided to PvEventCallbackRegister
297 // [i] tPvHandle Camera, Handle of camera which sent the event
298 // [i] const tPvCameraEvent* EventList, First event in list. This list exists only for
299 // the duration of the callback. If you need it, copy it!
300 // [i] unsigned long EventListLength Number of events in EventList
301 //
302 typedef void (PVDECL *tPvCameraEventCallback)(void* Context,
303  tPvHandle Camera,
304  const tPvCameraEvent* EventList,
305  unsigned long EventListLength);
306 
307 //----- Image Capture ---------------------------------------------------------
308 
309 //
310 // Frame image format type
311 //
312 typedef enum
313 {
314  ePvFmtMono8 = 0, // Monochrome, 8 bits
315  ePvFmtMono16 = 1, // Monochrome, 16 bits, data is LSB aligned
316  ePvFmtBayer8 = 2, // Bayer-color, 8 bits
317  ePvFmtBayer16 = 3, // Bayer-color, 16 bits, data is LSB aligned
318  ePvFmtRgb24 = 4, // RGB, 8 bits x 3
319  ePvFmtRgb48 = 5, // RGB, 16 bits x 3, data is LSB aligned
320  ePvFmtYuv411 = 6, // YUV 411
321  ePvFmtYuv422 = 7, // YUV 422
322  ePvFmtYuv444 = 8, // YUV 444
323  ePvFmtBgr24 = 9, // BGR, 8 bits x 3
324  ePvFmtRgba32 = 10, // RGBA, 8 bits x 4
325  ePvFmtBgra32 = 11, // BGRA, 8 bits x 4
326  ePvFmtMono12Packed = 12, // Monochrome, 12 bits,
327  ePvFmtBayer12Packed = 13, // Bayer-color, 12 bits, packed
328  __ePvFmt_force_32 = 0xFFFFFFFF
329 
331 
332 
333 //
334 // Bayer pattern. Applicable when a Bayer-color camera is sending raw bayer
335 // data.
336 //
337 typedef enum
338 {
339  ePvBayerRGGB = 0, // First line RGRG, second line GBGB...
340  ePvBayerGBRG = 1, // First line GBGB, second line RGRG...
341  ePvBayerGRBG = 2, // First line GRGR, second line BGBG...
342  ePvBayerBGGR = 3, // First line BGBG, second line GRGR...
343  __ePvBayer_force_32 = 0xFFFFFFFF
344 
346 
347 
348 //
349 // The frame structure passed to PvQueueFrame().
350 // NOTE: Memset structure to 0 when allocated.
351 // Prosilica filter driver reads AncillaryBuffer pointer.
352 // If pointer location random/invalid this will cause issues.
353 //
354 typedef struct
355 {
356  //----- In -----
357  void* ImageBuffer; // Buffer for image/pixel data.
358  unsigned long ImageBufferSize; // Size of ImageBuffer in bytes
359 
360  void* AncillaryBuffer; // Camera Firmware >= 1.42 Only.
361  // Buffer to capture ancillary chunk mode data. See ChunkModeActive attr.
362  // This MUST be 0 if not in use.
363  // Chunk mode format:
364  // [Bytes 1 - 4] acquisition count.
365  // [Bytes 5 - 8] user value. Not currently implemented. 0.
366  // [Bytes 9 - 12] exposure value.
367  // [Bytes 13 - 16] gain value.
368  // [Bytes 17 - 18] sync in levels.
369  // [Bytes 19 - 20] sync out levels.
370  // [Bytes 21 - 40] not implemented. 0.
371  // [Bytes 41 - 44] chunk ID. 1000.
372  // [Bytes 45 - 48] chunk length.
373 
374  unsigned long AncillaryBufferSize;// Size of your ancillary buffer in bytes. See NonImagePayloadSize attr.
375  // Set to 0 for no buffer.
376 
377  void* Context[4]; // For your use. Possible application: unique ID
378  // of tPvFrame for frame-done callback.
379  unsigned long _reserved1[8];
380 
381  //----- Out -----
382 
383  tPvErr Status; // Status of this frame
384 
385  unsigned long ImageSize; // Image size, in bytes
386  unsigned long AncillarySize; // Ancillary data size, in bytes
387 
388  unsigned long Width; // Image width
389  unsigned long Height; // Image height
390  unsigned long RegionX; // Start of readout region (left)
391  unsigned long RegionY; // Start of readout region (top)
392  tPvImageFormat Format; // Image format
393  unsigned long BitDepth; // Number of significant bits
394  tPvBayerPattern BayerPattern; // Bayer pattern, if bayer format
395 
396  unsigned long FrameCount; // Frame counter. Uses 16bit GigEVision BlockID. Rolls at 65535.
397  unsigned long TimestampLo; // Time stamp, lower 32-bits
398  unsigned long TimestampHi; // Time stamp, upper 32-bits
399 
400  unsigned long _reserved2[32];
401 
402 } tPvFrame;
403 
404 
405 //
406 // Frame Callback type
407 //
408 // Arguments:
409 //
410 // [i] tPvFrame* Frame, Frame completed
411 //
412 typedef void (PVDECL *tPvFrameCallback)(tPvFrame* Frame);
413 
414 
415 //----- Attributes ------------------------------------------------------------
416 
417 
418 #if defined(_M_IX86) || defined(_x86) || defined(_WIN64) || defined(_x64)
419 typedef long tPvInt32; // 32-bit signed integer
420 typedef unsigned long tPvUint32; // 32-bit unsigned integer
421 typedef float tPvFloat32; // IEEE 32-bit float
422 typedef long long tPvInt64; // 64-bit signed integer
423 typedef unsigned char tPvBoolean; // boolean
424 #elif defined(_ppc) || defined(_arm) || defined(_msa)
425 typedef long tPvInt32; // 32-bit integer
426 typedef unsigned long tPvUint32; // 32-bit unsigned integer
427 typedef float tPvFloat32; // IEEE 32-bit float
428 typedef long long tPvInt64; // 64-bit signed integer
429 typedef unsigned char tPvBoolean; // boolean
430 #else
431 #error Define specific data types for your platform.
432 #endif
433 
434 
435 //
436 // List of attributes, used by PvAttrList. This is an array of string
437 // pointers. The array, and all the string pointers, are const.
438 //
439 typedef const char* const* tPvAttrListPtr;
440 
441 
442 //
443 // Attribute data type supported
444 //
445 typedef enum
446 {
457 
458 } tPvDatatype;
459 
460 
461 //
462 // Attribute flags type
463 //
464 typedef enum
465 {
466  ePvFlagRead = 0x01, // Read access is permitted
467  ePvFlagWrite = 0x02, // Write access is permitted
468  ePvFlagVolatile = 0x04, // The camera may change the value any time
469  ePvFlagConst = 0x08, // Value is read only and never changes
470  __ePvFlag_force_32 = 0xFFFFFFFF
471 
473 
474 
475 //
476 // Attribute information type
477 //
478 typedef struct
479 {
480  tPvDatatype Datatype; // Data type
481  unsigned long Flags; // Combination of tPvAttribute flags
482  const char* Category; // Advanced: see documentation
483  const char* Impact; // Advanced: see documentation
484  unsigned long _reserved[4]; // Always zero
485 
487 
488 
489 //===== FUNCTION PROTOTYPES ===================================================
490 
491 //----- API Version -----------------------------------------------------------
492 
493 /*
494  * Function: PvVersion()
495  *
496  * Purpose: Retreive the version number of PvAPI
497  *
498  * Arguments:
499  *
500  * [OUT] unsigned long* pMajor, major version number
501  * [OUT] unsigned long* pMinor, minor version number
502  *
503  * Return: none
504  *
505  * This function can be called at anytime, including before the API is
506  * initialized.
507  */
508 void PVDECL PvVersion(unsigned long* pMajor,unsigned long* pMinor);
509 
510 
511 //----- API Initialization ----------------------------------------------------
512 
513 /*
514  * Function: PvInitialize()
515  *
516  * Purpose: Initialize the PvApi module. This must be called before any
517  * other PvApi function is run.
518  *
519  * Arguments: none
520  *
521  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
522  * following error codes:
523  *
524  * ePvErrResources, resources requested from the OS were not
525  * available
526  * ePvErrInternalFault, an internal fault occurred
527  */
528 tPvErr PVDECL PvInitialize(void);
529 
530 /*
531  * Function: PvInitializeNoDiscovery()
532  *
533  * Purpose: Initialize the PvApi module. This must be called before any
534  * other PvApi function is run. This version is intended to be used
535  * only when the camera discovery via broadcast is unwanted.
536  *
537  * Arguments: none
538  *
539  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
540  * following error codes:
541  *
542  * ePvErrResources, resources requested from the OS were not
543  * available
544  * ePvErrInternalFault, an internal fault occurred
545  */
546 tPvErr PVDECL PvInitializeNoDiscovery(void);
547 
548 
549 /*
550  * Function: PvUnInitialize()
551  *
552  * Purpose: Uninitialize the API module. This will free some resources,
553  * and shut down network activity if applicable.
554  *
555  * Arguments: none
556  *
557  * Return: none
558  */
559 void PVDECL PvUnInitialize(void);
560 
561 
562 //----- Interface-Link Callback -----------------------------------------------
563 
564 /*
565  * Function: PvLinkCallbackRegister()
566  *
567  * Purpose: Register a callback for interface events.
568  *
569  * Arguments:
570  *
571  * [ IN] tPvLinkCallback Callback, Callback function to run when an event occurs
572  * [ IN] tPvLinkEvent Event, Event to trigger the callback
573  * [ IN] void* Context, For your use: Context is passed to your
574  * callback function
575  *
576  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
577  * following error codes:
578  *
579  * ePvErrResources, resources requested from the OS were not
580  * available
581  * ePvErrBadSequence, API isn't initialized
582  *
583  * Here's the rules:
584  * - Multiple callback functions may be registered with the same event
585  * - The same callback function may be shared by different events
586  * - The same callback function with the same event may not be registered twice
587  *
588  * The callback functions are called from a thread within PvApi. The callbacks
589  * are sequenced; i.e. they will not be called simultaneously.
590  *
591  * Use PvLinkCallbackUnRegister() to stop receiving callbacks.
592  */
594  tPvLinkEvent Event,
595  void* Context);
596 
597 
598 /*
599  * Function: PvLinkCallbackUnRegister()
600  *
601  * Purpose: Unregister a callback for interface events.
602  *
603  * Arguments:
604  *
605  * [ IN] tPvLinkCallback Callback, Callback function previously registered
606  * [ IN] tPvLinkEvent Event, Event associated with the callback
607  *
608  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
609  * following error codes:
610  *
611  * ePvErrNotFound, registered callback was not found
612  * ePvErrResources, resources requested from the OS were not
613  * available
614  * ePvErrBadSequence, API isn't initialized
615  */
617  tPvLinkEvent Event);
618 
619 
620 //----- Camera Enumeration & Information --------------------------------------
621 
622 /*
623  * Function: PvCameraListEx()
624  *
625  * Purpose: List all the cameras currently visible to PvApi (extended)
626  *
627  * Arguments:
628  *
629  * [OUT] tPvCameraInfoEx* pList, Array of tPvCameraInfo, allocated by
630  * the caller. The camera list is copied here.
631  * [ IN] unsigned long ListLength, Length of the caller's pList array
632  * [OUT] unsigned long* pConnectedNum, Number of cameras found (may be more
633  * than ListLength!) returned here.
634  * May be NULL.
635  * [ IN] unsigned long StructSize, Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
636  *
637  * Return: Number of pList entries filled, up to ListLength.
638  */
639 unsigned long PVDECL PvCameraListEx(tPvCameraInfoEx* pList,
640  unsigned long ListLength,
641  unsigned long* pConnectedNum,
642  unsigned long StructSize);
643 
644 /*
645  * Function: PvCameraList()
646  *
647  * Purpose: List all the cameras currently visible to PvApi (deprecated)
648  *
649  * Arguments:
650  *
651  * [OUT] tPvCameraInfo* pList, Array of tPvCameraInfo, allocated by
652  * the caller. The camera list is
653  * copied here.
654  * [ IN] unsigned long ListLength, Length of the caller's pList array
655  * [OUT] unsigned long* pConnectedNum, Number of cameras found (may be more
656  * than ListLength!) returned here.
657  * May be NULL.
658  *
659  * Return: Number of pList entries filled, up to ListLength.
660  */
661 unsigned long PVDECL PvCameraList(tPvCameraInfo* pList,
662  unsigned long ListLength,
663  unsigned long* pConnectedNum);
664 
665 
666 /*
667  * Function: PvCameraCount()
668  *
669  * Purpose: Number of cameras visible to PvApi (at the time of the call).
670  * Does not include unreachable cameras.
671  *
672  * Arguments: none
673  *
674  * Return: The number of cameras found
675  *
676  * The number of cameras is dynamic, and may change at any time.
677  */
678 unsigned long PVDECL PvCameraCount(void);
679 
680 /*
681  * Function: PvCameraInfoEx()
682  *
683  * Purpose: Retreive information on a given camera (extended)
684  *
685  * Arguments:
686  *
687  * [ IN] unsigned long UniqueId, Unique ID of the camera
688  * [OUT] tPvCameraInfExo* pInfo, Structure where the information will be copied
689  * [ IN] unsigned long StructSize, Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
690  *
691  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
692  * following error codes:
693  *
694  * ePvErrNotFound, the camera was not found (unplugged)
695  * ePvErrUnplugged, the camera was found but unplugged during the
696  * function call
697  * ePvErrBadParameter, a valid pointer for pInfo was not supplied
698  * ePvErrResources, resources requested from the OS were not
699  * available
700  * ePvErrInternalFault, an internal fault occurred
701  * ePvErrBadSequence, API isn't initialized
702  */
703 tPvErr PVDECL PvCameraInfoEx(unsigned long UniqueId,tPvCameraInfoEx* pInfo,unsigned long StructSize);
704 
705 /*
706  * Function: PvCameraInfo()
707  *
708  * Purpose: Retreive information on a given camera (deprecated)
709  *
710  * Arguments:
711  *
712  * [ IN] unsigned long UniqueId, Unique ID of the camera
713  * [OUT] tPvCameraInfo* pInfo, Structure where the information will be
714  * copied
715  *
716  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
717  * following error codes:
718  *
719  * ePvErrNotFound, the camera was not found (unplugged)
720  * ePvErrUnplugged, the camera was found but unplugged during the
721  * function call
722  * ePvErrBadParameter, a valid pointer for pInfo was not supplied
723  * ePvErrResources, resources requested from the OS were not
724  * available
725  * ePvErrInternalFault, an internal fault occurred
726  * ePvErrBadSequence, API isn't initialized
727  */
728 tPvErr PVDECL PvCameraInfo(unsigned long UniqueId, tPvCameraInfo* pInfo);
729 
730 /*
731  * Function: PvCameraInfoByAddrEx()
732  *
733  * Purpose: Retreive information on a camera, by IP address. This function
734  * is required if the ethernet camera is not on the local ethernet
735  * network. (extended)
736  *
737  * Arguments:
738  *
739  * [ IN] unsigned long IpAddr, IP address of camera, in network byte order.
740  * [OUT] tPvCameraInfo* pInfo, The camera information will be copied here.
741  * [OUT] tPvIpSettings* pIpSettings, The IP settings will be copied here; NULL pointer OK.
742  * [ IN] unsigned long StructSize, Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
743  *
744  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
745  * following error codes:
746  *
747  * ePvErrNotFound, the camera was not found
748  * ePvErrResources, resources requested from the OS were not
749  * available
750  * ePvErrInternalFault, an internal fault occurred
751  * ePvErrBadSequence, API isn't initialized
752  * ePvErrBadParameter, pIpSettings->size is invalid
753  *
754  * The specified camera may not be visible to PvCameraList(); it might be on a
755  * different ethernet network. In this case, communication with the camera is
756  * routed to the local gateway.
757  */
758 tPvErr PVDECL PvCameraInfoByAddrEx(unsigned long IpAddr,
759  tPvCameraInfoEx* pInfo,
760  tPvIpSettings* pIpSettings,
761  unsigned long StructSize);
762 
763 /*
764  * Function: PvCameraInfoByAddr()
765  *
766  * Purpose: Retreive information on a camera, by IP address. This function
767  * is required if the ethernet camera is not on the local ethernet
768  * network. (deprecated)
769  *
770  * Arguments:
771  *
772  * [ IN] unsigned long IpAddr, IP address of camera, in network byte
773  * order.
774  * [OUT] tPvCameraInfo* pInfo, The camera information will be copied
775  * here.
776  * [OUT] tPvIpSettings* pIpSettings, The IP settings will be copied here;
777  * NULL pointer OK.
778  *
779  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
780  * following error codes:
781  *
782  * ePvErrNotFound, the camera was not found
783  * ePvErrResources, resources requested from the OS were not
784  * available
785  * ePvErrInternalFault, an internal fault occurred
786  * ePvErrBadSequence, API isn't initialized
787  * ePvErrBadParameter, pIpSettings->size is invalid
788  *
789  * The specified camera may not be visible to PvCameraList(); it might be on a
790  * different ethernet network. In this case, communication with the camera is
791  * routed to the local gateway.
792  */
793 tPvErr PVDECL PvCameraInfoByAddr(unsigned long IpAddr,
794  tPvCameraInfo* pInfo,
795  tPvIpSettings* pIpSettings);
796 
797 /*
798  * Function: PvCameraListUnreachableEx()
799  *
800  * Purpose: List all the cameras currently inaccessable by PvApi. This lists
801  * the ethernet cameras which are connected to the local ethernet
802  * network, but are on a different subnet. (extended)
803  *
804  * Arguments:
805  *
806  * [OUT] tPvCameraInfo* pList, Array of tPvCameraInfo, allocated by
807  * the caller. The camera list is
808  * copied here.
809  * [ IN] unsigned long ListLength, Length of the caller's pList array
810  * [OUT] unsigned long* pConnectedNum, Number of cameras found (may be more
811  * than ListLength!) returned here.
812  * May be NULL.
813  * [ IN] unsigned long StructSize, Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
814  *
815  * Return: Number of pList entries filled, up to ListLength.
816  */
817 unsigned long PVDECL PvCameraListUnreachableEx(tPvCameraInfoEx* pList,
818  unsigned long ListLength,
819  unsigned long* pConnectedNum,
820  unsigned long StructSize);
821 
822 
823 /*
824  * Function: PvCameraListUnreachable()
825  *
826  * Purpose: List all the cameras currently inaccessable by PvApi. This lists
827  * the ethernet cameras which are connected to the local ethernet
828  * network, but are on a different subnet. (deprecated)
829  *
830  * Arguments:
831  *
832  * [OUT] tPvCameraInfo* pList, Array of tPvCameraInfo, allocated by
833  * the caller. The camera list is
834  * copied here.
835  * [ IN] unsigned long ListLength, Length of the caller's pList array
836  * [OUT] unsigned long* pConnectedNum, Number of cameras found (may be more
837  * than ListLength!) returned here.
838  * May be NULL.
839  *
840  * Return: Number of pList entries filled, up to ListLength.
841  */
842 unsigned long PVDECL PvCameraListUnreachable(tPvCameraInfo* pList,
843  unsigned long ListLength,
844  unsigned long* pConnectedNum);
845 
846 
847 //----- Opening & Closing -----------------------------------------------------
848 
849 /*
850  * Function: PvCameraOpen()
851  *
852  * Purpose: Open the specified camera. This function must be called before
853  * you can control the camera.
854  *
855  * Arguments:
856  *
857  * [ IN] unsigned long UniqueId, UniqueId of the camera
858  * [ IN] tPvAccessFlags AccessFlag, Access flag {monitor, master}
859  * [OUT] tPvHandle* pCamera, Handle to the opened camera returned here
860  *
861  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
862  * following error codes:
863  *
864  * ePvErrAccessDenied, the camera couldn't be open in the requested mode
865  * ePvErrNotFound, the camera was not found (unplugged)
866  * ePvErrUnplugged, the camera was found but unplugged during the
867  * function call
868  * ePvErrBadParameter, a valid pointer for pCamera was not supplied
869  * ePvErrResources, resources requested from the OS were not
870  * available
871  * ePvErrInternalFault, an internal fault occurred
872  * ePvErrBadSequence, API isn't initialized or camera is alreay open
873  *
874  * If ePvErrSuccess is returned, you must eventually call PvCameraClose().
875  *
876  * Alternatively, under special circumstances, you might open an ethernet
877  * camera with PvCameraOpenByAddr().
878  */
879 tPvErr PVDECL PvCameraOpen(unsigned long UniqueId,
880  tPvAccessFlags AccessFlag,
881  tPvHandle* pCamera);
882 
883 /*
884  * Function: PvCameraOpenByAddr()
885  *
886  * Purpose: Open the specified camera, by IP address. This function is
887  * required, in place of PvCameraOpen(), if the ethernet camera
888  * is not on the local ethernet network.
889  *
890  * Arguments:
891  *
892  * [ IN] unsigned long IpAddr, IP address of camera, in network byte
893  * order.
894  * [ IN] tPvAccessFlags AccessFlag, Access flag {monitor, master}
895  * [OUT] tPvHandle* pCamera, Handle to the opened camera returned here
896  *
897  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
898  * following error codes:
899  *
900  * ePvErrAccessDenied, the camera couldn't be open in the requested mode
901  * ePvErrNotFound, the camera was not found (unplugged)
902  * ePvErrUnplugged, the camera was found but unplugged during the
903  * function call
904  * ePvErrBadParameter, a valid pointer for pCamera was not supplied
905  * ePvErrResources, resources requested from the OS were not
906  * available
907  * ePvErrInternalFault, an internal fault occurred
908  * ePvErrBadSequence, API isn't initialized or camera is alreay open
909  *
910  * If ePvErrSuccess is returned, you must eventually call PvCameraClose().
911  *
912  * The specified camera may not be visible to PvCameraList(); it might be on a
913  * different ethernet network. In this case, communication with the camera is
914  * routed to the local gateway.
915  */
916 tPvErr PVDECL PvCameraOpenByAddr(unsigned long IpAddr,
917  tPvAccessFlags AccessFlag,
918  tPvHandle* pCamera);
919 
920 /*
921  * Function: PvCameraClose()
922  *
923  * Purpose: Close the specified camera.
924  *
925  * Arguments:
926  *
927  * [ IN] tPvHandle Camera, Handle of an opened camera
928  *
929  * Return: ePvErrBadHandle if the handle is bad, otherwise likely to be any of the
930  * following error codes:
931  *
932  * ePvErrBadHandle, the handle of the camera is invalid
933  * ePvErrBadSequence, API isn't initialized
934  *
935  */
936 tPvErr PVDECL PvCameraClose(tPvHandle Camera);
937 
938 
939 /*
940  * Function: PvCameraIpSettingsGet()
941  *
942  * Purpose: Get IP settings for an ethernet camera. This command will work
943  * for all cameras on the local ethernet network, including
944  * "unreachable" cameras.
945  *
946  * Arguments:
947  *
948  * [ IN] unsigned long UniqueId, UniqueId of the camera
949  * [OUT] tPvIpSettings* pSettings, Camera settings are copied here
950  *
951  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
952  * following error codes:
953  *
954  * ePvErrNotFound, the camera was not found (or is not
955  * an ethernet camera)
956  * ePvErrInternalFault, an internal fault occurred
957  * ePvErrBadSequence, API isn't initialized
958  * ePvBadParameter, pSettings->size is incorrect
959  *
960  * The camera does not have to be opened to run this command.
961  */
962 tPvErr PVDECL PvCameraIpSettingsGet(unsigned long UniqueId,
963  tPvIpSettings* pSettings);
964 
965 
966 /*
967  * Function: PvCameraIpSettingsChange()
968  *
969  * Purpose: Change the IP settings for an ethernet camera. This command
970  * will work for all cameras on the local ethernet network,
971  * including "unreachable" cameras.
972  *
973  * Arguments:
974  *
975  * [ IN] unsigned long UniqueId, UniqueId of the camera
976  * [ IN] const tPvIpSettings* pSettings, New camera settings
977  *
978  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
979  * following error codes:
980  *
981  * ePvErrNotFound, the camera was not found
982  * ePvErrAccessDenied, the camera was already open
983  * ePvErrInternalFault, an internal fault occurred
984  * ePvErrBadSequence, API isn't initialized
985  * ePvBadParameter, pSettings->size is incorrect
986  *
987  * This command will fail if any application on any host has opened the camera.
988  */
989 tPvErr PVDECL PvCameraIpSettingsChange(unsigned long UniqueId,
990  const tPvIpSettings* pSettings);
991 
992 
993 //----- Image Capture ---------------------------------------------------------
994 
995 /*
996  * Function: PvCaptureStart()
997  *
998  * Purpose: Setup the camera interface for image transfer. This does not
999  * necessarily start acquisition.
1000  *
1001  * Arguments:
1002  *
1003  * [ IN] tPvHandle Camera, Handle to the camera
1004  *
1005  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1006  * following error codes:
1007  *
1008  * ePvErrBadHandle, the handle of the camera is invalid
1009  * ePvErrUnplugged, the camera has been unplugged
1010  * ePvErrResources, resources requested from the OS were not
1011  * available
1012  * ePvErrInternalFault, an internal fault occurred
1013  * ePvErrBadSequence, API isn't initialized or capture already started
1014  *
1015  * PvCaptureStart() must be run before PvCaptureQueueFrame() is allowed. But
1016  * the camera will not acquire images before the AcquisitionMode attribute is
1017  * set to a non-idle mode.
1018  */
1019 tPvErr PVDECL PvCaptureStart(tPvHandle Camera);
1020 
1021 
1022 /*
1023  * Function: PvCaptureEnd()
1024  *
1025  * Purpose: Disable the image transfer mechanism.
1026  *
1027  * Arguments:
1028  *
1029  * [ IN] tPvHandle Camera, Handle to the camera
1030  *
1031  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1032  * following error codes:
1033  *
1034  * ePvErrBadHandle, the handle of the camera is invalid
1035  * ePvErrInternalFault, an internal fault occurred
1036  * ePvErrBadSequence, API isn't initialized or capture already stopped
1037  *
1038  * This cannot be called until the frame queue is empty.
1039  */
1040 tPvErr PVDECL PvCaptureEnd(tPvHandle Camera);
1041 
1042 
1043 /*
1044  * Function: PvCaptureQuery()
1045  *
1046  * Purpose: Check to see if a camera interface is ready to transfer images.
1047  * I.e. has PvCaptureStart() been called?
1048  *
1049  * Arguments:
1050  *
1051  * [ IN] tPvHandle Camera, Handle to the camera
1052  * [OUT] unsigned long* pIsStarted, Result returned here: 1=started, 0=disabled
1053  *
1054  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1055  * following error codes:
1056  *
1057  * ePvErrBadHandle, the handle of the camera is invalid
1058  * ePvBadParameter, a valid pointer for pIsStarted was not supplied
1059  * ePvErrInternalFault, an internal fault occurred
1060  * ePvErrBadSequence, API isn't initialized
1061  */
1062 tPvErr PVDECL PvCaptureQuery(tPvHandle Camera, unsigned long* pIsStarted);
1063 
1064 /*
1065  * Function: PvCaptureAdjustPacketSize()
1066  *
1067  * Purpose: Determine the maximum packet size supported by the system.
1068  *
1069  * Arguments:
1070  *
1071  * [ IN] tPvHandle Camera, Handle to the camera
1072  * [ IN] unsigned long MaximumPacketSize Upper limit: the packet size will
1073  * not be set higher than this value.
1074  *
1075  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1076  * following error codes:
1077  *
1078  * ePvErrBadHandle, the handle of the camera is invalid
1079  * ePvErrUnplugged, the camera has been unplugged
1080  * ePvErrResources, resources requested from the OS were not
1081  * available
1082  * ePvErrInternalFault, an internal fault occurred
1083  * ePvErrBadSequence, API isn't initialized or capture already started
1084  *
1085  * The maximum packet size can be limited by the camera, host adapter, and
1086  * ethernet switch.
1087  *
1088  * PvCaptureAdjustPacketSize() cannot be run when capture has started.
1089  */
1090 tPvErr PVDECL PvCaptureAdjustPacketSize(tPvHandle Camera,unsigned long MaximumPacketSize);
1091 
1092 /*
1093  * Function: PvCaptureQueueFrame()
1094  *
1095  * Purpose: Queue a frame buffer for image capture.
1096  *
1097  * Arguments:
1098  *
1099  * [ IN] tPvHandle Camera, Handle to the camera
1100  * [ IN] tPvFrame* pFrame, Frame to queue
1101  * [ IN] tPvFrameCallback Callback, Callback to run when the frame is done;
1102  * may be NULL for no callback
1103  *
1104  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1105  * following error codes:
1106  *
1107  * ePvErrBadHandle, the handle of the camera is invalid
1108  * ePvErrUnplugged, the camera has been unplugged
1109  * ePvErrQueueFull, the frame queue is full
1110  * ePvErrResources, resources requested from the OS were not
1111  * available
1112  * ePvErrInternalFault, an internal fault occurred
1113  * ePvErrBadSequence, API isn't initialized or capture not started
1114  *
1115  * This function returns immediately. If ePvErrSuccess is returned, the frame
1116  * will remain in the queue until it is complete, or aborted due to an error or
1117  * a call to PvCaptureQueueClear().
1118  *
1119  * Frames are completed (or aborted) in the order they are queued.
1120  *
1121  * You can specify a callback function (the "frame-done callback") to occur
1122  * when the frame is complete, or you can use PvCaptureWaitForFrameDone() to
1123  * block until the frame is complete.
1124  *
1125  * When the frame callback starts, the tPvFrame data structure is no longer in
1126  * use and you are free to do with it as you please (for example, reuse or
1127  * deallocation.)
1128  *
1129  * Each frame on the queue must have a unique tPvFrame data structure.
1130  */
1131 tPvErr PVDECL PvCaptureQueueFrame(tPvHandle Camera,
1132  tPvFrame* pFrame,
1133  tPvFrameCallback Callback);
1134 
1135 
1136 /*
1137  * Function: PvCaptureQueueClear()
1138  *
1139  * Purpose: Empty the frame queue.
1140  *
1141  * Arguments:
1142  *
1143  * [ IN] tPvHandle Camera, Handle to the camera
1144  *
1145  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1146  * following error codes:
1147  *
1148  * ePvErrBadHandle, the handle of the camera is invalid
1149  * ePvErrInternalFault, an internal fault occurred
1150  * ePvErrBadSequence, API isn't initialized
1151  *
1152  * Queued frames are returned with status ePvErrCancelled.
1153  *
1154  * PvCaptureQueueClear() cannot be called from the frame-done callback.
1155  *
1156  * When this function returns, no more frames are left on the queue and you
1157  * will not receive another frame callback.
1158  */
1159 tPvErr PVDECL PvCaptureQueueClear(tPvHandle Camera);
1160 
1161 
1162 /*
1163  * Function: PvCaptureWaitForFrameDone()
1164  *
1165  * Purpose: Wait for a frame capture to complete.
1166  *
1167  * Arguments:
1168  *
1169  * [ IN] tPvHandle Camera, Handle to the camera
1170  * [ IN] tPvFrame* pFrame, Frame to wait upon
1171  * [ IN] unsigned long Timeout, Wait timeout (in milliseconds); use
1172  * PVINFINITE for no timeout
1173  *
1174  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1175  * following error codes:
1176  *
1177  * ePvErrTimeout, timeout while waiting for the frame
1178  * ePvErrBadHandle, the handle of the camera is invalid
1179  * ePvErrInternalFault, an internal fault occurred
1180  * ePvErrBadSequence, API isn't initialized
1181  *
1182  * This function cannot be called from the frame-done callback.
1183  *
1184  * When this function returns, the frame structure is no longer in use and you
1185  * are free to do with it as you please (for example, reuse or deallocation).
1186  *
1187  * If you are using the frame-done callback: this function might return first,
1188  * or the frame callback might be called first.
1189  *
1190  * If the specified frame is not on the queue, this function returns
1191  * ePvErrSuccess, since we do not know if the frame just left the queue.
1192  */
1193 tPvErr PVDECL PvCaptureWaitForFrameDone(tPvHandle Camera,
1194  const tPvFrame* pFrame,
1195  unsigned long Timeout);
1196 
1197 
1198 //----- Attributes ------------------------------------------------------------
1199 
1200 /*
1201  * Function: PvAttrList()
1202  *
1203  * Purpose: List all the attributes for a given camera.
1204  *
1205  * Arguments:
1206  *
1207  * [ IN] tPvHandle Camera, Handle to the camera
1208  * [OUT] tPvAttrListPtr* pListPtr Pointer to the attribute list is returned
1209  * here. The attribute list is valid until
1210  * the camera is closed.
1211  * [OUT] unsigned long* pLength Length of the list is returned here. The
1212  * length never changes while the camera
1213  * remains opened.
1214  *
1215  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1216  * following error codes:
1217  *
1218  * ePvErrBadHandle, the handle of the camera is invalid
1219  * ePvErrUnplugged, the camera has been unplugged
1220  * ePvBadParameter, a valid pointer for pListPtr was not supplied
1221  * ePvErrInternalFault, an internal fault occurred
1222  * ePvErrBadSequence, API isn't initialized
1223  *
1224  * The attribute list is contained in memory allocated by the PvApi module.
1225  * This memory remains static until the camera is closed.
1226  */
1227 tPvErr PVDECL PvAttrList(tPvHandle Camera,
1228  tPvAttrListPtr* pListPtr,
1229  unsigned long* pLength);
1230 
1231 
1232 /*
1233  * Function: PvAttrInfo()
1234  *
1235  * Purpose: Retrieve information on an attribute. This information is
1236  * static for each camera.
1237  *
1238  * Arguments:
1239  *
1240  * [ IN] tPvHandle Camera, Handle to the camera
1241  * [ IN] const char* Name, Attribute name
1242  * [OUT] tPvAttributeInfo* pInfo, The information is copied here
1243  *
1244  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1245  * following error codes:
1246  *
1247  * ePvErrBadHandle, the handle of the camera is invalid
1248  * ePvErrUnplugged, the camera has been unplugged
1249  * ePvErrNotFound, the requested attribute doesn't exist
1250  * ePvBadParameter, a valid pointer for pInfo was not supplied
1251  * ePvErrInternalFault, an internal fault occurred
1252  * ePvErrBadSequence, API isn't initialized
1253  */
1254 tPvErr PVDECL PvAttrInfo(tPvHandle Camera,
1255  const char* Name,
1256  tPvAttributeInfo* pInfo);
1257 
1258 
1259 /*
1260  * Function: PvAttrExists()
1261  *
1262  * Purpose: Check if an attribute exists for the camera.
1263  *
1264  * Arguments:
1265  *
1266  * [ IN] tPvHandle Camera, Handle to the camera
1267  * [ IN] const char* Name, Attribute name
1268  *
1269  * Return: ePvErrSuccess, the attribute exists
1270  * ePvErrNotFound, the attribute does not exist
1271  *
1272  * The following error codes may also occur:
1273  *
1274  * ePvErrBadHandle, the handle of the camera is invalid
1275  * ePvErrUnplugged, the camera has been unplugged
1276  * ePvErrInternalFault, an internal fault occurred
1277  * ePvErrBadSequence, API isn't initialized
1278  */
1279 tPvErr PVDECL PvAttrExists(tPvHandle Camera, const char* Name);
1280 
1281 
1282 /*
1283  * Function: PvAttrIsAvailable()
1284  *
1285  * Purpose: Check if an attribute is available.
1286  *
1287  * Arguments:
1288  *
1289  * [ IN] tPvHandle Camera, Handle to the camera
1290  * [ IN] const char* Name, Attribute name
1291  *
1292  * Return: ePvErrSuccess, the attribute is available
1293  * ePvErrUnavailable, the attribute is not available
1294  *
1295  * The following error codes may also occur:
1296  *
1297  * ePvErrBadHandle, the handle of the camera is invalid
1298  * ePvErrUnplugged, the camera has been unplugged
1299  * ePvErrNotFound, the requested attribute doesn't exist
1300  * ePvErrInternalFault, an internal fault occurred
1301  * ePvErrBadSequence, API isn't initialized
1302  */
1303 tPvErr PVDECL PvAttrIsAvailable(tPvHandle Camera, const char* Name);
1304 
1305 
1306 /*
1307  * Function: PvAttrIsValid()
1308  *
1309  * Purpose: Check if an attribute's value is valid.
1310  *
1311  * Arguments:
1312  *
1313  * [ IN] tPvHandle Camera, Handle to the camera
1314  * [ IN] const char* Name, Attribute name
1315  *
1316  * Return: ePvErrSuccess, the attribute is valid
1317  * ePvErrOutOfRange, the attribute is not valid
1318  *
1319  * The following error codes may also occur:
1320  *
1321  * ePvErrBadHandle, the handle of the camera is invalid
1322  * ePvErrUnplugged, the camera has been unplugged
1323  * ePvErrOutOfRange, the requested attribute is not valid
1324  * ePvErrNotFound, the requested attribute doesn't exist
1325  * ePvErrInternalFault, an internal fault occurred
1326  * ePvErrBadSequence, API isn't initialized
1327  */
1328 tPvErr PVDECL PvAttrIsValid(tPvHandle Camera, const char* Name);
1329 
1330 
1331 /*
1332  * Function: PvAttrRangeEnum()
1333  *
1334  * Purpose: Get the enumeration set for an enumerated attribute. The set is
1335  * returned as a comma separated string containing all allowed
1336  * values.
1337  *
1338  * Arguments:
1339  *
1340  * [ IN] tPvHandle Camera, Handle to the camera
1341  * [ IN] const char* Name, Attribute name
1342  * [OUT] char* pBuffer, Caller-allocated buffer; the string is
1343  * copied here
1344  * [ IN] unsigned long BufferSize, Size of buffer, in bytes
1345  * [OUT] unsigned long* pSize, Size of the enumeration set string is
1346  * returned here. This may be bigger
1347  * than BufferSize! (pSize may be NULL.)
1348  *
1349  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1350  * following error codes:
1351  *
1352  * ePvErrBadHandle, the handle of the camera is invalid
1353  * ePvErrUnplugged, the camera has been unplugged
1354  * ePvErrNotFound, the requested attribute doesn't exist
1355  * ePvErrWrongType, the requested attribute is not of the correct type
1356  * ePvBadParameter, a valid pointer for pBuffer was not supplied
1357  * ePvErrInternalFault, an internal fault occurred
1358  * ePvErrBadSequence, API isn't initialized
1359  *
1360  * Enumeration sets must be considered dynamic. For some attributes, the set
1361  * may change at any time.
1362  */
1363 tPvErr PVDECL PvAttrRangeEnum(tPvHandle Camera,
1364  const char* Name,
1365  char* pBuffer,
1366  unsigned long BufferSize,
1367  unsigned long* pSize);
1368 
1369 
1370 /*
1371  * Function: PvAttrRangeUint32()
1372  *
1373  * Purpose: Get the value range for a uint32 attribute.
1374  *
1375  * Arguments:
1376  *
1377  * [ IN] tPvHandle Camera, Handle to the camera
1378  * [ IN] const char* Name, Attribute name
1379  * [OUT] tPvUint32* pMin, Minimum value returned here
1380  * [OUT] tPvUint32* pMax, Maximum value returned here
1381  *
1382  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1383  * following error codes:
1384  *
1385  * ePvErrBadHandle, the handle of the camera is invalid
1386  * ePvErrUnplugged, the camera has been unplugged
1387  * ePvErrNotFound, the requested attribute doesn't exist
1388  * ePvErrWrongType, the requested attribute is not of the correct type
1389  * ePvBadParameter, a valid pointer for pMin or pMax was not supplied
1390  * ePvErrInternalFault, an internal fault occurred
1391  * ePvErrBadSequence, API isn't initialized
1392  */
1393 tPvErr PVDECL PvAttrRangeUint32(tPvHandle Camera,
1394  const char* Name,
1395  tPvUint32* pMin,
1396  tPvUint32* pMax);
1397 
1398 
1399 /*
1400  * Function: PvAttrRangeFloat32()
1401  *
1402  * Purpose: Get the value range for a float32 attribute.
1403  *
1404  * Arguments:
1405  *
1406  * [ IN] tPvHandle Camera, Handle to the camera
1407  * [ IN] const char* Name, Attribute name
1408  * [OUT] tPvFloat32* pMin, Minimum value returned here
1409  * [OUT] tPvFloat32* pMax, Maximum value returned here
1410  *
1411  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1412  * following error codes:
1413  *
1414  * ePvErrBadHandle, the handle of the camera is invalid
1415  * ePvErrUnplugged, the camera has been unplugged
1416  * ePvErrNotFound, the requested attribute doesn't exist
1417  * ePvErrWrongType, the requested attribute is not of the correct type
1418  * ePvBadParameter, a valid pointer for pMin or pMax was not supplied
1419  * ePvErrInternalFault, an internal fault occurred
1420  * ePvErrBadSequence, API isn't initialized
1421  */
1422 tPvErr PVDECL PvAttrRangeFloat32(tPvHandle Camera,
1423  const char* Name,
1424  tPvFloat32* pMin,
1425  tPvFloat32* pMax);
1426 
1427 /*
1428  * Function: PvAttrRangeInt64()
1429  *
1430  * Purpose: Get the value range for a int64 attribute.
1431  *
1432  * Arguments:
1433  *
1434  * [ IN] tPvHandle Camera, Handle to the camera
1435  * [ IN] const char* Name, Attribute name
1436  * [OUT] tPvInt64* pMin, Minimum value returned here
1437  * [OUT] tPvInt64* pMax, Maximum value returned here
1438  *
1439  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1440  * following error codes:
1441  *
1442  * ePvErrBadHandle, the handle of the camera is invalid
1443  * ePvErrUnplugged, the camera has been unplugged
1444  * ePvErrNotFound, the requested attribute doesn't exist
1445  * ePvErrWrongType, the requested attribute is not of the correct type
1446  * ePvBadParameter, a valid pointer for pMin or pMax was not supplied
1447  * ePvErrInternalFault, an internal fault occurred
1448  * ePvErrBadSequence, API isn't initialized
1449  */
1450 tPvErr PVDECL PvAttrRangeInt64(tPvHandle Camera,
1451  const char* Name,
1452  tPvInt64* pMin,
1453  tPvInt64* pMax);
1454 
1455 /*
1456  * Function: PvCommandRun()
1457  *
1458  * Purpose: Run a specific command on the camera
1459  *
1460  * Arguments:
1461  *
1462  * [ IN] tPvHandle Camera, Handle to the camera
1463  * [ IN] const char* Name, Attribute name
1464  *
1465  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1466  * following error codes:
1467  *
1468  * ePvErrBadHandle, the handle of the camera is invalid
1469  * ePvErrUnplugged, the camera has been unplugged
1470  * ePvErrNotFound, the requested attribute doesn't exist
1471  * ePvErrWrongType, the requested attribute is not of the correct type
1472  * ePvErrInternalFault, an internal fault occurred
1473  * ePvErrBadSequence, API isn't initialized
1474  */
1475 tPvErr PVDECL PvCommandRun(tPvHandle Camera, const char* Name);
1476 
1477 
1478 /*
1479  * Function: PvAttrStringGet()
1480  *
1481  * Purpose: Get the value of a string attribute.
1482  *
1483  * Arguments:
1484  *
1485  * [ IN] tPvHandle Camera, Handle to the camera
1486  * [ IN] const char* Name, Attribute name
1487  * [OUT] char* pBuffer, Caller-allocated buffer; the string is
1488  * copied here
1489  * [ IN] unsigned long BufferSize, Size of buffer, in bytes
1490  * [OUT] unsigned long* pSize, Size of the string is returned here. This
1491  * may be bigger than BufferSize! (pSize
1492  * may be NULL.)
1493  *
1494  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1495  * following error codes:
1496  *
1497  * ePvErrBadHandle, the handle of the camera is invalid
1498  * ePvErrUnplugged, the camera has been unplugged
1499  * ePvErrNotFound, the requested attribute doesn't exist
1500  * ePvErrWrongType, the requested attribute is not of the correct type
1501  * ePvBadParameter, a valid pointer for pBuffer was not supplied
1502  * ePvErrInternalFault, an internal fault occurred
1503  * ePvErrBadSequence, API isn't initialized
1504  */
1505 tPvErr PVDECL PvAttrStringGet(tPvHandle Camera,
1506  const char* Name,
1507  char* pBuffer,
1508  unsigned long BufferSize,
1509  unsigned long* pSize);
1510 
1511 
1512 /*
1513  * Function: PvAttrStringSet()
1514  *
1515  * Purpose: Set the value of a string attribute.
1516  *
1517  * Arguments:
1518  *
1519  * [ IN] tPvHandle Camera, Handle to the camera
1520  * [ IN] const char* Name, Attribute name
1521  * [ IN] const char* Value, Value to set
1522  *
1523  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1524  * following error codes:
1525  *
1526  * ePvErrBadHandle, the handle of the camera is invalid
1527  * ePvErrUnplugged, the camera has been unplugged
1528  * ePvErrNotFound, the requested attribute doesn't exist
1529  * ePvErrWrongType, the requested attribute is not of the correct type
1530  * ePvErrForbidden, the requested attribute forbid this operation
1531  * ePvErrInternalFault, an internal fault occurred
1532  * ePvErrBadSequence, API isn't initialized
1533  */
1534 tPvErr PVDECL PvAttrStringSet(tPvHandle Camera,
1535  const char* Name,
1536  const char* Value);
1537 
1538 
1539 /*
1540  * Function: PvAttrEnumGet()
1541  *
1542  * Purpose: Get the value of an enumerated attribute. The enumeration value
1543  * is a string.
1544  *
1545  * Arguments:
1546  *
1547  * [ IN] tPvHandle Camera, Handle to the camera
1548  * [ IN] const char* Name, Attribute name
1549  * [OUT] char* pBuffer, Caller-allocated buffer; the string is
1550  * copied here
1551  * [ IN] unsigned long BufferSize, Size of buffer, in bytes
1552  * [OUT] unsigned long* pSize, Size of the string is returned here. This
1553  * may be bigger than BufferSize! (pSize
1554  * may be NULL.)
1555  *
1556  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1557  * following error codes:
1558  *
1559  * ePvErrBadHandle, the handle of the camera is invalid
1560  * ePvErrUnplugged, the camera has been unplugged
1561  * ePvErrNotFound, the requested attribute doesn't exist
1562  * ePvErrWrongType, the requested attribute is not of the correct type
1563  * ePvBadParameter, a valid pointer for pBuffer was not supplied
1564  * ePvErrInternalFault, an internal fault occurred
1565  * ePvErrBadSequence, API isn't initialized
1566  */
1567 tPvErr PVDECL PvAttrEnumGet(tPvHandle Camera,
1568  const char* Name,
1569  char* pBuffer,
1570  unsigned long BufferSize,
1571  unsigned long* pSize);
1572 
1573 
1574 /*
1575  * Function: PvAttrEnumSet()
1576  *
1577  * Purpose: Set the value of an enumerated attribute. The enumeration value
1578  * is a string.
1579  *
1580  * Arguments:
1581  *
1582  * [ IN] tPvHandle Camera, Handle to the camera
1583  * [ IN] const char* Name, Attribute name
1584  * [ IN] const char* Value, Value to set
1585  *
1586  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1587  * following error codes:
1588  *
1589  * ePvErrBadHandle, the handle of the camera is invalid
1590  * ePvErrUnplugged, the camera has been unplugged
1591  * ePvErrNotFound, the requested attribute doesn't exist
1592  * ePvErrWrongType, the requested attribute is not of the correct type
1593  * ePvErrForbidden, the requested attribute forbid this operation
1594  * ePvErrOutOfRange, the supplied value is out of range
1595  * ePvErrInternalFault, an internal fault occurred
1596  * ePvErrBadSequence, API isn't initialized
1597  */
1598 tPvErr PVDECL PvAttrEnumSet(tPvHandle Camera,
1599  const char* Name,
1600  const char* Value);
1601 
1602 
1603 /*
1604  * Function: PvAttrUint32Get()
1605  *
1606  * Purpose: Get the value of a uint32 attribute.
1607  *
1608  * Arguments:
1609  *
1610  * [ IN] tPvHandle Camera, Handle to the camera
1611  * [ IN] const char* Name, Attribute name
1612  * [OUT] tPvUint32* pValue, Value is returned here
1613  *
1614  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1615  * following error codes:
1616  *
1617  * ePvErrBadHandle, the handle of the camera is invalid
1618  * ePvErrUnplugged, the camera has been unplugged
1619  * ePvErrNotFound, the requested attribute doesn't exist
1620  * ePvErrWrongType, the requested attribute is not of the correct type
1621  * ePvBadParameter, a valid pointer for pValue was not supplied
1622  * ePvErrInternalFault, an internal fault occurred
1623  * ePvErrBadSequence, API isn't initialized
1624  */
1625 tPvErr PVDECL PvAttrUint32Get(tPvHandle Camera,
1626  const char* Name,
1627  tPvUint32* pValue);
1628 
1629 
1630 /*
1631  * Function: PvAttrUint32Set()
1632  *
1633  * Purpose: Set the value of a uint32 attribute.
1634  *
1635  * Arguments:
1636  *
1637  * [ IN] tPvHandle Camera, Handle to the camera
1638  * [ IN] const char* Name, Attribute name
1639  * [ IN] tPvUint32 Value, Value to set
1640  *
1641  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1642  * following error codes:
1643  *
1644  * ePvErrBadHandle, the handle of the camera is invalid
1645  * ePvErrUnplugged, the camera has been unplugged
1646  * ePvErrNotFound, the requested attribute doesn't exist
1647  * ePvErrWrongType, the requested attribute is not of the correct type
1648  * ePvErrForbidden, the requested attribute forbid this operation
1649  * ePvErrOutOfRange, the supplied value is out of range
1650  * ePvErrInternalFault, an internal fault occurred
1651  * ePvErrBadSequence, API isn't initialized
1652  */
1653 tPvErr PVDECL PvAttrUint32Set(tPvHandle Camera,
1654  const char* Name,
1655  tPvUint32 Value);
1656 
1657 
1658 /*
1659  * Function: PvAttrFloat32Get()
1660  *
1661  * Purpose: Get the value of a float32 attribute.
1662  *
1663  * Arguments:
1664  *
1665  * [ IN] tPvHandle Camera, Handle to the camera
1666  * [ IN] const char* Name, Attribute name
1667  * [OUT] tPvFloat32* pValue, Value is returned here
1668  *
1669  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1670  * following error codes:
1671  *
1672  * ePvErrBadHandle, the handle of the camera is invalid
1673  * ePvErrUnplugged, the camera has been unplugged
1674  * ePvErrNotFound, the requested attribute doesn't exist
1675  * ePvErrWrongType, the requested attribute is not of the correct type
1676  * ePvBadParameter, a valid pointer for pValue was not supplied
1677  * ePvErrInternalFault, an internal fault occurred
1678  * ePvErrBadSequence, API isn't initialized
1679  */
1680 tPvErr PVDECL PvAttrFloat32Get(tPvHandle Camera,
1681  const char* Name,
1682  tPvFloat32* pValue);
1683 
1684 
1685 /*
1686  * Function: PvAttrFloat32Set()
1687  *
1688  * Purpose: Set the value of a float32 attribute.
1689  *
1690  * Arguments:
1691  *
1692  * [ IN] tPvHandle Camera, Handle to the camera
1693  * [ IN] const char* Name, Attribute name
1694  * [ IN] tPvFloat32 Value, Value to set
1695  *
1696  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1697  * following error codes:
1698  *
1699  * ePvErrBadHandle, the handle of the camera is invalid
1700  * ePvErrUnplugged, the camera has been unplugged
1701  * ePvErrNotFound, the requested attribute doesn't exist
1702  * ePvErrWrongType, the requested attribute is not of the correct type
1703  * ePvErrForbidden, the requested attribute forbid this operation
1704  * ePvErrOutOfRange, the supplied value is out of range
1705  * ePvErrInternalFault, an internal fault occurred
1706  * ePvErrBadSequence, API isn't initialized
1707  */
1708 tPvErr PVDECL PvAttrFloat32Set(tPvHandle Camera,
1709  const char* Name,
1710  tPvFloat32 Value);
1711 
1712 /*
1713  * Function: PvAttrInt64Get()
1714  *
1715  * Purpose: Get the value of a int64 attribute.
1716  *
1717  * Arguments:
1718  *
1719  * [ IN] tPvHandle Camera, Handle to the camera
1720  * [ IN] const char* Name, Attribute name
1721  * [OUT] tPvInt64* pValue, Value is returned here
1722  *
1723  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1724  * following error codes:
1725  *
1726  * ePvErrBadHandle, the handle of the camera is invalid
1727  * ePvErrUnplugged, the camera has been unplugged
1728  * ePvErrNotFound, the requested attribute doesn't exist
1729  * ePvErrWrongType, the requested attribute is not of the correct type
1730  * ePvBadParameter, a valid pointer for pValue was not supplied
1731  * ePvErrInternalFault, an internal fault occurred
1732  * ePvErrBadSequence, API isn't initialized
1733  */
1734 tPvErr PVDECL PvAttrInt64Get(tPvHandle Camera,
1735  const char* Name,
1736  tPvInt64* pValue);
1737 
1738 
1739 /*
1740  * Function: PvAttrInt64Set()
1741  *
1742  * Purpose: Set the value of a int64 attribute.
1743  *
1744  * Arguments:
1745  *
1746  * [ IN] tPvHandle Camera, Handle to the camera
1747  * [ IN] const char* Name, Attribute name
1748  * [ IN] tPvInt64 Value, Value to set
1749  *
1750  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1751  * following error codes:
1752  *
1753  * ePvErrBadHandle, the handle of the camera is invalid
1754  * ePvErrUnplugged, the camera has been unplugged
1755  * ePvErrNotFound, the requested attribute doesn't exist
1756  * ePvErrWrongType, the requested attribute is not of the correct type
1757  * ePvErrForbidden, the requested attribute forbid this operation
1758  * ePvErrOutOfRange, the supplied value is out of range
1759  * ePvErrInternalFault, an internal fault occurred
1760  * ePvErrBadSequence, API isn't initialized
1761  */
1762 tPvErr PVDECL PvAttrInt64Set(tPvHandle Camera,
1763  const char* Name,
1764  tPvInt64 Value);
1765 
1766 /*
1767  * Function: PvAttrBooleanGet()
1768  *
1769  * Purpose: Get the value of a boolean attribute.
1770  *
1771  * Arguments:
1772  *
1773  * [ IN] tPvHandle Camera, Handle to the camera
1774  * [ IN] const char* Name, Attribute name
1775  * [OUT] tPvBoolean* pValue, Value is returned here
1776  *
1777  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1778  * following error codes:
1779  *
1780  * ePvErrBadHandle, the handle of the camera is invalid
1781  * ePvErrUnplugged, the camera has been unplugged
1782  * ePvErrNotFound, the requested attribute doesn't exist
1783  * ePvErrWrongType, the requested attribute is not of the correct type
1784  * ePvBadParameter, a valid pointer for pValue was not supplied
1785  * ePvErrInternalFault, an internal fault occurred
1786  * ePvErrBadSequence, API isn't initialized
1787  */
1788 tPvErr PVDECL PvAttrBooleanGet(tPvHandle Camera,const char* Name,tPvBoolean* pValue);
1789 
1790 
1791 /*
1792  * Function: PvAttrBooleanSet()
1793  *
1794  * Purpose: Set the value of a boolean attribute.
1795  *
1796  * Arguments:
1797  *
1798  * [ IN] tPvHandle Camera, Handle to the camera
1799  * [ IN] const char* Name, Attribute name
1800  * [ IN] tPvBoolean Value, Value to set
1801  *
1802  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1803  * following error codes:
1804  *
1805  * ePvErrBadHandle, the handle of the camera is invalid
1806  * ePvErrUnplugged, the camera has been unplugged
1807  * ePvErrNotFound, the requested attribute doesn't exist
1808  * ePvErrWrongType, the requested attribute is not of the correct type
1809  * ePvErrForbidden, the requested attribute forbid this operation
1810  * ePvErrOutOfRange, the supplied value is out of range
1811  * ePvErrInternalFault, an internal fault occurred
1812  * ePvErrBadSequence, API isn't initialized
1813  */
1814 tPvErr PVDECL PvAttrBooleanSet(tPvHandle Camera,const char* Name,tPvBoolean Value);
1815 
1816 //----- Camera event callback -------------------------------------------------
1817 
1818 /*
1819  * Function: PvCameraEventCallbackRegister()
1820  *
1821  * Purpose: Register a callback for camera events. The callback will receive
1822  * all events for the camera.
1823  *
1824  * Arguments:
1825  *
1826  * [ IN] tPvHandle Camera Handle to the camera
1827  * [ IN] tPvCameraEventCallback Callback, Callback function to run when an event occurs
1828  * [ IN] void* Context For your use: Context is passed to your
1829  * callback function
1830  *
1831  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1832  * following error codes:
1833  *
1834  * ePvErrResources, resources requested from the OS were not
1835  * available
1836  * ePvErrBadSequence, API isn't initialized
1837  *
1838  * The events generated by a camera are controlled by the attribute system.
1839  *
1840  * Here's the rules:
1841  * - Multiple callback functions may be registered for the same camera
1842  * - The same callback function may be shared by different cameras
1843  *
1844  * The callback functions are called from a thread within PvApi. The callbacks
1845  * are sequenced; i.e. they will not be called simultaneously.
1846  *
1847  * Use PvCameraEventCallbackUnRegister() to stop receiving callbacks.
1848  */
1849 tPvErr PVDECL PvCameraEventCallbackRegister(tPvHandle Camera,
1850  tPvCameraEventCallback Callback,
1851  void* Context);
1852 
1853 /*
1854  * Function: PvCameraEventCallbackUnRegister()
1855  *
1856  * Purpose: Unregister a callback for camera events.
1857  *
1858  * Arguments:
1859  *
1860  * [ IN] tPvHandle Camera Handle to the camera
1861  * [ IN] tPvCameraEventCallback Callback, Callback function previously registered
1862  *
1863  * Return: ePvErrSuccess if no error, otherwise likely to be any of the
1864  * following error codes:
1865  *
1866  * ePvErrNotFound, registered callback was not found
1867  * ePvErrResources, resources requested from the OS were not
1868  * available
1869  * ePvErrBadSequence, API isn't initialized
1870  */
1871 tPvErr PVDECL PvCameraEventCallbackUnRegister(tPvHandle Camera,tPvCameraEventCallback Callback);
1872 
1873 //----- Utility ---------------------------------------------------------------
1874 
1875 /*
1876  * Function: PvUtilityColorInterpolate()
1877  *
1878  * Purpose: Perform color interpolation. Input format is bayer8 or bayer16
1879  * (raw bayer image). Output format is RGB or separate color
1880  * planes.
1881  *
1882  * Arguments:
1883  *
1884  * [ IN] const tPvFrame* pFrame, Raw bayer image
1885  * [OUT] void* BufferRed, Red plane for output image
1886  * [OUT] void* BufferGreen, Green plane for output image
1887  * [OUT] void* BufferBlue, Blue plane for output image
1888  * [ IN] unsigned long PixelPadding, Padding after each pixel in raw-pixel units
1889  * [ IN] unsigned long LinePadding, Padding after each line in raw-pixel units
1890  *
1891  * Return: none
1892  *
1893  * Caller must allocate the output buffers:
1894  *
1895  * num_pixels = (((1 + pixel_padding) * width) + line_padding) * height
1896  *
1897  * buffer_size = raw_pixel_size * num_pixels
1898  *
1899  * Perhaps the most common way to use this function will be to generate a
1900  * Win32::StretchDiBits compatible BGR buffer:
1901  *
1902  * #define ULONG_PADDING(x) (((x+3) & ~3) - x)
1903  *
1904  * unsigned long line_padding = ULONG_PADDING(width*3);
1905  * unsigned long buffer_size = ((width*3) + line_padding) * height;
1906  *
1907  * unsigned char* buffer = new unsigned char[buffer_size];
1908  *
1909  * PvUtilityColorInterpolate(&frame, &buffer[2], &buffer[1],
1910  * &buffer[0], 2, line_padding);
1911  *
1912  */
1913 void PVDECL PvUtilityColorInterpolate(const tPvFrame* pFrame,
1914  void* BufferRed,
1915  void* BufferGreen,
1916  void* BufferBlue,
1917  unsigned long PixelPadding,
1918  unsigned long LinePadding);
1919 
1920 
1921 #ifdef __cplusplus
1922 }
1923 #endif
1924 
1925 #endif // PVAPI_H_INCLUDE
1926 
tPvErr Status
Definition: PvApi.h:383
tPvErr PVDECL PvAttrInt64Set(tPvHandle Camera, const char *Name, tPvInt64 Value)
tPvErr PVDECL PvCameraIpSettingsChange(unsigned long UniqueId, const tPvIpSettings *pSettings)
tPvErr PVDECL PvAttrRangeEnum(tPvHandle Camera, const char *Name, char *pBuffer, unsigned long BufferSize, unsigned long *pSize)
tPvErr PVDECL PvCameraEventCallbackUnRegister(tPvHandle Camera, tPvCameraEventCallback Callback)
tPvErr PVDECL PvCaptureQueueFrame(tPvHandle Camera, tPvFrame *pFrame, tPvFrameCallback Callback)
tPvErr PVDECL PvCameraOpen(unsigned long UniqueId, tPvAccessFlags AccessFlag, tPvHandle *pCamera)
unsigned long PermittedAccess
Definition: PvApi.h:198
unsigned long PersistentIpSubnet
Definition: PvApi.h:238
unsigned long TimestampLo
Definition: PvApi.h:397
tPvErr PVDECL PvAttrRangeUint32(tPvHandle Camera, const char *Name, tPvUint32 *pMin, tPvUint32 *pMax)
tPvErr PVDECL PvCaptureStart(tPvHandle Camera)
unsigned long TimestampLo
Definition: PvApi.h:284
tPvErr PVDECL PvAttrExists(tPvHandle Camera, const char *Name)
void PVDECL PvUtilityColorInterpolate(const tPvFrame *pFrame, void *BufferRed, void *BufferGreen, void *BufferBlue, unsigned long PixelPadding, unsigned long LinePadding)
const void * ExtraData
Definition: PvApi.h:287
unsigned long InterfaceId
Definition: PvApi.h:184
unsigned long UniqueId
Definition: PvApi.h:194
unsigned long PVDECL PvCameraList(tPvCameraInfo *pList, unsigned long ListLength, unsigned long *pConnectedNum)
tPvErr PVDECL PvAttrFloat32Get(tPvHandle Camera, const char *Name, tPvFloat32 *pValue)
tPvErr PVDECL PvCaptureAdjustPacketSize(tPvHandle Camera, unsigned long MaximumPacketSize)
tPvErr PVDECL PvCaptureWaitForFrameDone(tPvHandle Camera, const tPvFrame *pFrame, unsigned long Timeout)
tPvBayerPattern BayerPattern
Definition: PvApi.h:394
tPvErr PVDECL PvAttrStringGet(tPvHandle Camera, const char *Name, char *pBuffer, unsigned long BufferSize, unsigned long *pSize)
tPvErr PVDECL PvAttrInfo(tPvHandle Camera, const char *Name, tPvAttributeInfo *pInfo)
tPvErr PVDECL PvCameraInfoEx(unsigned long UniqueId, tPvCameraInfoEx *pInfo, unsigned long StructSize)
unsigned long Height
Definition: PvApi.h:389
tPvImageFormat Format
Definition: PvApi.h:392
tPvErr PVDECL PvAttrFloat32Set(tPvHandle Camera, const char *Name, tPvFloat32 Value)
unsigned long ImageSize
Definition: PvApi.h:385
tPvInterface InterfaceType
Definition: PvApi.h:185
tPvErr PVDECL PvCaptureQueueClear(tPvHandle Camera)
unsigned long PartVersion
Definition: PvApi.h:197
tPvBayerPattern
Definition: PvApi.h:337
tPvImageFormat
Definition: PvApi.h:312
void(PVDECL * tPvFrameCallback)(tPvFrame *Frame)
Definition: PvApi.h:412
tPvLinkEvent
Definition: PvApi.h:251
unsigned long AncillaryBufferSize
Definition: PvApi.h:374
tPvErr
Definition: PvApi.h:113
const char * Category
Definition: PvApi.h:482
unsigned long InterfaceId
Definition: PvApi.h:199
tPvIpConfig
Definition: PvApi.h:209
tPvErr PVDECL PvAttrList(tPvHandle Camera, tPvAttrListPtr *pListPtr, unsigned long *pLength)
unsigned long BitDepth
Definition: PvApi.h:393
void PVDECL PvVersion(unsigned long *pMajor, unsigned long *pMinor)
tPvIpConfig ConfigMode
Definition: PvApi.h:225
unsigned long PermittedAccess
Definition: PvApi.h:183
tPvErr PVDECL PvAttrUint32Get(tPvHandle Camera, const char *Name, tPvUint32 *pValue)
const char *const * tPvAttrListPtr
Definition: PvApi.h:439
tPvErr PVDECL PvCameraInfoByAddrEx(unsigned long IpAddr, tPvCameraInfoEx *pInfo, tPvIpSettings *pIpSettings, unsigned long StructSize)
tPvErr PVDECL PvLinkCallbackUnRegister(tPvLinkCallback Callback, tPvLinkEvent Event)
tPvErr PVDECL PvCommandRun(tPvHandle Camera, const char *Name)
unsigned long StructVer
Definition: PvApi.h:175
const char * Impact
Definition: PvApi.h:483
unsigned long Flags
Definition: PvApi.h:481
tPvErr PVDECL PvAttrStringSet(tPvHandle Camera, const char *Name, const char *Value)
unsigned long PVDECL PvCameraListUnreachable(tPvCameraInfo *pList, unsigned long ListLength, unsigned long *pConnectedNum)
unsigned long PVDECL PvCameraCount(void)
tPvErr PVDECL PvCameraEventCallbackRegister(tPvHandle Camera, tPvCameraEventCallback Callback, void *Context)
unsigned long TimestampHi
Definition: PvApi.h:285
unsigned long CurrentIpGateway
Definition: PvApi.h:233
unsigned long RegionX
Definition: PvApi.h:390
tPvErr PVDECL PvAttrInt64Get(tPvHandle Camera, const char *Name, tPvInt64 *pValue)
void * AncillaryBuffer
Definition: PvApi.h:360
tPvErr PVDECL PvAttrRangeInt64(tPvHandle Camera, const char *Name, tPvInt64 *pMin, tPvInt64 *pMax)
tPvAttributeFlags
Definition: PvApi.h:464
tPvErr PVDECL PvAttrEnumSet(tPvHandle Camera, const char *Name, const char *Value)
unsigned long PersistentIpAddr
Definition: PvApi.h:237
unsigned long RegionY
Definition: PvApi.h:391
tPvErr PVDECL PvCameraOpenByAddr(unsigned long IpAddr, tPvAccessFlags AccessFlag, tPvHandle *pCamera)
void * tPvHandle
Definition: PvApi.h:107
tPvErr PVDECL PvCaptureEnd(tPvHandle Camera)
unsigned long PartNumber
Definition: PvApi.h:196
void * ImageBuffer
Definition: PvApi.h:357
tPvErr PVDECL PvAttrIsValid(tPvHandle Camera, const char *Name)
unsigned long PVDECL PvCameraListEx(tPvCameraInfoEx *pList, unsigned long ListLength, unsigned long *pConnectedNum, unsigned long StructSize)
void(PVDECL * tPvCameraEventCallback)(void *Context, tPvHandle Camera, const tPvCameraEvent *EventList, unsigned long EventListLength)
Definition: PvApi.h:302
tPvErr PVDECL PvInitialize(void)
tPvErr PVDECL PvCaptureQuery(tPvHandle Camera, unsigned long *pIsStarted)
tPvAccessFlags
Definition: PvApi.h:149
tPvErr PVDECL PvAttrBooleanSet(tPvHandle Camera, const char *Name, tPvBoolean Value)
tPvErr PVDECL PvLinkCallbackRegister(tPvLinkCallback Callback, tPvLinkEvent Event, void *Context)
tPvErr PVDECL PvAttrUint32Set(tPvHandle Camera, const char *Name, tPvUint32 Value)
unsigned long CurrentIpAddress
Definition: PvApi.h:231
unsigned long EventId
Definition: PvApi.h:283
unsigned long AncillarySize
Definition: PvApi.h:386
unsigned long TimestampHi
Definition: PvApi.h:398
tPvInterface InterfaceType
Definition: PvApi.h:200
tPvErr PVDECL PvAttrIsAvailable(tPvHandle Camera, const char *Name)
unsigned long ImageBufferSize
Definition: PvApi.h:358
tPvInterface
Definition: PvApi.h:161
tPvErr PVDECL PvAttrBooleanGet(tPvHandle Camera, const char *Name, tPvBoolean *pValue)
unsigned long PersistentIpGateway
Definition: PvApi.h:239
tPvDatatype
Definition: PvApi.h:445
void PVDECL PvUnInitialize(void)
void(PVDECL * tPvLinkCallback)(void *Context, tPvInterface Interface, tPvLinkEvent Event, unsigned long UniqueId)
Definition: PvApi.h:271
tPvErr PVDECL PvAttrRangeFloat32(tPvHandle Camera, const char *Name, tPvFloat32 *pMin, tPvFloat32 *pMax)
tPvErr PVDECL PvCameraInfo(unsigned long UniqueId, tPvCameraInfo *pInfo)
unsigned long UniqueId
Definition: PvApi.h:177
tPvDatatype Datatype
Definition: PvApi.h:480
tPvErr PVDECL PvCameraClose(tPvHandle Camera)
tPvErr PVDECL PvCameraIpSettingsGet(unsigned long UniqueId, tPvIpSettings *pSettings)
tPvErr PVDECL PvAttrEnumGet(tPvHandle Camera, const char *Name, char *pBuffer, unsigned long BufferSize, unsigned long *pSize)
unsigned long PVDECL PvCameraListUnreachableEx(tPvCameraInfoEx *pList, unsigned long ListLength, unsigned long *pConnectedNum, unsigned long StructSize)
tPvErr PVDECL PvCameraInfoByAddr(unsigned long IpAddr, tPvCameraInfo *pInfo, tPvIpSettings *pIpSettings)
unsigned long ConfigModeSupport
Definition: PvApi.h:227
unsigned long Width
Definition: PvApi.h:388
unsigned long FrameCount
Definition: PvApi.h:396
unsigned long CurrentIpSubnet
Definition: PvApi.h:232
tPvErr PVDECL PvInitializeNoDiscovery(void)


prosilica_gige_sdk
Author(s): Allied Vision Technologies.
autogenerated on Mon Jun 10 2019 14:14:24