53 template<
class T>
inline T getBufferValue(
const std::shared_ptr<const GenTLWrapper> &gentl,
59 size_t size=
sizeof(T);
61 if (stream != 0 && buffer != 0)
63 gentl->DSGetBufferInfo(stream, buffer, cmd, &type, &ret, &size);
69 inline bool getBufferBool(
const std::shared_ptr<const GenTLWrapper> &gentl,
75 size_t size=
sizeof(ret);
77 if (stream != 0 && buffer != 0)
79 gentl->DSGetBufferInfo(stream, buffer, cmd, &type, &ret, &size);
85 inline std::string getBufferString(
const std::shared_ptr<const GenTLWrapper> &gentl,
92 size_t size=
sizeof(tmp);
94 if (stream != 0 && buffer != 0)
108 template<
class T>
inline T getBufferPartValue(
const std::shared_ptr<const GenTLWrapper> &gentl,
109 void *stream,
void *buffer, std::uint32_t part,
115 size_t size=
sizeof(T);
117 if (stream != 0 && buffer != 0)
119 gentl->DSGetBufferPartInfo(stream, buffer, part, cmd, &type, &ret, &size);
143 void Buffer::setNodemap(
const std::shared_ptr<GenApi::CNodeMapRef> _nodemap,
const std::string &tltype)
156 else if (tltype ==
"U3V")
185 chunkadapter->AttachBuffer(reinterpret_cast<std::uint8_t *>(
247 ret=
reinterpret_cast<char *
>(ret)+offset;
568 size_t size=
sizeof(v);
601 const uint64_t ns_freq=1000000000ul;
614 ret=ret/freq*ns_freq+(ns_freq*(ret%freq))/freq;
646 char *c=
reinterpret_cast<char *
>(&p);
size_t getDeliveredImageHeight(std::uint32_t part) const
Returns the number of lines that are delivered in this buffer.
size_t getDataSize() const
Returns the size of data intended to the written to the buffer the last time it has been filled...
bool getBoolean(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception, bool igncache)
Get the value of a boolean feature of the given nodemap.
size_t getYPadding() const
Returns vertical padding of the data in the buffer in bytes.
Connects a chunked DCAM buffer to a node map.
size_t getSizeFilled() const
Returns the number of bytes written into the buffer last time it has been filled. ...
std::shared_ptr< const GenTLWrapper > gentl
uint64_t getChunkLayoutID() const
Returns the chunk layout id, which serves as an indicator that the chunk layout has changed and the a...
std::string getFilename() const
Returns the filename in case the payload contains a file.
Declaration of the CChunkAdapterGeneric class.
void * getHandle() const
Get internal stream handle.
size_t getXPadding(std::uint32_t part) const
Returns horizontal padding of the data in the buffer in bytes.
int64_t getInteger(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, int64_t *vmin, int64_t *vmax, bool exception, bool igncache)
Get the value of an integer feature of the given nodemap.
int32_t BUFFER_PART_INFO_CMD
std::shared_ptr< GenApi::CNodeMapRef > nodemap
bool getIsQueued() const
Signals if the buffer is associated to the input or output queue.
std::shared_ptr< Device > getParent() const
Returns the pointer to the parent device object.
size_t getWidth(std::uint32_t part) const
Returns the width of the image in pixel.
uint64_t getPartSourceID(std::uint32_t part) const
Returns the source id of the specified part.
size_t getPayloadType() const
Returns the payload type according to PAYLOADTYPE_INFO_IDS.
uint64_t getTimestamp() const
Returns the timestamp of the buffer.
void * getGlobalBase() const
Returns the global base address of the buffer memory.
void * getBase(std::uint32_t part) const
Returns the base address of the specified part of the multi-part buffer.
Declaration of the CChunkAdapterGEV class.
uint64_t getPixelFormat(std::uint32_t part) const
Returns the pixel format of the specified part as defined in the PFNC.
std::shared_ptr< GenApi::CChunkAdapter > chunkadapter
size_t getDeliveredChunkPayloadSize() const
Returnes the delivered chung payload size.
void * getHandle() const
Get internal stream handle.
void setNodemap(const std::shared_ptr< GenApi::CNodeMapRef > nodemap, const std::string &tltype)
Set the device nodemap.
size_t getPartDataType(uint32_t part) const
Returns the data type id of the specified part as defined in PARTDATATYPE_IDS.
bool getContainsChunkdata() const
Returns if the buffer contains chunk data.
uint64_t getTimestampNS() const
Returns the acquisition timestamp of the data in this buffer in ns.
Buffer(const std::shared_ptr< const GenTLWrapper > &gentl, Stream *parent)
Constructs a buffer class as wrapper around a buffer handle.
bool isBigEndian() const
Returns if the data is given as big or little endian.
bool getDataLargerThanBuffer() const
Signals if the memory that was allocated for this buffer is too small.
size_t getGlobalSize() const
Returns the global size of the buffer.
uint64_t getPixelFormatNamespace(std::uint32_t part) const
Returns the pixel format namespace, which preferably should be PIXELFORMAT_NAMESPACE_PFNC_32BIT.
void * getUserPtr() const
Returns the private data pointer of the GenTL Consumer.
Connects a generic chunked buffer to a node map.
bool getIsAcquiring() const
Signals if the buffer is currently being filled with data.
bool getImagePresent(std::uint32_t part) const
Returns if a 2D, 3D or confidence image is present in the specified part.
bool getIsIncomplete() const
Signals if the buffer is incomplete due to an error.
uint64_t getFrameID() const
Returns the sequentially incremented number of the frame.
size_t getYOffset(std::uint32_t part) const
Returns the vertical offset of the data in the buffer in lines from the image origin to handle areas ...
bool getNewData() const
Returns if the buffer contains new data.
void setHandle(void *handle)
Set the buffer handle that this object should manage.
size_t getXOffset(std::uint32_t part) const
Returns the horizontal offset of the data in the buffer in pixels from the image origin to handle are...
size_t getHeight(std::uint32_t part) const
Returns the height of the image in pixel.
Connects a chunked U3V buffer to a node map.
The stream class encapsulates a Genicam stream.
size_t getSize(std::uint32_t part) const
Returns the size of the specified part of the mult-part buffer.
Declaration of the CChunkAdapterU3V class.
std::uint32_t getNumberOfParts() const
Returns the number of parts, excluding chunk data.
std::string getTLType() const
Returns the type the used transport layer.