STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
xMessageBufferSpaceAvailable

message_buffer.h

message_buffer.h

StreamBufferHandle_t MessageBufferHandle_t
Type by which message buffers are referenced.
#define xMessageBufferSpaceAvailable(xMessageBuffer)

Returns the number of bytes of free space in the message buffer.

Parameters
xMessageBufferThe handle of the message buffer being queried.
Returns
The number of bytes that can be written to the message buffer before the message buffer would be full. When a message is written to the message buffer an additional sizeof( size_t ) bytes are also written to store the message's length. sizeof( size_t ) is typically 4 bytes on a 32-bit architecture, so if xMessageBufferSpacesAvailable() returns 10, then the size of the largest message that can be written to the message buffer is 6 bytes.