AVT SDK needed for MicroPix compilation
authornico <nico@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Fri, 6 Jan 2012 04:59:04 +0000 (04:59 +0000)
committernico <nico@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Fri, 6 Jan 2012 04:59:04 +0000 (04:59 +0000)
git-svn-id: https://valelab.ucsf.edu/svn/3rdpartypublic@96 2c67d6c2-4361-4cd7-bd83-1149b1926c9b

14 files changed:
AVTGigESDK/README.txt [new file with mode: 0644]
AVTGigESDK/bin-pc/x64/CLIpConfig [new file with mode: 0755]
AVTGigESDK/bin-pc/x64/libPvAPI.dylib [new file with mode: 0755]
AVTGigESDK/bin-pc/x64/libPvJNI.dylib [new file with mode: 0755]
AVTGigESDK/bin-pc/x86/CLIpConfig [new file with mode: 0755]
AVTGigESDK/bin-pc/x86/SampleViewer.app/Contents/MacOS/SampleViewer [new file with mode: 0755]
AVTGigESDK/bin-pc/x86/libPvAPI.dylib [new file with mode: 0755]
AVTGigESDK/bin-pc/x86/libPvJNI.dylib [new file with mode: 0755]
AVTGigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf [new file with mode: 0644]
AVTGigESDK/documents/AVT_PvAPI_Manual.pdf [new file with mode: 0644]
AVTGigESDK/documents/PvAPI_Release_Notes.pdf [new file with mode: 0644]
AVTGigESDK/inc-pc/ImageLib.h [new file with mode: 0644]
AVTGigESDK/inc-pc/PvApi.h [new file with mode: 0644]
AVTGigESDK/inc-pc/PvRegIo.h [new file with mode: 0644]

