17#ifndef __ROGUE_INTERFACES_STREAM_BUFFER_H__
18#define __ROGUE_INTERFACES_STREAM_BUFFER_H__
44 std::shared_ptr<rogue::interfaces::stream::Pool> source_;
47 std::weak_ptr<rogue::interfaces::stream::Frame> frame_;
99 static std::shared_ptr<rogue::interfaces::stream::Buffer>
create(
100 std::shared_ptr<rogue::interfaces::stream::Pool> source,
123 Buffer(std::shared_ptr<rogue::interfaces::stream::Pool> source,
140 void setFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
266 void debug(uint32_t idx);
270typedef std::shared_ptr<rogue::interfaces::stream::Buffer>
BufferPtr;
Stream frame buffer container.
void adjustHeader(int32_t value)
Adjusts header reservation size.
void adjustPayload(int32_t value)
Adjusts payload size by signed delta.
uint8_t * iterator
Iterator alias for byte-wise buffer access.
void debug(uint32_t idx)
Emits debug information for this buffer.
~Buffer()
Destroys the buffer wrapper and returns ownership to the pool path.
void setFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Associates this buffer with its owning frame.
uint32_t getMeta()
Returns metadata associated with this buffer.
uint32_t getPayload()
Returns current payload size.
void minPayload(uint32_t size)
Ensures payload size is at least size.
void zeroHeader()
Clears header reservation.
uint8_t * endPayload()
Returns iterator to end of current payload.
void setPayload(uint32_t size)
Sets payload size.
uint8_t * end()
Returns iterator to end of usable buffer region.
static std::shared_ptr< rogue::interfaces::stream::Buffer > create(std::shared_ptr< rogue::interfaces::stream::Pool > source, void *data, uint32_t meta, uint32_t size, uint32_t alloc)
Creates a buffer backed by memory owned by a stream Pool.
uint8_t * begin()
Returns iterator to start of buffer payload region.
uint32_t getSize()
Returns payload-capable buffer size.
void adjustTail(int32_t value)
Adjusts tail reservation size.
void setMeta(uint32_t meta)
Sets metadata associated with this buffer.
void setPayloadEmpty()
Clears payload (sets payload size to zero).
void setPayloadFull()
Sets payload size to maximum available buffer space.
void zeroTail()
Clears tail reservation.
uint32_t getAvailable()
Returns remaining available payload space.
Container for one stream frame payload and metadata.
Frame and buffer allocator for stream endpoints.
std::shared_ptr< rogue::interfaces::stream::Buffer > BufferPtr
Shared pointer alias for Buffer.