TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlStream Struct Reference

#include <DynamicTablesPkg/Library/Common/AmlLib/Stream/AmlStream.h>

Data Fields

UINT8 * Buffer
 Pointer to a buffer.
 
UINT32 MaxBufferSize
 Size of Buffer.
 
UINT32 Index
 
EAML_STREAM_DIRECTION Direction
 

Detailed Description

Stream.

This structure is used as a wrapper around a buffer. It allows to do common buffer manipulations (read, write, etc.) while preventing buffer overflows.

Definition at line 32 of file AmlStream.h.

Field Documentation

◆ Buffer

UINT8* AmlStream::Buffer

Pointer to a buffer.

Definition at line 34 of file AmlStream.h.

◆ Direction

EAML_STREAM_DIRECTION AmlStream::Direction

The direction the stream is progressing. If the stream goes backward (toward lower addresses), the bytes written to the stream are not reverted. In the example below, writing "Hello" to the stream will not revert the string. The end of the stream buffer will contain "Hello world!". Similarly, moving the stream position will be done according to the direction of the stream. Stream buffer: +------------—+--—+--—+--—+--—+--—+--—+-— +---—+ |-----------— | ' ' | 'w' | 'o' | 'r' | 'l' | 'd' | '!' | '\0' | +------------—+--—+--—+--—+--—+--—+--—+-— +---—+ ^ Current position.

Definition at line 59 of file AmlStream.h.

◆ Index

UINT32 AmlStream::Index

Index in the Buffer. The Index field allows to keep track of how many bytes have been read/written in the Buffer, and to retrieve the current stream position. 0 <= Index <= MaxBufferSize. If Index == MaxBufferSize, no more action is allowed on the stream.

Definition at line 44 of file AmlStream.h.

◆ MaxBufferSize

UINT32 AmlStream::MaxBufferSize

Size of Buffer.

Definition at line 37 of file AmlStream.h.


The documentation for this struct was generated from the following file: