Raw data interface to a PvBuffer. More...
Public Member Functions | |
virtual uint64_t | GetPayloadLength () const =0 |
Get the payload length specified in the leader information of this block. More... | |
virtual PvResult | Alloc (uint64_t aPayloadLength, uint32_t aMaximumChunkLength=0)=0 |
Allocates memory for this PvRawData. More... | |
virtual void | Free ()=0 |
Frees (de-allocates) the buffer's internal memory. More... | |
virtual PvResult | Attach (void *aRawBuffer, uint64_t aPayloadLength, uint32_t aMaximumChunkLength=0)=0 |
Attach this PvRawData to an external memory buffer. More... | |
virtual uint8_t * | Detach ()=0 |
Releases an attached memory buffer. More... | |
Raw data interface to a PvBuffer.
A PvBuffer represents a generic buffer with no specific payload type. If the payload type is raw data, the user can obtain a pointer to a PvRawData buffer interface through PvBuffer::GetRawData.
This PvRawData pointer is owned by the PvBuffer and does not need to be released after use. It is valid as long as the PvBuffer exists.
|
pure virtual |
Allocates memory for this PvRawData.
Allocs a PvRawData of specific payload length
[in] | aPayloadLength | The payload length of the raw data, in pixels. See GetPayloadLength. |
[in] | aMaximumChunkLength | Maximum size in bytes to store chunks ( must include extra 64 bits by chunks for headers ). |
|
pure virtual |
Attach this PvRawData to an external memory buffer.
This method is identical to Alloc(uint64_t,uint32_t), with the following exceptions:
[in] | aRawBuffer | A pointer to the buffer. |
[in] | aPayloadLength | The payload length of the raw data, in pixels. See GetPayloadLength. |
[in] | aMaximumChunkLength | See Alloc(uint64_t,uint32_t). |
|
pure virtual |
Releases an attached memory buffer.
Does nothing other then resetting the memory buffer pointer to NULL.
|
pure virtual |
Frees (de-allocates) the buffer's internal memory.
|
pure virtual |
Get the payload length specified in the leader information of this block.
If you wish to construct a buffer with payload type "Raw Data", simply call PvRawData::Alloc or PvRawData::Attach and the payload length field will be set automatically at the time the block is transmitted.
Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com