PvApi.h
Go to the documentation of this file.
00001 /*
00002 |==============================================================================
00003 | Copyright (C) 2006-2011 Allied Vision Technologies.  All Rights Reserved.
00004 |
00005 | Redistribution of this header file, in original or modified form, without
00006 | prior written consent of Allied Vision Technologies is prohibited.
00007 |
00008 |=============================================================================
00009 |
00010 | File:         PvApi.h
00011 |
00012 | Project/lib:  PvAPI
00013 |
00014 | Targets:      Win32, Linux, QNX, OSX
00015 |
00016 | Description:  Main header file for PvAPI, the programming interface for
00017 |               Prosilica Series and Manta cameras.
00018 |
00019 |
00020 |------------------------------------------------------------------------------
00021 |
00022 | Example basic functions:
00023 |
00024 |       PvInitialize()          - load and initialize the PvApi module
00025 |       PvUnInitialize()        - shut down the module
00026 |
00027 |       PvCameraList()          - list the cameras available
00028 |
00029 |       PvCameraOpen()          - open & close your cameras
00030 |       PvCameraClose()
00031 |
00032 |       PvCaptureStart()        - start & end image capture
00033 |       PvCaptureEnd()
00034 |
00035 |       PvCaptureQueueFrame()   - queue a frame buffer for image capture
00036 |
00037 |       PvCaptureQueueClear()   - clear all frames off the queue (i.e. abort)
00038 |
00039 |       PvAttrList()            - list all attributes for this camera
00040 |       PvAttrInfo()            - get information on an attribute
00041 |
00042 | Example basic attributes:
00043 |
00044 |       Width              - Uint32 - RW : image width in pixels
00045 |       Height             - Uint32 - RW : image height in pixels
00046 |       PixelFormat        - Enum   - RW : image data format. Eg. mono8, mono16
00047 |       TotalBytesPerFrame - Uint32 - R  : number of bytes per image
00048 |       ExposureValue      - Uint32 - RW : camera exposure time
00049 |
00050 | See AVT "GigE Camera and Driver Attributes" document for full attribute description
00051 |
00052 |==============================================================================
00053 |
00054 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
00055 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
00056 | NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE
00057 | DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00058 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00059 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
00060 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF
00061 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00062 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00063 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00064 |
00065 |==============================================================================
00066 | dd/mon/yy     Notes
00067 |------------------------------------------------------------------------------
00068 | 27/Jun/05     Original.
00069 | 04/Jun/07     Licence changes
00070 | 27/Jun/07     Added function PvCaptureAdjustPacketSize
00071 | 09/Jul/07     Added error code ePvErrFirewall
00072 | 17/Aug/07     Added new pixel formats
00073 | 26/Feb/09     Release 1.22
00074 | 05/Apr/10     Added support for int64 and boolean attributes
00075 | 03/May/11     Added FrameCount, AncillaryBuffer notes
00076 |==============================================================================
00077 */
00078 
00079 #ifndef PVAPI_H_INCLUDE
00080 #define PVAPI_H_INCLUDE
00081 
00082 #ifdef __cplusplus
00083 extern "C" {
00084 #endif
00085 
00086 //===== INCLUDE FILES =========================================================
00087 
00088 //===== #DEFINES ==============================================================
00089 
00090 #ifndef PVDECL
00091         #ifdef _MSC_VER
00092                 #define PVDECL           __stdcall
00093         #else
00094                 #if defined(_LINUX) || defined(_QNX) || defined(_OSX)
00095                         #define PVDECL
00096                 #else
00097                         #error Define PVDECL to be your compiler keyword for "standard call"
00098                 #endif
00099         #endif
00100 #endif
00101 
00102 #define PVINFINITE      0xFFFFFFFF  // Never timeout
00103 
00104 
00105 //===== TYPE DEFINITIONS ======================================================
00106 
00107 typedef void*           tPvHandle;  // Camera handle
00108 
00109 
00110 //
00111 // Error codes, returned by most functions:
00112 //
00113 typedef enum
00114 {
00115     ePvErrSuccess       = 0,        // No error
00116     ePvErrCameraFault   = 1,        // Unexpected camera fault
00117     ePvErrInternalFault = 2,        // Unexpected fault in PvApi or driver
00118     ePvErrBadHandle     = 3,        // Camera handle is invalid
00119     ePvErrBadParameter  = 4,        // Bad parameter to API call
00120     ePvErrBadSequence   = 5,        // Sequence of API calls is incorrect
00121     ePvErrNotFound      = 6,        // Camera or attribute not found
00122     ePvErrAccessDenied  = 7,        // Camera cannot be opened in the specified mode
00123     ePvErrUnplugged     = 8,        // Camera was unplugged
00124     ePvErrInvalidSetup  = 9,        // Setup is invalid (an attribute is invalid)
00125     ePvErrResources     = 10,       // System/network resources or memory not available
00126     ePvErrBandwidth     = 11,       // 1394 bandwidth not available
00127     ePvErrQueueFull     = 12,       // Too many frames on queue
00128     ePvErrBufferTooSmall= 13,       // Frame buffer is too small
00129     ePvErrCancelled     = 14,       // Frame cancelled by user
00130     ePvErrDataLost      = 15,       // The data for the frame was lost
00131     ePvErrDataMissing   = 16,       // Some data in the frame is missing
00132     ePvErrTimeout       = 17,       // Timeout during wait
00133     ePvErrOutOfRange    = 18,       // Attribute value is out of the expected range
00134     ePvErrWrongType     = 19,       // Attribute is not this type (wrong access function) 
00135     ePvErrForbidden     = 20,       // Attribute write forbidden at this time
00136     ePvErrUnavailable   = 21,       // Attribute is not available at this time
00137     ePvErrFirewall      = 22,       // A firewall is blocking the traffic (Windows only)
00138     __ePvErr_force_32   = 0xFFFFFFFF
00139 
00140 } tPvErr;
00141 
00142 
00143 //----- Camera Enumeration & Information --------------------------------------
00144 
00145 //
00146 // Camera access mode.  Used as flags in tPvCameraInfo data, and as the access
00147 // mode in PvOpenCamera().
00148 //
00149 typedef enum
00150 {
00151     ePvAccessMonitor        = 2, // Monitor access: no control, read & listen only
00152     ePvAccessMaster         = 4, // Master access: full control
00153     __ePvAccess_force_32    = 0xFFFFFFFF
00154 
00155 } tPvAccessFlags;
00156 
00157 
00158 //
00159 // Camera interface type (i.e. firewire, ethernet):
00160 //
00161 typedef enum
00162 {
00163     ePvInterfaceFirewire    = 1,
00164     ePvInterfaceEthernet    = 2,
00165     __ePvInterface_force_32 = 0xFFFFFFFF
00166 
00167 } tPvInterface;
00168 
00169 
00170 //
00171 // Camera information type (extended)
00172 //
00173 typedef struct
00174 {
00175     unsigned long       StructVer;               // Version of this structure
00176     //---- Version 1 ----
00177     unsigned long       UniqueId;            // Unique value for each camera
00178     char                CameraName[32];      // People-friendly camera name (usually part name)
00179     char                ModelName[32];       // Name of camera part
00180     char                PartNumber[32];      // Manufacturer's part number
00181     char                SerialNumber[32];    // Camera's serial number
00182     char                FirmwareVersion[32]; // Camera's firmware version
00183     unsigned long       PermittedAccess;     // A combination of tPvAccessFlags
00184     unsigned long       InterfaceId;         // Unique value for each interface or bus
00185     tPvInterface        InterfaceType;       // Interface type; see tPvInterface
00186 
00187 } tPvCameraInfoEx;
00188 
00189 //
00190 // Camera information type (deprecated)
00191 //
00192 typedef struct
00193 {
00194     unsigned long       UniqueId;         // Unique value for each camera
00195     char                SerialString[32]; // Camera's serial number
00196     unsigned long       PartNumber;       // Camera part number
00197     unsigned long       PartVersion;      // Camera part version
00198     unsigned long       PermittedAccess;  // A combination of tPvAccessFlags
00199     unsigned long       InterfaceId;      // Unique value for each interface or bus
00200     tPvInterface        InterfaceType;    // Interface type; see tPvInterface
00201     char                DisplayName[16];  // People-friendly camera name
00202     unsigned long       _reserved[4];     // Always zero
00203 
00204 } tPvCameraInfo;
00205 
00206 //
00207 // IP configuration mode for ethernet cameras.
00208 //
00209 typedef enum
00210 {
00211     ePvIpConfigPersistent   = 1,            // Use persistent IP settings
00212     ePvIpConfigDhcp         = 2,            // Use DHCP, fallback to AutoIP
00213     ePvIpConfigAutoIp       = 4,            // Use AutoIP only
00214     __ePvIpConfig_force_32  = 0xFFFFFFFF
00215 
00216 } tPvIpConfig;
00217 
00218 
00219 //
00220 // Structure used for PvCameraIpSettingsGet() and PvCameraIpSettingsChange().
00221 //
00222 typedef struct
00223 {
00224     // IP configuration mode: persistent, DHCP & AutoIp, or AutoIp only.
00225     tPvIpConfig         ConfigMode;
00226     // IP configuration mode supported by the camera
00227     unsigned long       ConfigModeSupport;
00228 
00229     // Current IP configuration.  Ignored for PvCameraIpSettingsChange().  All
00230     // values are in network byte order (i.e. big endian).
00231     unsigned long       CurrentIpAddress;
00232     unsigned long       CurrentIpSubnet;
00233     unsigned long       CurrentIpGateway;
00234 
00235     // Persistent IP configuration.  See "ConfigMode" to enable persistent IP
00236     // settings.  All values are in network byte order.
00237     unsigned long       PersistentIpAddr;
00238     unsigned long       PersistentIpSubnet;
00239     unsigned long       PersistentIpGateway;
00240 
00241     unsigned long       _reserved1[8];
00242 
00243 } tPvIpSettings;
00244 
00245 
00246 //----- Interface-Link Callback -----------------------------------------------
00247 
00248 //
00249 // Link (aka interface) event type
00250 //
00251 typedef enum
00252 {
00253     ePvLinkAdd          = 1, // camera first detected after PvInitialize 
00254     ePvLinkRemove       = 2, // camera removed
00255     _ePvLink_reserved1  = 3, 
00256     __ePvLink_force_32  = 0xFFFFFFFF
00257 
00258 } tPvLinkEvent;
00259 
00260 
00261 //
00262 // Link (aka interface) event Callback type
00263 //
00264 // Arguments:
00265 //
00266 //  [i] void* Context,          Context, as provided to PvLinkCallbackRegister
00267 //  [i] tPvInterface Interface, Interface on which the event occurred
00268 //  [i] tPvLinkEvent Event,     Event which occurred
00269 //  [i] unsigned long UniqueId, Unique ID of the camera related to the event
00270 //
00271 typedef void (PVDECL *tPvLinkCallback)(void* Context,
00272                                        tPvInterface Interface,
00273                                        tPvLinkEvent Event,
00274                                        unsigned long UniqueId);
00275 
00276 //----- Camera-Event Callback -----------------------------------------------
00277 
00278 //
00279 // Camera event type
00280 //
00281 typedef struct
00282 {
00283     unsigned long EventId;      // Event ID
00284     unsigned long TimestampLo;  // Time stamp, lower 32-bits
00285     unsigned long TimestampHi;  // Time stamp, upper 32-bits
00286     unsigned long Data[4];      // Event data
00287     const void*   ExtraData;    // Event extra-data (NULL if none)
00288 
00289 } tPvCameraEvent;
00290 
00291 //
00292 // Camera-event Callback type
00293 //
00294 // Arguments:
00295 //
00296 //  [i] void* Context,                     Context, as provided to PvEventCallbackRegister
00297 //  [i] tPvHandle Camera,                  Handle of camera which sent the event
00298 //  [i] const tPvCameraEvent* EventList,   First event in list.  This list exists only for
00299 //                                         the duration of the callback.  If you need it, copy it!
00300 //  [i] unsigned long EventListLength      Number of events in EventList
00301 //
00302 typedef void (PVDECL *tPvCameraEventCallback)(void* Context,
00303                                               tPvHandle Camera,
00304                                               const tPvCameraEvent* EventList,
00305                                               unsigned long EventListLength);
00306 
00307 //----- Image Capture ---------------------------------------------------------
00308 
00309 //
00310 // Frame image format type
00311 //
00312 typedef enum
00313 {
00314     ePvFmtMono8         = 0,            // Monochrome, 8 bits
00315     ePvFmtMono16        = 1,            // Monochrome, 16 bits, data is LSB aligned
00316     ePvFmtBayer8        = 2,            // Bayer-color, 8 bits
00317     ePvFmtBayer16       = 3,            // Bayer-color, 16 bits, data is LSB aligned
00318     ePvFmtRgb24         = 4,            // RGB, 8 bits x 3
00319     ePvFmtRgb48         = 5,            // RGB, 16 bits x 3, data is LSB aligned
00320     ePvFmtYuv411        = 6,            // YUV 411
00321     ePvFmtYuv422        = 7,            // YUV 422
00322     ePvFmtYuv444        = 8,            // YUV 444
00323     ePvFmtBgr24         = 9,            // BGR, 8 bits x 3
00324     ePvFmtRgba32        = 10,           // RGBA, 8 bits x 4
00325     ePvFmtBgra32        = 11,           // BGRA, 8 bits x 4
00326     ePvFmtMono12Packed  = 12,           // Monochrome, 12 bits, 
00327     ePvFmtBayer12Packed = 13,           // Bayer-color, 12 bits, packed
00328     __ePvFmt_force_32   = 0xFFFFFFFF
00329 
00330 } tPvImageFormat;
00331 
00332 
00333 //
00334 // Bayer pattern.  Applicable when a Bayer-color camera is sending raw bayer
00335 // data.
00336 //
00337 typedef enum
00338 {
00339     ePvBayerRGGB        = 0,            // First line RGRG, second line GBGB...
00340     ePvBayerGBRG        = 1,            // First line GBGB, second line RGRG...
00341     ePvBayerGRBG        = 2,            // First line GRGR, second line BGBG...
00342     ePvBayerBGGR        = 3,            // First line BGBG, second line GRGR...
00343     __ePvBayer_force_32 = 0xFFFFFFFF
00344 
00345 } tPvBayerPattern;
00346 
00347 
00348 //
00349 // The frame structure passed to PvQueueFrame().
00350 // NOTE: Memset structure to 0 when allocated. 
00351 //       Prosilica filter driver reads AncillaryBuffer pointer.  
00352 //       If pointer location random/invalid this will cause issues. 
00353 //
00354 typedef struct
00355 {
00356     //----- In -----
00357     void*               ImageBuffer;        // Buffer for image/pixel data.
00358     unsigned long       ImageBufferSize;    // Size of ImageBuffer in bytes
00359 
00360     void*               AncillaryBuffer;    // Camera Firmware >= 1.42 Only.
00361                                             // Buffer to capture ancillary chunk mode data. See ChunkModeActive attr.
00362                                             // This MUST be 0 if not in use.
00363                                             // Chunk mode format:
00364                                             //     [Bytes 1 - 4]   acquisition count.
00365                                             //     [Bytes 5 - 8]   user value. Not currently implemented. 0.
00366                                             //     [Bytes 9 - 12]  exposure value.
00367                                             //     [Bytes 13 - 16] gain value.
00368                                             //     [Bytes 17 - 18] sync in levels.
00369                                             //     [Bytes 19 - 20] sync out levels.
00370                                             //     [Bytes 21 - 40] not implemented. 0.
00371                                             //     [Bytes 41 - 44] chunk ID. 1000.
00372                                             //     [Bytes 45 - 48] chunk length.
00373 
00374     unsigned long       AncillaryBufferSize;// Size of your ancillary buffer in bytes. See NonImagePayloadSize attr.
00375                                             //   Set to 0 for no buffer.
00376 
00377     void*               Context[4];         // For your use. Possible application: unique ID
00378                                             //   of tPvFrame for frame-done callback.
00379     unsigned long       _reserved1[8];
00380 
00381     //----- Out -----
00382 
00383     tPvErr              Status;             // Status of this frame
00384 
00385     unsigned long       ImageSize;          // Image size, in bytes
00386     unsigned long       AncillarySize;      // Ancillary data size, in bytes
00387 
00388     unsigned long       Width;              // Image width
00389     unsigned long       Height;             // Image height
00390     unsigned long       RegionX;            // Start of readout region (left)
00391     unsigned long       RegionY;            // Start of readout region (top)
00392     tPvImageFormat      Format;             // Image format
00393     unsigned long       BitDepth;           // Number of significant bits
00394     tPvBayerPattern     BayerPattern;       // Bayer pattern, if bayer format
00395 
00396     unsigned long       FrameCount;         // Frame counter. Uses 16bit GigEVision BlockID. Rolls at 65535.
00397     unsigned long       TimestampLo;        // Time stamp, lower 32-bits
00398     unsigned long       TimestampHi;        // Time stamp, upper 32-bits
00399 
00400     unsigned long       _reserved2[32];
00401 
00402 } tPvFrame;
00403 
00404 
00405 //
00406 // Frame Callback type
00407 //
00408 // Arguments:
00409 //
00410 //  [i] tPvFrame* Frame, Frame completed
00411 //
00412 typedef void (PVDECL *tPvFrameCallback)(tPvFrame* Frame);
00413 
00414 
00415 //----- Attributes ------------------------------------------------------------
00416 
00417 
00418 #if defined(_M_IX86) || defined(_x86) || defined(_WIN64) || defined(_x64)
00419 typedef long            tPvInt32;   // 32-bit signed integer
00420 typedef unsigned long   tPvUint32;  // 32-bit unsigned integer
00421 typedef float           tPvFloat32; // IEEE 32-bit float
00422 typedef long long       tPvInt64;   // 64-bit signed integer
00423 typedef unsigned char   tPvBoolean; // boolean
00424 #elif defined(_ppc) || defined(_arm) || defined(_msa)
00425 typedef long            tPvInt32;   // 32-bit integer
00426 typedef unsigned long   tPvUint32;  // 32-bit unsigned integer
00427 typedef float           tPvFloat32; // IEEE 32-bit float
00428 typedef long long       tPvInt64;   // 64-bit signed integer
00429 typedef unsigned char   tPvBoolean; // boolean
00430 #else
00431 #error Define specific data types for your platform.
00432 #endif
00433 
00434 
00435 //
00436 // List of attributes, used by PvAttrList.  This is an array of string
00437 // pointers.  The array, and all the string pointers, are const.
00438 //
00439 typedef const char* const* tPvAttrListPtr;
00440 
00441 
00442 //
00443 // Attribute data type supported
00444 //
00445 typedef enum
00446 {
00447     ePvDatatypeUnknown  = 0,
00448     ePvDatatypeCommand  = 1,
00449     ePvDatatypeRaw      = 2,
00450     ePvDatatypeString   = 3,
00451     ePvDatatypeEnum     = 4,
00452     ePvDatatypeUint32   = 5,
00453     ePvDatatypeFloat32  = 6,
00454     ePvDatatypeInt64    = 7,
00455     ePvDatatypeBoolean  = 8,
00456     __ePvDatatypeforce_32= 0xFFFFFFFF
00457 
00458 } tPvDatatype;
00459 
00460 
00461 //
00462 // Attribute flags type
00463 //
00464 typedef enum
00465 {
00466     ePvFlagRead         = 0x01,     // Read access is permitted
00467     ePvFlagWrite        = 0x02,     // Write access is permitted
00468     ePvFlagVolatile     = 0x04,     // The camera may change the value any time
00469     ePvFlagConst        = 0x08,     // Value is read only and never changes
00470     __ePvFlag_force_32  = 0xFFFFFFFF
00471 
00472 } tPvAttributeFlags;
00473 
00474 
00475 //
00476 // Attribute information type
00477 //
00478 typedef struct
00479 {
00480     tPvDatatype         Datatype;       // Data type
00481     unsigned long       Flags;          // Combination of tPvAttribute flags
00482     const char*         Category;       // Advanced: see documentation
00483     const char*         Impact;         // Advanced: see documentation
00484     unsigned long       _reserved[4];   // Always zero
00485 
00486 } tPvAttributeInfo;
00487 
00488 
00489 //===== FUNCTION PROTOTYPES ===================================================
00490 
00491 //----- API Version -----------------------------------------------------------
00492 
00493 /*
00494  * Function:  PvVersion()
00495  *
00496  * Purpose:   Retreive the version number of PvAPI
00497  *
00498  * Arguments: 
00499  *
00500  * [OUT] unsigned long* pMajor, major version number
00501  * [OUT] unsigned long* pMinor, minor version number
00502  *
00503  * Return:    none
00504  *
00505  * This function can be called at anytime, including before the API is
00506  * initialized.
00507  */
00508 void PVDECL PvVersion(unsigned long* pMajor,unsigned long* pMinor);
00509 
00510 
00511 //----- API Initialization ----------------------------------------------------
00512 
00513 /*
00514  * Function:  PvInitialize()
00515  *
00516  * Purpose:   Initialize the PvApi module.  This must be called before any
00517  *            other PvApi function is run.
00518  *
00519  * Arguments: none
00520  *
00521  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00522  *            following error codes:
00523  *
00524  *               ePvErrResources,       resources requested from the OS were not
00525  *                                      available           
00526  *               ePvErrInternalFault,   an internal fault occurred
00527  */
00528 tPvErr PVDECL PvInitialize(void);
00529 
00530 /*
00531  * Function:  PvInitializeNoDiscovery()
00532  *
00533  * Purpose:   Initialize the PvApi module.  This must be called before any
00534  *            other PvApi function is run. This version is intended to be used
00535  *            only when the camera discovery via broadcast is unwanted.
00536  *
00537  * Arguments: none
00538  *
00539  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00540  *            following error codes:
00541  *
00542  *               ePvErrResources,       resources requested from the OS were not
00543  *                                      available           
00544  *               ePvErrInternalFault,   an internal fault occurred
00545  */
00546 tPvErr PVDECL PvInitializeNoDiscovery(void);
00547 
00548 
00549 /*
00550  * Function:  PvUnInitialize()
00551  *
00552  * Purpose:   Uninitialize the API module.  This will free some resources,
00553  *            and shut down network activity if applicable.
00554  *
00555  * Arguments: none
00556  *
00557  * Return:    none
00558  */
00559 void PVDECL PvUnInitialize(void);
00560 
00561 
00562 //----- Interface-Link Callback -----------------------------------------------
00563 
00564 /*
00565  * Function:  PvLinkCallbackRegister()
00566  *
00567  * Purpose:   Register a callback for interface events.
00568  *
00569  * Arguments:
00570  *
00571  * [ IN] tPvLinkCallback Callback, Callback function to run when an event occurs
00572  * [ IN] tPvLinkEvent Event,       Event to trigger the callback
00573  * [ IN] void* Context,            For your use: Context is passed to your
00574  *                                   callback function
00575  *
00576  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00577  *            following error codes:
00578  *
00579  *               ePvErrResources,       resources requested from the OS were not
00580  *                                      available
00581  *               ePvErrBadSequence,     API isn't initialized
00582  *
00583  * Here's the rules:
00584  *   - Multiple callback functions may be registered with the same event
00585  *   - The same callback function may be shared by different events
00586  *   - The same callback function with the same event may not be registered twice
00587  *
00588  * The callback functions are called from a thread within PvApi.  The callbacks
00589  * are sequenced; i.e. they will not be called simultaneously.
00590  *
00591  * Use PvLinkCallbackUnRegister() to stop receiving callbacks.
00592  */
00593 tPvErr PVDECL PvLinkCallbackRegister(tPvLinkCallback Callback,
00594                                      tPvLinkEvent Event,
00595                                      void* Context);
00596 
00597 
00598 /*
00599  * Function:  PvLinkCallbackUnRegister()
00600  *
00601  * Purpose:   Unregister a callback for interface events.
00602  *
00603  * Arguments:
00604  *
00605  * [ IN] tPvLinkCallback Callback, Callback function previously registered
00606  * [ IN] tPvLinkEvent Event,       Event associated with the callback
00607  *
00608  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00609  *            following error codes:
00610  *
00611  *               ePvErrNotFound,        registered callback was not found
00612  *               ePvErrResources,       resources requested from the OS were not
00613  *                                      available
00614  *               ePvErrBadSequence,     API isn't initialized
00615  */
00616 tPvErr PVDECL PvLinkCallbackUnRegister(tPvLinkCallback Callback,
00617                                        tPvLinkEvent Event);
00618 
00619 
00620 //----- Camera Enumeration & Information --------------------------------------
00621 
00622 /*
00623  * Function:  PvCameraListEx()
00624  *
00625  * Purpose:   List all the cameras currently visible to PvApi (extended)
00626  *
00627  * Arguments:
00628  *
00629  * [OUT] tPvCameraInfoEx* pList,        Array of tPvCameraInfo, allocated by
00630  *                                      the caller.  The camera list is copied here.
00631  * [ IN] unsigned long ListLength,      Length of the caller's pList array
00632  * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
00633  *                                      than ListLength!) returned here.
00634  *                                      May be NULL.
00635  * [ IN] unsigned long StructSize,      Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
00636  *
00637  * Return:    Number of pList entries filled, up to ListLength.
00638  */
00639 unsigned long PVDECL PvCameraListEx(tPvCameraInfoEx* pList,
00640                                     unsigned long ListLength,
00641                                     unsigned long* pConnectedNum,
00642                                     unsigned long StructSize);
00643 
00644 /*
00645  * Function:  PvCameraList()
00646  *
00647  * Purpose:   List all the cameras currently visible to PvApi (deprecated)
00648  *
00649  * Arguments:
00650  *
00651  * [OUT] tPvCameraInfo* pList,          Array of tPvCameraInfo, allocated by
00652  *                                        the caller.  The camera list is
00653  *                                            copied here.
00654  * [ IN] unsigned long ListLength,      Length of the caller's pList array
00655  * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
00656  *                                        than ListLength!) returned here.
00657  *                                        May be NULL.
00658  *
00659  * Return:    Number of pList entries filled, up to ListLength.
00660  */
00661 unsigned long PVDECL PvCameraList(tPvCameraInfo* pList,
00662                                   unsigned long ListLength,
00663                                   unsigned long* pConnectedNum);
00664 
00665 
00666 /*
00667  * Function:  PvCameraCount()
00668  *
00669  * Purpose:   Number of cameras visible to PvApi (at the time of the call).
00670  *            Does not include unreachable cameras.
00671  *
00672  * Arguments: none
00673  *
00674  * Return:    The number of cameras found
00675  *
00676  * The number of cameras is dynamic, and may change at any time.
00677  */
00678 unsigned long PVDECL PvCameraCount(void);
00679 
00680 /*
00681  * Function:  PvCameraInfoEx()
00682  *
00683  * Purpose:   Retreive information on a given camera (extended)
00684  *
00685  * Arguments:
00686  *
00687  * [ IN] unsigned long UniqueId,    Unique ID of the camera
00688  * [OUT] tPvCameraInfExo* pInfo,    Structure where the information will be copied
00689  * [ IN] unsigned long StructSize,  Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
00690  *
00691  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00692  *            following error codes:
00693  *
00694  *               ePvErrNotFound,        the camera was not found (unplugged)
00695  *               ePvErrUnplugged,       the camera was found but unplugged during the
00696  *                                      function call
00697  *               ePvErrBadParameter,    a valid pointer for pInfo was not supplied
00698  *               ePvErrResources,       resources requested from the OS were not
00699  *                                      available
00700  *               ePvErrInternalFault,   an internal fault occurred
00701  *               ePvErrBadSequence,     API isn't initialized
00702  */
00703 tPvErr PVDECL PvCameraInfoEx(unsigned long UniqueId,tPvCameraInfoEx* pInfo,unsigned long StructSize);
00704 
00705 /*
00706  * Function:  PvCameraInfo()
00707  *
00708  * Purpose:   Retreive information on a given camera (deprecated)
00709  *
00710  * Arguments:
00711  *
00712  * [ IN] unsigned long UniqueId,    Unique ID of the camera
00713  * [OUT] tPvCameraInfo* pInfo,      Structure where the information will be
00714  *                                    copied
00715  *
00716  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00717  *            following error codes:
00718  *
00719  *               ePvErrNotFound,        the camera was not found (unplugged)
00720  *               ePvErrUnplugged,       the camera was found but unplugged during the
00721  *                                      function call
00722  *               ePvErrBadParameter,    a valid pointer for pInfo was not supplied
00723  *               ePvErrResources,       resources requested from the OS were not
00724  *                                      available
00725  *               ePvErrInternalFault,   an internal fault occurred
00726  *               ePvErrBadSequence,     API isn't initialized
00727  */
00728 tPvErr PVDECL PvCameraInfo(unsigned long UniqueId, tPvCameraInfo* pInfo);
00729 
00730 /*
00731  * Function:  PvCameraInfoByAddrEx()
00732  *
00733  * Purpose:   Retreive information on a camera, by IP address.  This function
00734  *            is required if the ethernet camera is not on the local ethernet
00735  *            network. (extended)
00736  *
00737  * Arguments:
00738  *
00739  * [ IN] unsigned long IpAddr,          IP address of camera, in network byte order.
00740  * [OUT] tPvCameraInfo* pInfo,          The camera information will be copied here.
00741  * [OUT] tPvIpSettings* pIpSettings,    The IP settings will be copied here; NULL pointer OK.
00742  * [ IN] unsigned long StructSize,      Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
00743  *
00744  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00745  *            following error codes:
00746  *
00747  *               ePvErrNotFound,        the camera was not found
00748  *               ePvErrResources,       resources requested from the OS were not
00749  *                                      available
00750  *               ePvErrInternalFault,   an internal fault occurred
00751  *               ePvErrBadSequence,     API isn't initialized
00752  *               ePvErrBadParameter,    pIpSettings->size is invalid
00753  *
00754  * The specified camera may not be visible to PvCameraList(); it might be on a
00755  * different ethernet network.  In this case, communication with the camera is
00756  * routed to the local gateway.
00757  */
00758 tPvErr PVDECL PvCameraInfoByAddrEx(unsigned long IpAddr,
00759                                    tPvCameraInfoEx* pInfo,
00760                                    tPvIpSettings* pIpSettings,
00761                                    unsigned long StructSize);
00762 
00763 /*
00764  * Function:  PvCameraInfoByAddr()
00765  *
00766  * Purpose:   Retreive information on a camera, by IP address.  This function
00767  *            is required if the ethernet camera is not on the local ethernet
00768  *            network. (deprecated)
00769  *
00770  * Arguments:
00771  *
00772  * [ IN] unsigned long IpAddr,          IP address of camera, in network byte
00773  *                                        order.
00774  * [OUT] tPvCameraInfo* pInfo,          The camera information will be copied
00775  *                                        here.
00776  * [OUT] tPvIpSettings* pIpSettings,    The IP settings will be copied here;
00777  *                                        NULL pointer OK.
00778  *
00779  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00780  *            following error codes:
00781  *
00782  *               ePvErrNotFound,        the camera was not found
00783  *               ePvErrResources,       resources requested from the OS were not
00784  *                                      available
00785  *               ePvErrInternalFault,   an internal fault occurred
00786  *               ePvErrBadSequence,     API isn't initialized
00787  *               ePvErrBadParameter,    pIpSettings->size is invalid
00788  *
00789  * The specified camera may not be visible to PvCameraList(); it might be on a
00790  * different ethernet network.  In this case, communication with the camera is
00791  * routed to the local gateway.
00792  */
00793 tPvErr PVDECL PvCameraInfoByAddr(unsigned long IpAddr,
00794                                  tPvCameraInfo* pInfo,
00795                                  tPvIpSettings* pIpSettings);
00796 
00797 /*
00798  * Function:  PvCameraListUnreachableEx()
00799  *
00800  * Purpose:   List all the cameras currently inaccessable by PvApi.  This lists
00801  *            the ethernet cameras which are connected to the local ethernet
00802  *            network, but are on a different subnet. (extended)
00803  *
00804  * Arguments:
00805  *
00806  * [OUT] tPvCameraInfo* pList,          Array of tPvCameraInfo, allocated by
00807  *                                      the caller.  The camera list is
00808  *                                          copied here.
00809  * [ IN] unsigned long ListLength,      Length of the caller's pList array
00810  * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
00811  *                                      than ListLength!) returned here.
00812  *                                      May be NULL.
00813  * [ IN] unsigned long StructSize,      Size of tPvCameraInfoEx (sizeof(tPvCameraInfoEx))
00814  *
00815  * Return:    Number of pList entries filled, up to ListLength.
00816  */
00817 unsigned long PVDECL PvCameraListUnreachableEx(tPvCameraInfoEx* pList,
00818                                                unsigned long ListLength,
00819                                                unsigned long* pConnectedNum,
00820                                                unsigned long StructSize);
00821 
00822 
00823 /*
00824  * Function:  PvCameraListUnreachable()
00825  *
00826  * Purpose:   List all the cameras currently inaccessable by PvApi.  This lists
00827  *            the ethernet cameras which are connected to the local ethernet
00828  *            network, but are on a different subnet. (deprecated)
00829  *
00830  * Arguments:
00831  *
00832  * [OUT] tPvCameraInfo* pList,          Array of tPvCameraInfo, allocated by
00833  *                                        the caller.  The camera list is
00834  *                                            copied here.
00835  * [ IN] unsigned long ListLength,      Length of the caller's pList array
00836  * [OUT] unsigned long* pConnectedNum,  Number of cameras found (may be more
00837  *                                        than ListLength!) returned here.
00838  *                                        May be NULL.
00839  *
00840  * Return:    Number of pList entries filled, up to ListLength.
00841  */
00842 unsigned long PVDECL PvCameraListUnreachable(tPvCameraInfo* pList,
00843                                              unsigned long ListLength,
00844                                              unsigned long* pConnectedNum);
00845 
00846 
00847 //----- Opening & Closing -----------------------------------------------------
00848 
00849 /*
00850  * Function:  PvCameraOpen()
00851  *
00852  * Purpose:   Open the specified camera.  This function must be called before
00853  *            you can control the camera.
00854  *
00855  * Arguments:
00856  *
00857  * [ IN] unsigned long UniqueId,    UniqueId of the camera
00858  * [ IN] tPvAccessFlags AccessFlag, Access flag {monitor, master}
00859  * [OUT] tPvHandle* pCamera,        Handle to the opened camera returned here
00860  *
00861  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00862  *            following error codes:
00863  *
00864  *               ePvErrAccessDenied,    the camera couldn't be open in the requested mode
00865  *               ePvErrNotFound,        the camera was not found (unplugged)
00866  *               ePvErrUnplugged,       the camera was found but unplugged during the
00867  *                                      function call
00868  *               ePvErrBadParameter,    a valid pointer for pCamera was not supplied
00869  *               ePvErrResources,       resources requested from the OS were not
00870  *                                      available
00871  *               ePvErrInternalFault,   an internal fault occurred
00872  *               ePvErrBadSequence,     API isn't initialized or camera is alreay open
00873  *
00874  * If ePvErrSuccess is returned, you must eventually call PvCameraClose().
00875  *
00876  * Alternatively, under special circumstances, you might open an ethernet
00877  * camera with PvCameraOpenByAddr().
00878  */
00879 tPvErr PVDECL PvCameraOpen(unsigned long UniqueId,
00880                            tPvAccessFlags AccessFlag,
00881                            tPvHandle* pCamera);
00882 
00883 /*
00884  * Function:  PvCameraOpenByAddr()
00885  *
00886  * Purpose:   Open the specified camera, by IP address.  This function is
00887  *            required, in place of PvCameraOpen(), if the ethernet camera
00888  *            is not on the local ethernet network.
00889  *
00890  * Arguments:
00891  *
00892  * [ IN] unsigned long IpAddr,          IP address of camera, in network byte
00893  *                                        order.
00894  * [ IN] tPvAccessFlags AccessFlag,     Access flag {monitor, master}
00895  * [OUT] tPvHandle* pCamera,            Handle to the opened camera returned here
00896  *
00897  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00898  *            following error codes:
00899  *
00900  *               ePvErrAccessDenied,    the camera couldn't be open in the requested mode
00901  *               ePvErrNotFound,        the camera was not found (unplugged)
00902  *               ePvErrUnplugged,       the camera was found but unplugged during the
00903  *                                      function call
00904  *               ePvErrBadParameter,    a valid pointer for pCamera was not supplied
00905  *               ePvErrResources,       resources requested from the OS were not
00906  *                                      available
00907  *               ePvErrInternalFault,   an internal fault occurred
00908  *               ePvErrBadSequence,     API isn't initialized or camera is alreay open
00909  *
00910  * If ePvErrSuccess is returned, you must eventually call PvCameraClose().
00911  *
00912  * The specified camera may not be visible to PvCameraList(); it might be on a
00913  * different ethernet network.  In this case, communication with the camera is
00914  * routed to the local gateway.
00915  */
00916 tPvErr PVDECL PvCameraOpenByAddr(unsigned long IpAddr,
00917                                  tPvAccessFlags AccessFlag,
00918                                  tPvHandle* pCamera);
00919 
00920 /*
00921  * Function:  PvCameraClose()
00922  *
00923  * Purpose:   Close the specified camera.
00924  *
00925  * Arguments:
00926  *
00927  * [ IN] tPvHandle Camera,      Handle of an opened camera
00928  *
00929  * Return:    ePvErrBadHandle if the handle is bad, otherwise likely to be any of the
00930  *            following error codes:
00931  *
00932  *               ePvErrBadHandle,    the handle of the camera is invalid
00933  *               ePvErrBadSequence,  API isn't initialized
00934  *
00935  */
00936 tPvErr PVDECL PvCameraClose(tPvHandle Camera);
00937 
00938 
00939 /*
00940  * Function:  PvCameraIpSettingsGet()
00941  *
00942  * Purpose:   Get IP settings for an ethernet camera.  This command will work
00943  *            for all cameras on the local ethernet network, including
00944  *            "unreachable" cameras.
00945  *
00946  * Arguments:
00947  *
00948  * [ IN] unsigned long UniqueId,    UniqueId of the camera
00949  * [OUT] tPvIpSettings* pSettings,  Camera settings are copied here
00950  *
00951  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00952  *            following error codes:
00953  *
00954  *               ePvErrNotFound,        the camera was not found (or is not
00955  *                                      an ethernet camera)
00956  *               ePvErrInternalFault,   an internal fault occurred
00957  *               ePvErrBadSequence,     API isn't initialized
00958  *               ePvBadParameter,       pSettings->size is incorrect
00959  *
00960  * The camera does not have to be opened to run this command.
00961  */
00962 tPvErr PVDECL PvCameraIpSettingsGet(unsigned long UniqueId,
00963                                     tPvIpSettings* pSettings);
00964 
00965 
00966 /*
00967  * Function:  PvCameraIpSettingsChange()
00968  *
00969  * Purpose:   Change the IP settings for an ethernet camera.  This command
00970  *            will work for all cameras on the local ethernet network,
00971  *            including "unreachable" cameras.
00972  *
00973  * Arguments:
00974  *
00975  * [ IN] unsigned long UniqueId,            UniqueId of the camera
00976  * [ IN] const tPvIpSettings* pSettings,    New camera settings
00977  *
00978  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
00979  *            following error codes:
00980  *
00981  *               ePvErrNotFound,        the camera was not found
00982  *               ePvErrAccessDenied,    the camera was already open
00983  *               ePvErrInternalFault,   an internal fault occurred
00984  *               ePvErrBadSequence,     API isn't initialized
00985  *               ePvBadParameter,       pSettings->size is incorrect
00986  *
00987  * This command will fail if any application on any host has opened the camera.
00988  */
00989 tPvErr PVDECL PvCameraIpSettingsChange(unsigned long UniqueId,
00990                                        const tPvIpSettings*     pSettings);
00991 
00992 
00993 //----- Image Capture ---------------------------------------------------------
00994 
00995 /*
00996  * Function:  PvCaptureStart()
00997  *
00998  * Purpose:   Setup the camera interface for image transfer.  This does not
00999  *            necessarily start acquisition.
01000  *
01001  * Arguments:
01002  *
01003  * [ IN] tPvHandle Camera,      Handle to the camera 
01004  *
01005  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01006  *            following error codes:
01007  *              
01008  *               ePvErrBadHandle,       the handle of the camera is invalid
01009  *               ePvErrUnplugged,       the camera has been unplugged 
01010  *               ePvErrResources,       resources requested from the OS were not
01011  *                                      available
01012  *               ePvErrInternalFault,   an internal fault occurred
01013  *               ePvErrBadSequence,     API isn't initialized or capture already started
01014  *
01015  * PvCaptureStart() must be run before PvCaptureQueueFrame() is allowed.  But
01016  * the camera will not acquire images before the AcquisitionMode attribute is
01017  * set to a non-idle mode.
01018  */
01019 tPvErr PVDECL PvCaptureStart(tPvHandle Camera);
01020 
01021 
01022 /*
01023  * Function:  PvCaptureEnd()
01024  *
01025  * Purpose:   Disable the image transfer mechanism.
01026  *
01027  * Arguments:
01028  *
01029  * [ IN] tPvHandle Camera,      Handle to the camera 
01030  *
01031  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01032  *            following error codes:
01033  *              
01034  *               ePvErrBadHandle,       the handle of the camera is invalid
01035  *               ePvErrInternalFault,   an internal fault occurred
01036  *               ePvErrBadSequence,     API isn't initialized or capture already stopped
01037  *
01038  * This cannot be called until the frame queue is empty.
01039  */
01040 tPvErr PVDECL PvCaptureEnd(tPvHandle Camera);
01041 
01042 
01043 /*
01044  * Function:  PvCaptureQuery()
01045  *
01046  * Purpose:   Check to see if a camera interface is ready to transfer images.
01047  *            I.e. has PvCaptureStart() been called?
01048  *
01049  * Arguments:
01050  *
01051  * [ IN] tPvHandle Camera,          Handle to the camera 
01052  * [OUT] unsigned long* pIsStarted, Result returned here: 1=started, 0=disabled
01053  *
01054  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01055  *            following error codes:
01056  *              
01057  *               ePvErrBadHandle,       the handle of the camera is invalid
01058  *               ePvBadParameter,       a valid pointer for pIsStarted was not supplied
01059  *               ePvErrInternalFault,   an internal fault occurred
01060  *               ePvErrBadSequence,     API isn't initialized
01061  */
01062 tPvErr PVDECL PvCaptureQuery(tPvHandle Camera, unsigned long* pIsStarted);
01063 
01064 /*
01065  * Function:  PvCaptureAdjustPacketSize()
01066  *
01067  * Purpose:   Determine the maximum packet size supported by the system.
01068  *
01069  * Arguments:
01070  *
01071  * [ IN] tPvHandle Camera,                   Handle to the camera 
01072  * [ IN] unsigned long MaximumPacketSize     Upper limit: the packet size will
01073  *                                             not be set higher than this value.
01074  *
01075  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01076  *            following error codes:
01077  *              
01078  *               ePvErrBadHandle,       the handle of the camera is invalid
01079  *               ePvErrUnplugged,       the camera has been unplugged 
01080  *               ePvErrResources,       resources requested from the OS were not
01081  *                                      available
01082  *               ePvErrInternalFault,   an internal fault occurred
01083  *               ePvErrBadSequence,     API isn't initialized or capture already started
01084  *
01085  * The maximum packet size can be limited by the camera, host adapter, and
01086  * ethernet switch.
01087  *
01088  * PvCaptureAdjustPacketSize() cannot be run when capture has started.
01089  */
01090 tPvErr PVDECL PvCaptureAdjustPacketSize(tPvHandle Camera,unsigned long MaximumPacketSize);
01091 
01092 /*
01093  * Function:  PvCaptureQueueFrame()
01094  *
01095  * Purpose:   Queue a frame buffer for image capture.
01096  *
01097  * Arguments:
01098  *
01099  * [ IN] tPvHandle Camera,          Handle to the camera 
01100  * [ IN] tPvFrame* pFrame,          Frame to queue
01101  * [ IN] tPvFrameCallback Callback, Callback to run when the frame is done;
01102  *                                    may be NULL for no callback
01103  *
01104  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01105  *            following error codes:
01106  *              
01107  *               ePvErrBadHandle,       the handle of the camera is invalid
01108  *               ePvErrUnplugged,       the camera has been unplugged 
01109  *               ePvErrQueueFull,       the frame queue is full
01110  *               ePvErrResources,       resources requested from the OS were not
01111  *                                      available
01112  *               ePvErrInternalFault,   an internal fault occurred
01113  *               ePvErrBadSequence,     API isn't initialized or capture not started
01114  *
01115  * This function returns immediately.  If ePvErrSuccess is returned, the frame
01116  * will remain in the queue until it is complete, or aborted due to an error or
01117  * a call to PvCaptureQueueClear().
01118  *
01119  * Frames are completed (or aborted) in the order they are queued.
01120  *
01121  * You can specify a callback function (the "frame-done callback") to occur
01122  * when the frame is complete, or you can use PvCaptureWaitForFrameDone() to
01123  * block until the frame is complete.
01124  *
01125  * When the frame callback starts, the tPvFrame data structure is no longer in
01126  * use and you are free to do with it as you please (for example, reuse or
01127  * deallocation.)
01128  *
01129  * Each frame on the queue must have a unique tPvFrame data structure.
01130  */
01131 tPvErr PVDECL PvCaptureQueueFrame(tPvHandle Camera,
01132                                   tPvFrame* pFrame,
01133                                   tPvFrameCallback Callback);
01134 
01135 
01136 /*
01137  * Function:  PvCaptureQueueClear()
01138  *
01139  * Purpose:   Empty the frame queue.
01140  *
01141  * Arguments:
01142  *
01143  * [ IN] tPvHandle Camera,          Handle to the camera 
01144  *
01145  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01146  *            following error codes:
01147  *              
01148  *               ePvErrBadHandle,       the handle of the camera is invalid
01149  *               ePvErrInternalFault,   an internal fault occurred
01150  *               ePvErrBadSequence,     API isn't initialized
01151  *
01152  * Queued frames are returned with status ePvErrCancelled.
01153  *
01154  * PvCaptureQueueClear() cannot be called from the frame-done callback.
01155  *
01156  * When this function returns, no more frames are left on the queue and you
01157  * will not receive another frame callback.
01158  */
01159 tPvErr PVDECL PvCaptureQueueClear(tPvHandle Camera);
01160 
01161 
01162 /*
01163  * Function:  PvCaptureWaitForFrameDone()
01164  *
01165  * Purpose:   Wait for a frame capture to complete.
01166  *
01167  * Arguments:
01168  *
01169  * [ IN] tPvHandle Camera,          Handle to the camera 
01170  * [ IN] tPvFrame* pFrame,          Frame to wait upon
01171  * [ IN] unsigned long Timeout,     Wait timeout (in milliseconds); use
01172  *                                    PVINFINITE for no timeout
01173  *
01174  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01175  *            following error codes:
01176  *              
01177  *               ePvErrTimeout,         timeout while waiting for the frame
01178  *               ePvErrBadHandle,       the handle of the camera is invalid
01179  *               ePvErrInternalFault,   an internal fault occurred
01180  *               ePvErrBadSequence,     API isn't initialized
01181  *
01182  * This function cannot be called from the frame-done callback.
01183  * 
01184  * When this function returns, the frame structure is no longer in use and you
01185  * are free to do with it as you please (for example, reuse or deallocation).
01186  *
01187  * If you are using the frame-done callback: this function might return first,
01188  * or the frame callback might be called first.
01189  *
01190  * If the specified frame is not on the queue, this function returns
01191  * ePvErrSuccess, since we do not know if the frame just left the queue.
01192  */
01193 tPvErr PVDECL PvCaptureWaitForFrameDone(tPvHandle Camera,
01194                                         const tPvFrame* pFrame,
01195                                         unsigned long Timeout);
01196 
01197 
01198 //----- Attributes ------------------------------------------------------------
01199 
01200 /*
01201  * Function:  PvAttrList()
01202  *
01203  * Purpose:   List all the attributes for a given camera.
01204  *
01205  * Arguments:
01206  *
01207  * [ IN] tPvHandle Camera,          Handle to the camera
01208  * [OUT] tPvAttrListPtr* pListPtr   Pointer to the attribute list is returned
01209  *                                    here.  The attribute list is valid until
01210  *                                    the camera is closed.
01211  * [OUT] unsigned long* pLength     Length of the list is returned here.  The
01212  *                                    length never changes while the camera
01213  *                                    remains opened.
01214  *
01215  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01216  *            following error codes:
01217  *              
01218  *               ePvErrBadHandle,       the handle of the camera is invalid
01219  *               ePvErrUnplugged,       the camera has been unplugged 
01220  *               ePvBadParameter,       a valid pointer for pListPtr was not supplied
01221  *               ePvErrInternalFault,   an internal fault occurred
01222  *               ePvErrBadSequence,     API isn't initialized
01223  *
01224  * The attribute list is contained in memory allocated by the PvApi module.
01225  * This memory remains static until the camera is closed.
01226  */
01227 tPvErr PVDECL PvAttrList(tPvHandle Camera,
01228                          tPvAttrListPtr* pListPtr,
01229                          unsigned long* pLength);
01230 
01231 
01232 /*
01233  * Function:  PvAttrInfo()
01234  *
01235  * Purpose:   Retrieve information on an attribute.  This information is
01236  *            static for each camera.
01237  *
01238  * Arguments:
01239  *
01240  * [ IN] tPvHandle Camera,          Handle to the camera 
01241  * [ IN] const char* Name,          Attribute name 
01242  * [OUT] tPvAttributeInfo* pInfo,   The information is copied here
01243  *
01244  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01245  *            following error codes:
01246  *              
01247  *               ePvErrBadHandle,       the handle of the camera is invalid
01248  *               ePvErrUnplugged,       the camera has been unplugged 
01249  *               ePvErrNotFound,        the requested attribute doesn't exist
01250  *               ePvBadParameter,       a valid pointer for pInfo was not supplied
01251  *               ePvErrInternalFault,   an internal fault occurred
01252  *               ePvErrBadSequence,     API isn't initialized
01253  */
01254 tPvErr PVDECL PvAttrInfo(tPvHandle Camera,
01255                          const char* Name,
01256                          tPvAttributeInfo* pInfo);
01257 
01258 
01259 /*
01260  * Function:  PvAttrExists()
01261  *
01262  * Purpose:   Check if an attribute exists for the camera.
01263  *
01264  * Arguments:
01265  *
01266  * [ IN] tPvHandle Camera,          Handle to the camera 
01267  * [ IN] const char* Name,          Attribute name
01268  *
01269  * Return:       ePvErrSuccess,         the attribute exists
01270  *               ePvErrNotFound,        the attribute does not exist
01271  *
01272  *            The following error codes may also occur:
01273  *              
01274  *               ePvErrBadHandle,       the handle of the camera is invalid
01275  *               ePvErrUnplugged,       the camera has been unplugged 
01276  *               ePvErrInternalFault,   an internal fault occurred
01277  *               ePvErrBadSequence,     API isn't initialized
01278  */
01279 tPvErr PVDECL PvAttrExists(tPvHandle Camera, const char* Name);
01280 
01281 
01282 /*
01283  * Function:  PvAttrIsAvailable()
01284  *
01285  * Purpose:   Check if an attribute is available.
01286  *
01287  * Arguments:
01288  *
01289  * [ IN] tPvHandle Camera,              Handle to the camera 
01290  * [ IN] const char* Name,              Attribute name 
01291  *
01292  * Return:       ePvErrSuccess,         the attribute is available
01293  *               ePvErrUnavailable,     the attribute is not available
01294  *
01295  *            The following error codes may also occur:
01296  *
01297  *               ePvErrBadHandle,       the handle of the camera is invalid
01298  *               ePvErrUnplugged,       the camera has been unplugged 
01299  *               ePvErrNotFound,        the requested attribute doesn't exist
01300  *               ePvErrInternalFault,   an internal fault occurred
01301  *               ePvErrBadSequence,     API isn't initialized
01302  */
01303 tPvErr PVDECL PvAttrIsAvailable(tPvHandle Camera, const char* Name);
01304 
01305 
01306 /*
01307  * Function:  PvAttrIsValid()
01308  *
01309  * Purpose:   Check if an attribute's value is valid.
01310  *
01311  * Arguments: 
01312  *
01313  * [ IN] tPvHandle Camera,          Handle to the camera 
01314  * [ IN] const char* Name,          Attribute name 
01315  *
01316  * Return:       ePvErrSuccess,         the attribute is valid
01317  *               ePvErrOutOfRange,      the attribute is not valid
01318  *
01319  *            The following error codes may also occur:
01320  *
01321  *               ePvErrBadHandle,       the handle of the camera is invalid
01322  *               ePvErrUnplugged,       the camera has been unplugged 
01323  *               ePvErrOutOfRange,      the requested attribute is not valid
01324  *               ePvErrNotFound,        the requested attribute doesn't exist
01325  *               ePvErrInternalFault,   an internal fault occurred
01326  *               ePvErrBadSequence,     API isn't initialized
01327  */
01328 tPvErr PVDECL PvAttrIsValid(tPvHandle Camera, const char* Name);
01329 
01330 
01331 /*
01332  * Function:  PvAttrRangeEnum()
01333  *
01334  * Purpose:   Get the enumeration set for an enumerated attribute.  The set is
01335  *            returned as a comma separated string containing all allowed
01336  *            values.
01337  *
01338  * Arguments:
01339  *
01340  * [ IN] tPvHandle Camera,          Handle to the camera 
01341  * [ IN] const char* Name,          Attribute name 
01342  * [OUT] char* pBuffer,             Caller-allocated buffer; the string is
01343  *                                    copied here
01344  * [ IN] unsigned long BufferSize,  Size of buffer, in bytes
01345  * [OUT] unsigned long* pSize,      Size of the enumeration set string is
01346  *                                      returned here.  This may be bigger
01347  *                                      than BufferSize!  (pSize may be NULL.)
01348  *
01349  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01350  *            following error codes:
01351  *              
01352  *               ePvErrBadHandle,       the handle of the camera is invalid
01353  *               ePvErrUnplugged,       the camera has been unplugged 
01354  *               ePvErrNotFound,        the requested attribute doesn't exist
01355  *               ePvErrWrongType,       the requested attribute is not of the correct type
01356  *               ePvBadParameter,       a valid pointer for pBuffer was not supplied
01357  *               ePvErrInternalFault,   an internal fault occurred
01358  *               ePvErrBadSequence,     API isn't initialized
01359  *
01360  * Enumeration sets must be considered dynamic.  For some attributes, the set
01361  * may change at any time.
01362  */
01363 tPvErr PVDECL PvAttrRangeEnum(tPvHandle Camera,
01364                               const char* Name,
01365                               char* pBuffer,
01366                               unsigned long BufferSize,
01367                               unsigned long* pSize);
01368 
01369 
01370 /*
01371  * Function:  PvAttrRangeUint32()
01372  *
01373  * Purpose:   Get the value range for a uint32 attribute.
01374  *
01375  * Arguments:
01376  *
01377  * [ IN] tPvHandle Camera,          Handle to the camera 
01378  * [ IN] const char* Name,          Attribute name 
01379  * [OUT] tPvUint32* pMin,           Minimum value returned here
01380  * [OUT] tPvUint32* pMax,           Maximum value returned here
01381  *
01382  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01383  *            following error codes:
01384  *              
01385  *               ePvErrBadHandle,       the handle of the camera is invalid
01386  *               ePvErrUnplugged,       the camera has been unplugged 
01387  *               ePvErrNotFound,        the requested attribute doesn't exist
01388  *               ePvErrWrongType,       the requested attribute is not of the correct type
01389  *               ePvBadParameter,       a valid pointer for pMin or pMax was not supplied
01390  *               ePvErrInternalFault,   an internal fault occurred
01391  *               ePvErrBadSequence,     API isn't initialized
01392  */
01393 tPvErr PVDECL PvAttrRangeUint32(tPvHandle Camera,
01394                                 const char* Name,
01395                                 tPvUint32* pMin,
01396                                 tPvUint32* pMax);
01397 
01398 
01399 /*
01400  * Function:  PvAttrRangeFloat32()
01401  *
01402  * Purpose:   Get the value range for a float32 attribute.
01403  *
01404  * Arguments:
01405  *
01406  * [ IN] tPvHandle Camera,          Handle to the camera 
01407  * [ IN] const char* Name,          Attribute name 
01408  * [OUT] tPvFloat32* pMin,          Minimum value returned here           
01409  * [OUT] tPvFloat32* pMax,          Maximum value returned here
01410  *
01411  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01412  *            following error codes:
01413  *              
01414  *               ePvErrBadHandle,       the handle of the camera is invalid
01415  *               ePvErrUnplugged,       the camera has been unplugged 
01416  *               ePvErrNotFound,        the requested attribute doesn't exist
01417  *               ePvErrWrongType,       the requested attribute is not of the correct type
01418  *               ePvBadParameter,       a valid pointer for pMin or pMax was not supplied
01419  *               ePvErrInternalFault,   an internal fault occurred
01420  *               ePvErrBadSequence,     API isn't initialized
01421  */
01422 tPvErr PVDECL PvAttrRangeFloat32(tPvHandle Camera,
01423                                  const char* Name,
01424                                  tPvFloat32* pMin,
01425                                  tPvFloat32* pMax);
01426 
01427 /*
01428  * Function:  PvAttrRangeInt64()
01429  *
01430  * Purpose:   Get the value range for a int64 attribute.
01431  *
01432  * Arguments:
01433  *
01434  * [ IN] tPvHandle Camera,          Handle to the camera 
01435  * [ IN] const char* Name,          Attribute name 
01436  * [OUT] tPvInt64* pMin,            Minimum value returned here
01437  * [OUT] tPvInt64* pMax,            Maximum value returned here
01438  *
01439  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01440  *            following error codes:
01441  *              
01442  *               ePvErrBadHandle,       the handle of the camera is invalid
01443  *               ePvErrUnplugged,       the camera has been unplugged 
01444  *               ePvErrNotFound,        the requested attribute doesn't exist
01445  *               ePvErrWrongType,       the requested attribute is not of the correct type
01446  *               ePvBadParameter,       a valid pointer for pMin or pMax was not supplied
01447  *               ePvErrInternalFault,   an internal fault occurred
01448  *               ePvErrBadSequence,     API isn't initialized
01449  */
01450 tPvErr PVDECL PvAttrRangeInt64(tPvHandle Camera,
01451                                const char* Name,
01452                                tPvInt64* pMin,
01453                                tPvInt64* pMax);
01454 
01455 /*
01456  * Function:  PvCommandRun()
01457  *
01458  * Purpose:   Run a specific command on the camera
01459  *
01460  * Arguments:
01461  *
01462  * [ IN] tPvHandle Camera,          Handle to the camera 
01463  * [ IN] const char* Name,          Attribute name 
01464  *
01465  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01466  *            following error codes:
01467  *              
01468  *               ePvErrBadHandle,       the handle of the camera is invalid
01469  *               ePvErrUnplugged,       the camera has been unplugged 
01470  *               ePvErrNotFound,        the requested attribute doesn't exist
01471  *               ePvErrWrongType,       the requested attribute is not of the correct type
01472  *               ePvErrInternalFault,   an internal fault occurred
01473  *               ePvErrBadSequence,     API isn't initialized
01474  */
01475 tPvErr PVDECL PvCommandRun(tPvHandle Camera, const char* Name);
01476 
01477 
01478 /*
01479  * Function:  PvAttrStringGet()
01480  *
01481  * Purpose:   Get the value of a string attribute.
01482  *
01483  * Arguments:
01484  *
01485  * [ IN] tPvHandle Camera,          Handle to the camera 
01486  * [ IN] const char* Name,          Attribute name 
01487  * [OUT] char* pBuffer,             Caller-allocated buffer; the string is
01488  *                                    copied here
01489  * [ IN] unsigned long BufferSize,  Size of buffer, in bytes
01490  * [OUT] unsigned long* pSize,      Size of the string is returned here.  This
01491  *                                    may be bigger than BufferSize!  (pSize
01492  *                                    may be NULL.)
01493  *
01494  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01495  *            following error codes:
01496  *              
01497  *               ePvErrBadHandle,       the handle of the camera is invalid
01498  *               ePvErrUnplugged,       the camera has been unplugged 
01499  *               ePvErrNotFound,        the requested attribute doesn't exist
01500  *               ePvErrWrongType,       the requested attribute is not of the correct type
01501  *               ePvBadParameter,       a valid pointer for pBuffer was not supplied
01502  *               ePvErrInternalFault,   an internal fault occurred
01503  *               ePvErrBadSequence,     API isn't initialized
01504  */
01505 tPvErr PVDECL PvAttrStringGet(tPvHandle Camera,
01506                               const char* Name,
01507                               char* pBuffer,
01508                               unsigned long BufferSize,
01509                               unsigned long* pSize);
01510 
01511 
01512 /*
01513  * Function:  PvAttrStringSet()
01514  *
01515  * Purpose:   Set the value of a string attribute.
01516  *
01517  * Arguments:
01518  *
01519  * [ IN] tPvHandle Camera,          Handle to the camera 
01520  * [ IN] const char* Name,          Attribute name 
01521  * [ IN] const char* Value,  Value to set
01522  *
01523  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01524  *            following error codes:
01525  *              
01526  *               ePvErrBadHandle,       the handle of the camera is invalid
01527  *               ePvErrUnplugged,       the camera has been unplugged 
01528  *               ePvErrNotFound,        the requested attribute doesn't exist
01529  *               ePvErrWrongType,       the requested attribute is not of the correct type
01530  *               ePvErrForbidden,       the requested attribute forbid this operation
01531  *               ePvErrInternalFault,   an internal fault occurred
01532  *               ePvErrBadSequence,     API isn't initialized
01533  */
01534 tPvErr PVDECL PvAttrStringSet(tPvHandle Camera,
01535                               const char* Name,
01536                               const char* Value);
01537 
01538 
01539 /*
01540  * Function:  PvAttrEnumGet()
01541  *
01542  * Purpose:   Get the value of an enumerated attribute.  The enumeration value
01543  *            is a string.
01544  *
01545  * Arguments:
01546  *
01547  * [ IN] tPvHandle Camera,          Handle to the camera 
01548  * [ IN] const char* Name,          Attribute name 
01549  * [OUT] char* pBuffer,             Caller-allocated buffer; the string is
01550  *                                    copied here
01551  * [ IN] unsigned long BufferSize,  Size of buffer, in bytes
01552  * [OUT] unsigned long* pSize,      Size of the string is returned here.  This
01553  *                                    may be bigger than BufferSize!  (pSize
01554  *                                    may be NULL.)
01555  *
01556  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01557  *            following error codes:
01558  *              
01559  *               ePvErrBadHandle,       the handle of the camera is invalid
01560  *               ePvErrUnplugged,       the camera has been unplugged 
01561  *               ePvErrNotFound,        the requested attribute doesn't exist
01562  *               ePvErrWrongType,       the requested attribute is not of the correct type
01563  *               ePvBadParameter,       a valid pointer for pBuffer was not supplied
01564  *               ePvErrInternalFault,   an internal fault occurred
01565  *               ePvErrBadSequence,     API isn't initialized
01566  */
01567 tPvErr PVDECL PvAttrEnumGet(tPvHandle Camera,
01568                             const char* Name,
01569                             char* pBuffer,
01570                             unsigned long BufferSize,
01571                             unsigned long* pSize);
01572 
01573 
01574 /*
01575  * Function:  PvAttrEnumSet()
01576  *
01577  * Purpose:   Set the value of an enumerated attribute.  The enumeration value
01578  *            is a string.
01579  *
01580  * Arguments:
01581  *
01582  * [ IN] tPvHandle Camera,          Handle to the camera 
01583  * [ IN] const char* Name,          Attribute name 
01584  * [ IN] const char* Value,         Value to set
01585  *
01586  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01587  *            following error codes:
01588  *              
01589  *               ePvErrBadHandle,       the handle of the camera is invalid
01590  *               ePvErrUnplugged,       the camera has been unplugged 
01591  *               ePvErrNotFound,        the requested attribute doesn't exist
01592  *               ePvErrWrongType,       the requested attribute is not of the correct type
01593  *               ePvErrForbidden,       the requested attribute forbid this operation
01594  *               ePvErrOutOfRange,      the supplied value is out of range
01595  *               ePvErrInternalFault,   an internal fault occurred
01596  *               ePvErrBadSequence,     API isn't initialized
01597  */
01598 tPvErr PVDECL PvAttrEnumSet(tPvHandle Camera,
01599                             const char* Name,
01600                             const char* Value);
01601 
01602 
01603 /*
01604  * Function:  PvAttrUint32Get()
01605  *
01606  * Purpose:   Get the value of a uint32 attribute.
01607  *
01608  * Arguments:
01609  *
01610  * [ IN] tPvHandle Camera,          Handle to the camera 
01611  * [ IN] const char* Name,          Attribute name 
01612  * [OUT] tPvUint32* pValue,         Value is returned here
01613  *
01614  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01615  *            following error codes:
01616  *              
01617  *               ePvErrBadHandle,       the handle of the camera is invalid
01618  *               ePvErrUnplugged,       the camera has been unplugged 
01619  *               ePvErrNotFound,        the requested attribute doesn't exist
01620  *               ePvErrWrongType,       the requested attribute is not of the correct type
01621  *               ePvBadParameter,       a valid pointer for pValue was not supplied
01622  *               ePvErrInternalFault,   an internal fault occurred
01623  *               ePvErrBadSequence,     API isn't initialized
01624  */
01625 tPvErr PVDECL PvAttrUint32Get(tPvHandle Camera,
01626                               const char* Name,
01627                               tPvUint32* pValue);
01628 
01629 
01630 /*
01631  * Function:  PvAttrUint32Set()
01632  *
01633  * Purpose:   Set the value of a uint32 attribute.
01634  *
01635  * Arguments:
01636  *
01637  * [ IN] tPvHandle Camera,          Handle to the camera 
01638  * [ IN] const char* Name,          Attribute name 
01639  * [ IN] tPvUint32 Value,           Value to set
01640  *
01641  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01642  *            following error codes:
01643  *              
01644  *               ePvErrBadHandle,       the handle of the camera is invalid
01645  *               ePvErrUnplugged,       the camera has been unplugged 
01646  *               ePvErrNotFound,        the requested attribute doesn't exist
01647  *               ePvErrWrongType,       the requested attribute is not of the correct type
01648  *               ePvErrForbidden,       the requested attribute forbid this operation
01649  *               ePvErrOutOfRange,      the supplied value is out of range
01650  *               ePvErrInternalFault,   an internal fault occurred
01651  *               ePvErrBadSequence,     API isn't initialized
01652  */
01653 tPvErr PVDECL PvAttrUint32Set(tPvHandle Camera,
01654                               const char* Name,
01655                               tPvUint32 Value);
01656 
01657 
01658 /*
01659  * Function:  PvAttrFloat32Get()
01660  *
01661  * Purpose:   Get the value of a float32 attribute.
01662  *
01663  * Arguments:
01664  *
01665  * [ IN] tPvHandle Camera,          Handle to the camera 
01666  * [ IN] const char* Name,          Attribute name 
01667  * [OUT] tPvFloat32* pValue,        Value is returned here
01668  *
01669  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01670  *            following error codes:
01671  *              
01672  *               ePvErrBadHandle,       the handle of the camera is invalid
01673  *               ePvErrUnplugged,       the camera has been unplugged 
01674  *               ePvErrNotFound,        the requested attribute doesn't exist
01675  *               ePvErrWrongType,       the requested attribute is not of the correct type
01676  *               ePvBadParameter,       a valid pointer for pValue was not supplied
01677  *               ePvErrInternalFault,   an internal fault occurred
01678  *               ePvErrBadSequence,     API isn't initialized
01679  */
01680 tPvErr PVDECL PvAttrFloat32Get(tPvHandle Camera,
01681                                const char* Name,
01682                                tPvFloat32* pValue);
01683 
01684 
01685 /*
01686  * Function:  PvAttrFloat32Set()
01687  *
01688  * Purpose:   Set the value of a float32 attribute.
01689  *
01690  * Arguments:
01691  *
01692  * [ IN] tPvHandle Camera,          Handle to the camera 
01693  * [ IN] const char* Name,          Attribute name 
01694  * [ IN] tPvFloat32 Value,          Value to set
01695  *
01696  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01697  *            following error codes:
01698  *              
01699  *               ePvErrBadHandle,       the handle of the camera is invalid
01700  *               ePvErrUnplugged,       the camera has been unplugged 
01701  *               ePvErrNotFound,        the requested attribute doesn't exist
01702  *               ePvErrWrongType,       the requested attribute is not of the correct type
01703  *               ePvErrForbidden,       the requested attribute forbid this operation
01704  *               ePvErrOutOfRange,      the supplied value is out of range
01705  *               ePvErrInternalFault,   an internal fault occurred
01706  *               ePvErrBadSequence,     API isn't initialized
01707  */
01708 tPvErr PVDECL PvAttrFloat32Set(tPvHandle Camera,
01709                                const char* Name,
01710                                tPvFloat32 Value);
01711 
01712 /*
01713  * Function:  PvAttrInt64Get()
01714  *
01715  * Purpose:   Get the value of a int64 attribute.
01716  *
01717  * Arguments:
01718  *
01719  * [ IN] tPvHandle Camera,          Handle to the camera 
01720  * [ IN] const char* Name,          Attribute name 
01721  * [OUT] tPvInt64* pValue,          Value is returned here
01722  *
01723  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01724  *            following error codes:
01725  *              
01726  *               ePvErrBadHandle,       the handle of the camera is invalid
01727  *               ePvErrUnplugged,       the camera has been unplugged 
01728  *               ePvErrNotFound,        the requested attribute doesn't exist
01729  *               ePvErrWrongType,       the requested attribute is not of the correct type
01730  *               ePvBadParameter,       a valid pointer for pValue was not supplied
01731  *               ePvErrInternalFault,   an internal fault occurred
01732  *               ePvErrBadSequence,     API isn't initialized
01733  */
01734 tPvErr PVDECL PvAttrInt64Get(tPvHandle Camera,
01735                              const char* Name,
01736                              tPvInt64* pValue);
01737 
01738 
01739 /*
01740  * Function:  PvAttrInt64Set()
01741  *
01742  * Purpose:   Set the value of a int64 attribute.
01743  *
01744  * Arguments:
01745  *
01746  * [ IN] tPvHandle Camera,          Handle to the camera 
01747  * [ IN] const char* Name,          Attribute name 
01748  * [ IN] tPvInt64 Value,            Value to set
01749  *
01750  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01751  *            following error codes:
01752  *              
01753  *               ePvErrBadHandle,       the handle of the camera is invalid
01754  *               ePvErrUnplugged,       the camera has been unplugged 
01755  *               ePvErrNotFound,        the requested attribute doesn't exist
01756  *               ePvErrWrongType,       the requested attribute is not of the correct type
01757  *               ePvErrForbidden,       the requested attribute forbid this operation
01758  *               ePvErrOutOfRange,      the supplied value is out of range
01759  *               ePvErrInternalFault,   an internal fault occurred
01760  *               ePvErrBadSequence,     API isn't initialized
01761  */
01762 tPvErr PVDECL PvAttrInt64Set(tPvHandle Camera,
01763                               const char* Name,
01764                               tPvInt64 Value);
01765                               
01766 /*
01767  * Function:  PvAttrBooleanGet()
01768  *
01769  * Purpose:   Get the value of a boolean attribute.
01770  *
01771  * Arguments:
01772  *
01773  * [ IN] tPvHandle Camera,          Handle to the camera 
01774  * [ IN] const char* Name,          Attribute name 
01775  * [OUT] tPvBoolean* pValue,        Value is returned here
01776  *
01777  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01778  *            following error codes:
01779  *              
01780  *               ePvErrBadHandle,       the handle of the camera is invalid
01781  *               ePvErrUnplugged,       the camera has been unplugged 
01782  *               ePvErrNotFound,        the requested attribute doesn't exist
01783  *               ePvErrWrongType,       the requested attribute is not of the correct type
01784  *               ePvBadParameter,       a valid pointer for pValue was not supplied
01785  *               ePvErrInternalFault,   an internal fault occurred
01786  *               ePvErrBadSequence,     API isn't initialized
01787  */
01788 tPvErr PVDECL PvAttrBooleanGet(tPvHandle Camera,const char* Name,tPvBoolean* pValue);
01789 
01790 
01791 /*
01792  * Function:  PvAttrBooleanSet()
01793  *
01794  * Purpose:   Set the value of a boolean attribute.
01795  *
01796  * Arguments:
01797  *
01798  * [ IN] tPvHandle Camera,          Handle to the camera 
01799  * [ IN] const char* Name,          Attribute name 
01800  * [ IN] tPvBoolean Value,          Value to set
01801  *
01802  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01803  *            following error codes:
01804  *              
01805  *               ePvErrBadHandle,       the handle of the camera is invalid
01806  *               ePvErrUnplugged,       the camera has been unplugged 
01807  *               ePvErrNotFound,        the requested attribute doesn't exist
01808  *               ePvErrWrongType,       the requested attribute is not of the correct type
01809  *               ePvErrForbidden,       the requested attribute forbid this operation
01810  *               ePvErrOutOfRange,      the supplied value is out of range
01811  *               ePvErrInternalFault,   an internal fault occurred
01812  *               ePvErrBadSequence,     API isn't initialized
01813  */
01814 tPvErr PVDECL PvAttrBooleanSet(tPvHandle Camera,const char* Name,tPvBoolean Value);
01815 
01816 //----- Camera event callback -------------------------------------------------
01817 
01818 /*
01819  * Function:  PvCameraEventCallbackRegister()
01820  *
01821  * Purpose:   Register a callback for camera events.  The callback will receive
01822  *            all events for the camera.
01823  *
01824  * Arguments:
01825  *
01826  * [ IN] tPvHandle Camera                               Handle to the camera
01827  * [ IN] tPvCameraEventCallback Callback,   Callback function to run when an event occurs
01828  * [ IN] void* Context                      For your use: Context is passed to your
01829  *                                          callback function
01830  *
01831  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01832  *            following error codes:
01833  *
01834  *               ePvErrResources,       resources requested from the OS were not
01835  *                                      available
01836  *               ePvErrBadSequence,     API isn't initialized
01837  *
01838  * The events generated by a camera are controlled by the attribute system.
01839  *
01840  * Here's the rules:
01841  *   - Multiple callback functions may be registered for the same camera
01842  *   - The same callback function may be shared by different cameras
01843  *
01844  * The callback functions are called from a thread within PvApi.  The callbacks
01845  * are sequenced; i.e. they will not be called simultaneously.
01846  *
01847  * Use PvCameraEventCallbackUnRegister() to stop receiving callbacks.
01848  */
01849 tPvErr PVDECL PvCameraEventCallbackRegister(tPvHandle Camera,
01850                                             tPvCameraEventCallback Callback,
01851                                             void* Context);
01852 
01853 /*
01854  * Function:  PvCameraEventCallbackUnRegister()
01855  *
01856  * Purpose:   Unregister a callback for camera events.
01857  *
01858  * Arguments:
01859  *
01860  * [ IN] tPvHandle Camera                         Handle to the camera
01861  * [ IN] tPvCameraEventCallback Callback, Callback function previously registered
01862  *
01863  * Return:    ePvErrSuccess if no error, otherwise likely to be any of the
01864  *            following error codes:
01865  *
01866  *               ePvErrNotFound,        registered callback was not found
01867  *               ePvErrResources,       resources requested from the OS were not
01868  *                                      available
01869  *               ePvErrBadSequence,     API isn't initialized
01870  */
01871 tPvErr PVDECL PvCameraEventCallbackUnRegister(tPvHandle Camera,tPvCameraEventCallback Callback);
01872 
01873 //----- Utility ---------------------------------------------------------------
01874 
01875 /*
01876  * Function:  PvUtilityColorInterpolate()
01877  *
01878  * Purpose:   Perform color interpolation.  Input format is bayer8 or bayer16
01879  *            (raw bayer image).  Output format is RGB or separate color
01880  *            planes.
01881  *
01882  * Arguments:
01883  *
01884  * [ IN] const tPvFrame* pFrame,        Raw bayer image
01885  * [OUT] void* BufferRed,               Red plane for output image
01886  * [OUT] void* BufferGreen,             Green plane for output image
01887  * [OUT] void* BufferBlue,              Blue plane for output image
01888  * [ IN] unsigned long PixelPadding,    Padding after each pixel in raw-pixel units
01889  * [ IN] unsigned long LinePadding,     Padding after each line in raw-pixel units
01890  *
01891  * Return:    none
01892  *
01893  * Caller must allocate the output buffers:
01894  *
01895  *      num_pixels = (((1 + pixel_padding) * width) + line_padding) * height
01896  *
01897  *      buffer_size = raw_pixel_size * num_pixels
01898  *
01899  * Perhaps the most common way to use this function will be to generate a
01900  * Win32::StretchDiBits compatible BGR buffer:
01901  *
01902  *      #define ULONG_PADDING(x)                        (((x+3) & ~3) - x)
01903  *
01904  *      unsigned long line_padding = ULONG_PADDING(width*3);
01905  *      unsigned long buffer_size = ((width*3) + line_padding) * height;
01906  *
01907  *      unsigned char* buffer = new unsigned char[buffer_size];
01908  *
01909  *      PvUtilityColorInterpolate(&frame, &buffer[2], &buffer[1],
01910  *                                &buffer[0], 2, line_padding);
01911  *
01912  */
01913 void PVDECL PvUtilityColorInterpolate(const tPvFrame* pFrame,
01914                                       void* BufferRed,
01915                                       void* BufferGreen,
01916                                       void* BufferBlue,
01917                                       unsigned long PixelPadding,
01918                                       unsigned long LinePadding);
01919 
01920 
01921 #ifdef __cplusplus
01922 }
01923 #endif
01924 
01925 #endif // PVAPI_H_INCLUDE
01926 


prosilica_gige_sdk
Author(s): Allied Vision Technologies.
autogenerated on Thu Jun 6 2019 17:44:46