VmbCPP C++ API Function Reference

Classes

VmbSystem

class VmbSystem : public VmbCPP::FeatureContainer

A class providing access to functionality and information about the Vmb API itself.

A singleton object is provided by the GetInstance function.

Access to any information other than the version of the VmbCPP API can only be accessed after calling Startup and before calling Shutdown.

If a custom camera factory is used, this must be set before calling Startup.

Public Functions

VmbSystem(const VmbSystem&) = delete

the class is not copyable

VmbSystem &operator=(const VmbSystem &system) = delete

the class is not copyable

IMEXPORT VmbErrorType QueryVersion (VmbVersionInfo_t &version) const noexcept

Retrieve the version number of VmbCPP.

This function can be called at any time, even before the API is initialized. All other version numbers can be queried via feature access

Parameters:

version[out] Reference to the struct where version information is copied

Return values:

VmbErrorSuccess – always returned

Returns:

VmbErrorType

IMEXPORT VmbErrorType Startup (const VmbFilePathChar_t *pathConfiguration)

Initialize the VmbCPP module.

On successful return, the API is initialized; this is a necessary call. This method must be called before any other VmbCPP function is run.

Parameters:

pathConfiguration[in] A string containing the semicolon separated list of paths. The paths contain directories to search for .cti files, paths to .cti files and optionally the path to a configuration xml file. If null is passed the parameter is considered to contain the values from the GENICAM_GENTLXX_PATH environment variable

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorInternalFault – An internal fault occurred

Returns:

IMEXPORT VmbErrorType Startup ()

Initialize the VmbCPP module (overload, without starting parameter pathConfiguration)

On successful return, the API is initialized; this is a necessary call. This method must be called before any other VmbCPP function is run.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorInternalFault – An internal fault occurred

Returns:

IMEXPORT VmbErrorType Shutdown ()

Perform a shutdown of the API module. This will free some resources and deallocate all physical resources if applicable.

Return values:

VmbErrorSuccess – always returned

Returns:

VmbErrorType

inline VmbErrorType GetInterfaces(InterfacePtrVector &interfaces)

List all the interfaces currently visible to VmbCPP.

All the interfaces known via a GenTL are listed by this command and filled into the vector provided. If the vector is not empty, new elements will be appended. Interfaces can be adapter cards or frame grabber cards, for instance.

Parameters:

interfaces[out] Vector of shared pointer to Interface object

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorStructSize – The given struct size is not valid for this API version

  • VmbErrorMoreData – More data were returned than space was provided

  • VmbErrorInternalFault – An internal fault occurred

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetInterfaceByID (const char *pID, InterfacePtr &pInterface)

Gets a specific interface identified by an ID.

An interface known via a GenTL is listed by this command and filled into the pointer provided. Interface can be an adapter card or a frame grabber card, for instance.

Parameters:
  • pID[in] The ID of the interface to get (returned by GetInterfaces())

  • pInterface[out] Shared pointer to Interface object

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadParameterpID is null.

  • VmbErrorStructSize – The given struct size is not valid for this API version

  • VmbErrorMoreData – More data were returned than space was provided

Returns:

VmbErrorType

VmbErrorType GetInterfaceByID(std::nullptr_t, InterfacePtr&) = delete

null is not allowed as interface id parameter

template<class T>
inline std::enable_if<CStringLikeTraits<T>::IsCStringLike, VmbErrorType>::type GetInterfaceByID(const T &id, InterfacePtr &pInterface)

Convenience function for calling GetInterfaceByID(char const*, InterfacePtr&) with id converted to const char*.

This is a convenience function for calling GetInterfaceById(CStringLikeTraits<T>::ToString(id), pInterface).

Types other than std::string may be passed to this function, if CStringLikeTraits is specialized before including this header.

Template Parameters:

T – a type that is considered to be a c string like

inline VmbErrorType GetCameras(CameraPtrVector &cameras)

Retrieve a list of all cameras.

Parameters:

cameras[out] Vector of shared pointer to Camera object A camera known via a GenTL is listed by this command and filled into the pointer provided.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorStructSize – The given struct size is not valid for this API version

  • VmbErrorMoreData – More data were returned than space was provided

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetCameraByID (const char *pID, CameraPtr &pCamera)

Gets a specific camera identified by an ID. The returned camera is still closed.

A camera known via a GenTL is listed by this command and filled into the pointer provided. Only static properties of the camera can be fetched until the camera has been opened. “pID” can be one of the following:

  • ”169.254.12.13” for an IP address,

  • ”000F314C4BE5” for a MAC address or

  • ”DEV_1234567890” for an ID as reported by VmbCPP

Parameters:
  • pID[in] The ID of the camera to get

  • pCamera[out] Shared pointer to camera object

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadParameterpID is null.

  • VmbErrorStructSize – The given struct size is not valid for this API version

  • VmbErrorMoreData – More data were returned than space was provided

Returns:

VmbErrorType

VmbErrorType GetCameraByID(std::nullptr_t, CameraPtr&) = delete

It’s not possible to identify a camera given null as id.

template<class IdType>
inline std::enable_if<CStringLikeTraits<IdType>::IsCStringLike, VmbErrorType>::type GetCameraByID(const IdType &id, VmbAccessModeType eAccessMode, CameraPtr &pCamera)

Convenience function for calling GetCameraByID(char const*, CameraPtr&) with id converted to const char*.

This is a convenience function for calling GetCameraByID(CStringLikeTraits<T>::ToString(id), pCamera).

Types other than std::string may be passed to this function, if CStringLikeTraits is specialized before including this header.

Template Parameters:

IdType – a type that is considered to be a c string like

IMEXPORT VmbErrorType OpenCameraByID (const char *pID, VmbAccessModeType eAccessMode, CameraPtr &pCamera)

Gets a specific camera identified by an ID. The returned camera is already open.

A camera can be opened if camera-specific control is required, such as I/O pins on a frame grabber card. Control is then possible via feature access methods. “pID” can be one of the following:

  • ”169.254.12.13” for an IP address,

  • ”000F314C4BE5” for a MAC address or

  • ”DEV_1234567890” for an ID as reported by VmbCPP

Parameters:
  • pID[in] The unique ID of the camera to get

  • eAccessMode[in] The requested access mode

  • pCamera[out] A shared pointer to the camera

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorNotFound – The designated interface cannot be found

  • VmbErrorBadParameterpID is null.

Returns:

VmbErrorType

VmbErrorType OpenCameraByID(std::nullptr_t, VmbAccessModeType, CameraPtr&) = delete

It’s not possible to identify a camera given null as id.

template<class IdType>
inline std::enable_if<CStringLikeTraits<IdType>::IsCStringLike, VmbErrorType>::type OpenCameraByID(const IdType &id, VmbAccessModeType eAccessMode, CameraPtr &pCamera)

Convenience function for calling OpenCameraByID(char const*, VmbAccessModeType, CameraPtr&) with id converted to const char*.

This is a convenience function for calling OpenCameraByID(CStringLikeTraits<T>::ToString(id), eAccessMode, pCamera).

Types other than std::string may be passed to this function, if CStringLikeTraits is specialized before including this header.

Template Parameters:

IdType – a type that is considered to be a c string like

IMEXPORT VmbErrorType RegisterCameraListObserver (const ICameraListObserverPtr &pObserver)

Registers an instance of camera observer whose CameraListChanged() method gets called as soon as a camera is plugged in, plugged out, or changes its access status.

Parameters:

pObserver[in] A shared pointer to an object derived from ICameraListObserver

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterpObserver is null.

  • VmbErrorInvalidCall – If the very same observer is already registered

Returns:

VmbErrorType

IMEXPORT VmbErrorType UnregisterCameraListObserver (const ICameraListObserverPtr &pObserver)

Unregisters a camera observer.

Parameters:

pObserver[in] A shared pointer to an object derived from ICameraListObserver

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorNotFound – If the observer is not registered

  • VmbErrorBadParameterpObserver is null.

Returns:

VmbErrorType

IMEXPORT VmbErrorType RegisterInterfaceListObserver (const IInterfaceListObserverPtr &pObserver)

Registers an instance of interface observer whose InterfaceListChanged() method gets called as soon as an interface is plugged in, plugged out, or changes its access status.

Parameters:

pObserver[in] A shared pointer to an object derived from IInterfaceListObserver

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterpObserver is null.

  • VmbErrorInvalidCall – If the very same observer is already registered

Returns:

VmbErrorType

IMEXPORT VmbErrorType UnregisterInterfaceListObserver (const IInterfaceListObserverPtr &pObserver)

Unregisters an interface observer.

Parameters:

pObserver[in] A shared pointer to an object derived from IInterfaceListObserver

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorNotFound – If the observer is not registered

  • VmbErrorBadParameterpObserver is null.

Returns:

VmbErrorType

IMEXPORT VmbErrorType RegisterCameraFactory (const ICameraFactoryPtr &pCameraFactory)

Registers an instance of camera factory. When a custom camera factory is registered, all instances of type camera will be set up accordingly.

Parameters:

pCameraFactory[in] A shared pointer to an object derived from ICameraFactory

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterpCameraFactory is null.

Returns:

VmbErrorType

IMEXPORT VmbErrorType UnregisterCameraFactory ()

Unregisters the camera factory. After unregistering the default camera class is used.

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

inline VmbErrorType GetTransportLayers(TransportLayerPtrVector &transportLayers)

Retrieve a list of all transport layers.

All transport layers known via GenTL are listed by this command and filled into the pointer provided.

Parameters:

transportLayers[out] Vector of shared pointer to TransportLayer object

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorStructSize – The given struct size is not valid for this API version

  • VmbErrorMoreData – More data were returned than space was provided

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetTransportLayerByID (const char *pID, TransportLayerPtr &pTransportLayer)

Gets a specific transport layer identified by an ID.

An interface known via a GenTL is listed by this command and filled into the pointer provided. Interface can be an adapter card or a frame grabber card, for instance.

Parameters:
  • pID[in] The ID of the interface to get (returned by GetInterfaces())

  • pTransportLayer[out] Shared pointer to Transport Layer object

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadParameterpID is null.

  • VmbErrorStructSize – The given struct size is not valid for this API version

  • VmbErrorMoreData – More data were returned than space was provided

Returns:

VmbErrorType

template<class T>
inline std::enable_if<CStringLikeTraits<T>::IsCStringLike, VmbErrorType>::type GetTransportLayerByID(T const &id, TransportLayerPtr &pTransportLayer)

Convenience function for calling GetTransportLayerByID(char const*, TransportLayerPtr&) with id converted to const char*.

This is a convenience function for calling GetTransportLayerByID(CStringLikeTraits<T>::ToString(id), pTransportLayer).

Types other than std::string may be passed to this function, if CStringLikeTraits is specialized before including this header.

Template Parameters:

T – a type that is considered to be a c string like

VmbErrorType GetTransportLayerByID(std::nullptr_t, TransportLayerPtr&) = delete

the transport layer cannot retrieved given null as id.

CameraPtr GetCameraPtrByHandle(const VmbHandle_t handle) const

Mapping of handle to CameraPtr.

Logger *GetLogger() const noexcept

get the logger for the VmbCPP Api

Returns:

A pointer to the logger or null

Public Static Functions

static IMEXPORT VmbSystem & GetInstance () noexcept

Returns a reference to the System singleton.

Return values:

VmbSystem&

TransportLayer

class TransportLayer : public VmbCPP::PersistableFeatureContainer

A class providing access to GenTL system module specific functionality and information.

Public Types

typedef std::function<VmbErrorType(const TransportLayer *pTransportLayer, InterfacePtr *pInterfaces, VmbUint32_t &size)> GetInterfacesByTLFunction

Type for an std::function to retrieve a Transport Layer’s interfaces.

typedef std::function<VmbErrorType(const TransportLayer *pTransportLayer, CameraPtr *pCameras, VmbUint32_t &size)> GetCamerasByTLFunction

Type for an std::function to retrieve a Transport Layer’s cameras.

Public Functions

TransportLayer(const VmbTransportLayerInfo_t &transportLayerInfo, GetInterfacesByTLFunction getInterfacesByTL, GetCamerasByTLFunction getCamerasByTL)

Transport Layer constructor.

Parameters:
  • transportLayerInfo[out] The transport layer info struct

  • getInterfacesByTL[in] The function used to find interfaces

  • getCamerasByTL[in] The function used to find transport layers

Throws:

std::bad_alloc – not enough memory is available to store the data for the object constructed

TransportLayer() = delete

the class is non-default-constructible

TransportLayer(const TransportLayer&) = delete

the class is non-copyable

TransportLayer &operator=(const TransportLayer&) = delete

the class is non-copyable

inline VmbErrorType GetInterfaces(InterfacePtrVector &interfaces)

Get all interfaces related to this transport layer.

Parameters:

interfaces[out] Returned list of related interfaces

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadHandle – The handle is not valid

  • VmbErrorResources – Resources not available (e.g. memory)

  • VmbErrorInternalFault – An internal fault occurred

Returns:

VmbErrorType

inline VmbErrorType GetCameras(CameraPtrVector &cameras)

Get all cameras related to this transport layer.

Parameters:

cameras[out] Returned list of related cameras

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadHandle – The handle is not valid

  • VmbErrorResources – Resources not available (e.g. memory)

  • VmbErrorInternalFault – An internal fault occurred

Returns:

VmbErrorType

inline VmbErrorType GetID(std::string &transportLayerID) const noexcept

Gets the transport layer ID.

Note

This information remains static throughout the object’s lifetime

Parameters:

transportLayerID[out] The ID of the transport layer

Return values:

VmbErrorSuccess – If no error

Returns:

inline VmbErrorType GetName(std::string &name) const noexcept

Gets the transport layer name.

Note

This information remains static throughout the object’s lifetime

Parameters:

name[out] The name of the transport layer

Return values:

VmbErrorSuccess – If no error

Returns:

inline VmbErrorType GetModelName(std::string &modelName) const noexcept

Gets the model name of the transport layer.

Note

This information remains static throughout the object’s lifetime

Parameters:

modelName[out] The model name of the transport layer

Return values:

VmbErrorSuccess – If no error

Returns:

inline VmbErrorType GetVendor(std::string &vendor) const noexcept

Gets the vendor of the transport layer.

Note

This information remains static throughout the object’s lifetime

Parameters:

vendor[out] The vendor of the transport layer

Return values:

VmbErrorSuccess – If no error

Returns:

inline VmbErrorType GetVersion(std::string &version) const noexcept

Gets the version of the transport layer.

Note

This information remains static throughout the object’s lifetime

Parameters:

version[out] The version of the transport layer

Return values:

VmbErrorSuccess – If no error

Returns:

inline VmbErrorType GetPath(std::string &path) const noexcept

Gets the full path of the transport layer.

Note

This information remains static throughout the object’s lifetime

Parameters:

path[out] The full path of the transport layer

Return values:

VmbErrorSuccess – If no error

Returns:

IMEXPORT VmbErrorType GetType (VmbTransportLayerType &type) const noexcept

Gets the type, e.g. GigE or USB of the transport layer.

Note

This information remains static throughout the object’s lifetime

Parameters:

type[out] The type of the transport layer

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

Interface

class Interface : public VmbCPP::PersistableFeatureContainer

An object representing the GenTL interface.

Public Types

using GetCamerasByInterfaceFunction = std::function<VmbErrorType(const Interface *pInterface, CameraPtr *pCameras, VmbUint32_t &size)>

Type for an std::function to retrieve an Interface’s cameras.

Public Functions

Interface() = delete

Object is not default constructible.

Interface(const Interface&) = delete

Object is not copyable.

Interface &operator=(const Interface&) = delete

Object is not copyable.

Interface(const VmbInterfaceInfo_t &interfaceInfo, const TransportLayerPtr &pTransportLayerPtr, GetCamerasByInterfaceFunction getCamerasByInterface)

Create an interface given the interface info and info about related objects.

Parameters:
  • interfaceInfo[in] the information about the interface

  • pTransportLayerPtr[in] the pointer to the transport layer providing this interface

  • getCamerasByInterface[in] the function for retrieving the cameras of this interface

inline VmbErrorType GetID(std::string &interfaceID) const noexcept

Gets the ID of an interface.

This information remains static throughout the object’s lifetime

Parameters:

interfaceID[out] The ID of the interface

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetType (VmbTransportLayerType &type) const noexcept

Gets the type, e.g. GigE or USB of an interface.

This information remains static throughout the object’s lifetime

Parameters:

type[out] The type of the interface

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

inline VmbErrorType GetName(std::string &name) const noexcept

Gets the name of an interface.

Details: This information remains static throughout the object’s lifetime

Parameters:

name[out] The name of the interface

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetTransportLayer (TransportLayerPtr &pTransportLayer) const

Gets the pointer of the related transport layer.

Parameters:

pTransportLayer[out] The pointer of the related transport layer.

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

inline VmbErrorType GetCameras(CameraPtrVector &cameras)

Get all cameras related to this transport layer.

Parameters:

cameras[out] Returned list of related cameras

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadHandle – The handle is not valid

  • VmbErrorResources – Resources not available (e.g. memory)

  • VmbErrorInternalFault – An internal fault occurred

Returns:

VmbErrorType

Camera

class Camera : public VmbCPP::PersistableFeatureContainer, public VmbCPP::ICapturingModule

A class for accessing camera related functionality.

This object corresponds to the GenTL remote device.

Public Functions

IMEXPORT Camera(const VmbCameraInfo_t &cameraInfo, const InterfacePtr &pInterface)

Creates an instance of class Camera given the interface info object received from the Vmb C API.

If “IP_OR_MAC@” occurs in VmbCameraInfo::cameraIdString of cameraInfo, the camera id used to identify the camera is the substring starting after the first occurence of this string with the next occurence of the same string removed, should it exist. Otherwise VmbCameraInfo::cameraIdExtended is used to identify the camera.

If VmbCameraInfo::cameraIdExtended is used, it needs to match the extended id retrieved from the VmbC API.

Any strings in cameraInfo that are null are treated as the empty string.

Parameters:
  • cameraInfo[in] The struct containing the information about the camera.

  • pInterface[in] The shared pointer to the interface providing the camera

Throws:

std::bad_alloc – The memory available is insufficient to allocate the storage required to store the data.

virtual IMEXPORT ~Camera()

Destroys an instance of class Camera.

Destroying a camera implicitly closes it beforehand.

virtual IMEXPORT VmbErrorType Open (VmbAccessModeType accessMode)

Opens the specified camera.

A camera may be opened in a specific access mode. This mode determines the level of control you have on a camera.

Parameters:

accessMode[in] Access mode determines the level of control you have on the camera

Return values:
  • VmbErrorSuccess – The call was successful

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorInvalidCall – If called from frame callback or chunk access callback

  • VmbErrorNotFound – The designated camera cannot be found

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType Close ()

Closes the specified camera.

Depending on the access mode this camera was opened in, events are killed, callbacks are unregistered, the frame queue is cleared, and camera control is released.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

  • VmbErrorInUse – The camera is currently in use with VmbChunkDataAccess

  • VmbErrorBadHandle – The handle does not correspond to an open camera

  • VmbErrorInvalidCall – If called from frame callback or chunk access callback

Returns:

VmbErrorType

inline VmbErrorType GetID(std::string &cameraID) const noexcept

Gets the ID of a camera.

The id is the id choosen by the transport layer. There’s no guarantee it’s human readable.

The id same id may be used by multiple cameras provided by different interfaces.

Note

This information remains static throughout the object’s lifetime

Parameters:

cameraID[out] The string the camera id is written to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorResources – The attempt to allocate memory for storing the output failed.

Returns:

VmbErrorType

inline VmbErrorType GetExtendedID(std::string &extendedID) const noexcept

Gets the extenden ID of a camera (globally unique identifier)

The extended id is unique for the camera. The same physical camera may be listed multiple times with different extended ids, if multiple ctis or multiple interfaces provide access to the device.

Note

This information remains static throughout the object’s lifetime

Parameters:

extendedID[out] The the extended id is written to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorResources – The attempt to allocate memory for storing the output failed.

Returns:

VmbErrorType

inline VmbErrorType GetName(std::string &name) const noexcept

Gets the display name of a camera.

Note

This information remains static throughout the object’s lifetime

Parameters:

name[out] The string the name of the camera is written to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorResources – The attempt to allocate memory for storing the output failed.

Returns:

VmbErrorType

inline VmbErrorType GetModel(std::string &model) const noexcept

Gets the model name of a camera.

Note

This information remains static throughout the object’s lifetime

Parameters:

model[out] The string the model name of the camera is written to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorResources – The attempt to allocate memory for storing the output failed.

Returns:

VmbErrorType

inline VmbErrorType GetSerialNumber(std::string &serialNumber) const noexcept

Gets the serial number of a camera.

Note

This information remains static throughout the object’s lifetime

Parameters:

serialNumber[out] The string to write the serial number of the camera to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorResources – The attempt to allocate memory for storing the output failed.

Returns:

VmbErrorType

inline VmbErrorType GetInterfaceID(std::string &interfaceID) const

Gets the interface ID of a camera.

Note

This information remains static throughout the object’s lifetime

Parameters:

interfaceID[out] The string to write the interface ID to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorResources – The attempt to allocate memory for storing the output failed.

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetInterfaceType (VmbTransportLayerType &interfaceType) const

Gets the type of the interface the camera is connected to. And therefore the type of the camera itself.

Parameters:

interfaceType[out] A reference to the interface type variable to write the output to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorNotAvailable – No interface is currently associated with this object

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetInterface (InterfacePtr &pInterface) const

Gets the shared pointer to the interface providing the camera.

Parameters:

pInterface[out] The shared pointer to assign the interface assigned to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorNotAvailable – No interface is currently associated with this object

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetLocalDevice (LocalDevicePtr &pLocalDevice)

Gets the shared pointer to the local device module associated with this camera.

This information is only available for open cameras.

Parameters:

pLocalDevice[out] The shared pointer the local device is assigned to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpen – The camera is currently not opened

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetTransportLayer (TransportLayerPtr &pTransportLayer) const

Gets the pointer of the related transport layer.

Parameters:

pTransportLayer[out] The shared pointer the transport layer is assigned to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorNotAvailable – No interface is currently associated with this object or the interface is not associated with a transport layer

Returns:

VmbErrorType

inline VmbErrorType GetStreams(StreamPtrVector &streams) noexcept

Gets the vector with the available streams of the camera.

Parameters:

streams[out] The vector the available streams of the camera are written to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorResources – The attempt to allocate memory for storing the output failed.

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetPermittedAccess (VmbAccessModeType &permittedAccess) const

Gets the access modes of a camera.

Parameters:

permittedAccess[out] The possible access modes of the camera

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorNotFound – No camera with the given id is found

Returns:

VmbErrorType

inline VmbErrorType ReadMemory(const VmbUint64_t &address, UcharVector &buffer) const noexcept

Reads a block of memory. The number of bytes to read is determined by the size of the provided buffer.

Parameters:
  • address[in] The address to read from

  • buffer[out] The returned data as vector

Return values:
  • VmbErrorSuccess – If all requested bytes have been read

  • VmbErrorBadParameter – Vector buffer is empty.

  • VmbErrorIncomplete – If at least one, but not all bytes have been read. See overload ReadMemory(const VmbUint64_t&, UcharVector&, VmbUint32_t&) const.

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

inline VmbErrorType ReadMemory(const VmbUint64_t &address, UcharVector &buffer, VmbUint32_t &completeReads) const noexcept

Same as ReadMemory(const Uint64Vector&, UcharVector&) const, but returns the number of bytes successfully read in case of an error VmbErrorIncomplete.

Parameters:
  • address[in] The address to read from

  • buffer[out] The returned data as vector

  • completeReads[out] The number of successfully read bytes

Return values:
  • VmbErrorSuccess – If all requested bytes have been read

  • VmbErrorBadParameter – Vector buffer is empty.

  • VmbErrorIncomplete – If at least one, but not all bytes have been read. See overload ReadMemory(const VmbUint64_t&, UcharVector&, VmbUint32_t&) const.

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

inline VmbErrorType WriteMemory(const VmbUint64_t &address, const UcharVector &buffer) noexcept

Writes a block of memory. The number of bytes to write is determined by the size of the provided buffer.

Parameters:
  • address[in] The address to write to

  • buffer[in] The data to write as vector

Return values:
  • VmbErrorSuccess – If all requested bytes have been written

  • VmbErrorBadParameter – Vector buffer is empty.

  • VmbErrorIncomplete – If at least one, but not all bytes have been written. See overload WriteMemory(const VmbUint64_t&, const UcharVector&, VmbUint32_t&).

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

inline VmbErrorType WriteMemory(const VmbUint64_t &address, const UcharVector &buffer, VmbUint32_t &sizeComplete) noexcept

Same as WriteMemory(const Uint64Vector&, const UcharVector&), but returns the number of bytes successfully written in case of an error VmbErrorIncomplete.

Parameters:
  • address[in] The address to write to

  • buffer[in] The data to write as vector

  • sizeComplete[out] The number of successfully written bytes

Return values:
  • VmbErrorSuccess – If all requested bytes have been written

  • VmbErrorBadParameter – Vector buffer is empty.

  • VmbErrorIncomplete – If at least one, but not all bytes have been written.

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

IMEXPORT VmbErrorType AcquireSingleImage (FramePtr &pFrame, VmbUint32_t timeout, FrameAllocationMode allocationMode=FrameAllocation_AnnounceFrame)

Gets one image synchronously.

Parameters:
  • pFrame[out] The frame that gets filled

  • timeout[in] The time in milliseconds to wait until the frame got filled

  • allocationMode[in] The frame allocation mode

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterpFrame is null.

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInUse – If the frame was queued with a frame callback

  • VmbErrorTimeout – Call timed out

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

inline VmbErrorType AcquireMultipleImages(FramePtrVector &frames, VmbUint32_t timeout, FrameAllocationMode allocationMode = FrameAllocation_AnnounceFrame)

Gets a certain number of images synchronously.

The size of the frame vector determines the number of frames to use.

Parameters:
  • frames[inout] The frames that get filled

  • timeout[in] The time in milliseconds to wait until one frame got filled

  • allocationMode[in] The frame allocation mode

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorInternalFault – Filling all the frames was not successful.

  • VmbErrorBadParameter – Vector frames is empty or one of the frames is null.

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInUse – If the frame was queued with a frame callback

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

inline VmbErrorType AcquireMultipleImages(FramePtrVector &frames, VmbUint32_t timeout, VmbUint32_t &numFramesCompleted, FrameAllocationMode allocationMode = FrameAllocation_AnnounceFrame)

Same as AcquireMultipleImages(FramePtrVector&, VmbUint32_t, FrameAllocationMode), but returns the number of frames that were filled completely.

The size of the frame vector determines the number of frames to use. On return, numFramesCompleted holds the number of frames actually filled.

Parameters:
  • frames[inout] The frames to fill

  • timeout[in] The time in milliseconds to wait until one frame got filled

  • numFramesCompleted[out] The number of frames that were filled completely

  • allocationMode[in] The frame allocation mode

Return values:
  • VmbErrorInternalFault – Filling all the frames was not successful.

  • VmbErrorBadParameter – Vector frames is empty or one of the frames is null.

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInUse – If the frame was queued with a frame callback

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

IMEXPORT VmbErrorType StartContinuousImageAcquisition (int bufferCount, const IFrameObserverPtr &pObserver, FrameAllocationMode allocationMode=FrameAllocation_AnnounceFrame)

Starts streaming and allocates the needed frames.

Parameters:
  • bufferCount[in] The number of frames to use

  • pObserver[out] The observer to use on arrival of acquired frames

  • allocationMode[in] The frame allocation mode

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

IMEXPORT VmbErrorType StopContinuousImageAcquisition ()

Stops streaming and deallocates the frames used.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorDeviceNotOpen – The camera is currently not open

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetPayloadSize (VmbUint32_t &nPayloadSize) noexcept

Get the necessary payload size for buffer allocation.

Parameters:

nPayloadSize[in] The variable to write the payload size to

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType AnnounceFrame (const FramePtr &pFrame) override

Announces a frame to the API that may be queued for frame capturing later.

The frame is announced for the first stream.

Allows some preparation for frames like DMA preparation depending on the transport layer. The order in which the frames are announced is not taken in consideration by the API.

Parameters:

pFrame[in] Shared pointer to a frame to announce

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorBadParameterpFrame is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType RevokeFrame (const FramePtr &pFrame) override

Revoke a frame from the API.

The frame is revoked for the first stream.

The referenced frame is removed from the pool of frames for capturing images.

A call to FlushQueue may be required for the frame to be revoked successfully.

Parameters:

pFrame[in] Shared pointer to a frame that is to be removed from the list of announced frames

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given frame pointer is not valid

  • VmbErrorBadParameterpFrame is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType RevokeAllFrames () override

Revoke all frames announced for the first stream of this camera.

A call to FlushQueue may be required to be able to revoke all frames.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType QueueFrame (const FramePtr &pFrame) override

Queues a frame that may be filled during frame capturing.

The frame is queued for the first stream.

The given frame is put into a queue that will be filled sequentially. The order in which the frames are filled is determined by the order in which they are queued. If the frame was announced with AnnounceFrame() before, the application has to ensure that the frame is also revoked by calling RevokeFrame() or RevokeAll() when cleaning up.

Parameters:

pFrame[in] A shared pointer to a frame

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given frame is not valid

  • VmbErrorBadParameterpFrame is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

  • VmbErrorInvalidCall – StopContinuousImageAcquisition is currently running in another thread

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType FlushQueue () override

Flushes the capture queue.

Works with the first available stream.

All currently queued frames will be returned to the user, leaving no frames in the input queue. After this call, no frame notification will occur until frames are queued again.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType StartCapture () override

Prepare the API for incoming frames from this camera. Works with the first available stream.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType EndCapture () override

Stops the API from being able to receive frames from this camera. The frame callback will not be called any more. Works with the first stream of the camera.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorDeviceNotOpen – The camera is currently not open

  • VmbErrorNotAvailable – The camera does not provide any streams

Returns:

VmbErrorType

IMEXPORT bool ExtendedIdEquals (char const *extendedId) noexcept

Checks if the extended id of this object matches a string.

Parameters:

extendedId[in] the id to to compare the extended id of this object with

Returns:

true, if extendedId is non-null and matches the extended id of this object, false otherwise.

Camera(const Camera&) = delete

The object is non-copyable.

Camera &operator=(const Camera&) = delete

The object is non-copyable.

virtual IMEXPORT VmbErrorType GetStreamBufferAlignment (VmbUint32_t &nBufferAlignment) override

Retrieve the necessary buffer alignment size in bytes (equals 1 if Data Stream has no such restriction)

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

Returns:

VmbErrorType

LocalDevice

class LocalDevice : public VmbCPP::PersistableFeatureContainer

A module providing access to the features of the local device GenTL module.

Public Functions

IMEXPORT LocalDevice(VmbHandle_t handle)

Creates an instance of class LocalDevice.

Parameters:

handle[in] The handle of the local device

LocalDevice(const LocalDevice&) = delete

Object is not copyable.

LocalDevice &operator=(const LocalDevice&) = delete

Object is not copyable.

Stream

class Stream : public VmbCPP::PersistableFeatureContainer, public VmbCPP::ICapturingModule

A class providing access to a single stream of a single camera.

The class provides functionality for acquiring data via the stream. Furthermore it provides access to information about the corresponding GenTL stream module.

Public Functions

IMEXPORT Stream(VmbHandle_t streamHandle, bool deviceIsOpen)

Creates an instance of class Stream.

Parameters:
  • streamHandle[in] Handle to the stream

  • deviceIsOpen[in] Sets the internal status to know if the camera device is open or not

Stream() = delete

Object is not default constructible.

Stream(const Stream&) = delete

Object is not copyable.

Stream &operator=(const Stream&) = delete

Object is not copyable.

virtual IMEXPORT ~Stream()

Destroys an instance of class Stream. Destroying a stream implicitly closes it beforehand.

virtual IMEXPORT VmbErrorType Open ()

Opens the specified stream.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenVmbSystem or Camera was not opened before the current command

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType Close ()

Closes the specified stream.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType AnnounceFrame (const FramePtr &pFrame) override

Announces a frame to the API that may be queued for frame capturing later. Allows some preparation for frames like DMA preparation depending on the transport layer. The order in which the frames are announced is not taken in consideration by the API.

Parameters:

pFrame[in] Shared pointer to a frame to announce

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorBadParameter – “pFrame” is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType RevokeFrame (const FramePtr &pFrame) override

Revoke a frame from the API. The referenced frame is removed from the pool of frames for capturing images.

Parameters:

pFrame[in] Shared pointer to a frame that is to be removed from the list of announced frames

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

  • VmbErrorBadHandle – The given frame pointer is not valid

  • VmbErrorBadParameter – “pFrame” is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType RevokeAllFrames () override

Revoke all frames assigned to this certain camera.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

  • VmbErrorBadHandle – The given handle is not valid

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType QueueFrame (const FramePtr &pFrame) override

Queues a frame that may be filled during frame capturing.

The given frame is put into a queue that will be filled sequentially. The order in which the frames are filled is determined by the order in which they are queued. If the frame was announced with AnnounceFrame() before, the application has to ensure that the frame is also revoked by calling RevokeFrame() or RevokeAll() when cleaning up.

Parameters:

pFrame[in] A shared pointer to a frame

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

  • VmbErrorBadHandle – The given frame is not valid

  • VmbErrorBadParameter – “pFrame” is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

  • VmbErrorInvalidCall – StopContinuousImageAcquisition is currently running in another thread

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType FlushQueue () override

Flushes the capture queue.

All currently queued frames will be returned to the user, leaving no frames in the input queue. After this call, no frame notification will occur until frames are queued again.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

  • VmbErrorBadHandle – The given handle is not valid

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType StartCapture () noexcept override

Prepare the API for incoming frames from this camera.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorDeviceNotOpenCamera was not opened for usage

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType EndCapture () noexcept override

Stop the API from being able to receive frames from this camera.

Consequences of VmbCaptureEnd():

  • The frame queue is flushed

  • The frame callback will not be called any more

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

  • VmbErrorBadHandle – The given handle is not valid

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType GetStreamBufferAlignment (VmbUint32_t &nBufferAlignment) override

Retrieve the necessary buffer alignment size in bytes (equals 1 if Data Stream has no such restriction)

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorDeviceNotOpenCamera was not opened before the current command

Returns:

VmbErrorType

Frame

class Frame

An object representing a data buffer that can be filled by acquiring data from a camera.

Public Types

typedef std::function<VmbErrorType(ChunkFeatureContainerPtr&)> ChunkDataAccessFunction

Type for an std::function for accessing ChunkData via a FeatureContainer.

Public Functions

explicit IMEXPORT Frame(VmbInt64_t bufferSize, FrameAllocationMode allocationMode = FrameAllocation_AnnounceFrame, VmbUint32_t bufferAlignment = 1)

Creates an instance of class Frame of a certain size and memory alignment.

Parameters:
  • bufferSize[in] The size of the underlying buffer

  • allocationMode[in] Indicates if announce frame or alloc and announce frame is used

  • bufferAlignment[in] The alignment that needs to be satisfied for the frame buffer allocation

IMEXPORT Frame(VmbUchar_t *pBuffer, VmbInt64_t bufferSize)

Creates an instance of class Frame with the given user buffer of the given size.

Parameters:
  • pBuffer[in] A pointer to an allocated buffer

  • bufferSize[in] The size of the underlying buffer

IMEXPORT ~Frame()

Destroys an instance of class Frame.

IMEXPORT VmbErrorType RegisterObserver (const IFrameObserverPtr &pObserver)

Registers an observer that will be called whenever a new frame arrives. As new frames arrive, the observer’s FrameReceived method will be called. Only one observer can be registered.

Parameters:

pObserver[in] An object that implements the IObserver interface

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterpObserver is null.

  • VmbErrorResources – The observer was in use

Returns:

VmbErrorType

IMEXPORT VmbErrorType UnregisterObserver ()

Unregisters the observer that was called whenever a new frame arrived.

IMEXPORT VmbErrorType GetBuffer (VmbUchar_t *&pBuffer)

Returns the complete buffer including image and chunk data.

Parameters:

pBuffer[out] A pointer to the buffer

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetBuffer (const VmbUchar_t *&pBuffer) const

Returns the complete buffer including image and chunk data.

Parameters:

pBuffer[out] A pointer to the buffer

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetImage (VmbUchar_t *&pBuffer)

Returns only the image data.

Parameters:

pBuffer[out] A pointer to the buffer

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetImage (const VmbUchar_t *&pBuffer) const

Returns the pointer to the first byte of the image data.

Parameters:

pBuffer[out] A pointer to the buffer

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetReceiveStatus (VmbFrameStatusType &status) const

Returns the receive status of a frame.

Parameters:

status[out] The receive status

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetPayloadType (VmbPayloadType &payloadType) const

Returns the payload type of a frame.

Parameters:

payloadType[out] The payload type

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetBufferSize (VmbUint32_t &bufferSize) const

Returns the memory size of the frame buffer holding.

both the image data and the chunk data

Parameters:

bufferSize[out] The size in bytes

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetPixelFormat (VmbPixelFormatType &pixelFormat) const

Returns the GenICam pixel format.

Parameters:

pixelFormat[out] The GenICam pixel format

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetWidth (VmbUint32_t &width) const

Returns the width of the image.

Parameters:

width[out] The width in pixels

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetHeight (VmbUint32_t &height) const

Returns the height of the image.

Parameters:

height[out] The height in pixels

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetOffsetX (VmbUint32_t &offsetX) const

Returns the X offset of the image.

Parameters:

offsetX[out] The X offset in pixels

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetOffsetY (VmbUint32_t &offsetY) const

Returns the Y offset of the image.

Parameters:

offsetY[out] The Y offset in pixels

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetFrameID (VmbUint64_t &frameID) const

Returns the frame ID.

Parameters:

frameID[out] The frame ID

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetTimestamp (VmbUint64_t &timestamp) const

Returns the timestamp.

Parameters:

timestamp[out] The timestamp

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

IMEXPORT VmbErrorType ContainsChunkData (VmbBool_t &containsChunkData) const

Returns true if the frame contains Chunk Data.

Parameters:

containsChunkData[out] true if the frame contains Chunk Data

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorNotAvailable – If the underlying Transport Layer does not provide this information

Returns:

VmbErrorType

inline VmbErrorType AccessChunkData(ChunkDataAccessFunction chunkAccessFunction)

Access the frame’s chunk data via a FeatureContainerPtr.

Note

Chunk data can be accessed only in the scope of the given ChunkDataAccessFunction.

Parameters:

chunkAccessFunction[in] Callback for Chunk data access

Return values:

VmbErrorSuccess – If no error

Returns:

VmbErrorType

bool GetObserver(IFrameObserverPtr &observer) const

Getter for the frame observer.

Parameters:

observer[out] the frame observer pointer to write the retrieved observer to.

Returns:

True, if there was a non-null observer to retrieve, false otherwise.

Frame() = delete

No default ctor.

Frame(Frame&) = delete

No copy ctor.

Frame &operator=(const Frame&) = delete

No assignment operator.

struct Impl

FeatureContainer

class FeatureContainer : protected virtual VmbCPP::BasicLockable

A entity providing access to a set of features.

Subclassed by VmbCPP::PersistableFeatureContainer, VmbCPP::VmbSystem

Public Functions

IMEXPORT FeatureContainer()

Creates an instance of class FeatureContainer.

FeatureContainer(const FeatureContainer&) = delete

Object is non-copyable.

FeatureContainer &operator=(const FeatureContainer&) = delete

Object is non-copyable.

IMEXPORT ~FeatureContainer()

Destroys an instance of class FeatureContainer.

IMEXPORT VmbErrorType GetFeatureByName (const char *pName, FeaturePtr &pFeature)

Gets one particular feature of a feature container (e.g. a camera)

Parameters:
  • pName[in] The name of the feature to get

  • pFeature[out] The queried feature

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorDeviceNotOpen – Base feature class (e.g. Camera) was not opened.

  • VmbErrorBadParameterpName is null.

Returns:

VmbErrorType

VmbErrorType GetFeatureByName(std::nullptr_t, FeaturePtr&) = delete

the feature name must be non-null

inline VmbErrorType GetFeatures(FeaturePtrVector &features)

Gets all features of a feature container (e.g. a camera)

Once queried, this information remains static throughout the object’s lifetime

Parameters:

features[out] The container for all queried features

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterfeatures is empty.

Returns:

VmbErrorType

VmbHandle_t GetHandle() const noexcept

Gets the handle used for this container by the Vmb C API.

PersistableFeatureContainer

class PersistableFeatureContainer : public VmbCPP::FeatureContainer

An interface providing access and persistance functionality for features.

Subclassed by VmbCPP::Camera, VmbCPP::Interface, VmbCPP::LocalDevice, VmbCPP::Stream, VmbCPP::TransportLayer

Public Functions

IMEXPORT PersistableFeatureContainer()

Creates an instance of class FeatureContainer.

PersistableFeatureContainer(const PersistableFeatureContainer&) = delete

Object is not copyable.

PersistableFeatureContainer &operator=(const PersistableFeatureContainer&) = delete

Object is not copyable.

IMEXPORT VmbErrorType SaveSettings (const VmbFilePathChar_t *filePath, VmbFeaturePersistSettings_t *pSettings=nullptr) const noexcept

Saves the current module setup to an XML file.

Parameters:
  • filePath[in] Path of the XML file

  • pSettings[in] Pointer to settings struct

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorBadParameter – If filePath is or the settings struct is invalid

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The object handle is not valid

  • VmbErrorNotFound – The object handle is insufficient to identify the module that should be saved

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

  • VmbErrorIO – There was an issue writing the file.

Returns:

VmbErrorType

VmbErrorType SaveSettings(std::nullptr_t, VmbFeaturePersistSettings_t *pSettings = nullptr) const noexcept = delete

Settings cannot be saved given null as file path.

IMEXPORT VmbErrorType LoadSettings (const VmbFilePathChar_t *const filePath, VmbFeaturePersistSettings_t *pSettings=nullptr) const noexcept

Loads the current module setup from an XML file into the camera.

Parameters:
  • filePath[in] Name of the XML file

  • pSettings[in] Pointer to settings struct

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorBadHandle – The object handle is not valid

  • VmbErrorAmbiguous – The module to restore the settings for cannot be uniquely identified based on the information available

  • VmbErrorNotFound – The object handle is insufficient to identify the module that should be restored

  • VmbErrorRetriesExceeded – Some or all of the features could not be restored with the max iterations specified

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

  • VmbErrorBadParameter – If filePath is null or the settings struct is invalid

  • VmbErrorIO – There was an issue with reading the file.

Returns:

An error code indicating success or the type of error that occured.

VmbErrorType LoadSettings(std::nullptr_t, VmbFeaturePersistSettings_t *pSettings = nullptr) const noexcept = delete

Loading settings requires a non-null path.

Feature

class Feature

Class providing access to one feature of one module.

Public Functions

Feature() = delete

Object is not default constructible.

Feature(const Feature&) = delete

Object is not copy constructible.

Feature &operator=(const Feature&) = delete

Object is not copy constructible.

IMEXPORT VmbErrorType GetValue (VmbInt64_t &value) const noexcept

Queries the value of a feature of type Integer or Enumeration.

Parameters:

value[out] The feature’s value

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetValue (double &value) const noexcept

Queries the value of a feature of type Float.

Parameters:

value[out] The feature’s value

Returns:

VmbErrorType

inline VmbErrorType GetValue(std::string &value) const noexcept

Queries the value of a feature of type String or Enumeration.

Parameters:

value[out] The feature’s value

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetValue (bool &value) const noexcept

Queries the value of a feature of type Bool.

Parameters:

value[out] The feature’s value

Returns:

VmbErrorType

inline VmbErrorType GetValue(UcharVector &value) const noexcept

Queries the value of a feature of type Register.

Parameters:

value[out] The feature’s value

Returns:

VmbErrorType

inline VmbErrorType GetValue(UcharVector &value, VmbUint32_t &sizeFilled) const noexcept

Queries the value of a feature of type const Register.

Parameters:
  • value[out] The feature’s value

  • sizeFilled[out] The number of actually received values

Returns:

VmbErrorType

inline VmbErrorType GetValues(Int64Vector &values) noexcept

Queries the possible integer values of a feature of type Enumeration.

Parameters:

values[out] The feature’s values

Returns:

VmbErrorType

inline VmbErrorType GetValues(StringVector &values) noexcept

Queries the string values of a feature of type Enumeration.

Parameters:

values[out] The feature’s values

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetEntry (EnumEntry &entry, const char *pEntryName) const noexcept

Queries a single enum entry of a feature of type Enumeration.

Parameters:
  • entry[out] An enum feature’s enum entry

  • pEntryName[in] The name of the enum entry

Returns:

VmbErrorType

inline VmbErrorType GetEntries(EnumEntryVector &entries) noexcept

Queries all enum entries of a feature of type Enumeration.

Parameters:

entries[out] An enum feature’s enum entries

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetRange (double &minimum, double &maximum) const noexcept

Queries the range of a feature of type Float.

Parameters:
  • minimum[out] The feature’s min value

  • maximum[out] The feature’s max value

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetRange (VmbInt64_t &minimum, VmbInt64_t &maximum) const noexcept

Queries the range of a feature of type Integer.

Parameters:
  • minimum[out] The feature’s min value

  • maximum[out] The feature’s max value

Returns:

VmbErrorType

IMEXPORT VmbErrorType SetValue (VmbInt64_t value) noexcept

Sets and integer or enum feature.

If the feature is an enum feature, the value set is the enum entry corresponding to the integer value.

If known, use pass the string value instead, since this is more performant.

Parameters:

value[in] The feature’s value

Returns:

VmbErrorType

template<class IntegralType>
inline std::enable_if<std::is_integral<IntegralType>::value && !std::is_same<IntegralType, VmbInt64_t>::value, VmbErrorType>::type SetValue(IntegralType value) noexcept

Convenience function for calling SetValue(VmbInt64_t) with an integral value without the need to cast the parameter to VmbInt64_t.

Calls SetValue(static_cast<VmbInt64_t>(value))

Template Parameters:

IntegralType – an integral type other than VmbInt64_t

template<class EnumType>
inline std::enable_if<!std::is_same<bool, typename impl::UnderlyingTypeHelper<EnumType>::type>::value, VmbErrorType>::type SetValue(EnumType value) noexcept

Convenience function for calling SetValue(VmbInt64_t) with an enum value without the need to cast the parameter to VmbInt64_t.

Calls SetValue(static_cast<VmbInt64_t>(value))

Template Parameters:

EnumType – an enum type that with an underlying type other than bool.

IMEXPORT VmbErrorType SetValue (double value) noexcept

Sets the value of a feature float feature.

Parameters:

value[in] The feature’s value

Returns:

VmbErrorType

IMEXPORT VmbErrorType SetValue (const char *pValue) noexcept

Sets the value of a string feature or an enumeration feature.

Parameters:

pValue[in] The feature’s value

Returns:

VmbErrorType

VmbErrorType SetValue(std::nullptr_t) noexcept = delete

null is not allowed as string value

IMEXPORT VmbErrorType SetValue (bool value) noexcept

Sets the value of a feature of type Bool.

Parameters:

value[in] The feature’s value

Returns:

VmbErrorType

inline VmbErrorType SetValue(const UcharVector &value) noexcept

Sets the value of a feature of type Register.

Parameters:

value[in] The feature’s value

Returns:

VmbErrorType

IMEXPORT VmbErrorType HasIncrement (VmbBool_t &incrementSupported) const noexcept

Checks, if a Float or Integer feature provides an increment.

Integer features are always assumed to provide an incement, even if it defaults to 0.

Parameters:

incrementSupported[out] The feature’s increment support state

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetIncrement (VmbInt64_t &increment) const noexcept

Gets the increment of a feature of type Integer.

Parameters:

increment[out] The feature’s increment

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetIncrement (double &increment) const noexcept

Gets the increment of a feature of type Float.

Parameters:

increment[out] The feature’s increment

Returns:

VmbErrorType

IMEXPORT VmbErrorType IsValueAvailable (const char *pValue, bool &available) const noexcept

Indicates whether an existing enumeration value is currently available.

An enumeration value might not be available due to the module’s current configuration.

Parameters:
  • pValue[in] The enumeration value as string

  • available[out] True when the given value is available

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorInvalidValue – If the given value is not a valid enumeration value for this enum

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

  • VmbErrorWrongType – The feature is not an enumeration

Returns:

VmbErrorType

VmbErrorType IsValueAvailable(std::nullptr_t, bool&) const noexcept = delete

Searching for an enum entry given the null string is not allowed.

IMEXPORT VmbErrorType IsValueAvailable (VmbInt64_t value, bool &available) const noexcept

Indicates whether an existing enumeration value is currently available.

An enumeration value might not be selectable due to the module’s current configuration.

Parameters:
  • value[in] The enumeration value as int

  • available[out] True when the given value is available

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorInvalidValue – If the given value is not a valid enumeration value for this enum

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

  • VmbErrorWrongType – The feature is not an enumeration

Returns:

VmbErrorType

IMEXPORT VmbErrorType RunCommand () noexcept

Executes a feature of type Command.

Returns:

VmbErrorType

IMEXPORT VmbErrorType IsCommandDone (bool &isDone) const noexcept

Checks if the execution of a feature of type Command has finished.

Parameters:

isDone[out] True when execution has finished

Returns:

VmbErrorType

inline VmbErrorType GetName(std::string &name) const noexcept

Queries a feature’s name.

Note

The feature name does not change during the lifecycle of the object.

Parameters:

name[out] The feature’s name

Return values:
  • VmbErrorSuccess

  • VmbErrorResources

Returns:

VmbErrorType

inline VmbErrorType GetDisplayName(std::string &displayName) const noexcept

Queries a feature’s display name.

Note

The display name does not change during the lifecycle of the object.

Parameters:

displayName[out] The feature’s display name

Return values:
  • VmbErrorSuccess

  • VmbErrorResources

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetDataType (VmbFeatureDataType &dataType) const noexcept

Queries a feature’s type.

Note

The feature type does not change during the lifecycle of the object.

Parameters:

dataType[out] The feature’s type

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetFlags (VmbFeatureFlagsType &flags) const noexcept

Queries a feature’s access status.

The access to the feature may change depending on the state of the module.

Parameters:

flags[out] The feature’s access status

Returns:

VmbErrorType

inline VmbErrorType GetCategory(std::string &category) const noexcept

Queries a feature’s category in the feature tree.

Note

The category does not change during the lifecycle of the object.

Parameters:

category[out] The feature’s position in the feature tree

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetPollingTime (VmbUint32_t &pollingTime) const noexcept

Queries a feature’s polling time.

Parameters:

pollingTime[out] The interval to poll the feature

Returns:

VmbErrorType

inline VmbErrorType GetUnit(std::string &unit) const noexcept

Queries a feature’s unit.

Information about the unit used is only available for features of type Integer or Float. For other feature types the empty string is returned.

Note

The display name does not change during the lifecycle of the object.

Parameters:

unit[out] The feature’s unit

Returns:

VmbErrorType

inline VmbErrorType GetRepresentation(std::string &representation) const noexcept

Queries a feature’s representation.

Information about the representation used is only available for features of type Integer or Float. For other feature types the empty string is returned.

Note

The representation does not change during the lifecycle of the object.

Parameters:

representation[out] The feature’s representation

Returns:

VmbErrorType

IMEXPORT VmbErrorType GetVisibility (VmbFeatureVisibilityType &visibility) const noexcept

Queries a feature’s visibility.

Note

The visibiliry does not change during the lifecycle of the object.

Parameters:

visibility[out] The feature’s visibility

Returns:

VmbErrorType

inline VmbErrorType GetToolTip(std::string &toolTip) const noexcept

Queries a feature’s tooltip to display in the GUI.

Note

The tooltip does not change during the lifecycle of the object.

Parameters:

toolTip[out] The feature’s tool tip

Returns:

VmbErrorType

inline VmbErrorType GetDescription(std::string &description) const noexcept

Queries a feature’s description.

Note

The description does not change during the lifecycle of the object.

Parameters:

description[out] The feature’s description

Returns:

VmbErrorType

inline VmbErrorType GetSFNCNamespace(std::string &sFNCNamespace) const noexcept

Queries a feature’s Standard Feature Naming Convention namespace.

Note

The namespace does not change during the lifecycle of the object.

Parameters:

sFNCNamespace[out] The feature’s SFNC namespace

Returns:

VmbErrorType

inline VmbErrorType GetSelectedFeatures(FeaturePtrVector &selectedFeatures) noexcept

Gets the features that get selected by the current feature.

Note

The selected features do not change during the lifecycle of the object.

Parameters:

selectedFeatures[out] The selected features

Returns:

VmbErrorType

inline VmbErrorType GetValidValueSet(Int64Vector &validValues) const noexcept

Retrieves info about the valid value set of an integer feature. Features of other types will retrieve an error VmbErrorWrongType.

Note

Only some specific integer features support valid value sets.

Parameters:

validValues[out] Vector of int64, after the call it contains the valid value set.

Return values:
  • VmbErrorSuccess – The call was successful

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The current feature handle is not valid

  • VmbErrorWrongType – The type of the feature is not Integer

  • VmbErrorValidValueSetNotPresent – The feature does not provide a valid value set

  • VmbErrorResources – Resources not available (e.g. memory)

  • VmbErrorOther – Some other issue occured

Returns:

An error code indicating success or the type of error that occured.

IMEXPORT VmbErrorType IsReadable (bool &isReadable) noexcept

Queries the read access status of a feature.

Parameters:

isReadable[out] True when feature can be read

Returns:

VmbErrorType

IMEXPORT VmbErrorType IsWritable (bool &isWritable) noexcept

Queries the write access status of a feature.

Parameters:

isWritable[out] True when feature can be written

Returns:

VmbErrorType

IMEXPORT VmbErrorType IsStreamable (bool &isStreamable) const noexcept

Queries whether a feature’s should be persisted to store the state of a module.

Note

The information does not change during the lifecycle of the object.

Parameters:

isStreamable[out] True when streamable

Returns:

VmbErrorType

IMEXPORT VmbErrorType RegisterObserver (const IFeatureObserverPtr &pObserver)

Registers an observer that notifies the application whenever a feature is invalidated.

Note

A feature may be invalidated even though the value hasn’t changed. A notification of the observer just provides a notification that the value needs to be reread, to be sure the current module value is known.

Parameters:

pObserver[out] The observer to be registered

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterpObserver is null.

  • VmbErrorAlreadypObserver is already registered

  • VmbErrorDeviceNotOpen – Device is not open (FeatureContainer is null)

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

IMEXPORT VmbErrorType UnregisterObserver (const IFeatureObserverPtr &pObserver)

Unregisters an observer.

Parameters:

pObserver[out] The observer to be unregistered

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorBadParameterpObserver is null.

  • VmbErrorUnknownpObserver is not registered

  • VmbErrorDeviceNotOpen – Device is not open (FeatureContainer is null)

  • VmbErrorInvalidCall – If called from a chunk access callback

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

  • VmbErrorInternalFault – Could not lock feature observer list for writing.

Returns:

VmbErrorType

Interfaces

ICameraListObserver

class ICameraListObserver

A base class for listeners observing the list of available cameras.

Public Functions

virtual IMEXPORT void CameraListChanged (CameraPtr pCam, UpdateTriggerType reason)=0

The event handler function that gets called whenever an ICameraListObserver is triggered. This occurs most likely when a camera was plugged in or out.

Parameters:
  • pCam[out] The camera that triggered the event

  • reason[out] The reason why the callback routine was triggered (e.g., a new camera was plugged in)

inline virtual IMEXPORT ~ICameraListObserver()

Destroys an instance of class ICameraListObserver.

IInterfaceListObserver

class IInterfaceListObserver

Base class for Observers of the list of interfaces.

Public Functions

virtual IMEXPORT void InterfaceListChanged (InterfacePtr pInterface, UpdateTriggerType reason)=0

The event handler function that gets called whenever an IInterfaceListObserver is triggered.

Parameters:
  • pInterface[out] The interface that triggered the event

  • reason[out] The reason why the callback routine was triggered

inline virtual IMEXPORT ~IInterfaceListObserver()

Destroys an instance of class IInterfaceListObserver.

ICapturingModule

class ICapturingModule

Common interface for entities acquisition can be started for.

Stream and Camera both implement this interface. For Camera this interface provides access to the first stream.

Subclassed by VmbCPP::Camera, VmbCPP::Stream

Public Functions

virtual IMEXPORT VmbErrorType AnnounceFrame (const FramePtr &pFrame)=0

Announces a frame to the API that may be queued for frame capturing later. Allows some preparation for frames like DMA preparation depending on the transport layer. The order in which the frames are announced is not taken in consideration by the API.

Parameters:

pFrame[in] Shared pointer to a frame to announce

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorBadParameter – “pFrame” is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType RevokeFrame (const FramePtr &pFrame)=0

Revoke a frame from the API. The referenced frame is removed from the pool of frames for capturing images.

Parameters:

pFrame[in] Shared pointer to a frame that is to be removed from the list of announced frames

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given frame pointer is not valid

  • VmbErrorBadParameter – “pFrame” is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType RevokeAllFrames ()=0

Revoke all frames assigned to this certain camera.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType QueueFrame (const FramePtr &pFrame)=0

Queues a frame that may be filled during frame capturing.

The given frame is put into a queue that will be filled sequentially. The order in which the frames are filled is determined by the order in which they are queued. If the frame was announced with AnnounceFrame() before, the application has to ensure that the frame is also revoked by calling RevokeFrame() or RevokeAll() when cleaning up.

Parameters:

pFrame[in] A shared pointer to a frame

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given frame is not valid

  • VmbErrorBadParameter – “pFrame” is null.

  • VmbErrorStructSize – The given struct size is not valid for this version of the API

  • VmbErrorInvalidCall – StopContinuousImageAcquisition is currently running in another thread

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType FlushQueue ()=0

Flushes the capture queue.

All currently queued frames will be returned to the user, leaving no frames in the input queue. After this call, no frame notification will occur until frames are queued again.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType StartCapture ()=0

Prepare the API for incoming frames from this camera.

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

  • VmbErrorDeviceNotOpenCamera was not opened for usage

  • VmbErrorInvalidAccess – Operation is invalid with the current access mode

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType EndCapture ()=0

Stop the API from being able to receive frames from this camera.

Consequences of VmbCaptureEnd():

  • The frame queue is flushed

  • The frame callback will not be called any more

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

  • VmbErrorBadHandle – The given handle is not valid

Returns:

VmbErrorType

virtual IMEXPORT VmbErrorType GetStreamBufferAlignment (VmbUint32_t &nBufferAlignment)=0

Retrieve the necessary buffer alignment size in bytes (equals 1 if Data Stream has no such restriction)

Return values:
  • VmbErrorSuccess – If no error

  • VmbErrorApiNotStarted – VmbStartup() was not called before the current command

Returns:

VmbErrorType

inline virtual IMEXPORT ~ICapturingModule()

Destroys an instance of class ICapturingModule.

ICapturingModule(const ICapturingModule&) = delete

Object is non-copyable.

ICapturingModule &operator=(const ICapturingModule&) = delete

Object is non-copyable.

IFeatureObserver

class IFeatureObserver

The base class to derive feature invalidation listeners from.

Derived classes must implement IFeatureObserver::FeatureChanged .

Public Functions

virtual IMEXPORT void FeatureChanged (const FeaturePtr &pFeature)=0

The event handler function that gets called whenever a feature has changed.

Parameters:

pFeature[in] The feature that has changed

inline virtual IMEXPORT ~IFeatureObserver()

Destroys an instance of class IFeatureObserver.

IFrameObserver

class IFrameObserver

The base class for observers listening for acquired frames.

A derived class must implement the FrameReceived function.

Public Functions

virtual IMEXPORT void FrameReceived (const FramePtr pFrame)=0

The event handler function that gets called whenever a new frame is received.

Parameters:

pFrame[in] The frame that was received

inline virtual IMEXPORT ~IFrameObserver()

Destroys an instance of class IFrameObserver.

IFrameObserver() = delete

frame observers are not intended to be default constructed

Common Types & Constants

Main header file for the common types of the APIs.

This file describes all necessary definitions for types used within the Vmb APIs. These type definitions are designed to be portable from other languages and other operating systems.

