/*
|==============================================================================
| Copyright (C) 2006-2011 Allied Vision Technologies. All Rights Reserved.
|
| Redistribution of this header file, in original or modified form, without
| prior written consent of Allied Vision Technologies is prohibited.
|
|=============================================================================
|
| File: PvApi.h
|
| Project/lib: PvAPI
|
| Targets: Win32, Linux, QNX, OSX
|
| Description: Main header file for PvAPI, the programming interface for
| Prosilica Series and Manta cameras.
|
|
|------------------------------------------------------------------------------
|
| Example basic functions:
|
| PvInitialize() - load and initialize the PvApi module
| PvUnInitialize() - shut down the module
|
| PvCameraList() - list the cameras available
|
| PvCameraOpen() - open & close your cameras
| PvCameraClose()
|
| PvCaptureStart() - start & end image capture
| PvCaptureEnd()
|
| PvCaptureQueueFrame() - queue a frame buffer for image capture
|
| PvCaptureQueueClear() - clear all frames off the queue (i.e. abort)
|
| PvAttrList() - list all attributes for this camera
| PvAttrInfo() - get information on an attribute
|
| Example basic attributes:
|
| Width - Uint32 - RW : image width in pixels
| Height - Uint32 - RW : image height in pixels
| PixelFormat - Enum - RW : image data format. Eg. mono8, mono16
| TotalBytesPerFrame - Uint32 - R : number of bytes per image
| ExposureValue - Uint32 - RW : camera exposure time
|
| See AVT "GigE Camera and Driver Attributes" document for full attribute description
|
|==============================================================================
|
| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
| DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|==============================================================================
| dd/mon/yy Notes
|------------------------------------------------------------------------------
| 27/Jun/05 Original.
| 04/Jun/07 Licence changes
| 27/Jun/07 Added function PvCaptureAdjustPacketSize
| 09/Jul/07 Added error code ePvErrFirewall
| 17/Aug/07 Added new pixel formats
| 26/Feb/09 Release 1.22
| 05/Apr/10 Added support for int64 and boolean attributes
| 03/May/11 Added FrameCount, AncillaryBuffer notes
|==============================================================================
*/
#ifndef PVAPI_H_INCLUDE
#define PVAPI_H_INCLUDE
#ifdef __cplusplus
extern "C" {
#endif
//===== INCLUDE FILES =========================================================
//===== #DEFINES ==============================================================
#ifndef PVDECL
#ifdef _MSC_VER
#define PVDECL __stdcall
#else
#if defined(_LINUX) || defined(_QNX) || defined(_OSX)
#define PVDECL
#else
#error Define PVDECL to be your compiler keyword for "standard call"
#endif
#endif
#endif
#define PVINFINITE 0xFFFFFFFF // Never timeout
//===== TYPE DEFINITIONS ======================================================
typedef void* tPvHandle; // Camera handle
//
// Error codes, returned by most functions:
//
typedef enum
{
ePvErrSuccess = 0, // No error
ePvErrCameraFault = 1, // Unexpected camera fault
ePvErrInternalFault = 2, // Unexpected fault in PvApi or driver
ePvErrBadHandle = 3, // Camera handle is invalid
ePvErrBadParameter = 4, // Bad parameter to API call
ePvErrBadSequence = 5, // Sequence of API calls is incorrect
ePvErrNotFound = 6, // Camera or attribute not found
ePvErrAccessDenied = 7, // Camera cannot be opened in the specified mode
ePvErrUnplugged = 8, // Camera was unplugged
ePvErrInvalidSetup = 9, // Setup is invalid (an attribute is invalid)
ePvErrResources = 10, // System/network resources or memory not available
ePvErrBandwidth = 11, // 1394 bandwidth not available
ePvErrQueueFull = 12, // Too many frames on queue
ePvErrBufferTooSmall= 13, // Frame buffer is too small
ePvErrCancelled = 14, // Frame cancelled by user
ePvErrDataLost = 15, // The data for the frame was lost
ePvErrDataMissing = 16, // Some data in the frame is missing
ePvErrTimeout = 17, // Timeout during wait
ePvErrOutOfRange = 18, // Attribute value is out of the expected range
ePvErrWrongType = 19, // Attribute is not this type (wrong access function)
ePvErrForbidden = 20, // Attribute write forbidden at this time
ePvErrUnavailable = 21, // Attribute is not available at this time
ePvErrFirewall = 22, // A firewall is blocking the traffic (Windows only)
__ePvErr_force_32 = 0xFFFFFFFF
} tPvErr;
//----- Camera Enumeration & Information --------------------------------------
//
// Camera access mode. Used as flags in tPvCameraInfo data, and as the access
// mode in PvOpenCamera().
//
typedef enum
{
ePvAccessMonitor = 2, // Monitor access: no control, read & listen only
ePvAccessMaster = 4, // Master access: full control
__ePvAccess_force_32 = 0xFFFFFFFF
} tPvAccessFlags;
//
// Camera interface type (i.e. firewire, ethernet):
//
typedef enum
{
ePvInterfaceFirewire = 1,
ePvInterfaceEthernet = 2,
__ePvInterface_force_32 = 0xFFFFFFFF
} tPvInterface;
//
// Camera information type (extended)
//
typedef struct
{
unsigned long StructVer; // Version of this structure
//---- Version 1 ----
unsigned long UniqueId; // Unique value for each camera
char CameraName[32]; // People-friendly camera name (usually part name)
char ModelName[32]; // Name of camera part
char PartNumber[32]; // Manufacturer's part number
char SerialNumber[32]; // Camera's serial number
char FirmwareVersion[32]; // Camera's firmware version
unsigned long PermittedAccess; // A combination of tPvAccessFlags
unsigned long InterfaceId; // Unique value for each interface or bus
tPvInterface InterfaceType; // Interface type; see tPvInterface
} tPvCameraInfoEx;
//
// Camera information type (deprecated)
//
typedef struct
{
unsigned long UniqueId; // Unique value for each camera
char SerialString[32]; // Camera's serial number
unsigned long PartNumber; // Camera part number
unsigned long PartVersion; // Camera part version
unsigned long PermittedAccess; // A combination of tPvAccessFlags
unsigned long InterfaceId; // Unique value for each interface or bus
tPvInterface InterfaceType; // Interface type; see tPvInterface
char DisplayName[16]; /