buffer_get_type

This function returns the type of a given buffer.

The return value will be one of the following constants:

Buffer Type Constant
ConstantDescription
buffer_fixedA buffer of fixed size.
buffer_growA buffer that will "grow" dynamically as data is added
buffer_wrapA buffer where the data will "wrap". When the data being added reaches the limit of the buffer size, the overwrite will be placed back at the start of the buffer, and further writing will continue from that point.
buffer_fastA special "stripped" buffer that is extremely fast to read/write to. Can only be used with buffer_u8 data types, and must be 1 byte aligned.

 

Syntax:

buffer_get_type(buffer);

ArgumentTypeDescription
bufferBufferThe buffer to check.

 

Returns:

Buffer Type Constant

 

Example:

type = buffer_get_type(buff);

The above code gets the type of the buffer stored in the variable buff and stores it in a variable.