Basic Types

VMB_FILE_PATH_LITERAL(value)

macro for converting a c string literal into a system dependent string literal

Adds L as prefix on Windows and is replaced by the unmodified value on other operating systems.

const VmbFilePathChar_t* path = VMB_FILE_PATH_LITERAL("./some/path/tl.cti");
enum VmbBoolVal

enum for bool values.

Values:

enumerator VmbBoolTrue
enumerator VmbBoolFalse
typedef signed char VmbInt8_t

8-bit signed integer.

typedef unsigned char VmbUint8_t

8-bit unsigned integer.

typedef short VmbInt16_t

16-bit signed integer.

typedef unsigned short VmbUint16_t

16-bit unsigned integer.

typedef int VmbInt32_t

32-bit signed integer.

typedef unsigned int VmbUint32_t

32-bit unsigned integer.

typedef long long VmbInt64_t

64-bit signed integer.

typedef unsigned long long VmbUint64_t

64-bit unsigned integer.

typedef void *VmbHandle_t

Handle, e.g. for a camera.

typedef char VmbBool_t

Boolean type (equivalent to char).

For values see VmbBoolVal

typedef enum VmbBoolVal VmbBoolVal

enum for bool values.

typedef unsigned char VmbUchar_t

char type.

typedef char VmbFilePathChar_t

Character type used for file paths

Error Codes

enum VmbErrorType

Error codes, returned by most functions.

Values:

enumerator VmbErrorSuccess

No error.

enumerator VmbErrorInternalFault

Unexpected fault in VmbC or driver.

enumerator VmbErrorApiNotStarted

VmbStartup() was not called before the current command

enumerator VmbErrorNotFound

The designated instance (camera, feature etc.) cannot be found.

enumerator VmbErrorBadHandle

The given handle is not valid.

enumerator VmbErrorDeviceNotOpen

Device was not opened for usage.

enumerator VmbErrorInvalidAccess

Operation is invalid with the current access mode.

enumerator VmbErrorBadParameter

One of the parameters is invalid (usually an illegal pointer)

enumerator VmbErrorStructSize

The given struct size is not valid for this version of the API.

enumerator VmbErrorMoreData

More data available in a string/list than space is provided.

enumerator VmbErrorWrongType

Wrong feature type for this access function.

enumerator VmbErrorInvalidValue

The value is not valid; either out of bounds or not an increment of the minimum.

enumerator VmbErrorTimeout

Timeout during wait.

enumerator VmbErrorOther

Other error.

enumerator VmbErrorResources

Resources not available (e.g. memory)

enumerator VmbErrorInvalidCall

Call is invalid in the current context (e.g. callback)

enumerator VmbErrorNoTL

No transport layers are found.

enumerator VmbErrorNotImplemented

API feature is not implemented.

enumerator VmbErrorNotSupported

API feature is not supported.

enumerator VmbErrorIncomplete

The current operation was not completed (e.g. a multiple registers read or write)

enumerator VmbErrorIO

Low level IO error in transport layer.

enumerator VmbErrorValidValueSetNotPresent

The valid value set could not be retrieved, since the feature does not provide this property.

enumerator VmbErrorGenTLUnspecified

Unspecified GenTL runtime error.

enumerator VmbErrorUnspecified

Unspecified runtime error.

enumerator VmbErrorBusy

The responsible module/entity is busy executing actions.

enumerator VmbErrorNoData

The function has no data to work on.

enumerator VmbErrorParsingChunkData

An error occurred parsing a buffer containing chunk data.

enumerator VmbErrorInUse

Something is already in use.

enumerator VmbErrorUnknown

Error condition unknown.

enumerator VmbErrorXml

Error parsing XML.

enumerator VmbErrorNotAvailable

Something is not available.

enumerator VmbErrorNotInitialized

Something is not initialized.

enumerator VmbErrorInvalidAddress

The given address is out of range or invalid for internal reasons.

enumerator VmbErrorAlready

Something has already been done.

enumerator VmbErrorNoChunkData

A frame expected to contain chunk data does not contain chunk data.

enumerator VmbErrorUserCallbackException

A callback provided by the user threw an exception.

enumerator VmbErrorFeaturesUnavailable

The XML for the module is currently not loaded; the module could be in the wrong state or the XML could not be retrieved or could not be parsed properly.

enumerator VmbErrorTLNotFound

A required transport layer could not be found or loaded.

enumerator VmbErrorAmbiguous

An entity cannot be uniquely identified based on the information provided.

enumerator VmbErrorRetriesExceeded

Something could not be accomplished with a given number of retries.

enumerator VmbErrorInsufficientBufferCount

The operation requires more buffers.

enumerator VmbErrorCustom

The minimum error code to use for user defined error codes to avoid conflict with existing error codes.

typedef enum VmbErrorType VmbErrorType

Error codes, returned by most functions.

typedef VmbInt32_t VmbError_t

Type for an error returned by API methods; for values see VmbErrorType.

Version

typedef struct VmbVersionInfo VmbVersionInfo_t

Version information.

Pixel information

enum VmbPixelType

Indicates if pixel is monochrome or RGB.

Values:

enumerator VmbPixelMono

Monochrome pixel.

enumerator VmbPixelColor

Pixel bearing color information.

enum VmbPixelOccupyType

Indicates number of bits for a pixel. Needed for building values of VmbPixelFormatType.

Values:

enumerator VmbPixelOccupy8Bit

Pixel effectively occupies 8 bits.

enumerator VmbPixelOccupy10Bit

Pixel effectively occupies 10 bits.

enumerator VmbPixelOccupy12Bit

Pixel effectively occupies 12 bits.

enumerator VmbPixelOccupy14Bit

Pixel effectively occupies 14 bits.

enumerator VmbPixelOccupy16Bit

Pixel effectively occupies 16 bits.

enumerator VmbPixelOccupy24Bit

Pixel effectively occupies 24 bits.

enumerator VmbPixelOccupy32Bit

Pixel effectively occupies 32 bits.

enumerator VmbPixelOccupy48Bit

Pixel effectively occupies 48 bits.

enumerator VmbPixelOccupy64Bit

Pixel effectively occupies 64 bits.

enum VmbPixelFormatType

Pixel format types. As far as possible, the Pixel Format Naming Convention (PFNC) has been followed, allowing a few deviations. If data spans more than one byte, it is always LSB aligned, except if stated differently.

Values:

enumerator VmbPixelFormatMono8

Monochrome, 8 bits (PFNC: Mono8)

enumerator VmbPixelFormatMono10

Monochrome, 10 bits in 16 bits (PFNC: Mono10)

enumerator VmbPixelFormatMono10p

Monochrome, 10 bits in 16 bits (PFNC: Mono10p)

enumerator VmbPixelFormatMono12

Monochrome, 12 bits in 16 bits (PFNC: Mono12)

enumerator VmbPixelFormatMono12Packed

Monochrome, 2x12 bits in 24 bits (GEV:Mono12Packed)

enumerator VmbPixelFormatMono12p

Monochrome, 2x12 bits in 24 bits (PFNC: MonoPacked)

enumerator VmbPixelFormatMono14

Monochrome, 14 bits in 16 bits (PFNC: Mono14)

enumerator VmbPixelFormatMono16

Monochrome, 16 bits (PFNC: Mono16)

enumerator VmbPixelFormatBayerGR8

Bayer-color, 8 bits, starting with GR line (PFNC: BayerGR8)

enumerator VmbPixelFormatBayerRG8

Bayer-color, 8 bits, starting with RG line (PFNC: BayerRG8)

enumerator VmbPixelFormatBayerGB8

Bayer-color, 8 bits, starting with GB line (PFNC: BayerGB8)

enumerator VmbPixelFormatBayerBG8

Bayer-color, 8 bits, starting with BG line (PFNC: BayerBG8)

enumerator VmbPixelFormatBayerGR10

Bayer-color, 10 bits in 16 bits, starting with GR line (PFNC: BayerGR10)

enumerator VmbPixelFormatBayerRG10

Bayer-color, 10 bits in 16 bits, starting with RG line (PFNC: BayerRG10)

enumerator VmbPixelFormatBayerGB10

Bayer-color, 10 bits in 16 bits, starting with GB line (PFNC: BayerGB10)

enumerator VmbPixelFormatBayerBG10

Bayer-color, 10 bits in 16 bits, starting with BG line (PFNC: BayerBG10)

enumerator VmbPixelFormatBayerGR12

Bayer-color, 12 bits in 16 bits, starting with GR line (PFNC: BayerGR12)

enumerator VmbPixelFormatBayerRG12

Bayer-color, 12 bits in 16 bits, starting with RG line (PFNC: BayerRG12)

enumerator VmbPixelFormatBayerGB12

Bayer-color, 12 bits in 16 bits, starting with GB line (PFNC: BayerGB12)

enumerator VmbPixelFormatBayerBG12

Bayer-color, 12 bits in 16 bits, starting with BG line (PFNC: BayerBG12)

enumerator VmbPixelFormatBayerGR12Packed

Bayer-color, 2x12 bits in 24 bits, starting with GR line (GEV:BayerGR12Packed)

enumerator VmbPixelFormatBayerRG12Packed

Bayer-color, 2x12 bits in 24 bits, starting with RG line (GEV:BayerRG12Packed)

enumerator VmbPixelFormatBayerGB12Packed

Bayer-color, 2x12 bits in 24 bits, starting with GB line (GEV:BayerGB12Packed)

enumerator VmbPixelFormatBayerBG12Packed

Bayer-color, 2x12 bits in 24 bits, starting with BG line (GEV:BayerBG12Packed)

enumerator VmbPixelFormatBayerGR10p

Bayer-color, 10 bits continuous packed, starting with GR line (PFNC: BayerGR10p)

enumerator VmbPixelFormatBayerRG10p

Bayer-color, 10 bits continuous packed, starting with RG line (PFNC: BayerRG10p)

enumerator VmbPixelFormatBayerGB10p

Bayer-color, 10 bits continuous packed, starting with GB line (PFNC: BayerGB10p)

enumerator VmbPixelFormatBayerBG10p

Bayer-color, 10 bits continuous packed, starting with BG line (PFNC: BayerBG10p)

enumerator VmbPixelFormatBayerGR12p

Bayer-color, 12 bits continuous packed, starting with GR line (PFNC: BayerGR12p)

enumerator VmbPixelFormatBayerRG12p

Bayer-color, 12 bits continuous packed, starting with RG line (PFNC: BayerRG12p)

enumerator VmbPixelFormatBayerGB12p

Bayer-color, 12 bits continuous packed, starting with GB line (PFNC: BayerGB12p)

enumerator VmbPixelFormatBayerBG12p

Bayer-color, 12 bits continuous packed, starting with BG line (PFNC: BayerBG12p)

enumerator VmbPixelFormatBayerGR16

Bayer-color, 16 bits, starting with GR line (PFNC: BayerGR16)

enumerator VmbPixelFormatBayerRG16

Bayer-color, 16 bits, starting with RG line (PFNC: BayerRG16)

enumerator VmbPixelFormatBayerGB16

Bayer-color, 16 bits, starting with GB line (PFNC: BayerGB16)

enumerator VmbPixelFormatBayerBG16

Bayer-color, 16 bits, starting with BG line (PFNC: BayerBG16)

enumerator VmbPixelFormatRgb8

RGB, 8 bits x 3 (PFNC: RGB8)

enumerator VmbPixelFormatBgr8

BGR, 8 bits x 3 (PFNC: BGR8)

enumerator VmbPixelFormatRgb10

RGB, 12 bits in 16 bits x 3 (PFNC: RGB12)

enumerator VmbPixelFormatBgr10

RGB, 12 bits in 16 bits x 3 (PFNC: RGB12)

enumerator VmbPixelFormatRgb12

RGB, 12 bits in 16 bits x 3 (PFNC: RGB12)

enumerator VmbPixelFormatBgr12

RGB, 12 bits in 16 bits x 3 (PFNC: RGB12)

enumerator VmbPixelFormatRgb14

RGB, 14 bits in 16 bits x 3 (PFNC: RGB12)

enumerator VmbPixelFormatBgr14

RGB, 14 bits in 16 bits x 3 (PFNC: RGB12)

enumerator VmbPixelFormatRgb16

RGB, 16 bits x 3 (PFNC: RGB16)

enumerator VmbPixelFormatBgr16

RGB, 16 bits x 3 (PFNC: RGB16)

enumerator VmbPixelFormatArgb8

ARGB, 8 bits x 4 (PFNC: RGBa8)

enumerator VmbPixelFormatRgba8

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatBgra8

BGRA, 8 bits x 4 (PFNC: BGRa8)

enumerator VmbPixelFormatRgba10

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatBgra10

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatRgba12

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatBgra12

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatRgba14

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatBgra14

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatRgba16

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatBgra16

RGBA, 8 bits x 4, legacy name.

enumerator VmbPixelFormatYuv411

YUV 4:1:1 with 8 bits (PFNC: YUV411_8_UYYVYY, GEV:YUV411Packed)

enumerator VmbPixelFormatYuv422

YUV 4:2:2 with 8 bits (PFNC: YUV422_8_UYVY, GEV:YUV422Packed)

enumerator VmbPixelFormatYuv444

YUV 4:4:4 with 8 bits (PFNC: YUV8_UYV, GEV:YUV444Packed)

enumerator VmbPixelFormatYuv422_8

YUV 4:2:2 with 8 bits Channel order YUYV (PFNC: YUV422_8)

enumerator VmbPixelFormatYCbCr8_CbYCr

YCbCr 4:4:4 with 8 bits (PFNC: YCbCr8_CbYCr) - identical to VmbPixelFormatYuv444.

enumerator VmbPixelFormatYCbCr422_8

YCbCr 4:2:2 8-bit YCbYCr (PFNC: YCbCr422_8)

enumerator VmbPixelFormatYCbCr411_8_CbYYCrYY

YCbCr 4:1:1 with 8 bits (PFNC: YCbCr411_8_CbYYCrYY) - identical to VmbPixelFormatYuv411.

enumerator VmbPixelFormatYCbCr601_8_CbYCr

YCbCr601 4:4:4 8-bit CbYCrt (PFNC: YCbCr601_8_CbYCr)

enumerator VmbPixelFormatYCbCr601_422_8

YCbCr601 4:2:2 8-bit YCbYCr (PFNC: YCbCr601_422_8)

enumerator VmbPixelFormatYCbCr601_411_8_CbYYCrYY

YCbCr601 4:1:1 8-bit CbYYCrYY (PFNC: YCbCr601_411_8_CbYYCrYY)

enumerator VmbPixelFormatYCbCr709_8_CbYCr

YCbCr709 4:4:4 8-bit CbYCr (PFNC: YCbCr709_8_CbYCr)

enumerator VmbPixelFormatYCbCr709_422_8

YCbCr709 4:2:2 8-bit YCbYCr (PFNC: YCbCr709_422_8)

enumerator VmbPixelFormatYCbCr709_411_8_CbYYCrYY

YCbCr709 4:1:1 8-bit CbYYCrYY (PFNC: YCbCr709_411_8_CbYYCrYY)

enumerator VmbPixelFormatYCbCr422_8_CbYCrY

YCbCr 4:2:2 with 8 bits (PFNC: YCbCr422_8_CbYCrY) - identical to VmbPixelFormatYuv422.

enumerator VmbPixelFormatYCbCr601_422_8_CbYCrY

YCbCr601 4:2:2 8-bit CbYCrY (PFNC: YCbCr601_422_8_CbYCrY)

enumerator VmbPixelFormatYCbCr709_422_8_CbYCrY

YCbCr709 4:2:2 8-bit CbYCrY (PFNC: YCbCr709_422_8_CbYCrY)

enumerator VmbPixelFormatYCbCr411_8

YCbCr 4:1:1 8-bit YYCbYYCr (PFNC: YCbCr411_8)

enumerator VmbPixelFormatYCbCr8

YCbCr 4:4:4 8-bit YCbCr (PFNC: YCbCr8)

enumerator VmbPixelFormatLast
typedef enum VmbPixelType VmbPixelType

Indicates if pixel is monochrome or RGB.

typedef enum VmbPixelOccupyType VmbPixelOccupyType

Indicates number of bits for a pixel. Needed for building values of VmbPixelFormatType.

typedef enum VmbPixelFormatType VmbPixelFormatType

Pixel format types. As far as possible, the Pixel Format Naming Convention (PFNC) has been followed, allowing a few deviations. If data spans more than one byte, it is always LSB aligned, except if stated differently.

typedef VmbUint32_t VmbPixelFormat_t

Type for the pixel format; for values see VmbPixelFormatType.

struct VmbVersionInfo
#include <VmbCommonTypes.h>

Version information.

Out

VmbUint32_t major

Major version number.

VmbUint32_t minor

Minor version number.

VmbUint32_t patch

Patch version number.

File containing constants used in the Vmb C API.

Defines

VMB_PATH_SEPARATOR_CHAR

the character used to separate file paths in the parameter of VmbStartup

VMB_PATH_SEPARATOR_STRING

the string used to separate file paths in the parameter of VmbStartup

VMB_SFNC_NAMESPACE_CUSTOM

The C string identifying the namespace of features not defined in the SFNC standard.

VMB_SFNC_NAMESPACE_STANDARD

The C string identifying the namespace of features defined in the SFNC standard.

Struct definitions for the VmbC API.

Transport layer

enum VmbTransportLayerType

Camera or transport layer type (for instance U3V or GEV).

Values:

enumerator VmbTransportLayerTypeUnknown

Interface is not known to this version of the API.

enumerator VmbTransportLayerTypeGEV

GigE Vision.

enumerator VmbTransportLayerTypeCL

Camera Link.

enumerator VmbTransportLayerTypeIIDC

IIDC 1394.

enumerator VmbTransportLayerTypeUVC

USB video class.

enumerator VmbTransportLayerTypeCXP

CoaXPress.

enumerator VmbTransportLayerTypeCLHS

Camera Link HS.

enumerator VmbTransportLayerTypeU3V

USB3 Vision Standard.

enumerator VmbTransportLayerTypeEthernet

Generic Ethernet.

enumerator VmbTransportLayerTypePCI

PCI / PCIe.

enumerator VmbTransportLayerTypeCustom

Non standard.

enumerator VmbTransportLayerTypeMixed

Mixed (transport layer only)

typedef enum VmbTransportLayerType VmbTransportLayerType

Camera or transport layer type (for instance U3V or GEV).

typedef VmbUint32_t VmbTransportLayerType_t

Type for an Interface; for values see VmbTransportLayerType.

typedef struct VmbTransportLayerInfo VmbTransportLayerInfo_t

Transport layer information.

Holds read-only information about a transport layer.

Interface

typedef struct VmbInterfaceInfo VmbInterfaceInfo_t

Interface information.

Holds read-only information about an interface.

Camera

enum VmbAccessModeType

Access mode for cameras.

Used in VmbCameraInfo_t as flags, so multiple modes can be announced, while in VmbCameraOpen(), no combination must be used.

Values:

enumerator VmbAccessModeNone

No access.

enumerator VmbAccessModeFull

Read and write access.

enumerator VmbAccessModeRead

Read-only access.

enumerator VmbAccessModeUnknown

Access type unknown.

enumerator VmbAccessModeExclusive

Read and write access without permitting access for other consumers.

typedef enum VmbAccessModeType VmbAccessModeType

Access mode for cameras.

Used in VmbCameraInfo_t as flags, so multiple modes can be announced, while in VmbCameraOpen(), no combination must be used.

typedef VmbUint32_t VmbAccessMode_t

Type for an AccessMode; for values see VmbAccessModeType.

typedef struct VmbCameraInfo VmbCameraInfo_t

Camera information.

Holds read-only information about a camera.

Feature

enum VmbFeatureDataType

Supported feature data types.

Values:

enumerator VmbFeatureDataUnknown

Unknown feature type.

enumerator VmbFeatureDataInt

64-bit integer feature

enumerator VmbFeatureDataFloat

64-bit floating point feature

enumerator VmbFeatureDataEnum

Enumeration feature.

enumerator VmbFeatureDataString

String feature.

enumerator VmbFeatureDataBool

Boolean feature.

enumerator VmbFeatureDataCommand

Command feature.

enumerator VmbFeatureDataRaw

Raw (direct register access) feature.

enumerator VmbFeatureDataNone

Feature with no data.

enum VmbFeatureVisibilityType

Feature visibility.

Values:

enumerator VmbFeatureVisibilityUnknown

Feature visibility is not known.

enumerator VmbFeatureVisibilityBeginner

Feature is visible in feature list (beginner level)

enumerator VmbFeatureVisibilityExpert

Feature is visible in feature list (expert level)

enumerator VmbFeatureVisibilityGuru

Feature is visible in feature list (guru level)

enumerator VmbFeatureVisibilityInvisible

Feature is visible in the feature list, but should be hidden in GUI applications.

enum VmbFeatureFlagsType

Feature flags.

Values:

enumerator VmbFeatureFlagsNone

No additional information is provided.

enumerator VmbFeatureFlagsRead

Static info about read access. Current status depends on access mode, check with VmbFeatureAccessQuery()

enumerator VmbFeatureFlagsWrite

Static info about write access. Current status depends on access mode, check with VmbFeatureAccessQuery()

enumerator VmbFeatureFlagsVolatile

Value may change at any time.

enumerator VmbFeatureFlagsModifyWrite

Value may change after a write.

typedef enum VmbFeatureDataType VmbFeatureDataType

Supported feature data types.

typedef VmbUint32_t VmbFeatureData_t

Data type for a Feature; for values see VmbFeatureDataType.

typedef enum VmbFeatureVisibilityType VmbFeatureVisibilityType

Feature visibility.

typedef VmbUint32_t VmbFeatureVisibility_t

Type for Feature visibility; for values see VmbFeatureVisibilityType.

typedef enum VmbFeatureFlagsType VmbFeatureFlagsType

Feature flags.

typedef VmbUint32_t VmbFeatureFlags_t

Type for Feature flags; for values see VmbFeatureFlagsType.

typedef struct VmbFeatureInfo VmbFeatureInfo_t

Feature information.

Holds read-only information about a feature.

typedef struct VmbFeatureEnumEntry VmbFeatureEnumEntry_t

Info about possible entries of an enumeration feature.

Frame

enum VmbFrameStatusType

Status of a frame transfer.

Values:

enumerator VmbFrameStatusComplete

Frame has been completed without errors.

enumerator VmbFrameStatusIncomplete

Frame could not be filled to the end.

enumerator VmbFrameStatusTooSmall

Frame buffer was too small.

enumerator VmbFrameStatusInvalid

Frame buffer was invalid.

enum VmbFrameFlagsType

Frame flags.

Values:

enumerator VmbFrameFlagsNone

No additional information is provided.

enumerator VmbFrameFlagsDimension

VmbFrame_t::width and VmbFrame_t::height are provided.

enumerator VmbFrameFlagsOffset

VmbFrame_t::offsetX and VmbFrame_t::offsetY are provided (ROI)

enumerator VmbFrameFlagsFrameID

VmbFrame_t::frameID is provided.

enumerator VmbFrameFlagsTimestamp

VmbFrame_t::timestamp is provided.

enumerator VmbFrameFlagsImageData

VmbFrame_t::imageData is provided.

enumerator VmbFrameFlagsPayloadType

VmbFrame_t::payloadType is provided.

enumerator VmbFrameFlagsChunkDataPresent

VmbFrame_t::chunkDataPresent is set based on info provided by the transport layer.

enum VmbPayloadType

Frame payload type.

Values:

enumerator VmbPayloadTypeUnknown

Unknown payload type.

enumerator VmbPayloadTypeImage

image data

enumerator VmbPayloadTypeRaw

raw data

enumerator VmbPayloadTypeFile

file data

enumerator VmbPayloadTypeJPEG

JPEG data as described in the GigEVision 2.0 specification.

enumerator VmbPayloadTypJPEG2000

JPEG 2000 data as described in the GigEVision 2.0 specification.

enumerator VmbPayloadTypeH264

H.264 data as described in the GigEVision 2.0 specification.

enumerator VmbPayloadTypeChunkOnly

Chunk data exclusively.

enumerator VmbPayloadTypeDeviceSpecific

Device specific data format.

enumerator VmbPayloadTypeGenDC

GenDC data.

