Pleora Technologies Inc. eBUS SDK v5.1.10.4642 API



PvRawData Class Reference

Raw data interface to a PvBuffer. More...

Public Member Functions

uint64_t GetPayloadLength () const
 Get the payload length specified in the leader information of this block. More...
 
PvResult Alloc (uint64_t aPayloadLength, uint32_t aMaximumChunkLength=0)
 Allocates memory for this PvRawData. More...
 
void Free ()
 Frees (de-allocates) the buffer's internal memory. More...
 
PvResult Attach (void *aRawBuffer, uint64_t aPayloadLength, uint32_t aMaximumChunkLength=0)
 Attach this PvRawData to an external memory buffer. More...
 
uint8_t * Detach ()
 Releases an attached memory buffer. More...
 

Protected Member Functions

 PvRawData (PvBufferLib::RawData *aRawData)
 Constructor. More...
 
virtual ~PvRawData ()
 Destructor. 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.

Constructor & Destructor Documentation

PvRawData::PvRawData ( PvBufferLib::RawData *  aRawData)
protected

Constructor.

Declared as protected as PvRawData cannot be instantiated by the user.

A pointer to the PvRawData interface can be obtained from a PvBuffer using PvBuffer::GetImage.

Parameters
[in]aRawDataPointer to internal eBUS SDK class.
PvRawData::~PvRawData ( )
protectedvirtual

Destructor.

Declared as protected as the user does no need (or can) delete a PvRawData directly.

Member Function Documentation

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

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:
PvResult PvRawData::Attach ( void *  aRawBuffer,
uint64_t  aPayloadLength,
uint32_t  aMaximumChunkLength = 0 
)

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:
uint8_t * PvRawData::Detach ( )

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
void PvRawData::Free ( )

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

See also
Alloc
uint64_t PvRawData::GetPayloadLength ( ) const

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-2018 Pleora Technologies Inc.
www.pleora.com