Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvRawData Class Referenceabstract

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...
 

Detailed Description

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.

Member Function Documentation

◆ Alloc()

PvResult PvRawData::Alloc ( uint64_t  aPayloadLength,
uint32_t  aMaximumChunkLength = 0 
)
pure virtual

Allocates memory for this PvRawData.

Allocs a PvRawData of specific payload length

Parameters
[in]aPayloadLengthThe payload length of the raw data, in pixels. See GetPayloadLength.
[in]aMaximumChunkLengthMaximum size in bytes to store chunks ( must include extra 64 bits by chunks for headers ).
Returns
Includes:

◆ Attach()

PvResult PvRawData::Attach ( void *  aRawBuffer,
uint64_t  aPayloadLength,
uint32_t  aMaximumChunkLength = 0 
)
pure virtual

Attach this PvRawData to an external memory buffer.

This method is identical to Alloc(uint64_t,uint32_t), with the following exceptions:

  • This method uses an external memory buffer, controlled by the caller.
Parameters
[in]aRawBufferA pointer to the buffer.
[in]aPayloadLengthThe payload length of the raw data, in pixels. See GetPayloadLength.
[in]aMaximumChunkLengthSee Alloc(uint64_t,uint32_t).
Returns
Includes:

◆ Detach()

uint8_t * PvRawData::Detach ( )
pure virtual

Releases an attached memory buffer.

Does nothing other then resetting the memory buffer pointer to NULL.

Returns
The buffer's location in memory.
See also
Attach

◆ Free()

void PvRawData::Free ( )
pure virtual

Frees (de-allocates) the buffer's internal memory.

See also
Alloc

◆ GetPayloadLength()

uint64_t PvRawData::GetPayloadLength ( ) const
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.

Returns
The payload length specified in the leader information of this block

The documentation for this class was generated from the following files:

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com