diff --git a/AVTGigESDK/README.txt b/AVTGigESDK/README.txt
new file mode 100644 (file)
index 0000000..b99fea2
--- /dev/null
@@ -0,0 +1,71 @@
+### AVT PvAPI GigE SDK 1.26 for Mac OS X\r
+### README\r
+###\r
+### 09/29/11\r
+###\r
+\r
+*************************************************************************\r
+* Notes\r
+*************************************************************************\r
+\r
+* Up to and including Mac OS X Snow Leopard, the OS does not support multicasting. \r
+\r
+* The MTU of the GigE adapter MUST be changed to Jumbo frames (9000). See System Preferences -> Network -> Ethernet -> Advanced ->Ethernet -> MTU, or use command line "ifconfig". If a lower MTU is used, camera connection will drop when camera stream or control network traffic floods to NIC.\r
+\r
+* A route for 255.255.255.255 may need to be added to point to the adapter on which the camera will be plugged (or to the switch on which the camera will be). This can be done with the following command:\r
+\r
+  > sudo route -n add 255.255.255.255 169.254.42.97\r
+\r
+where 169.254.42.97 is the IP (self-assigned or assigned by you) of the adapter\r
+\r
+\r
+*************************************************************************\r
+* Compilation\r
+*************************************************************************\r
+\r
+* This distribution support x86,x64 for OS X 10.5 to 10.7. Modify the "ARCH" file located in the Examples directory before building the samples to select the proper architecture: x86 or x64.\r
+\r
+* The shared library in ./bin-pc is usable with software compiled with either GCC 4.2\r
+\r
+* Static libraries are provides for GCC 4.2, they can be found in ./lib-pc\r
+\r
+* Each of the sample code can be build as follow:\r
+\r
+  > make sample ; make install\r
+\r
+The executables will be copied into the ./bin-pc folder.\r
+\r
+\r
+*************************************************************************\r
+* SampleViewer Compilation\r
+*************************************************************************\r
+\r
+* A compiled version of the SampleViewer is provided for convenience. It is statically linked with wxWidgets (installing/compiling wxMac isn't required) and with PvAPI. \r
+\r
+* SampleViewer requires the wxMAC module >= 2.6, compiled as unicode. Modify the makefile to use the version you have installed on your system.\r
+\r
+* Since wxMac is built on top of Carbon, there is NO 64-bit SampleViewer.\r
+\r
+\r
+*************************************************************************\r
+* Java\r
+*************************************************************************\r
+\r
+* The Java folder (in examples) contains a JNI interface to PvAPI and a set of samples. In the bin-pc folder, you will find a build version of the interface (libPvJNI.so). Here's the steps to import the samples in Eclipse:\r
+\r
+    1. Start Eclipse & set workspace to "AVT GigE SDK/examples/Java"\r
+    2. In the "Package Explorer", right click then select "Import". From there expand "General" and select "Existing Projects into Workspace"\r
+       then "Next".\r
+    3. In "Select Root directory" browse to "AVT GigE SDK/examples/Java/PvJPI" then click on "Finish". The project will appears in the "Explorer".\r
+    4. Do the same thing for any of sample code you want, e.g. "JListCameras"\r
+    5. Select the "JListCameras" project in the "Explorer", right click and select "Run as" -> "Java Application".\r
+    6. In the "Select Java Application" window, scroll down to "JListCameras - Prosilica" and select it. Press "Ok". The sample code will launch,\r
+       but fail with a java.lang.unsatisfiedLinkError exception. Terminate the app.\r
+    7. In the "Eclipse" menu "Run", select "Run Configuration ...". Select "JListCameras" and click on the "Arguments" tab and add the following\r
+       string to "VM arguments":\r
+       \r
+       -Djava.library.path="/Full/Path/To/AVT GigE SDK/bin-pc/x64"\r
+       \r
+       Replace Full/Path/To by the actual path to the SDK on your system. If you are on a 32bits system, replace x64 by x86.\r
+    8. In the same window, change the "Working Directory" to "Other" and enter the exact same path as above (no need to have it quoted).\r
+    9. Click on "Apply", then "Run".\r
diff --git a/AVTGigESDK/bin-pc/x64/CLIpConfig b/AVTGigESDK/bin-pc/x64/CLIpConfig
new file mode 100755 (executable)
index 0000000..6075d07
Binary files /dev/null and b/AVTGigESDK/bin-pc/x64/CLIpConfig differ
diff --git a/AVTGigESDK/bin-pc/x64/libPvAPI.dylib b/AVTGigESDK/bin-pc/x64/libPvAPI.dylib
new file mode 100755 (executable)
index 0000000..ca81034
Binary files /dev/null and b/AVTGigESDK/bin-pc/x64/libPvAPI.dylib differ
diff --git a/AVTGigESDK/bin-pc/x64/libPvJNI.dylib b/AVTGigESDK/bin-pc/x64/libPvJNI.dylib
new file mode 100755 (executable)
index 0000000..fdee64c
Binary files /dev/null and b/AVTGigESDK/bin-pc/x64/libPvJNI.dylib differ
diff --git a/AVTGigESDK/bin-pc/x86/CLIpConfig b/AVTGigESDK/bin-pc/x86/CLIpConfig
new file mode 100755 (executable)
index 0000000..63daf2f
Binary files /dev/null and b/AVTGigESDK/bin-pc/x86/CLIpConfig differ
diff --git a/AVTGigESDK/bin-pc/x86/SampleViewer.app/Contents/MacOS/SampleViewer b/AVTGigESDK/bin-pc/x86/SampleViewer.app/Contents/MacOS/SampleViewer
new file mode 100755 (executable)
index 0000000..47f8e1c
Binary files /dev/null and b/AVTGigESDK/bin-pc/x86/SampleViewer.app/Contents/MacOS/SampleViewer differ
diff --git a/AVTGigESDK/bin-pc/x86/libPvAPI.dylib b/AVTGigESDK/bin-pc/x86/libPvAPI.dylib
new file mode 100755 (executable)
index 0000000..edc1921
Binary files /dev/null and b/AVTGigESDK/bin-pc/x86/libPvAPI.dylib differ
diff --git a/AVTGigESDK/bin-pc/x86/libPvJNI.dylib b/AVTGigESDK/bin-pc/x86/libPvJNI.dylib
new file mode 100755 (executable)
index 0000000..59b4fcb
Binary files /dev/null and b/AVTGigESDK/bin-pc/x86/libPvJNI.dylib differ
diff --git a/AVTGigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf b/AVTGigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf
new file mode 100644 (file)
index 0000000..2a53037
Binary files /dev/null and b/AVTGigESDK/documents/AVT_Camera_and_Driver_Attributes.pdf differ
diff --git a/AVTGigESDK/documents/AVT_PvAPI_Manual.pdf b/AVTGigESDK/documents/AVT_PvAPI_Manual.pdf
new file mode 100644 (file)
index 0000000..3d87924
Binary files /dev/null and b/AVTGigESDK/documents/AVT_PvAPI_Manual.pdf differ
diff --git a/AVTGigESDK/documents/PvAPI_Release_Notes.pdf b/AVTGigESDK/documents/PvAPI_Release_Notes.pdf
new file mode 100644 (file)
index 0000000..6fd71a6
Binary files /dev/null and b/AVTGigESDK/documents/PvAPI_Release_Notes.pdf differ
diff --git a/AVTGigESDK/inc-pc/ImageLib.h b/AVTGigESDK/inc-pc/ImageLib.h
new file mode 100644 (file)
index 0000000..731b180
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+|==============================================================================\r
+| Copyright (C) 2004-2011 Prosilica.  All Rights Reserved.\r
+|\r
+| Redistribution of this header file, in original or modified form, without\r
+| prior written consent of Prosilica is prohibited.\r
+|\r
+|==============================================================================\r
+|\r
+| File:                        ImageLib.h\r
+|\r
+| Project/lib: PvAPI\r
+|\r
+| Target:              Win32, Linux, QNX\r
+|\r
+| Description: Provide a function to save a Frame in a TIFF image file.\r
+|\r
+| Notes:               \r
+|\r
+|\r
+|      LIBTIFF Use and Copyright\r
+|      ~~~~~~~~~~~~~~~~~~~~~~~~~\r
+|\r
+|      Copyright (c) 1988-1997 Sam Leffler\r
+|      Copyright (c) 1991-1997 Silicon Graphics, Inc.\r
+|\r
+|      Permission to use, copy, modify, distribute, and sell this software and \r
+|      its documentation for any purpose is hereby granted without fee, provided\r
+|      that (i) the above copyright notices and this permission notice appear in\r
+|      all copies of the software and related documentation, and (ii) the names of\r
+|      Sam Leffler and Silicon Graphics may not be used in any advertising or\r
+|      publicity relating to the software without the specific, prior written\r
+|      permission of Sam Leffler and Silicon Graphics.\r
+|\r
+|      THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, \r
+|      EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY \r
+|      WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  \r
+|\r
+|      IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR\r
+|      ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,\r
+|      OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\r
+|      WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF \r
+|      LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE \r
+|      OF THIS SOFTWARE.\r
+|\r
+|==============================================================================\r
+| dd/mon/yy  Author            Notes\r
+|------------------------------------------------------------------------------\r
+| 01/01/04      JLV            Original.\r
+| 24/03/11   AKA               Updated to LibTIFF 3.9.4. Now builds with VC++ 2008, 2010.\r
+|==============================================================================\r
+*/\r
+\r
+#ifndef IMAGELIB_H_INCLUDE\r
+#define IMAGELIB_H_INCLUDE\r
+\r
+//===== INCLUDE FILES =========================================================\r
+\r
+#include <PvApi.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+//===== FUNCTION PROTOTYPES ===================================================\r
+\r
+bool ImageWriteTiff(const char* filename, const tPvFrame* pFrame);\r
+\r
+}\r
+\r
+\r
+#endif // IMAGELIB_H_INCLUDE\r
+\r
diff --git a/AVTGigESDK/inc-pc/PvApi.h b/AVTGigESDK/inc-pc/PvApi.h
new file mode 100644 (file)
index 0000000..2691ebc
--- /dev/null
@@ -0,0 +1,1926 @@
+/*
+|==============================================================================
+| 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];  // People-friendly camera name
+    unsigned long       _reserved[4];     // Always zero
+
+} tPvCameraInfo;
+
+//
+// IP configuration mode for ethernet cameras.
+//
+typedef enum
+{
+    ePvIpConfigPersistent   = 1,            // Use persistent IP settings
+    ePvIpConfigDhcp         = 2,            // Use DHCP, fallback to AutoIP
+    ePvIpConfigAutoIp       = 4,            // Use AutoIP only
+    __ePvIpConfig_force_32  = 0xFFFFFFFF
+
+} tPvIpConfig;
+
+
+//
+// Structure used for PvCameraIpSettingsGet() and PvCameraIpSettingsChange().
+//
+typedef struct
+{
+    // IP configuration mode: persistent, DHCP & AutoIp, or AutoIp only.
+    tPvIpConfig         ConfigMode;
+    // IP configuration mode supported by the camera
+    unsigned long       ConfigModeSupport;
+
+    // Current IP configuration.  Ignored for PvCameraIpSettingsChange().  All
+    // values are in network byte order (i.e. big endian).
+    unsigned long       CurrentIpAddress;
+    unsigned long       CurrentIpSubnet;
+    unsigned long       CurrentIpGateway;
+
+    // Persistent IP configuration.  See "ConfigMode" to enable persistent IP
+    // settings.  All values are in network byte order.
+    unsigned long       PersistentIpAddr;
+    unsigned long       PersistentIpSubnet;
+    unsigned long       PersistentIpGateway;
+
+    unsigned long       _reserved1[8];
+
+} tPvIpSettings;
+
+
+//----- Interface-Link Callback -----------------------------------------------
+
+//
+// Link (aka interface) event type
+//
+typedef enum
+{
+    ePvLinkAdd          = 1, // camera first detected after PvInitialize 
+    ePvLinkRemove       = 2, // camera removed
+    _ePvLink_reserved1  = 3, 
+    __ePvLink_force_32  = 0xFFFFFFFF
+
+} tPvLinkEvent;
+
+
+//
+// Link (aka interface) event Callback type
+//
+// Arguments:
+//
+//  [i] void* Context,          Context, as provided to PvLinkCallbackRegister
+//  [i] tPvInterface Interface, Interface on which the event occurred
+//  [i] tPvLinkEvent Event,     Event which occurred
+//  [i] unsigned long UniqueId, Unique ID of the camera related to the event
+//
+typedef void (PVDECL *tPvLinkCallback)(void* Context,
+                                       tPvInterface Interface,
+                                       tPvLinkEvent Event,
+                                       unsigned long UniqueId);
+
+//----- Camera-Event Callback -----------------------------------------------
+
+//
+// Camera event type
+//
+typedef struct
+{
+    unsigned long EventId;      // Event ID
+    unsigned long TimestampLo;  // Time stamp, lower 32-bits
+    unsigned long TimestampHi;  // Time stamp, upper 32-bits
+    unsigned long Data[4];      // Event data
+    const void*   ExtraData;    // Event extra-data (NULL if none)
+
+} tPvCameraEvent;
+
+//
+// Camera-event Callback type
+//
+// Arguments:
+//
+//  [i] void* Context,                     Context, as provided to PvEventCallbackRegister
+//  [i] tPvHandle Camera,                  Handle of camera which sent the event
+//  [i] const tPvCameraEvent* EventList,   First event in list.  This list exists only for
+//                                         the duration of the callback.  If you need it, copy it!
+//  [i] unsigned long EventListLength      Number of events in EventList
+//
+typedef void (PVDECL *tPvCameraEventCallback)(void* Context,
+                                              tPvHandle Camera,
+                                              const tPvCameraEvent* EventList,
+                                              unsigned long EventListLength);
+
+//----- Image Capture ---------------------------------------------------------
+
+//
+// Frame image format type
+//
+typedef enum
+{
+    ePvFmtMono8         = 0,            // Monochrome, 8 bits
+    ePvFmtMono16        = 1,            // Monochrome, 16 bits, data is LSB aligned
+    ePvFmtBayer8        = 2,            // Bayer-color, 8 bits
+    ePvFmtBayer16       = 3,            // Bayer-color, 16 bits, data is LSB aligned
+    ePvFmtRgb24         = 4,            // RGB, 8 bits x 3
+    ePvFmtRgb48         = 5,            // RGB, 16 bits x 3, data is LSB aligned
+    ePvFmtYuv411        = 6,            // YUV 411
+    ePvFmtYuv422        = 7,            // YUV 422
+    ePvFmtYuv444        = 8,            // YUV 444
+    ePvFmtBgr24         = 9,            // BGR, 8 bits x 3
+    ePvFmtRgba32        = 10,           // RGBA, 8 bits x 4
+    ePvFmtBgra32        = 11,           // BGRA, 8 bits x 4
+    ePvFmtMono12Packed  = 12,           // Monochrome, 12 bits, 
+    ePvFmtBayer12Packed = 13,           // Bayer-color, 12 bits, packed
+    __ePvFmt_force_32   = 0xFFFFFFFF
+
+} tPvImageFormat;
+
+
+//
+// Bayer pattern.  Applicable when a Bayer-color camera is sending raw bayer
+// data.
+//
+typedef enum
+{
+    ePvBayerRGGB        = 0,            // First line RGRG, second line GBGB...
+    ePvBayerGBRG        = 1,            // First line GBGB, second line RGRG...
+    ePvBayerGRBG        = 2,            // First line GRGR, second line BGBG...
+    ePvBayerBGGR        = 3,            // First line BGBG, second line GRGR...
+    __ePvBayer_force_32 = 0xFFFFFFFF
+
+} tPvBayerPattern;
+
+
+//
+// The frame structure passed to PvQueueFrame().
+// NOTE: Memset structure to 0 when allocated. 
+//       Prosilica filter driver reads AncillaryBuffer pointer.  
+//       If pointer location random/invalid this will cause issues. 
+//
+typedef struct
+{
+    //----- In -----
+    void*               ImageBuffer;        // Buffer for image/pixel data.
+    unsigned long       ImageBufferSize;    // Size of ImageBuffer in bytes
+
+    void*               AncillaryBuffer;    // Camera Firmware >= 1.42 Only.
+                                            // Buffer to capture ancillary chunk mode data. See ChunkModeActive attr.
+                                            // This MUST be 0 if not in use.
+                                            // Chunk mode format:
+                                            //     [Bytes 1 - 4]   acquisition count.
+                                            //     [Bytes 5 - 8]   user value. Not currently implemented. 0.
+                                            //    [Bytes 9 - 12]  exposure value.
+                                            //    [Bytes 13 - 16] gain value.
+                                            //    [Bytes 17 - 18] sync in levels.
+                                            //    [Bytes 19 - 20] sync out levels.
+                                            //    [Bytes 21 - 40] not implemented. 0.
+                                            //    [Bytes 41 - 44] chunk ID. 1000.
+                                            //    [Bytes 45 - 48] chunk length.
+
+    unsigned long       AncillaryBufferSize;// Size of your ancillary buffer in bytes. See NonImagePayloadSize attr.
+                                            //   Set to 0 for no buffer.
+
+    void*               Context[4];         // For your use. Possible application: unique ID
+                                            //   of tPvFrame for frame-done callback.
+    unsigned long       _reserved1[8];
+
+    //----- Out -----
+
+    tPvErr              Status;             // Status of this frame
+
+    unsigned long       ImageSize;          // Image size, in bytes
+    unsigned long       AncillarySize;      // Ancillary data size, in bytes
+
+    unsigned long       Width;              // Image width
+    unsigned long       Height;             // Image height
+    unsigned long       RegionX;            // Start of readout region (left)
+    unsigned long       RegionY;            // Start of readout region (top)
+    tPvImageFormat      Format;             // Image format
+    unsigned long       BitDepth;           // Number of significant bits
+    tPvBayerPattern     BayerPattern;       // Bayer pattern, if bayer format
+
+    unsigned long       FrameCount;         // Frame counter. Uses 16bit GigEVision BlockID. Rolls at 65535.
+    unsigned long       TimestampLo;        // Time stamp, lower 32-bits
+    unsigned long       TimestampHi;        // Time stamp, upper 32-bits
+
+    unsigned long       _reserved2[32];
+
+} tPvFrame;
+
+
+//
+// Frame Callback type
+//
+// Arguments:
+//
+//  [i] tPvFrame* Frame, Frame completed
+//
+typedef void (PVDECL *tPvFrameCallback)(tPvFrame* Frame);
+
+
+//----- Attributes ------------------------------------------------------------
+
+
+#if defined(_M_IX86) || defined(_x86) || defined(_WIN64) || defined(_x64)
+typedef long            tPvInt32;   // 32-bit signed integer
+typedef unsigned long   tPvUint32;  // 32-bit unsigned integer
+typedef float           tPvFloat32; // IEEE 32-bit float
+typedef long long       tPvInt64;   // 64-bit signed integer
+typedef unsigned char   tPvBoolean; // boolean
+#elif defined(_ppc) || defined(_arm) || defined(_msa)
+typedef long            tPvInt32;   // 32-bit integer
+typedef unsigned long   tPvUint32;  // 32-bit unsigned integer
+typedef float           tPvFloat32; // IEEE 32-bit float
+typedef long long       tPvInt64;   // 64-bit signed integer
+typedef unsigned char   tPvBoolean; // boolean
+#else
+#error Define specific data types for your platform.
+#endif
+
+
+//
+// List of attributes, used by PvAttrList.  This is an array of string
+// pointers.  The array, and all the string pointers, are const.
+//
+typedef const char* const* tPvAttrListPtr;
+
+
+//
+// Attribute data type supported
+//
+typedef enum
+{
+    ePvDatatypeUnknown  = 0,
+    ePvDatatypeCommand  = 1,
+    ePvDatatypeRaw      = 2,
+    ePvDatatypeString   = 3,
+    ePvDatatypeEnum     = 4,
+    ePvDatatypeUint32   = 5,
+    ePvDatatypeFloat32  = 6,
+    ePvDatatypeInt64    = 7,
+    ePvDatatypeBoolean  = 8,
+    __ePvDatatypeforce_32= 0xFFFFFFFF
+
+} tPvDatatype;
+
+
+//
+// Attribute flags type
+//
+typedef enum
+{
+    ePvFlagRead         = 0x01,     // Read access is permitted
+    ePvFlagWrite        = 0x02,     // Write access is permitted
+    ePvFlagVolatile     = 0x04,     // The camera may change the value any time
+    ePvFlagConst        = 0x08,     // Value is read only and never changes
+    __ePvFlag_force_32  = 0xFFFFFFFF
+
+} tPvAttributeFlags;
+
+
+//
+// Attribute information type
+//
+typedef struct
+{
+    tPvDatatype         Datatype;       // Data type
+    unsigned long       Flags;          // Combination of tPvAttribute flags
+    const char*         Category;       // Advanced: see documentation
+    const char*         Impact;         // Advanced: see documentation
+    unsigned long       _reserved[4];   // Always zero
+
+} tPvAttributeInfo;
+
+
+//===== FUNCTION PROTOTYPES ===================================================
+
+//----- API Version -----------------------------------------------------------
+
+/*
+ * Function:  PvVersion()
+ *
+ * Purpose:   Retreive the version number of PvAPI
+ *
+ * Arguments: 
+ *
+ * [OUT] unsigned long* pMajor, major version number
+ * [OUT] unsigned long* pMinor, minor version number
+ *
+ * Return:    none
+ *
+ * This function can be called at anytime, including before the API is
+ * initialized.
+ */
+void PVDECL PvVersion(unsigned long* pMajor,unsigned long* pMinor);
+
+
+//----- API Initialization ----------------------------------------------------
+
+/*
+ * Function:  PvInitialize()
+ *
+ * Purpose:   Initialize the PvApi module.  This must be called before any
+ *            other PvApi function is run.
+ *
+ * Arguments: none
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available           
+ *               ePvErrInternalFault,   an internal fault occurred
+ */
+tPvErr PVDECL PvInitialize(void);
+
+/*
+ * Function:  PvInitializeNoDiscovery()
+ *
+ * Purpose:   Initialize the PvApi module.  This must be called before any
+ *            other PvApi function is run. This version is intended to be used
+ *            only when the camera discovery via broadcast is unwanted.
+ *
+ * Arguments: none
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available           
+ *               ePvErrInternalFault,   an internal fault occurred
+ */
+tPvErr PVDECL PvInitializeNoDiscovery(void);
+
+
+/*
+ * Function:  PvUnInitialize()
+ *
+ * Purpose:   Uninitialize the API module.  This will free some resources,
+ *            and shut down network activity if applicable.
+ *
+ * Arguments: none
+ *
+ * Return:    none
+ */
+void PVDECL PvUnInitialize(void);
+
+
+//----- Interface-Link Callback -----------------------------------------------
+
+/*
+ * Function:  PvLinkCallbackRegister()
+ *
+ * Purpose:   Register a callback for interface events.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvLinkCallback Callback, Callback function to run when an event occurs
+ * [ IN] tPvLinkEvent Event,       Event to trigger the callback
+ * [ IN] void* Context,            For your use: Context is passed to your
+ *                                   callback function
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrBadSequence,     API isn't initialized
+ *
+ * Here's the rules:
+ *   - Multiple callback functions may be registered with the same event
+ *   - The same callback function may be shared by different events
+ *   - The same callback function with the same event may not be registered twice
+ *
+ * The callback functions are called from a thread within PvApi.  The callbacks
+ * are sequenced; i.e. they will not be called simultaneously.
+ *
+ * Use PvLinkCallbackUnRegister() to stop receiving callbacks.
+ */
+tPvErr PVDECL PvLinkCallbackRegister(tPvLinkCallback Callback,
+                                     tPvLinkEvent Event,
+                                     void* Context);
+
+
+/*
+ * Function:  PvLinkCallbackUnRegister()
+ *
+ * Purpose:   Unregister a callback for interface events.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvLinkCallback Callback, Callback function previously registered
+ * [ IN] tPvLinkEvent Event,       Event associated with the callback
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        registered callback was not found
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvLinkCallbackUnRegister(tPvLinkCallback Callback,
+                                       tPvLinkEvent Event);
+
+
+//----- Camera Enumeration & Information --------------------------------------
+
+/*
+ * Function:  PvCameraListEx()
+ *
+ * Purpose:   List all the cameras currently visible to PvApi (extended)
+ *
+ * Arguments:
+ *
+ * [OUT] tPvCameraInfoEx* pList,        Array of tPvCameraInfo, allocated by
+ *                                      the caller.  The camera list is copied here.
+ * [ IN] unsigned long ListLength,      Length of the caller's pList array
+ * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
+ *                                      than ListLength!) returned here.
+ *                                      May be NULL.
+ * [ IN] unsigned long StructSize,      Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
+ *
+ * Return:    Number of pList entries filled, up to ListLength.
+ */
+unsigned long PVDECL PvCameraListEx(tPvCameraInfoEx* pList,
+                                    unsigned long ListLength,
+                                    unsigned long* pConnectedNum,
+                                    unsigned long StructSize);
+
+/*
+ * Function:  PvCameraList()
+ *
+ * Purpose:   List all the cameras currently visible to PvApi (deprecated)
+ *
+ * Arguments:
+ *
+ * [OUT] tPvCameraInfo* pList,          Array of tPvCameraInfo, allocated by
+ *                                        the caller.  The camera list is
+ *                                           copied here.
+ * [ IN] unsigned long ListLength,      Length of the caller's pList array
+ * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
+ *                                        than ListLength!) returned here.
+ *                                        May be NULL.
+ *
+ * Return:    Number of pList entries filled, up to ListLength.
+ */
+unsigned long PVDECL PvCameraList(tPvCameraInfo* pList,
+                                  unsigned long ListLength,
+                                  unsigned long* pConnectedNum);
+
+
+/*
+ * Function:  PvCameraCount()
+ *
+ * Purpose:   Number of cameras visible to PvApi (at the time of the call).
+ *            Does not include unreachable cameras.
+ *
+ * Arguments: none
+ *
+ * Return:    The number of cameras found
+ *
+ * The number of cameras is dynamic, and may change at any time.
+ */
+unsigned long PVDECL PvCameraCount(void);
+
+/*
+ * Function:  PvCameraInfoEx()
+ *
+ * Purpose:   Retreive information on a given camera (extended)
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long UniqueId,    Unique ID of the camera
+ * [OUT] tPvCameraInfExo* pInfo,    Structure where the information will be copied
+ * [ IN] unsigned long StructSize,  Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        the camera was not found (unplugged)
+ *               ePvErrUnplugged,       the camera was found but unplugged during the
+ *                                      function call
+ *               ePvErrBadParameter,    a valid pointer for pInfo was not supplied
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvCameraInfoEx(unsigned long UniqueId,tPvCameraInfoEx* pInfo,unsigned long StructSize);
+
+/*
+ * Function:  PvCameraInfo()
+ *
+ * Purpose:   Retreive information on a given camera (deprecated)
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long UniqueId,    Unique ID of the camera
+ * [OUT] tPvCameraInfo* pInfo,      Structure where the information will be
+ *                                    copied
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        the camera was not found (unplugged)
+ *               ePvErrUnplugged,       the camera was found but unplugged during the
+ *                                      function call
+ *               ePvErrBadParameter,    a valid pointer for pInfo was not supplied
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvCameraInfo(unsigned long UniqueId, tPvCameraInfo* pInfo);
+
+/*
+ * Function:  PvCameraInfoByAddrEx()
+ *
+ * Purpose:   Retreive information on a camera, by IP address.  This function
+ *            is required if the ethernet camera is not on the local ethernet
+ *            network. (extended)
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long IpAddr,          IP address of camera, in network byte order.
+ * [OUT] tPvCameraInfo* pInfo,          The camera information will be copied here.
+ * [OUT] tPvIpSettings* pIpSettings,    The IP settings will be copied here; NULL pointer OK.
+ * [ IN] unsigned long StructSize,      Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        the camera was not found
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *               ePvErrBadParameter,    pIpSettings->size is invalid
+ *
+ * The specified camera may not be visible to PvCameraList(); it might be on a
+ * different ethernet network.  In this case, communication with the camera is
+ * routed to the local gateway.
+ */
+tPvErr PVDECL PvCameraInfoByAddrEx(unsigned long IpAddr,
+                                   tPvCameraInfoEx* pInfo,
+                                   tPvIpSettings* pIpSettings,
+                                   unsigned long StructSize);
+
+/*
+ * Function:  PvCameraInfoByAddr()
+ *
+ * Purpose:   Retreive information on a camera, by IP address.  This function
+ *            is required if the ethernet camera is not on the local ethernet
+ *            network. (deprecated)
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long IpAddr,          IP address of camera, in network byte
+ *                                        order.
+ * [OUT] tPvCameraInfo* pInfo,          The camera information will be copied
+ *                                        here.
+ * [OUT] tPvIpSettings* pIpSettings,    The IP settings will be copied here;
+ *                                        NULL pointer OK.
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        the camera was not found
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *               ePvErrBadParameter,    pIpSettings->size is invalid
+ *
+ * The specified camera may not be visible to PvCameraList(); it might be on a
+ * different ethernet network.  In this case, communication with the camera is
+ * routed to the local gateway.
+ */
+tPvErr PVDECL PvCameraInfoByAddr(unsigned long IpAddr,
+                                 tPvCameraInfo* pInfo,
+                                 tPvIpSettings* pIpSettings);
+
+/*
+ * Function:  PvCameraListUnreachableEx()
+ *
+ * Purpose:   List all the cameras currently inaccessable by PvApi.  This lists
+ *            the ethernet cameras which are connected to the local ethernet
+ *            network, but are on a different subnet. (extended)
+ *
+ * Arguments:
+ *
+ * [OUT] tPvCameraInfo* pList,          Array of tPvCameraInfo, allocated by
+ *                                      the caller.  The camera list is
+ *                                         copied here.
+ * [ IN] unsigned long ListLength,      Length of the caller's pList array
+ * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
+ *                                      than ListLength!) returned here.
+ *                                      May be NULL.
+ * [ IN] unsigned long StructSize,      Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
+ *
+ * Return:    Number of pList entries filled, up to ListLength.
+ */
+unsigned long PVDECL PvCameraListUnreachableEx(tPvCameraInfoEx* pList,
+                                               unsigned long ListLength,
+                                               unsigned long* pConnectedNum,
+                                               unsigned long StructSize);
+
+
+/*
+ * Function:  PvCameraListUnreachable()
+ *
+ * Purpose:   List all the cameras currently inaccessable by PvApi.  This lists
+ *            the ethernet cameras which are connected to the local ethernet
+ *            network, but are on a different subnet. (deprecated)
+ *
+ * Arguments:
+ *
+ * [OUT] tPvCameraInfo* pList,          Array of tPvCameraInfo, allocated by
+ *                                        the caller.  The camera list is
+ *                                           copied here.
+ * [ IN] unsigned long ListLength,      Length of the caller's pList array
+ * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
+ *                                        than ListLength!) returned here.
+ *                                        May be NULL.
+ *
+ * Return:    Number of pList entries filled, up to ListLength.
+ */
+unsigned long PVDECL PvCameraListUnreachable(tPvCameraInfo* pList,
+                                             unsigned long ListLength,
+                                             unsigned long* pConnectedNum);
+
+
+//----- Opening & Closing -----------------------------------------------------
+
+/*
+ * Function:  PvCameraOpen()
+ *
+ * Purpose:   Open the specified camera.  This function must be called before
+ *            you can control the camera.
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long UniqueId,    UniqueId of the camera
+ * [ IN] tPvAccessFlags AccessFlag, Access flag {monitor, master}
+ * [OUT] tPvHandle* pCamera,        Handle to the opened camera returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrAccessDenied,    the camera couldn't be open in the requested mode
+ *               ePvErrNotFound,        the camera was not found (unplugged)
+ *               ePvErrUnplugged,       the camera was found but unplugged during the
+ *                                      function call
+ *               ePvErrBadParameter,    a valid pointer for pCamera was not supplied
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized or camera is alreay open
+ *
+ * If ePvErrSuccess is returned, you must eventually call PvCameraClose().
+ *
+ * Alternatively, under special circumstances, you might open an ethernet
+ * camera with PvCameraOpenByAddr().
+ */
+tPvErr PVDECL PvCameraOpen(unsigned long UniqueId,
+                           tPvAccessFlags AccessFlag,
+                           tPvHandle* pCamera);
+
+/*
+ * Function:  PvCameraOpenByAddr()
+ *
+ * Purpose:   Open the specified camera, by IP address.  This function is
+ *            required, in place of PvCameraOpen(), if the ethernet camera
+ *            is not on the local ethernet network.
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long IpAddr,          IP address of camera, in network byte
+ *                                        order.
+ * [ IN] tPvAccessFlags AccessFlag,     Access flag {monitor, master}
+ * [OUT] tPvHandle* pCamera,            Handle to the opened camera returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrAccessDenied,    the camera couldn't be open in the requested mode
+ *               ePvErrNotFound,        the camera was not found (unplugged)
+ *               ePvErrUnplugged,       the camera was found but unplugged during the
+ *                                      function call
+ *               ePvErrBadParameter,    a valid pointer for pCamera was not supplied
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized or camera is alreay open
+ *
+ * If ePvErrSuccess is returned, you must eventually call PvCameraClose().
+ *
+ * The specified camera may not be visible to PvCameraList(); it might be on a
+ * different ethernet network.  In this case, communication with the camera is
+ * routed to the local gateway.
+ */
+tPvErr PVDECL PvCameraOpenByAddr(unsigned long IpAddr,
+                                 tPvAccessFlags AccessFlag,
+                                 tPvHandle* pCamera);
+
+/*
+ * Function:  PvCameraClose()
+ *
+ * Purpose:   Close the specified camera.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,      Handle of an opened camera
+ *
+ * Return:    ePvErrBadHandle if the handle is bad, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrBadHandle,    the handle of the camera is invalid
+ *               ePvErrBadSequence,  API isn't initialized
+ *
+ */
+tPvErr PVDECL PvCameraClose(tPvHandle Camera);
+
+
+/*
+ * Function:  PvCameraIpSettingsGet()
+ *
+ * Purpose:   Get IP settings for an ethernet camera.  This command will work
+ *            for all cameras on the local ethernet network, including
+ *            "unreachable" cameras.
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long UniqueId,    UniqueId of the camera
+ * [OUT] tPvIpSettings* pSettings,  Camera settings are copied here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        the camera was not found (or is not
+ *                                      an ethernet camera)
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *               ePvBadParameter,       pSettings->size is incorrect
+ *
+ * The camera does not have to be opened to run this command.
+ */
+tPvErr PVDECL PvCameraIpSettingsGet(unsigned long UniqueId,
+                                    tPvIpSettings* pSettings);
+
+
+/*
+ * Function:  PvCameraIpSettingsChange()
+ *
+ * Purpose:   Change the IP settings for an ethernet camera.  This command
+ *            will work for all cameras on the local ethernet network,
+ *            including "unreachable" cameras.
+ *
+ * Arguments:
+ *
+ * [ IN] unsigned long UniqueId,            UniqueId of the camera
+ * [ IN] const tPvIpSettings* pSettings,    New camera settings
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        the camera was not found
+ *               ePvErrAccessDenied,    the camera was already open
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *               ePvBadParameter,       pSettings->size is incorrect
+ *
+ * This command will fail if any application on any host has opened the camera.
+ */
+tPvErr PVDECL PvCameraIpSettingsChange(unsigned long UniqueId,
+                                       const tPvIpSettings*    pSettings);
+
+
+//----- Image Capture ---------------------------------------------------------
+
+/*
+ * Function:  PvCaptureStart()
+ *
+ * Purpose:   Setup the camera interface for image transfer.  This does not
+ *            necessarily start acquisition.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,      Handle to the camera 
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized or capture already started
+ *
+ * PvCaptureStart() must be run before PvCaptureQueueFrame() is allowed.  But
+ * the camera will not acquire images before the AcquisitionMode attribute is
+ * set to a non-idle mode.
+ */
+tPvErr PVDECL PvCaptureStart(tPvHandle Camera);
+
+
+/*
+ * Function:  PvCaptureEnd()
+ *
+ * Purpose:   Disable the image transfer mechanism.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,      Handle to the camera 
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized or capture already stopped
+ *
+ * This cannot be called until the frame queue is empty.
+ */
+tPvErr PVDECL PvCaptureEnd(tPvHandle Camera);
+
+
+/*
+ * Function:  PvCaptureQuery()
+ *
+ * Purpose:   Check to see if a camera interface is ready to transfer images.
+ *            I.e. has PvCaptureStart() been called?
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [OUT] unsigned long* pIsStarted, Result returned here: 1=started, 0=disabled
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvBadParameter,       a valid pointer for pIsStarted was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvCaptureQuery(tPvHandle Camera, unsigned long* pIsStarted);
+
+/*
+ * Function:  PvCaptureAdjustPacketSize()
+ *
+ * Purpose:   Determine the maximum packet size supported by the system.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,                   Handle to the camera 
+ * [ IN] unsigned long MaximumPacketSize     Upper limit: the packet size will
+ *                                             not be set higher than this value.
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized or capture already started
+ *
+ * The maximum packet size can be limited by the camera, host adapter, and
+ * ethernet switch.
+ *
+ * PvCaptureAdjustPacketSize() cannot be run when capture has started.
+ */
+tPvErr PVDECL PvCaptureAdjustPacketSize(tPvHandle Camera,unsigned long MaximumPacketSize);
+
+/*
+ * Function:  PvCaptureQueueFrame()
+ *
+ * Purpose:   Queue a frame buffer for image capture.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] tPvFrame* pFrame,          Frame to queue
+ * [ IN] tPvFrameCallback Callback, Callback to run when the frame is done;
+ *                                    may be NULL for no callback
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrQueueFull,       the frame queue is full
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized or capture not started
+ *
+ * This function returns immediately.  If ePvErrSuccess is returned, the frame
+ * will remain in the queue until it is complete, or aborted due to an error or
+ * a call to PvCaptureQueueClear().
+ *
+ * Frames are completed (or aborted) in the order they are queued.
+ *
+ * You can specify a callback function (the "frame-done callback") to occur
+ * when the frame is complete, or you can use PvCaptureWaitForFrameDone() to
+ * block until the frame is complete.
+ *
+ * When the frame callback starts, the tPvFrame data structure is no longer in
+ * use and you are free to do with it as you please (for example, reuse or
+ * deallocation.)
+ *
+ * Each frame on the queue must have a unique tPvFrame data structure.
+ */
+tPvErr PVDECL PvCaptureQueueFrame(tPvHandle Camera,
+                                  tPvFrame* pFrame,
+                                  tPvFrameCallback Callback);
+
+
+/*
+ * Function:  PvCaptureQueueClear()
+ *
+ * Purpose:   Empty the frame queue.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *
+ * Queued frames are returned with status ePvErrCancelled.
+ *
+ * PvCaptureQueueClear() cannot be called from the frame-done callback.
+ *
+ * When this function returns, no more frames are left on the queue and you
+ * will not receive another frame callback.
+ */
+tPvErr PVDECL PvCaptureQueueClear(tPvHandle Camera);
+
+
+/*
+ * Function:  PvCaptureWaitForFrameDone()
+ *
+ * Purpose:   Wait for a frame capture to complete.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] tPvFrame* pFrame,          Frame to wait upon
+ * [ IN] unsigned long Timeout,     Wait timeout (in milliseconds); use
+ *                                    PVINFINITE for no timeout
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrTimeout,         timeout while waiting for the frame
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *
+ * This function cannot be called from the frame-done callback.
+ * 
+ * When this function returns, the frame structure is no longer in use and you
+ * are free to do with it as you please (for example, reuse or deallocation).
+ *
+ * If you are using the frame-done callback: this function might return first,
+ * or the frame callback might be called first.
+ *
+ * If the specified frame is not on the queue, this function returns
+ * ePvErrSuccess, since we do not know if the frame just left the queue.
+ */
+tPvErr PVDECL PvCaptureWaitForFrameDone(tPvHandle Camera,
+                                        const tPvFrame* pFrame,
+                                        unsigned long Timeout);
+
+
+//----- Attributes ------------------------------------------------------------
+
+/*
+ * Function:  PvAttrList()
+ *
+ * Purpose:   List all the attributes for a given camera.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera
+ * [OUT] tPvAttrListPtr* pListPtr   Pointer to the attribute list is returned
+ *                                    here.  The attribute list is valid until
+ *                                    the camera is closed.
+ * [OUT] unsigned long* pLength     Length of the list is returned here.  The
+ *                                    length never changes while the camera
+ *                                    remains opened.
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvBadParameter,       a valid pointer for pListPtr was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *
+ * The attribute list is contained in memory allocated by the PvApi module.
+ * This memory remains static until the camera is closed.
+ */
+tPvErr PVDECL PvAttrList(tPvHandle Camera,
+                         tPvAttrListPtr* pListPtr,
+                         unsigned long* pLength);
+
+
+/*
+ * Function:  PvAttrInfo()
+ *
+ * Purpose:   Retrieve information on an attribute.  This information is
+ *            static for each camera.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvAttributeInfo* pInfo,   The information is copied here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvBadParameter,       a valid pointer for pInfo was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrInfo(tPvHandle Camera,
+                         const char* Name,
+                         tPvAttributeInfo* pInfo);
+
+
+/*
+ * Function:  PvAttrExists()
+ *
+ * Purpose:   Check if an attribute exists for the camera.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name
+ *
+ * Return:       ePvErrSuccess,         the attribute exists
+ *               ePvErrNotFound,        the attribute does not exist
+ *
+ *            The following error codes may also occur:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrExists(tPvHandle Camera, const char* Name);
+
+
+/*
+ * Function:  PvAttrIsAvailable()
+ *
+ * Purpose:   Check if an attribute is available.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,              Handle to the camera 
+ * [ IN] const char* Name,              Attribute name 
+ *
+ * Return:       ePvErrSuccess,         the attribute is available
+ *               ePvErrUnavailable,     the attribute is not available
+ *
+ *            The following error codes may also occur:
+ *
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrIsAvailable(tPvHandle Camera, const char* Name);
+
+
+/*
+ * Function:  PvAttrIsValid()
+ *
+ * Purpose:   Check if an attribute's value is valid.
+ *
+ * Arguments: 
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ *
+ * Return:       ePvErrSuccess,         the attribute is valid
+ *               ePvErrOutOfRange,      the attribute is not valid
+ *
+ *            The following error codes may also occur:
+ *
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrOutOfRange,      the requested attribute is not valid
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrIsValid(tPvHandle Camera, const char* Name);
+
+
+/*
+ * Function:  PvAttrRangeEnum()
+ *
+ * Purpose:   Get the enumeration set for an enumerated attribute.  The set is
+ *            returned as a comma separated string containing all allowed
+ *            values.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] char* pBuffer,             Caller-allocated buffer; the string is
+ *                                    copied here
+ * [ IN] unsigned long BufferSize,  Size of buffer, in bytes
+ * [OUT] unsigned long* pSize,      Size of the enumeration set string is
+ *                                      returned here.  This may be bigger
+ *                                      than BufferSize!  (pSize may be NULL.)
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pBuffer was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ *
+ * Enumeration sets must be considered dynamic.  For some attributes, the set
+ * may change at any time.
+ */
+tPvErr PVDECL PvAttrRangeEnum(tPvHandle Camera,
+                              const char* Name,
+                              char* pBuffer,
+                              unsigned long BufferSize,
+                              unsigned long* pSize);
+
+
+/*
+ * Function:  PvAttrRangeUint32()
+ *
+ * Purpose:   Get the value range for a uint32 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvUint32* pMin,           Minimum value returned here
+ * [OUT] tPvUint32* pMax,           Maximum value returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pMin or pMax was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrRangeUint32(tPvHandle Camera,
+                                const char* Name,
+                                tPvUint32* pMin,
+                                tPvUint32* pMax);
+
+
+/*
+ * Function:  PvAttrRangeFloat32()
+ *
+ * Purpose:   Get the value range for a float32 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvFloat32* pMin,          Minimum value returned here           
+ * [OUT] tPvFloat32* pMax,          Maximum value returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pMin or pMax was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrRangeFloat32(tPvHandle Camera,
+                                 const char* Name,
+                                 tPvFloat32* pMin,
+                                 tPvFloat32* pMax);
+
+/*
+ * Function:  PvAttrRangeInt64()
+ *
+ * Purpose:   Get the value range for a int64 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvInt64* pMin,            Minimum value returned here
+ * [OUT] tPvInt64* pMax,            Maximum value returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pMin or pMax was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrRangeInt64(tPvHandle Camera,
+                               const char* Name,
+                               tPvInt64* pMin,
+                               tPvInt64* pMax);
+
+/*
+ * Function:  PvCommandRun()
+ *
+ * Purpose:   Run a specific command on the camera
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvCommandRun(tPvHandle Camera, const char* Name);
+
+
+/*
+ * Function:  PvAttrStringGet()
+ *
+ * Purpose:   Get the value of a string attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] char* pBuffer,             Caller-allocated buffer; the string is
+ *                                    copied here
+ * [ IN] unsigned long BufferSize,  Size of buffer, in bytes
+ * [OUT] unsigned long* pSize,      Size of the string is returned here.  This
+ *                                    may be bigger than BufferSize!  (pSize
+ *                                    may be NULL.)
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pBuffer was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrStringGet(tPvHandle Camera,
+                              const char* Name,
+                              char* pBuffer,
+                              unsigned long BufferSize,
+                              unsigned long* pSize);
+
+
+/*
+ * Function:  PvAttrStringSet()
+ *
+ * Purpose:   Set the value of a string attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [ IN] const char* Value,  Value to set
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvErrForbidden,       the requested attribute forbid this operation
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrStringSet(tPvHandle Camera,
+                              const char* Name,
+                              const char* Value);
+
+
+/*
+ * Function:  PvAttrEnumGet()
+ *
+ * Purpose:   Get the value of an enumerated attribute.  The enumeration value
+ *            is a string.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] char* pBuffer,             Caller-allocated buffer; the string is
+ *                                    copied here
+ * [ IN] unsigned long BufferSize,  Size of buffer, in bytes
+ * [OUT] unsigned long* pSize,      Size of the string is returned here.  This
+ *                                    may be bigger than BufferSize!  (pSize
+ *                                    may be NULL.)
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pBuffer was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrEnumGet(tPvHandle Camera,
+                            const char* Name,
+                            char* pBuffer,
+                            unsigned long BufferSize,
+                            unsigned long* pSize);
+
+
+/*
+ * Function:  PvAttrEnumSet()
+ *
+ * Purpose:   Set the value of an enumerated attribute.  The enumeration value
+ *            is a string.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [ IN] const char* Value,         Value to set
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvErrForbidden,       the requested attribute forbid this operation
+ *               ePvErrOutOfRange,      the supplied value is out of range
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrEnumSet(tPvHandle Camera,
+                            const char* Name,
+                            const char* Value);
+
+
+/*
+ * Function:  PvAttrUint32Get()
+ *
+ * Purpose:   Get the value of a uint32 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvUint32* pValue,         Value is returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pValue was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrUint32Get(tPvHandle Camera,
+                              const char* Name,
+                              tPvUint32* pValue);
+
+
+/*
+ * Function:  PvAttrUint32Set()
+ *
+ * Purpose:   Set the value of a uint32 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [ IN] tPvUint32 Value,           Value to set
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvErrForbidden,       the requested attribute forbid this operation
+ *               ePvErrOutOfRange,      the supplied value is out of range
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrUint32Set(tPvHandle Camera,
+                              const char* Name,
+                              tPvUint32 Value);
+
+
+/*
+ * Function:  PvAttrFloat32Get()
+ *
+ * Purpose:   Get the value of a float32 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvFloat32* pValue,        Value is returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pValue was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrFloat32Get(tPvHandle Camera,
+                               const char* Name,
+                               tPvFloat32* pValue);
+
+
+/*
+ * Function:  PvAttrFloat32Set()
+ *
+ * Purpose:   Set the value of a float32 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [ IN] tPvFloat32 Value,          Value to set
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvErrForbidden,       the requested attribute forbid this operation
+ *               ePvErrOutOfRange,      the supplied value is out of range
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrFloat32Set(tPvHandle Camera,
+                               const char* Name,
+                               tPvFloat32 Value);
+
+/*
+ * Function:  PvAttrInt64Get()
+ *
+ * Purpose:   Get the value of a int64 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvInt64* pValue,          Value is returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pValue was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrInt64Get(tPvHandle Camera,
+                             const char* Name,
+                             tPvInt64* pValue);
+
+
+/*
+ * Function:  PvAttrInt64Set()
+ *
+ * Purpose:   Set the value of a int64 attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [ IN] tPvInt64 Value,            Value to set
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvErrForbidden,       the requested attribute forbid this operation
+ *               ePvErrOutOfRange,      the supplied value is out of range
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrInt64Set(tPvHandle Camera,
+                              const char* Name,
+                              tPvInt64 Value);
+                              
+/*
+ * Function:  PvAttrBooleanGet()
+ *
+ * Purpose:   Get the value of a boolean attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [OUT] tPvBoolean* pValue,        Value is returned here
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvBadParameter,       a valid pointer for pValue was not supplied
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrBooleanGet(tPvHandle Camera,const char* Name,tPvBoolean* pValue);
+
+
+/*
+ * Function:  PvAttrBooleanSet()
+ *
+ * Purpose:   Set the value of a boolean attribute.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera,          Handle to the camera 
+ * [ IN] const char* Name,          Attribute name 
+ * [ IN] tPvBoolean Value,          Value to set
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *              
+ *               ePvErrBadHandle,       the handle of the camera is invalid
+ *               ePvErrUnplugged,       the camera has been unplugged 
+ *               ePvErrNotFound,        the requested attribute doesn't exist
+ *               ePvErrWrongType,       the requested attribute is not of the correct type
+ *               ePvErrForbidden,       the requested attribute forbid this operation
+ *               ePvErrOutOfRange,      the supplied value is out of range
+ *               ePvErrInternalFault,   an internal fault occurred
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvAttrBooleanSet(tPvHandle Camera,const char* Name,tPvBoolean Value);
+
+//----- Camera event callback -------------------------------------------------
+
+/*
+ * Function:  PvCameraEventCallbackRegister()
+ *
+ * Purpose:   Register a callback for camera events.  The callback will receive
+ *            all events for the camera.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera                              Handle to the camera
+ * [ IN] tPvCameraEventCallback Callback,   Callback function to run when an event occurs
+ * [ IN] void* Context                      For your use: Context is passed to your
+ *                                          callback function
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrBadSequence,     API isn't initialized
+ *
+ * The events generated by a camera are controlled by the attribute system.
+ *
+ * Here's the rules:
+ *   - Multiple callback functions may be registered for the same camera
+ *   - The same callback function may be shared by different cameras
+ *
+ * The callback functions are called from a thread within PvApi.  The callbacks
+ * are sequenced; i.e. they will not be called simultaneously.
+ *
+ * Use PvCameraEventCallbackUnRegister() to stop receiving callbacks.
+ */
+tPvErr PVDECL PvCameraEventCallbackRegister(tPvHandle Camera,
+                                            tPvCameraEventCallback Callback,
+                                            void* Context);
+
+/*
+ * Function:  PvCameraEventCallbackUnRegister()
+ *
+ * Purpose:   Unregister a callback for camera events.
+ *
+ * Arguments:
+ *
+ * [ IN] tPvHandle Camera                        Handle to the camera
+ * [ IN] tPvCameraEventCallback Callback, Callback function previously registered
+ *
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
+ *            following error codes:
+ *
+ *               ePvErrNotFound,        registered callback was not found
+ *               ePvErrResources,       resources requested from the OS were not
+ *                                      available
+ *               ePvErrBadSequence,     API isn't initialized
+ */
+tPvErr PVDECL PvCameraEventCallbackUnRegister(tPvHandle Camera,tPvCameraEventCallback Callback);
+
+//----- Utility ---------------------------------------------------------------
+
+/*
+ * Function:  PvUtilityColorInterpolate()
+ *
+ * Purpose:   Perform color interpolation.  Input format is bayer8 or bayer16
+ *            (raw bayer image).  Output format is RGB or separate color
+ *            planes.
+ *
+ * Arguments:
+ *
+ * [ IN] const tPvFrame* pFrame,        Raw bayer image
+ * [OUT] void* BufferRed,               Red plane for output image
+ * [OUT] void* BufferGreen,             Green plane for output image
+ * [OUT] void* BufferBlue,              Blue plane for output image
+ * [ IN] unsigned long PixelPadding,    Padding after each pixel in raw-pixel units
+ * [ IN] unsigned long LinePadding,     Padding after each line in raw-pixel units
+ *
+ * Return:    none
+ *
+ * Caller must allocate the output buffers:
+ *
+ *      num_pixels = (((1 + pixel_padding) * width) + line_padding) * height
+ *
+ *      buffer_size = raw_pixel_size * num_pixels
+ *
+ * Perhaps the most common way to use this function will be to generate a
+ * Win32::StretchDiBits compatible BGR buffer:
+ *
+ *      #define ULONG_PADDING(x)                        (((x+3) & ~3) - x)
+ *
+ *      unsigned long line_padding = ULONG_PADDING(width*3);
+ *      unsigned long buffer_size = ((width*3) + line_padding) * height;
+ *
+ *      unsigned char* buffer = new unsigned char[buffer_size];
+ *
+ *      PvUtilityColorInterpolate(&frame, &buffer[2], &buffer[1],
+ *                                &buffer[0], 2, line_padding);
+ *
+ */
+void PVDECL PvUtilityColorInterpolate(const tPvFrame* pFrame,
+                                      void* BufferRed,
+                                      void* BufferGreen,
+                                      void* BufferBlue,
+                                      unsigned long PixelPadding,
+                                      unsigned long LinePadding);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // PVAPI_H_INCLUDE
+
diff --git a/AVTGigESDK/inc-pc/PvRegIo.h b/AVTGigESDK/inc-pc/PvRegIo.h
new file mode 100644 (file)
index 0000000..654c522
--- /dev/null
@@ -0,0 +1,201 @@
+/*\r
+|==============================================================================\r
+| 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.\r
+|\r
+|=============================================================================\r
+|\r
+| File:         PvRegIo.h\r
+|\r
+| Project/lib:  PvAPI\r
+|\r
+| Target:       Win32, Linux, QNX\r
+|\r
+| Description:  Camera register I/O.\r
+|\r
+| Notes:       These functions can cause corruption to the internal state of\r
+|              PvAPI. Use with caution. Sample code provided for accessing\r
+|                         certain registers. See siotest, CamMemory, GetXMLFile\r
+|\r
+|==============================================================================\r
+|\r
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED\r
+| WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\r
+| NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE\r
+| DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF\r
+| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+|\r
+|==============================================================================\r
+| dd/mon/yy     Notes\r
+|------------------------------------------------------------------------------\r
+| 10/Feb/06     Original.\r
+| 04/Jun/07     Licence changes\r
+|==============================================================================\r
+*/\r
+\r
+#ifndef PVREGIO_H_INCLUDE\r
+#define PVREGIO_H_INCLUDE\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+//===== INCLUDE FILES =========================================================\r
+\r
+#include <PvApi.h>\r
+\r
+//===== #DEFINES ==============================================================\r
+\r
+#define PvRegisterRead  _Pv_Factory_Test_10\r
+#define PvRegisterWrite _Pv_Factory_Test_11\r
+#define PvMemoryRead   _Pv_Factory_Test_12\r
+#define PvMemoryWrite  _Pv_Factory_Test_13\r
+\r
+//===== TYPE DEFINITIONS ======================================================\r
+\r
+//===== FUNCTION PROTOTYPES ===================================================\r
+\r
+/*\r
+ * Function:  PvRegisterRead()\r
+ *\r
+ * Purpose:   Read camera registers.  A backdoor command.\r
+ *\r
+ * Arguments:\r
+ *\r
+ * [ IN] tPvHandle Camera,                      Handle to the camera \r
+ * [ IN] unsigned long NumReads                 Number of registers to read\r
+ * [ IN] const unsigned long* pAddressArray,    Array of addresses, NumReads long\r
+ * [OUT] unsigned long* pDataArray,             Data is returned here; array\r
+ *                                                must be NumReads long\r
+ * [OUT] unsigned long* pNumComplete,           Number of registers successfully\r
+ *                                                read; if an error occurs this\r
+ *                                                is less than NumReads; may be\r
+ *                                                NULL\r
+ *\r
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the\r
+ *            following error codes:\r
+ *              \r
+ *               ePvErrBadHandle,       the handle of the camera is invalid\r
+ *               ePvErrUnplugged,       the camera has been unplugged \r
+ *               ePvBadParameter,       NumReads is incorrect\r
+ *               pPvAccessDenied,       read is not permitted (or register does\r
+ *                                        not exist)\r
+ */\r
+tPvErr PVDECL _Pv_Factory_Test_10(tPvHandle Camera,\r
+                                  unsigned long NumReads,\r
+                                  const unsigned long* pAddressArray,\r
+                                  unsigned long* pDataArray,\r
+                                  unsigned long* pNumComplete);\r
+\r
+\r
+/*\r
+ * Function:  PvRegisterWrite()\r
+ *\r
+ * Purpose:   Write camera registers.  A backdoor command.\r
+ *\r
+ * Arguments:\r
+ *\r
+ * [ IN] tPvHandle Camera,                      Handle to the camera \r
+ * [ IN] unsigned long NumWrites                Number of registers to write\r
+ * [ IN] const unsigned long* pAddressArray,    Array of addresses, NumWrites long\r
+ * [ IN] const unsigned long* pDataArray,       Array of data, NumWrites long\r
+ * [OUT] unsigned long* pNumComplete,           Number of registers successfully\r
+ *                                                written; if an error occurs this\r
+ *                                                is less than NumWrites; may be\r
+ *                                                NULL\r
+ *\r
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the\r
+ *            following error codes:\r
+ *              \r
+ *               ePvErrBadHandle,       the handle of the camera is invalid\r
+ *               ePvErrUnplugged,       the camera has been unplugged \r
+ *               ePvBadParameter,       NumWrites is incorrect\r
+ *               pPvAccessDenied,       write is not permitted (or register does\r
+ *                                        not exist)\r
+ */\r
+tPvErr PVDECL _Pv_Factory_Test_11(tPvHandle Camera,\r
+                                  unsigned long NumWrites,\r
+                                  const unsigned long* pAddressArray,\r
+                                  const unsigned long* pDataArray,\r
+                                  unsigned long* pNumComplete);\r
+\r
+\r
+\r
+/*\r
+ * Function:  PvMemoryRead()\r
+ *\r
+ * Purpose:   Read camera memory (READMEM_CMD).  A backdoor command.\r
+ *\r
+ * Arguments:\r
+ *\r
+ * [ IN] tPvHandle Camera,                      Handle to the camera \r
+ * [ IN] unsigned long Address,                 Address\r
+ * [ IN] unsigned long Size,                    Size of read in bytes; must\r
+ *                                                be a multiple of 4\r
+ * [OUT] unsigned char* pDataBuffer             Data is returned here; buffer\r
+ *                                                must be Size bytes long\r
+ *\r
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the\r
+ *            following error codes:\r
+ *              \r
+ *               ePvErrBadHandle,       the handle of the camera is invalid\r
+ *               ePvErrUnplugged,       the camera has been unplugged \r
+ *               ePvBadParameter,       Size is incorrect\r
+ *               pPvAccessDenied,       read is not permitted (or register does\r
+ *                                        not exist)\r
+ */\r
+tPvErr PVDECL _Pv_Factory_Test_12(tPvHandle Camera,\r
+                                  unsigned long Address,\r
+                                  unsigned long Size,\r
+                                  unsigned char* pDataBuffer);\r
+\r
+\r
+/*\r
+ * Function:  PvMemoryWrite()\r
+ *\r
+ * Purpose:   Write camera memory (WRITEMEM_CMD).  A backdoor command.\r
+ *\r
+ * Arguments:\r
+ *\r
+ * [ IN] tPvHandle Camera,                      Handle to the camera \r
+ * [ IN] unsigned long Address,                 Address\r
+ * [ IN] unsigned long Size,                    Size of write in bytes; must\r
+ *                                                be a multiple of 4\r
+ * [ IN] const unsigned char* pDataBuffer,      Data buffer, Size bytes long\r
+ * [OUT] unsigned long* pSizeComplete,          Number of bytes successfully\r
+ *                                                written; if an error occurs this\r
+ *                                                is less than Size; may be\r
+ *                                                NULL\r
+ *\r
+ * Return:    ePvErrSuccess if no error, otherwise likely to be any of the\r
+ *            following error codes:\r
+ *              \r
+ *               ePvErrBadHandle,       the handle of the camera is invalid\r
+ *               ePvErrUnplugged,       the camera has been unplugged \r
+ *               ePvBadParameter,       Size is incorrect\r
+ *               pPvAccessDenied,       write is not permitted (or register does\r
+ *                                        not exist)\r
+ */\r
+tPvErr PVDECL _Pv_Factory_Test_13(tPvHandle Camera,\r
+                                  unsigned long Address,\r
+                                  unsigned long Size,\r
+                                  const unsigned char* pDataBuffer,\r
+                                  unsigned long* pSizeComplete);\r
+\r
+\r
+//===== DATA ==================================================================\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif // PVREGIO_H_INCLUDE\r
+\r