VimbaC.h
Go to the documentation of this file.
00001 /*=============================================================================
00002   Copyright (C) 2012 Allied Vision Technologies.  All Rights Reserved.
00003 
00004   Redistribution of this header file, in original or modified form, without
00005   prior written consent of Allied Vision Technologies is prohibited.
00006 
00007 -------------------------------------------------------------------------------
00008  
00009   File:        VimbaC.h
00010 
00011   Description: Main header file for the VimbaC API.
00012 
00013 -------------------------------------------------------------------------------
00014 
00015   THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
00016   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
00017   NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE
00018   DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 
00019   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
00020   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00021   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  
00022   AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
00023   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00024   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00025 
00026 =============================================================================*/
00027 
00028 #ifndef VIMBAC_H_INCLUDE_
00029 #define VIMBAC_H_INCLUDE_
00030 
00031 // This file describes all necessary definitions for using Allied Vision's
00032 // VimbaC API. These type definitions are designed to be portable from other
00033 // languages and other operating systems.
00034 //
00035 // General conventions:
00036 // - Method names are composed in the following manner:
00037 //    - Vmb"Action"                                        example: VmbStartup()
00038 //    - Vmb"Entity""Action" or Vmb"ActionTarget""Action"   example: VmbInterfaceOpen()
00039 //    - Vmb"Entity""SubEntity/ActionTarget""Action"        example: VmbFeatureCommandRun()
00040 // - Methods dealing with features, memory or registers accept a handle from the following
00041 //   entity list as first parameter: System, Camera, Interface and AncillaryData.
00042 //   All other methods taking handles accept only a specific handle.
00043 // - Strings (generally declared as "const char *") are assumed to have a trailing 0 character
00044 // - All pointer parameters should of course be valid, except if stated otherwise.
00045 // - To ensure compatibility with older programs linked against a former version of the API,
00046 //   all struct* parameters have an accompanying sizeofstruct parameter.
00047 // - Functions returning lists are usually called twice: once with a zero buffer
00048 //   to get the length of the list, and then again with a buffer of the correct length.
00049 
00050 //===== #DEFINES ==============================================================
00051 
00052 #if defined (_WIN32)
00053     #if defined AVT_VMBAPI_C_EXPORTS                // DLL exports
00054         #define IMEXPORTC /*__declspec(dllexport)   HINT: We export via the .def file */
00055     #elif defined AVT_VMBAPI_C_LIB                  // static LIB
00056         #define IMEXPORTC
00057     #else                                           // import
00058         #define IMEXPORTC __declspec(dllimport)
00059     #endif
00060     
00061     #ifndef _WIN64
00062         // Calling convention
00063         #define VMB_CALL __stdcall
00064     #else
00065         // Calling convention
00066         #define VMB_CALL
00067     #endif
00068 #elif defined (__GNUC__) && (__GNUC__ >= 4) && defined (__ELF__)
00069     // SO exports (requires compiler option -fvisibility=hidden)
00070     #ifdef AVT_VMBAPI_C_EXPORTS
00071         #define IMEXPORTC __attribute__((visibility("default")))
00072     #else
00073         #define IMEXPORTC
00074     #endif
00075     
00076     #ifdef __i386__
00077         // Calling convention
00078         #define VMB_CALL __attribute__((stdcall))
00079     #else
00080         // Calling convention
00081         #define VMB_CALL
00082     #endif
00083 #elif defined (__APPLE__)
00084     #define IMEXPORTC __attribute__((visibility("default")))
00085     // Calling convention
00086     #define VMB_CALL
00087 #else
00088     #error Unknown platform, file needs adaption
00089 #endif
00090 
00091 //===== TYPES ==============================================================
00092 #include "VmbCommonTypes.h"
00093 
00094 #ifdef __cplusplus
00095 extern "C" {
00096 #endif
00097 
00098 // Timeout parameter signaling a blocking call
00099 #define VMBINFINITE        0xFFFFFFFF
00100 
00101 // Constant for the Vimba handle to be able to access Vimba system features
00102 static const VmbHandle_t  gVimbaHandle = (VmbHandle_t)1;
00103 
00104 //
00105 // Camera interface type (for instance FireWire, Ethernet);
00106 //
00107 typedef enum VmbInterfaceType
00108 {
00109     VmbInterfaceUnknown      = 0,           // Interface is not known to this version of the API
00110     VmbInterfaceFirewire     = 1,           // 1394
00111     VmbInterfaceEthernet     = 2,           // GigE
00112     VmbInterfaceUsb          = 3,           // USB 3.0
00113     VmbInterfaceCL           = 4,           // Camera Link
00114 } VmbInterfaceType;
00115 typedef VmbUint32_t VmbInterface_t;         // Type for an Interface; for values see VmbInterfaceType
00116 
00117 //
00118 // Access mode for configurable devices (interfaces, cameras).
00119 // Used in VmbCameraInfo_t, VmbInterfaceInfo_t as flags, so multiple modes can be
00120 // announced, while in VmbCameraOpen(), no combination must be used.
00121 //
00122 typedef enum VmbAccessModeType
00123 {
00124     VmbAccessModeNone       = 0,            // No access
00125     VmbAccessModeFull       = 1,            // Read and write access
00126     VmbAccessModeRead       = 2,            // Only read access
00127     VmbAccessModeConfig     = 4,            // Device configuration access
00128     VmbAccessModeLite       = 8,            // Device read/write access without feature access (only addresses)
00129 } VmbAccessModeType;
00130 typedef VmbUint32_t VmbAccessMode_t;        // Type for an AccessMode; for values see VmbAccessModeType
00131 
00132 //
00133 // Interface information.
00134 // Holds read-only information about an interface.
00135 //
00136 typedef struct
00137 {
00138     const char*     interfaceIdString;      // Unique identifier for each interface
00139     VmbInterface_t  interfaceType;          // Interface type, see VmbInterfaceType
00140     const char*     interfaceName;          // Interface name, given by the transport layer
00141     const char*     serialString;           // Serial number
00142     VmbAccessMode_t permittedAccess;        // Used access mode, see VmbAccessModeType
00143 
00144 } VmbInterfaceInfo_t;
00145 
00146 //
00147 // Camera information.
00148 // Holds read-only information about a camera.
00149 //
00150 typedef struct
00151 {
00152     const char*     cameraIdString;         // Unique identifier for each camera
00153     const char*     cameraName;             // Name of the camera
00154     const char*     modelName;              // Model name
00155     const char*     serialString;           // Serial number
00156     VmbAccessMode_t permittedAccess;        // Used access mode, see VmbAccessModeType
00157     const char*     interfaceIdString;      // Unique value for each interface or bus
00158 
00159 } VmbCameraInfo_t;
00160 
00161 //
00162 // Supported feature data types
00163 //
00164 typedef enum VmbFeatureDataType
00165 {
00166     VmbFeatureDataUnknown     = 0,          // Unknown feature type
00167     VmbFeatureDataInt         = 1,          // 64 bit integer feature
00168     VmbFeatureDataFloat       = 2,          // 64 bit floating point feature
00169     VmbFeatureDataEnum        = 3,          // Enumeration feature
00170     VmbFeatureDataString      = 4,          // String feature
00171     VmbFeatureDataBool        = 5,          // Boolean feature
00172     VmbFeatureDataCommand     = 6,          // Command feature
00173     VmbFeatureDataRaw         = 7,          // Raw (direct register access) feature
00174     VmbFeatureDataNone        = 8,          // Feature with no data
00175 } VmbFeatureDataType;
00176 typedef VmbUint32_t VmbFeatureData_t;       // Data type for a Feature; for values see VmbFeatureDataType
00177 
00178 //
00179 // Feature visibility
00180 //
00181 typedef enum VmbFeatureVisibilityType
00182 {
00183     VmbFeatureVisibilityUnknown      = 0,
00184     VmbFeatureVisibilityBeginner     = 1,   // Feature is visible in feature list (beginner level)
00185     VmbFeatureVisibilityExpert       = 2,   // Feature is visible in feature list (expert level)
00186     VmbFeatureVisibilityGuru         = 3,   // Feature is visible in feature list (guru level)
00187     VmbFeatureVisibilityInvisible    = 4,   // Feature is not visible in feature list
00188 } VmbFeatureVisibilityType;
00189 typedef VmbUint32_t VmbFeatureVisibility_t; // Type for Feature visibility; for values see VmbFeatureVisibilityType
00190 
00191 //
00192 // Feature flags
00193 //
00194 typedef enum VmbFeatureFlagsType
00195 {
00196     VmbFeatureFlagsNone         = 0,
00197     VmbFeatureFlagsRead         = 1,        // Read access might be permitted (check VmbFeatureAccessQuery())
00198     VmbFeatureFlagsWrite        = 2,        // Write access might be permitted (check VmbFeatureAccessQuery())
00199     VmbFeatureFlagsVolatile     = 8,        // Value may change at any time
00200     VmbFeatureFlagsModifyWrite  = 16,       // Value may change after a write
00201 } VmbFeatureFlagsType;
00202 typedef VmbUint32_t VmbFeatureFlags_t;      // Type for Feature flags; for values see VmbFeatureFlagsType
00203 
00204 //
00205 // Feature information.
00206 // Holds read-only information about a feature.
00207 //
00208 typedef struct VmbFeatureInfo
00209 {
00210     const char*             name;                   // Name used in the API
00211     VmbFeatureData_t        featureDataType;        // Data type of this feature
00212     VmbFeatureFlags_t       featureFlags;           // Access flags for this feature
00213     const char*             category;               // Category this feature can be found in
00214     const char*             displayName;            // Feature name to be used in GUIs
00215     VmbUint32_t             pollingTime;            // Predefined polling time for volatile features
00216     const char*             unit;                   // Measuring unit as given in the XML file
00217     const char*             representation;         // Representation of a numeric feature
00218     VmbFeatureVisibility_t  visibility;             // GUI visibility
00219     const char*             tooltip;                // Short description, e.g. for a tooltip
00220     const char*             description;            // Longer description
00221     const char*             sfncNamespace;          // Namespace this feature resides in
00222     VmbBool_t               isStreamable;           // Indicates if a feature can be stored to / loaded from a file
00223     VmbBool_t               hasAffectedFeatures;    // Indicates if the feature potentially affects other features
00224     VmbBool_t               hasSelectedFeatures;    // Indicates if the feature selects other features
00225 
00226 } VmbFeatureInfo_t;
00227 
00228 //
00229 // Info about possible entries of an enumeration feature
00230 //
00231 typedef struct VmbFeatureEnumEntry
00232 {
00233     const char*             name;           // Name used in the API
00234     const char*             displayName;    // Enumeration entry name to be used in GUIs
00235     VmbFeatureVisibility_t  visibility;     // GUI visibility
00236     const char*             tooltip;        // Short description, e.g. for a tooltip
00237     const char*             description;    // Longer description
00238     const char*             sfncNamespace;  // Namespace this feature resides in
00239     VmbInt64_t              intValue;       // Integer value of this enumeration entry
00240 
00241 } VmbFeatureEnumEntry_t;
00242 
00243 //
00244 // Status of a frame transfer
00245 //
00246 typedef enum VmbFrameStatusType
00247 {
00248     VmbFrameStatusComplete       =  0,      // Frame has been completed without errors
00249     VmbFrameStatusIncomplete     = -1,      // Frame could not be filled to the end
00250     VmbFrameStatusTooSmall       = -2,      // Frame buffer was too small
00251     VmbFrameStatusInvalid        = -3,      // Frame buffer was invalid
00252 } VmbFrameStatusType;
00253 typedef VmbInt32_t VmbFrameStatus_t;        // Type for the frame status; for values see VmbFrameStatusType
00254 
00255 //
00256 // Frame flags
00257 //
00258 typedef enum VmbFrameFlagsType
00259 {
00260     VmbFrameFlagsNone       = 0,
00261     VmbFrameFlagsDimension  = 1,            // Frame's dimension is provided
00262     VmbFrameFlagsOffset     = 2,            // Frame's Offset is provided (ROI)
00263     VmbFrameFlagsFrameID    = 4,            // Frame's ID is provided
00264     VmbFrameFlagsTimestamp  = 8,            // Frame's Timestamp is provided
00265 } VmbFrameFlagsType;
00266 typedef VmbUint32_t VmbFrameFlags_t;        // Type for Frame flags; for values see VmbFrameFlagsType
00267 
00268 //
00269 // Frame delivered by the camera
00270 //
00271 typedef struct
00272 {
00273     //----- In -----
00274 
00275     void*               buffer;             // Comprises image and ancillary data
00276     VmbUint32_t         bufferSize;         // Size of the data buffer
00277 
00278     void*               context[4];         // User context filled during queuing
00279 
00280     //----- Out -----
00281     VmbFrameStatus_t    receiveStatus;      // Resulting status of the receive operation
00282     VmbFrameFlags_t     receiveFlags;       // Resulting flags of the receive operation
00283 
00284     VmbUint32_t         imageSize;          // Size of the image data inside the data buffer
00285     VmbUint32_t         ancillarySize;      // Size of the ancillary data inside the data buffer
00286 
00287     VmbPixelFormat_t    pixelFormat;        // Pixel format of the image
00288 
00289     VmbUint32_t         width;              // Width of an image
00290     VmbUint32_t         height;             // Height of an image
00291     VmbUint32_t         offsetX;            // Horizontal offset of an image
00292     VmbUint32_t         offsetY;            // Vertical offset of an image
00293 
00294     VmbUint64_t         frameID;            // Unique ID of this frame in this stream
00295     VmbUint64_t         timestamp;          // Timestamp of the data transfer
00296 
00297 } VmbFrame_t;
00298 
00299 // ----- Callbacks ------------------------------------------------------------
00300 
00301 //
00302 // Name: VmbInvalidationCallback
00303 //
00304 // Purpose: Invalidation Callback type for a function that gets called in a separate thread
00305 //          and has been registered with VmbFeatureInvalidationRegister()
00306 //
00307 // Parameters:
00308 //
00309 //  [in ]  const VmbHandle_t    handle          Handle for an entity that exposes features
00310 //  [in ]  const char*          name            Name of the feature
00311 //  [in ]  void*                pUserContext    Pointer to the user context, see VmbFeatureInvalidationRegister
00312 //
00313 // Details:     While the callback is run, all feature data is atomic.  After the
00314 //              callback finishes, the feature data might be updated with new values.
00315 //
00316 // Note:        Do not spend too much time in this thread; it will prevent the feature values
00317 //              from being updated from any other thread or the lower-level drivers.
00318 //
00319 typedef void (VMB_CALL *VmbInvalidationCallback)( const VmbHandle_t  handle, const char*  name, void*  pUserContext );
00320 
00321 //
00322 // Name: VmbFrameCallback
00323 //
00324 // Purpose: Frame Callback type for a function that gets called in a separate thread
00325 //          if a frame has been queued with VmbCaptureFrameQueue()
00326 //
00327 // Parameters:
00328 //
00329 //  [in ]  const VmbHandle_t    cameraHandle    Handle of the camera
00330 //  [out]  VmbFrame_t*          pFrame          Frame completed
00331 //
00332 typedef void (VMB_CALL *VmbFrameCallback)( const VmbHandle_t  cameraHandle, VmbFrame_t*  pFrame );
00333 
00334 
00335 //===== FUNCTION PROTOTYPES ===================================================
00336 
00337 //----- API Version -----------------------------------------------------------
00338 
00339 //
00340 // Method:      VmbVersionQuery()
00341 //
00342 // Purpose:     Retrieve the version number of VimbaC.
00343 //
00344 // Parameters:
00345 //
00346 //  [out]  VmbVersionInfo_t*    pVersionInfo        Pointer to the struct where version information
00347 //                                                  is copied
00348 //  [in ]  VmbUint32_t          sizeofVersionInfo   Size of structure in bytes
00349 //
00350 // Returns:
00351 //
00352 //  - VmbErrorSuccess:       If no error
00353 //  - VmbErrorStructSize:    The given struct size is not valid for this version of the API
00354 //  - VmbErrorBadParameter:  "pVersionInfo" is NULL.
00355 //
00356 // Details:     This function can be called at anytime, even before the API is
00357 //              initialized. All other version numbers may be queried via feature access.
00358 //
00359 IMEXPORTC VmbError_t VMB_CALL VmbVersionQuery ( VmbVersionInfo_t*  pVersionInfo,
00360                                                 VmbUint32_t        sizeofVersionInfo );
00361 
00362 
00363 //----- API Initialization ----------------------------------------------------
00364 
00365 //
00366 // Method:      VmbStartup()
00367 //
00368 // Purpose:     Initialize the VimbaC API.
00369 //
00370 // Parameters:
00371 //
00372 // Returns:
00373 //
00374 //  - VmbErrorSuccess:       If no error
00375 //  - VmbErrorInternalFault: An internal fault occurred
00376 //
00377 // Details:     On successful return, the API is initialized; this is a necessary call.
00378 //
00379 // Note:        This method must be called before any VimbaC function other than VmbVersionQuery() is run.
00380 //
00381 IMEXPORTC VmbError_t VMB_CALL VmbStartup ( void );
00382 
00383 //
00384 // Method:      VmbShutdown()
00385 //
00386 // Purpose:     Perform a shutdown on the API.
00387 //
00388 // Parameters:  none
00389 //
00390 // Returns:     none
00391 //
00392 // Details:     This will free some resources and deallocate all physical resources if applicable.
00393 //
00394 IMEXPORTC void VMB_CALL VmbShutdown ( void );
00395 
00396 
00397 //----- Camera Enumeration & Information --------------------------------------
00398 
00399 //
00400 // Method:      VmbCamerasList()
00401 //
00402 // Purpose:     Retrieve a list of all cameras.
00403 //
00404 // Parameters:
00405 //
00406 //  [out]  VmbCameraInfo_t*  pCameraInfo        Array of VmbCameraInfo_t, allocated by
00407 //                                              the caller. The camera list is
00408 //                                              copied here. May be NULL if pNumFound is used for size query.
00409 //  [in ]  VmbUint32_t       listLength         Number of VmbCameraInfo_t elements provided
00410 //  [out]  VmbUint32_t*      pNumFound          Number of VmbCameraInfo_t elements found.
00411 //  [in ]  VmbUint32_t       sizeofCameraInfo   Size of the structure (if pCameraInfo == NULL this parameter is ignored)
00412 //
00413 // Returns:
00414 //
00415 //  - VmbErrorSuccess:       If no error
00416 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00417 //  - VmbErrorStructSize:    The given struct size is not valid for this API version
00418 //  - VmbErrorMoreData:      The given list length was insufficient to hold all available entries
00419 //  - VmbErrorBadParameter:  The pNumFound parameter was NULL
00420 //
00421 // Details:     Camera detection is started with the registration of the "DiscoveryCameraEvent"
00422 //              event or the first call of VmbCamerasList(), which may be delayed if no
00423 //              "DiscoveryCameraEvent" event is registered (see examples).
00424 //              VmbCamerasList() is usually called twice: once with an empty array to query the
00425 //              list length, and then again with an array of the correct length. If camera
00426 //              lists change between the calls, pNumFound may deviate from the query return.
00427 //
00428 IMEXPORTC VmbError_t VMB_CALL VmbCamerasList ( VmbCameraInfo_t*   pCameraInfo,
00429                                                VmbUint32_t        listLength,
00430                                                VmbUint32_t*       pNumFound,
00431                                                VmbUint32_t        sizeofCameraInfo );
00432 
00433 //
00434 // Method:      VmbCameraInfoQuery()
00435 //
00436 // Purpose:     Retrieve information on a camera given by an ID.
00437 //
00438 // Parameters:
00439 //
00440 //  [in ] const char*       idString           ID of the camera
00441 //  [out] VmbCameraInfo_t*  pInfo              Structure where information will be copied. May be NULL.
00442 //  [in ] VmbUint32_t       sizeofCameraInfo   Size of the structure
00443 //
00444 // Returns:
00445 //
00446 //  - VmbErrorSuccess:       If no error
00447 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00448 //  - VmbErrorNotFound:      The designated camera cannot be found
00449 //  - VmbErrorStructSize:    The given struct size is not valid for this API version
00450 //  - VmbErrorBadParameter:  idString was NULL
00451 //
00452 // Details:     May be called if a camera has not been opened by the application yet.
00453 //              Examples for "idString": 
00454 //              "DEV_81237473991" for an ID given by a transport layer,
00455 //              "169.254.12.13" for an IP address,
00456 //              "000F314C4BE5" for a MAC address or 
00457 //              "DEV_1234567890" for an ID as reported by Vimba
00458 //
00459 IMEXPORTC VmbError_t VMB_CALL VmbCameraInfoQuery ( const char*         idString,
00460                                                    VmbCameraInfo_t*    pInfo,
00461                                                    VmbUint32_t         sizeofCameraInfo );
00462 
00463 //
00464 // Method:      VmbCameraOpen()
00465 //
00466 // Purpose:     Open the specified camera.
00467 //
00468 // Parameters:
00469 //
00470 //  [in ]  const char*      idString        ID of the camera
00471 //  [in ]  VmbAccessMode_t  accessMode      Determines the level of control you have on the camera
00472 //  [out]  VmbHandle_t*     pCameraHandle   A camera handle
00473 //
00474 // Returns:
00475 //
00476 //  - VmbErrorSuccess:       If no error
00477 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00478 //  - VmbErrorNotFound:      The designated camera cannot be found
00479 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00480 //  - VmbErrorInvalidCall:   if called from frame callback
00481 //  - VmbErrorBadParameter:  if idString or pCameraHandle is NULL
00482 //
00483 // Details:     A camera may be opened in a specific access mode, which determines
00484 //              the level of control you have on a camera.
00485 //              Examples for "idString": 
00486 //              "DEV_81237473991" for an ID given by a transport layer,
00487 //              "169.254.12.13" for an IP address,
00488 //              "000F314C4BE5" for a MAC address or 
00489 //              "DEV_1234567890" for an ID as reported by Vimba
00490 //
00491 IMEXPORTC VmbError_t VMB_CALL VmbCameraOpen ( const char*      idString,
00492                                               VmbAccessMode_t  accessMode,
00493                                               VmbHandle_t*     pCameraHandle );
00494 
00495 //
00496 // Method:      VmbCameraClose()
00497 //
00498 // Purpose:     Close the specified camera.
00499 //
00500 // Parameters:
00501 //
00502 //  [in ]  const VmbHandle_t  cameraHandle      A valid camera handle
00503 //
00504 // Returns:
00505 //
00506 //  - VmbErrorSuccess:       If no error
00507 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00508 //  - VmbErrorInvalidCall:   If called from frame callback
00509 //
00510 // Details:     Depending on the access mode this camera was opened with, events are killed,
00511 //              callbacks are unregistered, and camera control is released.
00512 //
00513 IMEXPORTC VmbError_t VMB_CALL VmbCameraClose ( const VmbHandle_t  cameraHandle );
00514 
00515 
00516 //----- Features ----------------------------------------------------------
00517 
00518 //
00519 // Method:      VmbFeaturesList()
00520 //
00521 // Purpose:     List all the features for this entity.
00522 //
00523 // Parameters:
00524 //
00525 //  [in ]  const VmbHandle_t    handle            Handle for an entity that exposes features
00526 //  [out]  VmbFeatureInfo_t*    pFeatureInfoList  An array of VmbFeatureInfo_t to be filled by the API. May be NULL if pNumFund is used for size query.
00527 //  [in ]  VmbUint32_t          listLength        Number of VmbFeatureInfo_t elements provided
00528 //  [out]  VmbUint32_t*         pNumFound         Number of VmbFeatureInfo_t elements found. May be NULL if pFeatureInfoList is not NULL.
00529 //  [in ]  VmbUint32_t          sizeofFeatureInfo Size of a VmbFeatureInfo_t entry
00530 //
00531 // Returns:
00532 //
00533 //  - VmbErrorSuccess:       If no error
00534 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00535 //  - VmbErrorBadHandle:     The given handle is not valid
00536 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00537 //  - VmbErrorStructSize:    The given struct size of VmbFeatureInfo_t is not valid for this version of the API
00538 //  - VmbErrorMoreData:      The given list length was insufficient to hold all available entries
00539 //
00540 // Details:     This method lists all implemented features, whether they are currently available or not.
00541 //              The list of features does not change as long as the camera/interface is connected.
00542 //              "pNumFound" returns the number of VmbFeatureInfo elements.
00543 //              This function is usually called twice: once with an empty list to query the length
00544 //              of the list, and then again with an list of the correct length.
00545 //              
00546 //
00547 IMEXPORTC VmbError_t VMB_CALL VmbFeaturesList ( const VmbHandle_t   handle,
00548                                                 VmbFeatureInfo_t*   pFeatureInfoList,
00549                                                 VmbUint32_t         listLength,
00550                                                 VmbUint32_t*        pNumFound,
00551                                                 VmbUint32_t         sizeofFeatureInfo );
00552 
00553 //
00554 // Method:      VmbFeatureInfoQuery()
00555 //
00556 // Purpose:     Query information about the constant properties of a feature.
00557 //
00558 // Parameters:
00559 //
00560 //  [in ]  const VmbHandle_t        handle             Handle for an entity that exposes features
00561 //  [in ]  const char*              name               Name of the feature
00562 //  [out]  VmbFeatureInfo_t*        pFeatureInfo       The feature info to query
00563 //  [in ]  VmbUint32_t              sizeofFeatureInfo  Size of the structure
00564 //
00565 // Returns:
00566 //
00567 //  - VmbErrorSuccess:       If no error
00568 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00569 //  - VmbErrorBadHandle:     The given handle is not valid
00570 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00571 //  - VmbErrorStructSize:    The given struct size is not valid for this version of the API
00572 //
00573 // Details:     Users provide a pointer to VmbFeatureInfo_t, which is then set to the internal representation.
00574 //
00575 IMEXPORTC VmbError_t VMB_CALL VmbFeatureInfoQuery ( const VmbHandle_t   handle,
00576                                                     const char*         name,
00577                                                     VmbFeatureInfo_t*   pFeatureInfo,
00578                                                     VmbUint32_t         sizeofFeatureInfo );
00579 
00580 //
00581 // Method:      VmbFeatureListAffected()
00582 //
00583 // Purpose:     List all the features that might be affected by changes to this feature.
00584 //
00585 // Parameters:
00586 //
00587 //  [in ]  const VmbHandle_t    handle              Handle for an entity that exposes features
00588 //  [in ]  const char*          name                Name of the feature
00589 //  [out]  VmbFeatureInfo_t*    pFeatureInfoList    An array of VmbFeatureInfo_t to be filled by the API. May be NULL if pNumFound is used for size query.
00590 //  [in ]  VmbUint32_t          listLength          Number of VmbFeatureInfo_t elements provided
00591 //  [out]  VmbUint32_t*         pNumFound           Number of VmbFeatureInfo_t elements found. May be NULL is pFeatureInfoList is not NULL.
00592 //  [in ]  VmbUint32_t          sizeofFeatureInfo   Size of a VmbFeatureInfo_t entry
00593 //
00594 // Returns:
00595 //
00596 //  - VmbErrorSuccess:       If no error
00597 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00598 //  - VmbErrorBadHandle:     The given handle is not valid
00599 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00600 //  - VmbErrorStructSize:    The given struct size of VmbFeatureInfo_t is not valid for this version of the API
00601 //  - VmbErrorMoreData:      The given list length was insufficient to hold all available entries
00602 //
00603 // Details:     This method lists all affected features, whether they are currently available or not.
00604 //              The value of affected features depends directly or indirectly on this feature
00605 //              (including all selected features).
00606 //              The list of features does not change as long as the camera/interface is connected.
00607 //              This function is usually called twice: once with an empty array to query the length
00608 //              of the list, and then again with an array of the correct length.
00609 //
00610 IMEXPORTC VmbError_t VMB_CALL VmbFeatureListAffected ( const VmbHandle_t   handle,
00611                                                        const char*         name,
00612                                                        VmbFeatureInfo_t*   pFeatureInfoList,
00613                                                        VmbUint32_t         listLength,
00614                                                        VmbUint32_t*        pNumFound,
00615                                                        VmbUint32_t         sizeofFeatureInfo );
00616 
00617 //
00618 // Method:      VmbFeatureListSelected()
00619 //
00620 // Purpose:     List all the features selected by a given feature for this module.
00621 //
00622 // Parameters:
00623 //
00624 //  [in ]  const VmbHandle_t    handle              Handle for an entity that exposes features
00625 //  [in ]  const char*          name                Name of the feature
00626 //  [out]  VmbFeatureInfo_t*    pFeatureInfoList    An array of VmbFeatureInfo_t to be filled by the API. May be NULL if pNumFound is used for size query.
00627 //  [in ]  VmbUint32_t          listLength          Number of VmbFeatureInfo_t elements provided
00628 //  [out]  VmbUint32_t*         pNumFound           Number of VmbFeatureInfo_t elements found. May be NULL if pFeatureInfoList is not NULL.
00629 //  [in ]  VmbUint32_t          sizeofFeatureInfo   Size of a VmbFeatureInfo_t entry
00630 //
00631 // Returns:
00632 //
00633 //  - VmbErrorSuccess:       If no error
00634 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00635 //  - VmbErrorBadHandle:     The given handle is not valid
00636 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00637 //  - VmbErrorStructSize:    The given struct size is not valid for this version of the API
00638 //  - VmbErrorMoreData:      The given list length was insufficient to hold all available entries
00639 //
00640 // Details:     This method lists all selected features, whether they are currently available or not.
00641 //              Features with selected features ("selectors") have no direct impact on the camera,
00642 //              but only influence the register address that selected features point to.
00643 //              The list of features does not change while the camera/interface is connected.
00644 //              This function is usually called twice: once with an empty array to query the length
00645 //              of the list, and then again with an array of the correct length.
00646 //
00647 IMEXPORTC VmbError_t VMB_CALL VmbFeatureListSelected ( const VmbHandle_t  handle,
00648                                                        const char*        name,
00649                                                        VmbFeatureInfo_t*  pFeatureInfoList,
00650                                                        VmbUint32_t        listLength,
00651                                                        VmbUint32_t*       pNumFound,
00652                                                        VmbUint32_t        sizeofFeatureInfo );
00653 
00654 //
00655 // Method:      VmbFeatureAccessQuery()
00656 //
00657 // Purpose:     Return the dynamic read and write capabilities of this feature.
00658 //
00659 // Parameters:
00660 //
00661 //  [in ]  const VmbHandle_t  handle          Handle for an entity that exposes features.
00662 //  [in ]  const char *       name            Name of the feature.
00663 //  [out]  VmbBool_t *        pIsReadable     Indicates if this feature is readable. May be NULL.
00664 //  [out]  VmbBool_t *        pIsWriteable    Indicates if this feature is writable. May be NULL.
00665 //
00666 // Returns:
00667 //
00668 //  - VmbErrorSuccess:       If no error
00669 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00670 //  - VmbErrorBadHandle:     The given handle is not valid
00671 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00672 //  - VmbErrorBadParameter:  pIsReadable and pIsWriteable were both NULL
00673 //  - VmbErrorNotFound:      The feature was not found
00674 //
00675 // Details:     The access mode of a feature may change. For example, if "PacketSize"
00676 //              is locked while image data is streamed, it is only readable.
00677 //
00678 IMEXPORTC VmbError_t VMB_CALL VmbFeatureAccessQuery ( const VmbHandle_t   handle,
00679                                                       const char*         name,
00680                                                       VmbBool_t *         pIsReadable,
00681                                                       VmbBool_t *         pIsWriteable );
00682 
00683 
00684 //-----Integer --------
00685 
00686 //
00687 // Method:      VmbFeatureIntGet()
00688 //
00689 // Purpose:     Get the value of an integer feature.
00690 //
00691 // Parameters:
00692 //
00693 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
00694 //  [in ]  const char*          name        Name of the feature
00695 //  [out]  VmbInt64_t*          pValue      Value to get
00696 //
00697 // Returns:
00698 //
00699 //  - VmbErrorSuccess:       If no error
00700 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00701 //  - VmbErrorBadHandle:     The given handle is not valid
00702 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00703 //  - VmbErrorWrongType:     The type of feature "name" is not Integer
00704 //  - VmbErrorNotFound:      The feature was not found
00705 //  - VmbErrorBadParameter:  If name or pValue is NULL
00706 //
00707 IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntGet ( const VmbHandle_t   handle,
00708                                                  const char*         name,
00709                                                  VmbInt64_t*         pValue );
00710 
00711 //
00712 // Method:      VmbFeatureIntSet()
00713 //
00714 // Purpose:     Set the value of an integer feature.
00715 //
00716 // Parameters:
00717 //
00718 //  [in ]  const VmbHandle_t    handle    Handle for an entity that exposes features
00719 //  [in ]  const char*          name      Name of the feature
00720 //  [in ]  VmbInt64_t           value     Value to set
00721 //
00722 // Returns:
00723 //
00724 //  - VmbErrorSuccess:       If no error
00725 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00726 //  - VmbErrorBadHandle:     The given handle is not valid
00727 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00728 //  - VmbErrorWrongType:     The type of feature "name" is not Integer
00729 //  - VmbErrorInvalidValue:  "value" is either out of bounds or not an increment of the minimum
00730 //  - VmbErrorBadParameter:  If name is NULL
00731 //  - VmbErrorNotFound:      If the feature was not found
00732 //  - VmbErrorInvalidCall:   If called from frame callback
00733 //
00734 IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntSet ( const VmbHandle_t   handle,
00735                                                  const char*         name,
00736                                                  VmbInt64_t          value );
00737 
00738 //
00739 // Method:      VmbFeatureIntRangeQuery()
00740 //
00741 // Purpose:     Query the range of an integer feature.
00742 //
00743 // Parameters:
00744 //
00745 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
00746 //  [in ]  const char*          name        Name of the feature
00747 //  [out]  VmbInt64_t*          pMin        Minimum value to be returned. May be NULL.
00748 //  [out]  VmbInt64_t*          pMax        Maximum value to be returned. May be NULL.
00749 //
00750 // Returns:
00751 //
00752 //  - VmbErrorSuccess:       If no error
00753 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00754 //  - VmbErrorBadHandle:     The given handle is not valid
00755 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00756 //  - VmbErrorBadParameter:  If name is NULL or pMin and pMax are NULL
00757 //  - VmbErrorWrongType:     The type of feature "name" is not Integer
00758 //  - VmbErrorNotFound:      If the feature was not found
00759 //
00760 IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntRangeQuery ( const VmbHandle_t   handle,
00761                                                         const char*         name,
00762                                                         VmbInt64_t*         pMin,
00763                                                         VmbInt64_t*         pMax );
00764 
00765 //
00766 // Method:      VmbFeatureIntIncrementQuery()
00767 //
00768 // Purpose:     Query the increment of an integer feature.
00769 //
00770 // Parameters:
00771 //
00772 //  [in ]  const VmbHandle_t    handle         Handle for an entity that exposes features
00773 //  [in ]  const char*          name           Name of the feature
00774 //  [out]  VmbInt64_t*          pValue         Value of the increment to get.
00775 //
00776 // Returns:
00777 //
00778 //  - VmbErrorSuccess:       If no error
00779 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00780 //  - VmbErrorBadHandle:     The given handle is not valid
00781 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00782 //  - VmbErrorWrongType:     The type of feature "name" is not Integer
00783 //  - VmbErrorNotFound:      The feature was not found
00784 //    VmbErrorBadParameter:  IF name or pValue is NULL
00785 //
00786 IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntIncrementQuery ( const VmbHandle_t   handle,
00787                                                             const char*         name,
00788                                                             VmbInt64_t*         pValue );
00789 
00790 //-----Float --------
00791 
00792 //
00793 // Method:      VmbFeatureFloatGet()
00794 //
00795 // Purpose:     Get the value of a float feature.
00796 //
00797 // Parameters:
00798 //
00799 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
00800 //  [in ]  const char*          name        Name of the feature
00801 //  [out]  double*              pValue      Value to get
00802 //
00803 // Returns:
00804 //
00805 //  - VmbErrorSuccess:       If no error
00806 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00807 //  - VmbErrorBadHandle:     The given handle is not valid
00808 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00809 //  - VmbErrorWrongType:     The type of feature "name" is not Float
00810 //  - VmbErrorBadParameter:  If name or pValue is NULL
00811 //  - VmbErrorNotFound:      The feature was not found
00812 //
00813 IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatGet ( const VmbHandle_t   handle,
00814                                                    const char*         name,
00815                                                    double*             pValue );
00816 
00817 //
00818 // Method:      VmbFeatureFloatSet()
00819 //
00820 // Purpose:     Set the value of a float feature.
00821 //
00822 // Parameters:
00823 //
00824 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
00825 //  [in ]  const char*          name        Name of the feature
00826 //  [in ]  double               value       Value to set
00827 //
00828 // Returns:
00829 //
00830 //  - VmbErrorSuccess:       If no error
00831 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00832 //  - VmbErrorBadHandle:     The given handle is not valid
00833 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00834 //  - VmbErrorWrongType:     The type of feature "name" is not Float
00835 //  - VmbErrorInvalidValue:  "value" is not within valid bounds
00836 //  - VmbErrorNotFound:      The feature was not found
00837 //  - VmbErrorBadParameter:  If name is NULL
00838 //  - VmbErrorInvalidCall:   If called from frame callback
00839 //
00840 IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatSet ( const VmbHandle_t   handle,
00841                                                    const char*         name,
00842                                                    double              value );
00843 
00844 //
00845 // Method:      VmbFeatureFloatRangeQuery()
00846 //
00847 // Purpose:     Query the range of a float feature.
00848 //
00849 // Parameters:
00850 //
00851 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
00852 //  [in ]  const char*          name        Name of the feature
00853 //  [out]  double*              pMin        Minimum value to be returned. May be NULL.
00854 //  [out]  double*              pMax        Maximum value to be returned. May be NULL.
00855 //
00856 // Returns:
00857 //
00858 //  - VmbErrorSuccess:       If no error
00859 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00860 //  - VmbErrorBadHandle:     The given handle is not valid
00861 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00862 //  - VmbErrorWrongType:     The type of feature "name" is not Float
00863 //  - VmbErrorNotFound:      The feature was not found
00864 //  - VmbBadParameter:       If name is NULL or pMin and pMax are NULL
00865 //
00866 // Details:     Only one of the values may be queried if the other parameter is set to NULL,
00867 //              but if both parameters are NULL, an error is returned.
00868 //
00869 IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatRangeQuery ( const VmbHandle_t   handle,
00870                                                           const char*         name,
00871                                                           double*             pMin,
00872                                                           double*             pMax );
00873 
00874 //
00875 // Method:      VmbFeatureFloatIncrementQuery()
00876 //
00877 // Purpose:     Query the increment of an float feature.
00878 //
00879 // Parameters:
00880 //
00881 //  [in ]  const VmbHandle_t    handle         Handle for an entity that exposes features
00882 //  [in ]  const char*          name           Name of the feature
00883 //  [out]  double*              pValue         Value of the increment to get.
00884 //
00885 // Returns:
00886 //
00887 //  - VmbErrorSuccess:       If no error
00888 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00889 //  - VmbErrorBadHandle:     The given handle is not valid
00890 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00891 //  - VmbErrorWrongType:     The type of feature "name" is not Integer
00892 //  - VmbErrorNotFound:      The feature was not found
00893 //    VmbErrorBadParameter:  IF name or pValue is NULL
00894 //
00895 IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatIncrementQuery ( const VmbHandle_t   handle,
00896                                                               const char*         name,
00897                                                               VmbBool_t*          hasIncrement,
00898                                                               double*             pValue );
00899 //-----Enum --------
00900 
00901 //
00902 // Method:      VmbFeatureEnumGet()
00903 //
00904 // Purpose:     Get the value of an enumeration feature.
00905 //
00906 // Parameters:
00907 //
00908 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
00909 //  [in ]  const char*          name        Name of the feature
00910 //  [out]  const char**         pValue      The current enumeration value. The returned value
00911 //                                          is a reference to the API value
00912 //
00913 // Returns:
00914 //
00915 //  - VmbErrorSuccess:       If no error
00916 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00917 //  - VmbErrorBadHandle:     The given handle is not valid
00918 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00919 //  - VmbErrorWrongType:     The type of feature "name" is not Enumeration
00920 //  - VmbErrorNotFound:      The feature was not found
00921 //  - VmbErrorBadParameter:  if name or pValue is NULL
00922 //
00923 IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumGet ( const VmbHandle_t   handle,
00924                                                   const char*         name,
00925                                                   const char**        pValue );
00926 
00927 //
00928 // Method:      VmbFeatureEnumSet()
00929 //
00930 // Purpose:     Set the value of an enumeration feature.
00931 //
00932 // Parameters:
00933 //
00934 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
00935 //  [in ]  const char*          name        Name of the feature
00936 //  [in ]  const char*          value       Value to set
00937 //
00938 // Returns:
00939 //
00940 //  - VmbErrorSuccess:       If no error
00941 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00942 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00943 //  - VmbErrorBadHandle:     The given handle is not valid
00944 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00945 //  - VmbErrorWrongType:     The type of feature "name" is not Enumeration
00946 //  - VmbErrorInvalidValue:  "value" is not within valid bounds
00947 //  - VmbErrorNotFound:      The feature was not found
00948 //  - VmbErrorBadParameter:  If name ore value is NULL
00949 //  - VmbErrorInvalidCall:   If called from frame callback
00950 //
00951 IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumSet ( const VmbHandle_t   handle,
00952                                                   const char*         name,
00953                                                   const char*         value );
00954 
00955 //
00956 // Method:      VmbFeatureEnumRangeQuery()
00957 //
00958 // Purpose:     Query the value range of an enumeration feature.
00959 //
00960 // Parameters:
00961 //
00962 //  [in ]  const VmbHandle_t    handle          Handle for an entity that exposes features
00963 //  [in ]  const char*          name            Name of the feature
00964 //  [out]  const char* const*   pNameArray      An Array of enumeration value names may be NULL if pNumFilled is used for size query
00965 //  [in ]  VmbUint32_t          arrayLength     Number of elements in the array
00966 //  [out]  VmbUint32_t *        pNumFilled      Number of filled elements my be NULL if pNameArray is not NULL
00967 //
00968 // Returns:
00969 //
00970 //  - VmbErrorSuccess:       If no error
00971 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
00972 //  - VmbErrorBadHandle:     The given handle is not valid
00973 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
00974 //  - VmbErrorMoreData:      The given array length was insufficient to hold all available entries
00975 //  - VmbErrorWrongType:     The type of feature "name" is not Enumeration
00976 //  - VmbErrorNotFound:      The feature was not found
00977 //  - VmbErrorBadParameter:  if name is NULL or pNameArray and pNumFilled are NULL
00978 //
00979 IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumRangeQuery ( const VmbHandle_t   handle,
00980                                                          const char*         name,
00981                                                          const char**        pNameArray,
00982                                                          VmbUint32_t         arrayLength,
00983                                                          VmbUint32_t*        pNumFilled );
00984 
00985 //
00986 // Method:      VmbFeatureEnumIsAvailable()
00987 //
00988 // Purpose:     Check if a certain value of an enumeration is available.
00989 //
00990 // Parameters:
00991 //
00992 //  [in ]  const VmbHandle_t    handle          Handle for an entity that exposes features
00993 //  [in ]  const char*          name            Name of the feature
00994 //  [in ]  const char*          value           Value to check
00995 //  [out]  VmbBool_t *          pIsAvailable    Indicates if the given enumeration value is available
00996 //
00997 // Returns:
00998 //
00999 //  - VmbErrorSuccess:       If no error
01000 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01001 //  - VmbErrorBadHandle:     The given handle is not valid
01002 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01003 //  - VmbErrorWrongType:     The type of feature "name" is not Enumeration
01004 //  - VmbErrorNotFound:      The feature was not found
01005 //  - VmbErrorBadParameter:  if name or value or pIsAvailable is NULL
01006 //
01007 IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumIsAvailable ( const VmbHandle_t   handle,
01008                                                           const char*         name,
01009                                                           const char*         value,
01010                                                           VmbBool_t *         pIsAvailable );
01011 
01012 //
01013 // Method:      VmbFeatureEnumAsInt()
01014 //
01015 // Purpose:     Get the integer value for a given enumeration string value.
01016 //
01017 // Parameters:
01018 //
01019 //  [in ]  const VmbHandle_t    handle     Handle for an entity that exposes features
01020 //  [in ]  const char*          name       Name of the feature
01021 //  [in ]  const char*          value      The enumeration value to get the integer value for
01022 //  [out]  VmbInt64_t*          pIntVal    The integer value for this enumeration entry
01023 //
01024 // Returns:
01025 //
01026 //  - VmbErrorSuccess:       If no error
01027 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01028 //  - VmbErrorBadHandle:     The given handle is not valid
01029 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01030 //  - VmbErrorWrongType:     The type of feature "name" is not Enumeration
01031 //  - VmbErrorNotFound:      The feature was not found
01032 //  - VmbErrorBadParameter:  if name or value pIntVal is NULL
01033 //
01034 // Details:     Converts a name of an enum member into an int value ("Mono12Packed" to 0x10C0006)
01035 //
01036 IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumAsInt ( const VmbHandle_t   handle,
01037                                                     const char*         name,
01038                                                     const char*         value,
01039                                                     VmbInt64_t*         pIntVal );
01040 
01041 //
01042 // Method:      VmbFeatureEnumAsString()
01043 //
01044 // Purpose:     Get the enumeration string value for a given integer value.
01045 //
01046 // Parameters:
01047 //
01048 //  [in ]  const VmbHandle_t    handle          Handle for an entity that exposes features
01049 //  [in ]  const char*          name            Name of the feature
01050 //  [in ]  VmbInt64_t           intValue        The numeric value
01051 //  [out]  const char**         pStringValue    The string value for the numeric value
01052 //
01053 // Returns:
01054 //
01055 //  - VmbErrorSuccess:       If no error
01056 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01057 //  - VmbErrorBadHandle:     The given handle is not valid
01058 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01059 //  - VmbErrorWrongType:     The type of feature "name" is not Enumeration
01060 //  - VmbErrorNotFound:      The feature was not found
01061 //  - VmbErrorBadParameter:  If name or pStringValue is NULL
01062 //
01063 // Details:     Converts an int value to a name of an enum member (e.g. 0x10C0006 to "Mono12Packed")
01064 //
01065 IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumAsString ( const VmbHandle_t   handle,
01066                                                        const char*         name,
01067                                                        VmbInt64_t          intValue,
01068                                                        const char**        pStringValue );
01069 
01070 //
01071 // Method:      VmbFeatureEnumEntryGet()
01072 //
01073 // Purpose:     Get infos about an entry of an enumeration feature.
01074 //
01075 // Parameters:
01076 //
01077 //  [in ]  const VmbHandle_t        handle                  Handle for an entity that exposes features
01078 //  [in ]  const char*              featureName             Name of the feature
01079 //  [in ]  const char*              entryName               Name of the enum entry of that feature
01080 //  [out]  VmbFeatureEnumEntry_t*   pFeatureEnumEntry       Infos about that entry returned by the API
01081 //  [in]   VmbUint32_t              sizeofFeatureEnumEntry  Size of the structure
01082 //
01083 // Returns:
01084 //
01085 //  - VmbErrorSuccess:       If no error
01086 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01087 //  - VmbErrorBadHandle:     The given handle is not valid
01088 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01089 //  - VmbErrorStructSize     Size of VmbFeatureEnumEntry_t is not compatible with the API version
01090 //  - VmbErrorWrongType:     The type of feature "name" is not Enumeration
01091 //  - VmbErrorNotFound:      The feature was not found
01092 //  - VmbErrorBadParameter:  if featureName or entryName or pFeatureEnumEntry is NULL
01093 //
01094 IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumEntryGet ( const VmbHandle_t       handle,
01095                                                        const char*             featureName,
01096                                                        const char*             entryName,
01097                                                        VmbFeatureEnumEntry_t*  pFeatureEnumEntry,
01098                                                        VmbUint32_t             sizeofFeatureEnumEntry );
01099 
01100 //-----String --------
01101 
01102 //
01103 // Method:      VmbFeatureStringGet()
01104 //
01105 // Purpose:     Get the value of a string feature.
01106 //
01107 // Parameters:
01108 //
01109 //  [in ]  const VmbHandle_t    handle          Handle for an entity that exposes features
01110 //  [in ]  const char*          name            Name of the string feature
01111 //  [out]  char*                buffer          String buffer to fill. May be NULL if pSizeFilled is used for size query.
01112 //  [in ]  VmbUint32_t          bufferSize      Size of the input buffer
01113 //  [out]  VmbUint32_t*         pSizeFilled     Size actually filled my be NULL if buffer is not NULL.
01114 //
01115 // Returns:
01116 //
01117 //  - VmbErrorSuccess:       If no error
01118 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01119 //  - VmbErrorBadHandle:     The given handle is not valid
01120 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01121 //  - VmbErrorMoreData:      The given buffer size was too small
01122 //  - VmbErrorNotFound:      The feature was not found
01123 //  - VmbErrorWrongType:     The type of feature "name" is not String
01124 //
01125 // Details:     This function is usually called twice: once with an empty buffer to query the length
01126 //              of the string, and then again with a buffer of the correct length.
01127 
01128 IMEXPORTC VmbError_t VMB_CALL VmbFeatureStringGet ( const VmbHandle_t   handle,
01129                                                     const char*         name,
01130                                                     char*               buffer,
01131                                                     VmbUint32_t         bufferSize,
01132                                                     VmbUint32_t*        pSizeFilled );
01133 
01134 //
01135 // Method:    VmbFeatureStringSet()
01136 //
01137 // Purpose:   Set the value of a string feature.
01138 //
01139 // Parameters:
01140 //
01141 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
01142 //  [in ]  const char*          name        Name of the string feature
01143 //  [in ]  const char*          value       Value to set
01144 //
01145 // Returns:
01146 //
01147 //  - VmbErrorSuccess:       If no error
01148 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01149 //  - VmbErrorBadHandle:     The given handle is not valid
01150 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01151 //  - VmbErrorNotFound:      The feature was not found
01152 //  - VmbErrorWrongType:     The type of feature "name" is not String
01153 //  - VmbErrorInvalidValue:  Length of "value" exceeded the maximum length
01154 //  - VmbErrorBadParameter:  if name or value is NULL
01155 //  - VmbErrorInvalidCall:   If called from frame callback
01156 //
01157 IMEXPORTC VmbError_t VMB_CALL VmbFeatureStringSet ( const VmbHandle_t   handle,
01158                                                     const char*         name,
01159                                                     const char*         value );
01160 
01161 //
01162 // Method:      VmbFeatureStringMaxlengthQuery()
01163 //
01164 // Purpose:     Get the maximum length of a string feature.
01165 //
01166 // Parameters:
01167 //
01168 //  [in ]  const VmbHandle_t    handle        Handle for an entity that exposes features
01169 //  [in ]  const char*          name          Name of the string feature
01170 //  [out]  VmbUint32_t*         pMaxLength    Maximum length of this string feature
01171 //
01172 // Returns:
01173 //
01174 //  - VmbErrorSuccess:       If no error
01175 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01176 //  - VmbErrorBadHandle:     The given handle is not valid
01177 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01178 //  - VmbErrorWrongType:     The type of feature "name" is not String
01179 //  - VmbErrorBadParameter:  If name or pMaxLength is NULL
01180 //
01181 IMEXPORTC VmbError_t VMB_CALL VmbFeatureStringMaxlengthQuery ( const VmbHandle_t   handle,
01182                                                                const char*         name,
01183                                                                VmbUint32_t*        pMaxLength );
01184 
01185 //-----Boolean --------
01186 
01187 //
01188 // Method:      VmbFeatureBoolGet()
01189 //
01190 // Purpose:     Get the value of a boolean feature.
01191 //
01192 // Parameters:
01193 //
01194 //  [in ]  const VmbHandle_t    handle    Handle for an entity that exposes features
01195 //  [in ]  const char*          name      Name of the boolean feature
01196 //  [out]  VmbBool_t *          pValue    Value to be read
01197 //
01198 // Returns:
01199 //
01200 //  - VmbErrorSuccess:       If no error
01201 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01202 //  - VmbErrorBadHandle:     The given handle is not valid
01203 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01204 //  - VmbErrorWrongType:     The type of feature "name" is not Boolean
01205 //  - VmbErrorNotFound:      If feature is not found
01206 //  - VmbErrorBadParameter:  If name or pValue is NULL
01207 //
01208 IMEXPORTC VmbError_t VMB_CALL VmbFeatureBoolGet ( const VmbHandle_t   handle,
01209                                                   const char*         name,
01210                                                   VmbBool_t *         pValue );
01211 
01212 //
01213 // Method:      VmbFeatureBoolSet()
01214 //
01215 // Purpose:     Set the value of a boolean feature.
01216 //
01217 // Parameters:
01218 //
01219 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
01220 //  [in ]  const char*          name        Name of the boolean feature
01221 //  [in ]  VmbBool_t            value       Value to write
01222 //
01223 // Returns:
01224 //
01225 //  - VmbErrorSuccess:       If no error
01226 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01227 //  - VmbErrorBadHandle:     The given handle is not valid
01228 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01229 //  - VmbErrorWrongType:     The type of feature "name" is not Boolean
01230 //  - VmbErrorInvalidValue:  "value" is not within valid bounds
01231 //  - VmbErrorNotFound:      If the feature is not found
01232 //  - VmbErrorBadParameter:  name is NULL
01233 //  - VmbErrorInvalidCall:   If called from frame callback
01234 //
01235 IMEXPORTC VmbError_t VMB_CALL VmbFeatureBoolSet ( const VmbHandle_t   handle,
01236                                                   const char*         name,
01237                                                   VmbBool_t           value );
01238 
01239 //-----Command ------
01240 
01241 //
01242 // Method:    VmbFeatureCommandRun()
01243 //
01244 // Purpose:   Run a feature command.
01245 //
01246 // Parameters:
01247 //
01248 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
01249 //  [in ]  const char*          name        Name of the command feature
01250 //
01251 // Returns:
01252 //
01253 //  - VmbErrorSuccess:       If no error
01254 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01255 //  - VmbErrorBadHandle:     The given handle is not valid
01256 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01257 //  - VmbErrorWrongType:     The type of feature "name" is not Command
01258 //  - VmbErrorNotFound:      Feature was not found
01259 //  - VmbErrorBadParameter:  name is NULL
01260 //
01261 IMEXPORTC VmbError_t VMB_CALL VmbFeatureCommandRun ( const VmbHandle_t   handle,
01262                                                      const char*         name );
01263 
01264 //
01265 // Method:      VmbFeatureCommandIsDone()
01266 //
01267 // Purpose:     Check if a feature command is done.
01268 //
01269 // Parameters:
01270 //
01271 //  [in ]     const VmbHandle_t handle     Handle for an entity that exposes features
01272 //  [in ]     const char*       name       Name of the command feature
01273 //  [out]     VmbBool_t *       pIsDone    State of the command.
01274 //
01275 // Returns:
01276 //
01277 //  - VmbErrorSuccess:       If no error
01278 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01279 //  - VmbErrorBadHandle:     The given handle is not valid
01280 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01281 //  - VmbErrorWrongType:     The type of feature "name" is not Command
01282 //  - VmbErrorNotFound:      Feature was not found
01283 //  - VmbErrorBadParameter:  name or pIsDone is NULL
01284 //
01285 IMEXPORTC VmbError_t VMB_CALL VmbFeatureCommandIsDone ( const VmbHandle_t   handle,
01286                                                         const char*         name,
01287                                                         VmbBool_t *         pIsDone );
01288 
01289 //-----Raw --------
01290 
01291 //
01292 // Method:      VmbFeatureRawGet()
01293 //
01294 // Purpose:     Read the memory contents of an area given by a feature name.
01295 //
01296 // Parameters:
01297 //
01298 //  [in ]  const VmbHandle_t    handle         Handle for an entity that exposes features
01299 //  [in ]  const char*          name           Name of the raw feature
01300 //  [out]  char*                pBuffer        Buffer to fill
01301 //  [in ]  VmbUint32_t          bufferSize     Size of the buffer to be filled
01302 //  [out]  VmbUint32_t*         pSizeFilled    Number of bytes actually filled
01303 //
01304 // Returns:
01305 //
01306 //  - VmbErrorSuccess:       If no error
01307 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01308 //  - VmbErrorBadHandle:     The given handle is not valid
01309 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01310 //  - VmbErrorWrongType:     The type of feature "name" is not Register
01311 //  - VmbErrorNotFound:      Feature was not found
01312 //  - VmbErrorBadParameter:  If name or pBuffer or pSizeFilled is NULL
01313 //
01314 // Details:     This feature type corresponds to a top-level "Register" feature in GenICam.
01315 //              Data transfer is split up by the transport layer if the feature length is too large.
01316 //              You can get the size of the memory area addressed by the feature "name" by VmbFeatureRawLengthQuery().
01317 //
01318 IMEXPORTC VmbError_t VMB_CALL VmbFeatureRawGet ( const VmbHandle_t   handle,
01319                                                  const char*         name,
01320                                                  char*               pBuffer,
01321                                                  VmbUint32_t         bufferSize,
01322                                                  VmbUint32_t*        pSizeFilled );
01323 
01324 //
01325 // Method:      VmbFeatureRawSet()
01326 //
01327 // Purpose:     Write to a memory area given by a feature name.
01328 //
01329 // Parameters:
01330 //
01331 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
01332 //  [in ]  const char*          name        Name of the raw feature
01333 //  [in ]  const char*          pBuffer     Data buffer to use
01334 //  [in ]  VmbUint32_t          bufferSize  Size of the buffer
01335 //
01336 // Returns:
01337 //
01338 //  - VmbErrorSuccess:       If no error
01339 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01340 //  - VmbErrorBadHandle:     The given handle is not valid
01341 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01342 //  - VmbErrorWrongType:     The type of feature "name" is not Register
01343 //  - VmbErrorNotFound:      Feature was not found
01344 //  - VmbErrorBadParameter:  If name or pBuffer is NULL
01345 //  - VmbErrorInvalidCall:   If called from frame callback
01346 //
01347 // Details:     This feature type corresponds to a first-level "Register" node in the XML file.
01348 //              Data transfer is split up by the transport layer if the feature length is too large.
01349 //              You can get the size of the memory area addressed by the feature "name" by VmbFeatureRawLengthQuery().
01350 //
01351 IMEXPORTC VmbError_t VMB_CALL VmbFeatureRawSet ( const VmbHandle_t   handle,
01352                                                  const char*         name,
01353                                                  const char*         pBuffer,
01354                                                  VmbUint32_t         bufferSize );
01355 
01356 //
01357 // Method:      VmbFeatureRawLengthQuery()
01358 //
01359 // Purpose:     Get the length of a raw feature for memory transfers.
01360 //
01361 // Parameters:
01362 //
01363 //  [in ]  const VmbHandle_t    handle      Handle for an entity that exposes features
01364 //  [in ]  const char*          name        Name of the raw feature
01365 //  [out]  VmbUint32_t*         pLength     Length of the raw feature area (in bytes)
01366 //
01367 // Returns:
01368 //
01369 //  - VmbErrorSuccess:       If no error
01370 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01371 //  - VmbErrorBadHandle:     The given handle is not valid
01372 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01373 //  - VmbErrorWrongType:     The type of feature "name" is not Register
01374 //  - VmbErrorNotFound:      Feature not found
01375 //  - VmbErrorBadParameter:  If name or pLength is NULL
01376 //
01377 // Details:     This feature type corresponds to a first-level "Register" node in the XML file.
01378 //
01379 IMEXPORTC VmbError_t VMB_CALL VmbFeatureRawLengthQuery ( const VmbHandle_t   handle,
01380                                                          const char*         name,
01381                                                          VmbUint32_t*        pLength );
01382 
01383 //----- Feature invalidation --------------------------------------------------------
01384 
01385 //
01386 // Method:      VmbFeatureInvalidationRegister()
01387 //
01388 // Purpose:     Register a VmbInvalidationCallback callback for feature invalidation signaling.
01389 //
01390 // Parameters:
01391 //
01392 //  [in ]  const VmbHandle_t        handle          Handle for an entity that emits events
01393 //  [in ]  const char*              name            Name of the event (NULL to register for any feature)
01394 //  [in ]  VmbInvalidationCallback  callback        Callback to be run, when invalidation occurs
01395 //  [in ]  void*                    pUserContext    User context passed to function
01396 //
01397 // Returns:
01398 //
01399 //  - VmbErrorSuccess:       If no error
01400 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01401 //  - VmbErrorBadHandle:     The given handle is not valid
01402 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01403 //
01404 // Details:     Any feature change, either of its value or of its access state, may be tracked
01405 //              by registering an invalidation callback.
01406 //              Registering multiple callbacks for one feature invalidation event is possible because
01407 //              only the combination of handle, name, and callback is used as key. If the same
01408 //              combination of handle, name, and callback is registered a second time, it overwrites
01409 //              the previous one.
01410 //
01411 IMEXPORTC VmbError_t VMB_CALL VmbFeatureInvalidationRegister ( const VmbHandle_t        handle,
01412                                                                const char*              name,
01413                                                                VmbInvalidationCallback  callback,
01414                                                                void*                    pUserContext );
01415 
01416 //
01417 // Method:      VmbFeatureInvalidationUnregister()
01418 //
01419 // Purpose:     Unregister a previously registered feature invalidation callback.
01420 //
01421 // Parameters:
01422 //
01423 //  [in ]  const VmbHandle_t        handle          Handle for an entity that emits events
01424 //  [in ]  const char*              name            Name of the event
01425 //  [in ]  VmbInvalidationCallback  callback        Callback to be removed
01426 //
01427 // Returns:
01428 //
01429 //  - VmbErrorSuccess:       If no error
01430 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01431 //  - VmbErrorBadHandle:     The given handle is not valid
01432 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01433 //
01434 // Details:     Since multiple callbacks may be registered for a feature invalidation event,
01435 //              a combination of handle, name, and callback is needed for unregistering, too.
01436 //
01437 IMEXPORTC VmbError_t VMB_CALL VmbFeatureInvalidationUnregister ( const VmbHandle_t        handle,
01438                                                                  const char*              name,
01439                                                                  VmbInvalidationCallback  callback );
01440 
01441 
01442 //-----  Image preparation and acquisition ---------------------------------------------------
01443 
01444 //
01445 // Method:      VmbFrameAnnounce()
01446 //
01447 // Purpose:     Announce frames to the API that may be queued for frame capturing later.
01448 //
01449 // Parameters:
01450 //
01451 //  [in ]  const VmbHandle_t    cameraHandle    Handle for a camera
01452 //  [in ]  const VmbFrame_t*    pFrame          Frame buffer to announce
01453 //  [in ]  VmbUint32_t          sizeofFrame     Size of the frame structure
01454 //
01455 // Returns:
01456 //
01457 //  - VmbErrorSuccess:       If no error
01458 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01459 //  - VmbErrorBadHandle:     The given camera handle is not valid
01460 //  - VmbErrorBadParameter:  The given frame pointer is not valid or sizeofFrame is 0
01461 //  - VmbErrorStructSize:    The given struct size is not valid for this version of the API
01462 //
01463 // Details:     Allows some preparation for frames like DMA preparation depending on the transport layer.
01464 //              The order in which the frames are announced is not taken into consideration by the API.
01465 //
01466 IMEXPORTC VmbError_t VMB_CALL VmbFrameAnnounce ( const VmbHandle_t   cameraHandle,
01467                                                  const VmbFrame_t*   pFrame,
01468                                                  VmbUint32_t         sizeofFrame );
01469 
01470 
01471 //
01472 // Method:      VmbFrameRevoke()
01473 //
01474 // Purpose:     Revoke a frame from the API.
01475 //
01476 // Parameters:
01477 //
01478 //  [in ]  const VmbHandle_t    cameraHandle    Handle for a camera
01479 //  [in ]  const VmbFrame_t*    pFrame          Frame buffer to be removed from the list of announced frames
01480 //
01481 // Returns:
01482 //
01483 //  - VmbErrorSuccess:       If no error
01484 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01485 //  - VmbErrorBadHandle:     The given camera handle is not valid
01486 //  - VmbErrorBadParameter:  The given frame pointer is not valid
01487 //  - VmbErrorStructSize:    The given struct size is not valid for this version of the API
01488 //
01489 // Details:    The referenced frame is removed from the pool of frames for capturing images.
01490 //
01491 IMEXPORTC VmbError_t VMB_CALL VmbFrameRevoke ( const VmbHandle_t   cameraHandle,
01492                                                const VmbFrame_t*   pFrame );
01493 
01494 
01495 //
01496 // Method:      VmbFrameRevokeAll()
01497 //
01498 // Purpose:     Revoke all frames assigned to a certain camera.
01499 //
01500 // Parameters:
01501 //
01502 //  [in ]  const VmbHandle_t    cameraHandle    Handle for a camera
01503 //
01504 // Returns:
01505 //
01506 //  - VmbErrorSuccess:       If no error
01507 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01508 //  - VmbErrorBadHandle:     The given camera handle is not valid
01509 //
01510 IMEXPORTC VmbError_t VMB_CALL VmbFrameRevokeAll ( const VmbHandle_t  cameraHandle );
01511 
01512 
01513 //
01514 // Method:      VmbCaptureStart()
01515 //
01516 // Purpose:     Prepare the API for incoming frames.
01517 //
01518 // Parameters:
01519 //
01520 //  [in ]  const VmbHandle_t    cameraHandle    Handle for a camera
01521 //
01522 // Returns:
01523 //
01524 //  - VmbErrorSuccess:       If no error
01525 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01526 //  - VmbErrorBadHandle:     The given handle is not valid
01527 //  - VmbErrorDeviceNotOpen: Camera was not opened for usage
01528 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01529 //
01530 IMEXPORTC VmbError_t VMB_CALL VmbCaptureStart ( const VmbHandle_t  cameraHandle );
01531 
01532 
01533 //
01534 // Method:      VmbCaptureEnd()
01535 //
01536 // Purpose:     Stop the API from being able to receive frames.
01537 //
01538 // Parameters:
01539 //
01540 //  [in ]  const VmbHandle_t  cameraHandle    Handle for a camera
01541 //
01542 // Returns:
01543 //
01544 //  - VmbErrorSuccess:       If no error
01545 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01546 //  - VmbErrorBadHandle:     The given handle is not valid
01547 //
01548 // Details:     Consequences of VmbCaptureEnd():
01549 //                  - The input queue is flushed
01550 //                  - The frame callback will not be called any more
01551 //
01552 IMEXPORTC VmbError_t VMB_CALL VmbCaptureEnd ( const VmbHandle_t  cameraHandle );
01553 
01554 
01555 //
01556 // Method:      VmbCaptureFrameQueue()
01557 //
01558 // Purpose:     Queue frames that may be filled during frame capturing.
01559 //
01560 // Parameters:
01561 //
01562 //  [in ]  const VmbHandle_t    cameraHandle    Handle of the camera
01563 //  [in ]  const VmbFrame_t*    pFrame          Pointer to an already announced frame
01564 //  [in ]  VmbFrameCallback     callback        Callback to be run when the frame is complete.  NULL is Ok.
01565 //
01566 // Returns:
01567 //
01568 //  - VmbErrorSuccess:       If no error
01569 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01570 //  - VmbErrorBadHandle:     The given frame is not valid
01571 //  - VmbErrorStructSize:    The given struct size is not valid for this version of the API
01572 //
01573 // Details:     The given frame is put into a queue that will be filled sequentially.
01574 //              The order in which the frames are filled is determined by the order in which they are queued.
01575 //              If the frame was announced with VmbFrameAnnounce() before, the application
01576 //              has to ensure that the frame is also revoked by calling VmbFrameRevoke() or
01577 //              VmbFrameRevokeAll() when cleaning up.
01578 //
01579 IMEXPORTC VmbError_t VMB_CALL VmbCaptureFrameQueue ( const VmbHandle_t   cameraHandle,
01580                                                      const VmbFrame_t*   pFrame,
01581                                                      VmbFrameCallback    callback );
01582 
01583 
01584 //
01585 // Method:      VmbCaptureFrameWait()
01586 //
01587 // Purpose:     Wait for a queued frame to be filled (or dequeued).
01588 //
01589 // Parameters:
01590 //
01591 //  [in ]  const VmbHandle_t    cameraHandle    Handle of the camera
01592 //  [in ]  const VmbFrame_t*    pFrame          Pointer to an already announced & queued frame
01593 //  [in ]  VmbUint32_t          timeout         Timeout (in milliseconds)
01594 //
01595 // Returns:
01596 //
01597 //  - VmbErrorSuccess:       If no error
01598 //  - VmbErrorTimeout:       Call timed out
01599 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01600 //  - VmbErrorBadHandle:     The given handle is not valid
01601 //
01602 //
01603 IMEXPORTC VmbError_t VMB_CALL VmbCaptureFrameWait ( const VmbHandle_t   cameraHandle,
01604                                                     const VmbFrame_t*   pFrame,
01605                                                     VmbUint32_t         timeout);
01606 
01607 
01608 //
01609 // Method:      VmbCaptureQueueFlush()
01610 //
01611 // Purpose:     Flush the capture queue.
01612 //
01613 // Parameters:
01614 //
01615 //  [in ]  const VmbHandle_t cameraHandle   Handle of the camera to flush
01616 //
01617 // Returns:
01618 //
01619 //  - VmbErrorSuccess:       If no error
01620 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01621 //  - VmbErrorBadHandle:     The given handle is not valid
01622 //
01623 // Details:     Control of all the currently queued frames will be returned to the user,
01624 //              leaving no frames in the input queue.
01625 //              After this call, no frame notification will occur until frames are queued again.
01626 //
01627 IMEXPORTC VmbError_t VMB_CALL VmbCaptureQueueFlush ( const VmbHandle_t  cameraHandle );
01628 
01629 
01630 //----- Interface Enumeration & Information --------------------------------------
01631 
01632 //
01633 // Method:      VmbInterfacesList()
01634 //
01635 // Purpose:     List all the interfaces currently visible to VimbaC.
01636 //
01637 // Parameters:
01638 //
01639 //  [out]  VmbInterfaceInfo_t*  pInterfaceInfo          Array of VmbInterfaceInfo_t, allocated by the caller.
01640 //                                                      The interface list is copied here. May be NULL.
01641 //  [in ]  VmbUint32_t          listLength              Number of entries in the caller's pList array
01642 //  [out]  VmbUint32_t*         pNumFound               Number of interfaces found (may be more than
01643 //                                                      listLength!) returned here.
01644 //  [in ]  VmbUint32_t          sizeofInterfaceInfo     Size of one VmbInterfaceInfo_t entry
01645 //
01646 // Returns:
01647 //
01648 //  - VmbErrorSuccess:       If no error
01649 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01650 //  - VmbErrorStructSize:    The given struct size is not valid for this API version
01651 //  - VmbErrorMoreData:      The given list length was insufficient to hold all available entries
01652 //  - VmbErrorBadParameter:  pNumFound was NULL
01653 //
01654 // Details:     All the interfaces known via GenICam TransportLayers are listed by this 
01655 //              command and filled into the provided array. Interfaces may correspond to 
01656 //              adapter cards or frame grabber cards or, in the case of FireWire to the 
01657 //              whole 1394 infrastructure, for instance.
01658 //              This function is usually called twice: once with an empty array to query the length
01659 //              of the list, and then again with an array of the correct length.
01660 //
01661 IMEXPORTC VmbError_t VMB_CALL VmbInterfacesList ( VmbInterfaceInfo_t*  pInterfaceInfo,
01662                                                   VmbUint32_t          listLength,
01663                                                   VmbUint32_t*         pNumFound,
01664                                                   VmbUint32_t          sizeofInterfaceInfo );
01665 
01666 //
01667 // Method:      VmbInterfaceOpen()
01668 //
01669 // Purpose:     Open an interface handle for feature access.
01670 //
01671 // Parameters:
01672 //
01673 //  [in ]  const char*      idString           The ID of the interface to get the handle for
01674 //                                             (returned by VmbInterfacesList())
01675 //  [out]  VmbHandle_t*     pInterfaceHandle   The handle for this interface.
01676 //
01677 // Returns:
01678 //
01679 //  - VmbErrorSuccess:       If no error
01680 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01681 //  - VmbErrorNotFound:      The designated interface cannot be found
01682 //  - VmbErrorBadParameter:  pInterfaceHandle was NULL
01683 //
01684 // Details:     An interface can be opened if interface-specific control or information
01685 //              is required, e.g. the number of devices attached to a specific interface.
01686 //              Access is then possible via feature access methods.
01687 //
01688 IMEXPORTC VmbError_t VMB_CALL VmbInterfaceOpen ( const char*     idString,
01689                                                  VmbHandle_t*    pInterfaceHandle );
01690 
01691 //
01692 // Method:      VmbInterfaceClose()
01693 //
01694 // Purpose:     Close an interface.
01695 //
01696 // Parameters:
01697 //
01698 //  [in ]  const VmbHandle_t   interfaceHandle    The handle of the interface to close.
01699 //
01700 // Returns:
01701 //
01702 //  - VmbErrorSuccess:       If no error
01703 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01704 //  - VmbErrorBadHandle:     The given handle is not valid
01705 //
01706 // Details:     After configuration of the interface, close it by calling this function.
01707 //
01708 IMEXPORTC VmbError_t VMB_CALL VmbInterfaceClose ( const VmbHandle_t  interfaceHandle );
01709 
01710 
01711 //----- Ancillary data --------------------------------------------------------
01712 
01713 //
01714 // Method:      VmbAncillaryDataOpen()
01715 //
01716 // Purpose:     Get a working handle to allow access to the elements of the ancillary data via feature access.
01717 //
01718 // Parameters:
01719 //
01720 //  [in ]  VmbFrame_t*   pFrame                 Pointer to a filled frame
01721 //  [out]  VmbHandle_t*  pAncillaryDataHandle   Handle to the ancillary data inside the frame
01722 //
01723 // Returns:
01724 //
01725 //  - VmbErrorSuccess:       If no error
01726 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01727 //
01728 // Details:     This function can only succeed if the given frame has been filled by the API.
01729 //
01730 IMEXPORTC VmbError_t VMB_CALL VmbAncillaryDataOpen ( VmbFrame_t*     pFrame,
01731                                                      VmbHandle_t*    pAncillaryDataHandle );
01732 
01733 //
01734 // Method:      VmbAncillaryDataClose()
01735 //
01736 // Purpose:     Destroy the working handle to the ancillary data inside a frame.
01737 //
01738 // Parameters:
01739 //
01740 //  [in ]  VmbHandle_t  ancillaryDataHandle  Handle to ancillary frame data
01741 //
01742 // Returns:
01743 //
01744 //  - VmbErrorSuccess:       If no error
01745 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01746 //  - VmbErrorBadHandle:     The given handle is not valid
01747 //
01748 // Details:     After reading the ancillary data and before re-queuing the frame, ancillary data
01749 //              must be closed.
01750 //
01751 IMEXPORTC VmbError_t VMB_CALL VmbAncillaryDataClose ( VmbHandle_t  ancillaryDataHandle );
01752 
01753 
01754 //----- Memory/Register access --------------------------------------------
01755 //----- Memory/Register access --------------------------------------------
01756 
01757 //
01758 // Method:      VmbMemoryRead()
01759 //
01760 // Purpose:     Read an array of bytes.
01761 //
01762 // Parameters:
01763 //
01764 //  [in ]  const VmbHandle_t    handle          Handle for an entity that allows memory access
01765 //  [in ]  VmbUint64_t          address         Address to be used for this read operation
01766 //  [in ]  VmbUint32_t          bufferSize      Size of the data buffer to read
01767 //  [out]  char*                dataBuffer      Buffer to be filled
01768 //  [out]  VmbUint32_t*         pSizeComplete   Size of the data actually read
01769 //
01770 // Returns:
01771 //
01772 //  - VmbErrorSuccess:       If no error
01773 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01774 //  - VmbErrorBadHandle:     The given handle is not valid
01775 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01776 //
01777 IMEXPORTC VmbError_t VMB_CALL VmbMemoryRead ( const VmbHandle_t   handle,
01778                                               VmbUint64_t         address,
01779                                               VmbUint32_t         bufferSize,
01780                                               char*               dataBuffer,
01781                                               VmbUint32_t*        pSizeComplete );
01782 
01783 //
01784 // Method:      VmbMemoryWrite()
01785 //
01786 // Purpose:     Write an array of bytes.
01787 //
01788 // Parameters:
01789 //
01790 //  [in ]  const VmbHandle_t    handle          Handle for an entity that allows memory access
01791 //  [in ]  VmbUint64_t          address         Address to be used for this read operation
01792 //  [in ]  VmbUint32_t          bufferSize      Size of the data buffer to write
01793 //  [in ]  const char*          dataBuffer      Data to write
01794 //  [out]  VmbUint32_t*         pSizeComplete   Number of bytes successfully written; if an
01795 //                                              error occurs this is less than bufferSize
01796 //
01797 // Returns:
01798 //
01799 //  - VmbErrorSuccess:       If no error
01800 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01801 //  - VmbErrorBadHandle:     The given handle is not valid
01802 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01803 //  - VmbErrorMoreData:      Not all data were written; see pSizeComplete value for the number of bytes written
01804 //
01805 IMEXPORTC VmbError_t VMB_CALL VmbMemoryWrite ( const VmbHandle_t   handle,
01806                                                VmbUint64_t         address,
01807                                                VmbUint32_t         bufferSize,
01808                                                const char*         dataBuffer,
01809                                                VmbUint32_t*        pSizeComplete );
01810 
01811 //
01812 // Method:      VmbRegistersRead()
01813 //
01814 // Purpose:     Read an array of registers.
01815 //
01816 // Parameters:
01817 //
01818 //  [in ]  const VmbHandle_t    handle              Handle for an entity that allows register access
01819 //  [in ]  VmbUint32_t          readCount           Number of registers to be read
01820 //  [in ]  const VmbUint64_t*   pAddressArray       Array of addresses to be used for this read operation
01821 //  [out]  VmbUint64_t*         pDataArray          Array of registers to be used for this read operation
01822 //  [out]  VmbUint32_t*         pNumCompleteReads   Number of reads completed
01823 //
01824 // Returns:
01825 //
01826 //  - VmbErrorSuccess:       If no error
01827 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01828 //  - VmbErrorBadHandle:     The given handle is not valid
01829 //  - VmbErrorIncomplete:    Not all the requested reads could be completed
01830 //
01831 // Details:     Two arrays of data must be provided: an array of register addresses and one
01832 //              for corresponding values to be read. The registers are read consecutively
01833 //              until an error occurs or all registers are written successfully.
01834 //
01835 IMEXPORTC VmbError_t VMB_CALL VmbRegistersRead ( const VmbHandle_t   handle,
01836                                                  VmbUint32_t         readCount,
01837                                                  const VmbUint64_t*  pAddressArray,
01838                                                  VmbUint64_t*        pDataArray,
01839                                                  VmbUint32_t*        pNumCompleteReads );
01840 
01841 //
01842 // Method:      VmbRegistersWrite()
01843 //
01844 // Purpose:     Write an array of registers.
01845 //
01846 // Parameters:
01847 //
01848 //  [in ]  const VmbHandle_t    handle                  Handle for an entity that allows register access
01849 //  [in ]  VmbUint32_t          writeCount              Number of registers to be written
01850 //  [in ]  const VmbUint64_t*   pAddressArray           Array of addresses to be used for this write operation
01851 //  [in ]  const VmbUint64_t*   pDataArray              Array of reads to be used for this write operation
01852 //  [out]  VmbUint32_t*         pNumCompleteWrites      Number of writes completed
01853 //
01854 // Returns:
01855 //
01856 //  - VmbErrorSuccess:       If no error
01857 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01858 //  - VmbErrorBadHandle:     The given handle is not valid
01859 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01860 //  - VmbErrorIncomplete:    Not all the requested writes could be completed
01861 //
01862 // Details:     Two arrays of data must be provided: an array of register addresses and one with the
01863 //              corresponding values to be written to these addresses. The registers are written
01864 //              consecutively until an error occurs or all registers are written successfully.
01865 //
01866 IMEXPORTC VmbError_t VMB_CALL VmbRegistersWrite ( const VmbHandle_t   handle,
01867                                                   VmbUint32_t         writeCount,
01868                                                   const VmbUint64_t*  pAddressArray,
01869                                                   const VmbUint64_t*  pDataArray,
01870                                                   VmbUint32_t*        pNumCompleteWrites );
01871 
01872 //
01873 //  enum type for VmbCameraSettingsSave() which determines which feature shall persisted (saved) to XML file.
01874 //
01875 typedef enum VmbFeaturePersistType
01876 {
01877     VmbFeaturePersistAll        = 0,
01878     VmbFeaturePersistStreamable = 1,
01879     VmbFeaturePersistNoLUT      = 2
01880 } VmbFeaturePersistType;
01881 typedef VmbUint32_t VmbFeaturePersist_t;
01882 
01883 //
01884 //  struct type to collect all settings for VmbCameraSettingsSave and VmbCameraSettingsLoad
01885 //
01886 typedef struct
01887 {
01888     VmbFeaturePersist_t persistType;
01889     VmbUint32_t maxIterations;
01890     VmbUint32_t loggingLevel;
01891 } VmbFeaturePersistSettings_t;
01892 
01893 //
01894 // Method:      VmbCameraSettingsSave()
01895 //
01896 // Purpose:     Saves all feature values to XML file.
01897 //
01898 // Parameters:
01899 //
01900 //  [in ]  const VmbHandle_t             handle              Handle for an entity that allows register access
01901 //  [in ]  const char*                   fileName            Name of XML file to save settings
01902 //  [in ]  VmbFeaturePersistSettings_t*  pSettings           Settings struct
01903 //  [in ]  VmbUint32_t                   sizeofSettings      Size of settings struct
01904 //
01905 // Returns:
01906 //
01907 //  - VmbErrorSuccess:       If no error
01908 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01909 //  - VmbErrorBadHandle:     The given handle is not valid
01910 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01911 //  - VmbErrorBadParameter:  if fileName is NULL
01912 //
01913 // Details:     Camera must be opened beforehand and function needs corresponding handle.
01914 //              With given filename parameter path and name of XML file can be determined.
01915 //              Additionally behaviour of function can be set with providing 'persistent struct'.
01916 //
01917 IMEXPORTC VmbError_t VMB_CALL VmbCameraSettingsSave( const VmbHandle_t handle, const char *fileName, VmbFeaturePersistSettings_t *pSettings, VmbUint32_t sizeofSettings );
01918 
01919 //
01920 // Method:      VmbCameraSettingsLoad()
01921 //
01922 // Purpose:     Load all feature values from XML file to device.
01923 //
01924 // Parameters:
01925 //
01926 //  [in ]  const VmbHandle_t             handle              Handle for an entity that allows register access
01927 //  [in ]  const char*                   fileName            Name of XML file to save settings
01928 //  [in ]  VmbFeaturePersistSettings_t*  pSettings           Settings struct
01929 //  [in ]  VmbUint32_t                   sizeofSettings      Size of settings struct
01930 //
01931 // Returns:
01932 //
01933 //  - VmbErrorSuccess:       If no error
01934 //  - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
01935 //  - VmbErrorBadHandle:     The given handle is not valid
01936 //  - VmbErrorInvalidAccess: Operation is invalid with the current access mode
01937 //  - VmbErrorBadParameter:  if fileName is NULL
01938 //
01939 // Details:     Camera must be opened beforehand and function needs corresponding handle.
01940 //              With given filename parameter path and name of XML file can be determined.
01941 //              Additionally behaviour of function can be set with providing 'settings struct'.
01942 //
01943 IMEXPORTC VmbError_t VMB_CALL VmbCameraSettingsLoad( const VmbHandle_t handle, const char *fileName, VmbFeaturePersistSettings_t *pSettings, VmbUint32_t sizeofSettings );
01944 
01945 #ifdef __cplusplus
01946 }
01947 #endif
01948 
01949 #endif // VIMBAC_H_INCLUDE_


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Thu Jun 6 2019 18:23:39