You are here: Start » Function Reference » GenApi » GenApi_ReadRegisterData
GenApi_ReadRegisterData
Header: | Genicam.h |
---|---|
Namespace: | avl |
Module: | Genicam |
Reads raw binary data from the objects memory using the IRegister interface.
Syntax
void avl::GenApi_ReadRegisterData ( GenApiHandle inHandle, const char* inParameterName, bool inVerifyAccess, atl::sint64 inLength, void* ioBuffer )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inHandle | GenApiHandle | Handle to object providing GenApi interface. | ||
inParameterName | const char* | Textual name of the parameter that should be accessed in GenICam naming convention or device specific name. Parameter name is case sensitive. | ||
inVerifyAccess | bool | True to verify parameter access. | ||
inLength | sint64 | Size of the data to read. | ||
ioBuffer | void* | Buffer for the read data to be placed in (allocated with at least inLength bytes). |
Description
This function accesses the configuration of a device or software module using the GenICam GenApi interface. The actual GenApi interface is accessed through the handle of opened device or software module provided by other subsystem (like opened GigEVision device handle). A call to this function may result in time expensive (blocking) data exchange with device.
Application must allocate a buffer for the data and provide its pointer on the ioBuffer parameter. inLength specifies the amount of data (in bytes) to read from the register (starting at its beginning). GenApi_GetRegisterDescriptor can be used to determine the register size.
Set inVerifyAccess argument to true to check parameter state. When this argument is set to false accessing parameter in an improper device state may silently fail, the result is undefined.
Refer to the device documentation or use Device Manager to find a proper parameter name.
Exceptions
This function will throw an exception in the following situations:
- Object handle is invalid or does not provide the GenApi interface.
- GenApi description does not provide a parameter with specified name.
- Named parameter does not provide the IRegister interface.
- Null pointer is provided on the ioBuffer parameter.
- Requested data read size is larger than the range of the register.
- Connection with device is lost.
- Other unexpected GenICam or connection error occurred.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Null pointer on ioBuffer parameter. |