typedef enum VmbFrameStatusType VmbFrameStatusType

Status of a frame transfer.

typedef VmbInt32_t VmbFrameStatus_t

Type for the frame status; for values see VmbFrameStatusType.

typedef enum VmbFrameFlagsType VmbFrameFlagsType

Frame flags.

typedef VmbUint32_t VmbFrameFlags_t

Type for Frame flags; for values see VmbFrameFlagsType.

typedef enum VmbPayloadType VmbPayloadType

Frame payload type.

typedef VmbUint32_t VmbPayloadType_t

Type representing the payload type of a frame. For values see VmbPayloadType.

typedef VmbUint32_t VmbImageDimension_t

Type used to represent a dimension value, e.g. the image height.

typedef struct VmbFrame VmbFrame_t

Frame delivered by the camera.

Save/LoadSettings

enum VmbFeaturePersistType

Type of features that are to be saved (persisted) to the XML file when using VmbSettingsSave.

Values:

enumerator VmbFeaturePersistAll

Save all features to XML, including look-up tables (if possible)

enumerator VmbFeaturePersistStreamable

Save only features marked as streamable, excluding look-up tables.

enumerator VmbFeaturePersistNoLUT

Save all features except look-up tables (default)

enum VmbModulePersistFlagsType

Parameters determining the operation mode of VmbSettingsSave and VmbSettingsLoad.

Values:

enumerator VmbModulePersistFlagsNone

Persist/Load features for no module.

enumerator VmbModulePersistFlagsTransportLayer

Persist/Load the transport layer features.

enumerator VmbModulePersistFlagsInterface

Persist/Load the interface features.

enumerator VmbModulePersistFlagsRemoteDevice

Persist/Load the remote device features.

enumerator VmbModulePersistFlagsLocalDevice

Persist/Load the local device features.

enumerator VmbModulePersistFlagsStreams

Persist/Load the features of stream modules.

enumerator VmbModulePersistFlagsAll

Persist/Load features for all modules.

enum VmbLogLevel

A level to use for logging.

Values:

enumerator VmbLogLevelNone

Nothing is logged regardless of the severity of the issue.

enumerator VmbLogLevelError

Only errors are logged.

enumerator VmbLogLevelDebug

Only error and debug messages are logged.

enumerator VmbLogLevelWarn

Only error, debug and warn messages are logged.

enumerator VmbLogLevelTrace

all messages are logged

enumerator VmbLogLevelAll

all messages are logged

typedef enum VmbFeaturePersistType VmbFeaturePersistType

Type of features that are to be saved (persisted) to the XML file when using VmbSettingsSave.

typedef VmbUint32_t VmbFeaturePersist_t

Type for feature persistence; for values see VmbFeaturePersistType.

typedef enum VmbModulePersistFlagsType VmbModulePersistFlagsType

Parameters determining the operation mode of VmbSettingsSave and VmbSettingsLoad.

typedef VmbUint32_t VmbModulePersistFlags_t

Type for module persist flags; for values see VmbModulePersistFlagsType.

Use a combination of VmbModulePersistFlagsType constants

typedef enum VmbLogLevel VmbLogLevel

A level to use for logging.

typedef VmbUint32_t VmbLogLevel_t

The type used for storing the log level.

Use a constant from VmbLogLevel

typedef struct VmbFeaturePersistSettings VmbFeaturePersistSettings_t

Parameters determining the operation mode of VmbSettingsSave and VmbSettingsLoad.

Callbacks

void(VMB_CALL * VmbInvalidationCallback )(const VmbHandle_t handle, const char *name, void *userContext)

Invalidation callback type for a function that gets called in a separate thread and has been registered with VmbFeatureInvalidationRegister().

While the callback is run, all feature data is atomic. After the callback finishes, the feature data may be updated with new values.

Do not spend too much time in this thread; it prevents the feature values from being updated from any other thread or the lower-level drivers.

Param handle:

[in] Handle for an entity that exposes features

Param name:

[in] Name of the feature

Param userContext:

[in] Pointer to the user context, see VmbFeatureInvalidationRegister

void(VMB_CALL * VmbFrameCallback )(const VmbHandle_t cameraHandle, const VmbHandle_t streamHandle, VmbFrame_t *frame)

Frame Callback type for a function that gets called in a separate thread if a frame has been queued with VmbCaptureFrameQueue.

Warning

Any operations closing the stream including VmbShutdown and VmbCameraClose in addition to VmbCaptureEnd block until any currently active callbacks return. If the callback does not return in finite time, the program may not return.

Param cameraHandle:

[in] Handle of the camera the frame belongs to

Param streamHandle:

[in] Handle of the stream the frame belongs to

Param frame:

[in] The received frame

VmbError_t(VMB_CALL * VmbChunkAccessCallback )(VmbHandle_t featureAccessHandle, void *userContext)

Function pointer type to access chunk data.

This function should complete as quickly as possible, since it blocks other updates on the remote device.

This function should not throw exceptions, even if VmbC is used from C++. Any exception thrown will only result in an error code indicating that an exception was thrown.

Param featureAccessHandle:

[in] A special handle that can be used for accessing features; the handle is only valid during the call of the function.

Param userContext:

[in] The value the user passed to VmbChunkDataAccess.

Return:

An error to be returned from VmbChunkDataAccess in the absence of other errors; A custom exit code >= VmbErrorCustom can be returned to indicate a failure via VmbChunkDataAccess return code

struct VmbTransportLayerInfo
#include <VmbCTypeDefinitions.h>

Transport layer information.

Holds read-only information about a transport layer.

Out

const char *transportLayerIdString

Unique id of the transport layer.

const char *transportLayerName

Name of the transport layer.

const char *transportLayerModelName

Model name of the transport layer.

const char *transportLayerVendor

Vendor of the transport layer.

const char *transportLayerVersion

Version of the transport layer.

const char *transportLayerPath

Full path of the transport layer.

VmbHandle_t transportLayerHandle

Handle of the transport layer for feature access.

VmbTransportLayerType_t transportLayerType

The type of the transport layer.

struct VmbInterfaceInfo
#include <VmbCTypeDefinitions.h>

Interface information.

Holds read-only information about an interface.

Out

const char *interfaceIdString

Identifier of the interface.

const char *interfaceName

Interface name, given by the transport layer.

VmbHandle_t interfaceHandle

Handle of the interface for feature access.

VmbHandle_t transportLayerHandle

Handle of the related transport layer for feature access.

VmbTransportLayerType_t interfaceType

The technology of the interface.

struct VmbCameraInfo
#include <VmbCTypeDefinitions.h>

Camera information.

Holds read-only information about a camera.

Out

const char *cameraIdString

Identifier of the camera.

const char *cameraIdExtended

globally unique identifier for the camera

const char *cameraName

The display name of the camera.

const char *modelName

Model name.

const char *serialString

Serial number.

VmbHandle_t transportLayerHandle

Handle of the related transport layer for feature access.

VmbHandle_t interfaceHandle

Handle of the related interface for feature access.

VmbHandle_t localDeviceHandle

Handle of the related GenTL local device. NULL if the camera is not opened.

VmbHandle_t const *streamHandles

Handles of the streams provided by the camera. NULL if the camera is not opened.

VmbUint32_t streamCount

Number of stream handles in the streamHandles array.

VmbAccessMode_t permittedAccess

Permitted access modes, see VmbAccessModeType.

struct VmbFeatureInfo
#include <VmbCTypeDefinitions.h>

Feature information.

Holds read-only information about a feature.

Out

const char *name

Name used in the API.

const char *category

Category this feature can be found in.

const char *displayName

Feature name to be used in GUIs.

const char *tooltip

Short description, e.g. for a tooltip.

const char *description

Longer description.

const char *sfncNamespace

Namespace this feature resides in.

const char *unit

Measuring unit as given in the XML file.

const char *representation

Representation of a numeric feature.

VmbFeatureData_t featureDataType

Data type of this feature.

VmbFeatureFlags_t featureFlags

Access flags for this feature.

VmbUint32_t pollingTime

Predefined polling time for volatile features.

VmbFeatureVisibility_t visibility

GUI visibility.

VmbBool_t isStreamable

Indicates if a feature can be stored to / loaded from a file.

VmbBool_t hasSelectedFeatures

Indicates if the feature selects other features.

struct VmbFeatureEnumEntry
#include <VmbCTypeDefinitions.h>

Info about possible entries of an enumeration feature.

Out

const char *name

Name used in the API.

const char *displayName

Enumeration entry name to be used in GUIs.

const char *tooltip

Short description, e.g. for a tooltip.

const char *description

Longer description.

VmbInt64_t intValue

Integer value of this enumeration entry.

const char *sfncNamespace

Namespace this feature resides in.

VmbFeatureVisibility_t visibility

GUI visibility.

struct VmbFrame
#include <VmbCTypeDefinitions.h>

Frame delivered by the camera.

In

void *buffer

Comprises image and potentially chunk data.

VmbUint32_t bufferSize

The size of the data buffer.

void *context[4]

4 void pointers that can be employed by the user (e.g. for storing handles)

Out

VmbFrameStatus_t receiveStatus

The resulting status of the receive operation.

VmbUint64_t frameID

Unique ID of this frame in this stream.

VmbUint64_t timestamp

The timestamp set by the camera.

VmbUint8_t *imageData

The start of the image data, if present, or null.

VmbFrameFlags_t receiveFlags

Flags indicating which additional frame information is available.

VmbPixelFormat_t pixelFormat

Pixel format of the image.

VmbImageDimension_t width

Width of an image.

VmbImageDimension_t height

Height of an image.

VmbImageDimension_t offsetX

Horizontal offset of an image.

VmbImageDimension_t offsetY

Vertical offset of an image.

VmbPayloadType_t payloadType

The type of payload.

VmbBool_t chunkDataPresent

True if the transport layer reported chunk data to be present in the buffer.

struct VmbFeaturePersistSettings
#include <VmbCTypeDefinitions.h>

Parameters determining the operation mode of VmbSettingsSave and VmbSettingsLoad.

In

VmbFeaturePersist_t persistType

Type of features that are to be saved.

VmbModulePersistFlags_t modulePersistFlags

Flags specifying the modules to persist/load.

VmbUint32_t maxIterations

Number of iterations when loading settings.

VmbLogLevel_t loggingLevel

Determines level of detail for load/save settings logging.

Definition of macros for using the standard shared pointer (std::tr1) for VmbCPP.

Note

If your version of STL does not provide a shared pointer implementation please see UserSharedPointerDefines.h for information on how to use another shared pointer than std::shared_ptr.

namespace VmbCPP

Typedefs

using BasicLockablePtr = SharedPointer<BasicLockable>

An alias for a shared pointer to a BasicLockable.

using CameraPtr = SharedPointer<Camera>

An alias for a shared pointer to a Camera.

using FeaturePtr = SharedPointer<Feature>

An alias for a shared pointer to a Feature.

using FeatureContainerPtr = SharedPointer<FeatureContainer>

An alias for a shared pointer to a FeatureContainer.

using FramePtr = SharedPointer<Frame>

An alias for a shared pointer to a Frame.

using FrameHandlerPtr = SharedPointer<FrameHandler>

An alias for a shared pointer to a FrameHandler.

using ICameraFactoryPtr = SharedPointer<ICameraFactory>

An alias for a shared pointer to a camera factory.

using ICameraListObserverPtr = SharedPointer<ICameraListObserver>

An alias for a shared pointer to a camera list observer.

using IFeatureObserverPtr = SharedPointer<IFeatureObserver>

An alias for a shared pointer to a feature observer.

using IFrameObserverPtr = SharedPointer<IFrameObserver>

An alias for a shared pointer to a frame observer.

using InterfacePtr = SharedPointer<Interface>

An alias for a shared pointer to an Interface.

using IInterfaceListObserverPtr = SharedPointer<IInterfaceListObserver>

An alias for a shared pointer to an interface list observer.

using LocalDevicePtr = SharedPointer<LocalDevice>

An alias for a shared pointer to a LocalDevice.

using MutexPtr = SharedPointer<Mutex>

An alias for a shared pointer to a Mutex.

using StreamPtr = SharedPointer<Stream>

An alias for a shared pointer to a Stream.

using TransportLayerPtr = SharedPointer<TransportLayer>

An alias for a shared pointer to a TransportLayer.