![]() |
Programmer's Guide Baumer GAPI SDK Reference v2.10.0
|
This class realizes the data access to the memory. It contains information about the received data (e.g. image size, pixel format). This class belongs to the BGAPI2 main classes. More...
#include <bgapi2_genicam.hpp>
Public Member Functions | |
Buffer () | |
Parameterless constructor for creating of a Buffer-Object. When using this constructor, the buffer object takes care of memory management. The necessary memory for this Buffer-Object will only be allocated when it is added to a Buffer list. | |
Buffer (void *pUserObj) | |
Constructor for creating of a Buffer-Object. When using this constructor, the buffer object takes care of memory management. The necessary memory for this Buffer-Object will only be allocated when added to a Buffer list. More... | |
Buffer (void *pUserBuffer, bo_uint64 uUserBufferSize, void *pUserObj) | |
Constructor for creating of a Buffer-Object. When using this constructor, the user takes care of allocation of the necessary memory. More... | |
~Buffer () | |
Destructor to destroy an Buffer object. | |
String | GetID () |
This function delivers the unique string identifier of the Buffer object, which is used in the BufferList. More... | |
void | QueueBuffer () |
This function moves a Buffer object of the BufferList into the input buffer queue and make it available for the image acquisition. More... | |
void * | GetMemPtr () |
This function delivers a pointer to the memory of the Buffer object. More... | |
bo_uint64 | GetMemSize () |
This function delivers the size of the allocated memory. More... | |
void * | GetUserObj () |
This function delivers a pointer to a user allocated memory. See the construcors Buffer(void * pUserObj) and Buffer(void *pUserBuffer, bo_uint64 uUserBufferSize, void *pUserObj). More... | |
bo_uint64 | GetTimestamp () |
This function delivers the timestamp of the buffer obtained by the camera. The basic requirement for this function is that the Buffer object needs valid image data. See also the exception description of Exceptions::LowLevelException. More... | |
bo_uint64 | GetHostTimestamp () |
This function returns the host time stamp of the first received data packet of a new image obtained by a steady clock. The basic requirement for this function is that the Buffer object needs valid image data. See also the exception description of Exceptions::LowLevelException. More... | |
bo_bool | GetNewData () |
This function delivers a flag that indicates whether the object buffer contains new data. More... | |
bo_bool | GetIsQueued () |
This function delivers a flag that indicates whether the Buffer object has been queued. More... | |
bo_bool | GetIsAcquiring () |
This function delivers a flag that indicates whether the Buffer object is being filled. More... | |
bo_bool | GetIsIncomplete () |
This function delivers a flag that indicates whether the expected data has been completely transferred. More... | |
String | GetTLType () |
This function delivers the transport layer type with which the data were transmitted. More... | |
bo_uint64 | GetSizeFilled () |
This function delivers the number of transferred bytes. More... | |
bo_uint64 | GetWidth () |
This function delivers the width of the image in pixel. More... | |
bo_uint64 | GetHeight () |
This function delivers the height of the image in pixel. More... | |
bo_uint64 | GetXOffset () |
This function delivers the offset in X direction in pixel. More... | |
bo_uint64 | GetYOffset () |
This function delivers the offset in Y direction in pixel. More... | |
bo_uint64 | GetXPadding () |
This function delivers the number of extra bytes transmitted at the end of each line and it is only specified for the payload types Image and Extended Chunk Data. See function Buffer::GetPayloadType. More... | |
bo_uint64 | GetYPadding () |
This function delivers the number of extra bytes transmitted at the end of the image and it is only specified for the payload types Image and Extended Chunk Data. See function Buffer::GetPayloadType. More... | |
bo_uint64 | GetFrameID () |
This function delivers a sequentially incremented number of the image. The number refers e.g. for GigE Vision and for USB3 Vision to the block ID of the stream. More... | |
bo_bool | GetImagePresent () |
This function delivers true, if the Buffer object includes image data. More... | |
bo_uint64 | GetImageOffset () |
This function returns the offset into the memory of the Buffer object to the begin of the image data. More... | |
String | GetPayloadType () |
This function delivers the payload type of the Buffer object. See the payload type definitions in bgapi2_def.h (BGAPI2_PAYLOADTYPE_xxx). More... | |
String | GetPixelFormat () |
This function delivers the pixel format of the Buffer object. More... | |
bo_uint64 | GetDeliveredImageHeight () |
This function delivers the transmitted lines of an image. Only valid for the payload types 'Image' and 'ImageExt'. More... | |
bo_uint64 | GetDeliveredChunkPayloadSize () |
This function delivers the number of transmitted bytes. Only valid for the chunk payload types 'ChunkData' and 'ImageExt'. More... | |
bo_bool | GetContainsChunk () |
This function delivers true, if the Buffer object includes chunk data. More... | |
bo_uint64 | GetChunkLayoutID () |
This function delivers a value representing the current structure of the chunk data. This value changes when changing the structure of the chunk data. More... | |
NodeMap * | GetChunkNodeList () |
This function delivers a NodeMap of available chunk information of the Buffer object. Only valid for chunk payload types 'ChunkData' and 'ImageExt'. More... | |
String | GetFileName () |
This function delivers the file name of the Buffer object. Only valid for payload types 'File'. More... | |
DataStream * | GetParent () |
This function delivers the superordinate DataStream object but only if the Buffer object was added to a BufferList. More... | |
void * | GetReserved () |
Undocumented function. | |
![]() | |
Node * | GetNode (String name) |
This function delivers a certain object of the Node list and provides the access to a node objcet without the detour across a NodeMap object. This function is functional identical to NodeMap::GetNode. More... | |
NodeMap * | GetNodeTree () |
This function provides the features of a object derived from INode interface as tree structure in form of a NodeMap pointer. For a detailed description of the tree structure representation refer to the class description of NodeMap. More... | |
NodeMap * | GetNodeList () |
This function provides the features of a object derived from INode interface as unstructured list in form of a NodeMap pointer. For a detailed description of the unstructured list representation refer to the class description of NodeMap. More... | |
![]() | |
EventMode | GetEventMode () |
This function delivers the current event mode setting. The event mode is controlled by the event register functions. See also enumeration Events::EventMode. More... | |
void * | GetBase () |
Undocumented function. More... | |
Friends | |
class | BufferList |
class | DataStream |
This class realizes the data access to the memory. It contains information about the received data (e.g. image size, pixel format). This class belongs to the BGAPI2 main classes.
Definition at line 2153 of file bgapi2_genicam.hpp.
BGAPI2::Buffer::Buffer | ( | void * | pUserObj | ) |
Constructor for creating of a Buffer-Object. When using this constructor, the buffer object takes care of memory management. The necessary memory for this Buffer-Object will only be allocated when added to a Buffer list.
pUserObj | A pointer to a user allocated memory. This pointer is stored in the Buffer-Object and can be queried at any time. See function Buffer::GetUserObj. |
BGAPI2::Buffer::Buffer | ( | void * | pUserBuffer, |
bo_uint64 | uUserBufferSize, | ||
void * | pUserObj | ||
) |
Constructor for creating of a Buffer-Object. When using this constructor, the user takes care of allocation of the necessary memory.
To use the actual necessary memory size the functions Device::GetPayloadSize and DataStream::GetPayloadSize are used respectively. To use the maximum required memory size of a device the maximum of the 'PayloadSize' feature is queried. See Device::GetRemoteNode and Node::GetIntMax.
pUserBuffer | A pointer to a user allocated data buffer. |
uUserBufferSize | The size of the user allocated data buffer. |
pUserObj | A pointer to a user allocated memory. This pointer is stored in the Buffer-Object and can be queried at any time. See function Buffer::GetUserObj. |
BGAPI2::Buffer::GetChunkLayoutID | ( | ) |
This function delivers a value representing the current structure of the chunk data. This value changes when changing the structure of the chunk data.
The change in this value initiates a new internal parsing of the chunk data. Only valid for chunk payload types 'ChunkData' and 'ImageExt'.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Possible reasons for this exception are a incomplete transferred image and a wrong payload type. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetChunkNodeList | ( | ) |
This function delivers a NodeMap of available chunk information of the Buffer object. Only valid for chunk payload types 'ChunkData' and 'ImageExt'.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. Wrong payload type used. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
BGAPI2::Buffer::GetContainsChunk | ( | ) |
This function delivers true, if the Buffer object includes chunk data.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Possible reasons for this exception are a incomplete transferred image and a wrong payload type. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetDeliveredChunkPayloadSize | ( | ) |
This function delivers the number of transmitted bytes. Only valid for the chunk payload types 'ChunkData' and 'ImageExt'.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Possible reasons for this exception are a incomplete transferred image and a wrong payload type. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetDeliveredImageHeight | ( | ) |
This function delivers the transmitted lines of an image. Only valid for the payload types 'Image' and 'ImageExt'.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::LowLevelException | GenTL Producer error. Possible reasons for this exception are a incomplete transferred image and a wrong payload type. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetFileName | ( | ) |
This function delivers the file name of the Buffer object. Only valid for payload types 'File'.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | Baumer GenTL producer does not implement this feature. GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetFrameID | ( | ) |
This function delivers a sequentially incremented number of the image. The number refers e.g. for GigE Vision and for USB3 Vision to the block ID of the stream.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetHeight | ( | ) |
This function delivers the height of the image in pixel.
Exceptions::NotAvailableException | Possible reasons for this exceptions are the Buffer object is not added to a BufferList, or when using the payload type chunk the chunk feature 'ChunkHeight' is not available. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetHostTimestamp | ( | ) |
This function returns the host time stamp of the first received data packet of a new image obtained by a steady clock. The basic requirement for this function is that the Buffer object needs valid image data. See also the exception description of Exceptions::LowLevelException.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
BGAPI2::Buffer::GetID | ( | ) |
This function delivers the unique string identifier of the Buffer object, which is used in the BufferList.
Exceptions::ObjectInvalidException | The calling object is not valid. |
BGAPI2::Buffer::GetImageOffset | ( | ) |
This function returns the offset into the memory of the Buffer object to the begin of the image data.
Exceptions::NotAvailableException | The Buffer object doesn't include image data. The possible reason for this exception is, the image chunk on the device is not enabled. |
BGAPI2::Buffer::GetImagePresent | ( | ) |
This function delivers true, if the Buffer object includes image data.
Exceptions::NotAvailableException | This function is currently not suported. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetIsAcquiring | ( | ) |
This function delivers a flag that indicates whether the Buffer object is being filled.
The flag is set when data is written in the memory of the Buffer object. The flag is reset when the Buffer object is filled.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. A possible reason for this exception is the use of this function with the Baumer Filter Driver. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetIsIncomplete | ( | ) |
This function delivers a flag that indicates whether the expected data has been completely transferred.
The flag is set when the expected data was not completely transferred. The flag is reset when all expected data was transferred.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetIsQueued | ( | ) |
This function delivers a flag that indicates whether the Buffer object has been queued.
The flag is set when the Buffer object is moved into the input buffer queue. See functions Buffer::QueueBuffer, BufferList::FlushAllToInputQueue and BufferList::FlushUnqueuedToInputQueue. The flag is reset when the Buffer object is fetched by DataStreamEventControl::GetFilledBuffer function.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetMemPtr | ( | ) |
This function delivers a pointer to the memory of the Buffer object.
Exceptions::NotAvailableException | The Buffer object is currently no memory allocated, because it was not added to a BufferList. This exception is thrown only when using the constructors Buffer() and Buffer(void * pUserObj). |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. This exception is thrown only when using the constructors Buffer() and Buffer(void * pUserObj). |
BGAPI2::Buffer::GetMemSize | ( | ) |
This function delivers the size of the allocated memory.
Exceptions::NotAvailableException | The Buffer object is currently no memory allocated, because it was not added to a BufferList. This exception is thrown only when using the constructors Buffer() and Buffer(void * pUserObj). |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. This exception is thrown only when using the constructors Buffer() and Buffer(void * pUserObj). |
BGAPI2::Buffer::GetNewData | ( | ) |
This function delivers a flag that indicates whether the object buffer contains new data.
The flag is set when the Buffer object is moved into the output buffer queue. The flag is reset when the Buffer object moved into the input buffer queue. See functions Buffer::QueueBuffer, BufferList::FlushAllToInputQueue and BufferList::FlushUnqueuedToInputQueue.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetParent | ( | ) |
This function delivers the superordinate DataStream object but only if the Buffer object was added to a BufferList.
BGAPI2::Buffer::GetPayloadType | ( | ) |
This function delivers the payload type of the Buffer object. See the payload type definitions in bgapi2_def.h (BGAPI2_PAYLOADTYPE_xxx).
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. A possible reason for this exception is a incomplete transferred image. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetPixelFormat | ( | ) |
This function delivers the pixel format of the Buffer object.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList, or when using the payload type chunk the chunk feature 'ChunkPixelFormat' is not available. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. A possible reason for this exception is a incomplete transferred image. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetSizeFilled | ( | ) |
This function delivers the number of transferred bytes.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetTimestamp | ( | ) |
This function delivers the timestamp of the buffer obtained by the camera. The basic requirement for this function is that the Buffer object needs valid image data. See also the exception description of Exceptions::LowLevelException.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Possible reasons of this exception are: the Buffer object is still empty, the Buffer object is moved into the input buffer queue with Buffer::QueueBuffer, the Buffer object is filled, but is not fetched with DataStreamEventControl::GetFilledBuffer, the payload type of the received data is not supported by the GenTL producer. See function Buffer::GetPayloadType. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetTLType | ( | ) |
This function delivers the transport layer type with which the data were transmitted.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetUserObj | ( | ) |
This function delivers a pointer to a user allocated memory. See the construcors Buffer(void * pUserObj) and Buffer(void *pUserBuffer, bo_uint64 uUserBufferSize, void *pUserObj).
Exceptions::NotAvailableException | The Buffer object was created without user pointer. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
BGAPI2::Buffer::GetWidth | ( | ) |
This function delivers the width of the image in pixel.
Exceptions::NotAvailableException | Possible reasons for this exceptions are the Buffer object is not added to a BufferList, or when using the payload type chunk the chunk feature 'ChunkWidth' is not available. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetXOffset | ( | ) |
This function delivers the offset in X direction in pixel.
Exceptions::NotAvailableException | Possible reasons for this exceptions are the Buffer object is not added to a BufferList, or when using the payload type chunk the chunk feature 'ChunkOffsetX' is not available. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetXPadding | ( | ) |
This function delivers the number of extra bytes transmitted at the end of each line and it is only specified for the payload types Image and Extended Chunk Data. See function Buffer::GetPayloadType.
Exceptions::NotAvailableException | Possible reasons for this exceptions are the Buffer object is not added to a BufferList, when using the wrong the payload type. |
Exceptions::NotAvailableException | Possible reasons for this exceptions are the Buffer object is not added to a BufferList, and when using the payload type chunk the chunk feature 'ChunkOffsetX' is not available. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetYOffset | ( | ) |
This function delivers the offset in Y direction in pixel.
Exceptions::NotAvailableException | Possible reasons for this exceptions are the Buffer object is not added to a BufferList, or when using the payload type chunk the chunk feature 'ChunkOffsetY' is not available. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::GetYPadding | ( | ) |
This function delivers the number of extra bytes transmitted at the end of the image and it is only specified for the payload types Image and Extended Chunk Data. See function Buffer::GetPayloadType.
Exceptions::NotAvailableException | Possible reasons for this exceptions are the Buffer object is not added to a BufferList, when using the wrong the payload type. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
BGAPI2::Buffer::QueueBuffer | ( | ) |
This function moves a Buffer object of the BufferList into the input buffer queue and make it available for the image acquisition.
If the image aquisition is done the filled Buffer object is moved into the output buffer queue and is fetched with function DataStreamEventControl::GetFilledBuffer. See also the functions of the BufferList, to move the Buffer object between the internal lists. The Buffer object has to previously added with BufferList::Add to a BufferList, otherwise the function raises an exception.
Exceptions::NotAvailableException | The Buffer object is not added to a BufferList. |
Exceptions::ObjectInvalidException | The calling object is not valid. |
Exceptions::LowLevelException | GenTL Producer error. Use IException::GetErrorDescription or check trace output for more detailed error information. |
Jan, 14 2020
Baumer Optronic GmbH,
Badstrasse 30, 01454 D-Radeberg, Tel:+49-3528-4386-0, Fax:+49-3528-4386-86,
Email:support.cameras@baumer.com