3#ifndef TETL_FREERTOS_STREAM_BUFFER_HPP
4#define TETL_FREERTOS_STREAM_BUFFER_HPP
13#if defined(TETL_FREERTOS_USE_STUBS)
75 [[nodiscard]] auto
empty() const noexcept ->
bool;
82 [[nodiscard]] auto
full() const noexcept ->
bool;
104 auto
reset() noexcept ->
void;
constexpr auto data(C &c) noexcept(noexcept(c.data())) -> decltype(c.data())
Returns a pointer to the block of memory containing the elements of the container.
Definition data.hpp:11
constexpr auto size(C const &c) noexcept(noexcept(c.size())) -> decltype(c.size())
Returns the size of the given container c or array array. Returns c.size(), converted to the return t...
Definition size.hpp:18
TETL_BUILTIN_SIZET size_t
etl::size_t is the unsigned integer type of the result of the sizeof operator.
Definition size_t.hpp:14
auto empty() const noexcept -> bool
Queries a stream buffer to see if it is empty. A stream buffer is empty if it does not contain any da...
Definition stream_buffer.hpp:159
auto space_available() const noexcept -> size_type
Queries a stream buffer to see how much free space it contains, which is equal to the amount of data ...
Definition stream_buffer.hpp:168
etl::size_t size_type
Definition stream_buffer.hpp:31
auto write_from_isr(net::const_buffer data, BaseType_t *prio) -> size_type
Interrupt safe version of the API function that sends a stream of bytes to the stream buffer.
Definition stream_buffer.hpp:144
auto native_handle() const noexcept -> StreamBufferHandle_t
Returns the native FreeRTOS handle to the stream_buffer.
Definition stream_buffer.hpp:180
auto trigger_level(size_type triggerLevel) noexcept -> void
A stream buffer's trigger level is the number of bytes that must be in the stream buffer before a tas...
Definition stream_buffer.hpp:175
auto bytes_available() const noexcept -> size_type
Queries a stream buffer to see how much data it contains, which is equal to the number of bytes that ...
Definition stream_buffer.hpp:163
~stream_buffer() noexcept
Deletes a stream buffer, then the allocated memory is freed.
Definition stream_buffer.hpp:137
auto read_from_isr(net::mutable_buffer data, BaseType_t *prio) -> size_type
Receives bytes from a stream buffer.
Definition stream_buffer.hpp:154
stream_buffer(size_type size, size_type triggerLevel) noexcept
Creates a new stream buffer using dynamically allocated memory.
Definition stream_buffer.hpp:132
auto reset() noexcept -> void
Resets a stream buffer to its initial, empty, state. Any data that was in the stream buffer is discar...
Definition stream_buffer.hpp:173
auto write(net::const_buffer data, TickType_t ticks) -> size_type
Sends bytes to a stream buffer. The bytes are copied into the stream buffer.
Definition stream_buffer.hpp:139
auto full() const noexcept -> bool
Queries a stream buffer to see if it is full. A stream buffer is full if it does not have any free sp...
Definition stream_buffer.hpp:161
auto read(net::mutable_buffer data, TickType_t ticks) -> size_type
Receives bytes from a stream buffer.
Definition stream_buffer.hpp:149
Definition buffer_const.hpp:12
Definition buffer_mutable.hpp:12
auto xStreamBufferSend(StreamBufferHandle_t handle, void const *data, etl::size_t size, TickType_t ticksToWait) -> etl::size_t
Definition stubs.hpp:109
auto xStreamBufferReceive(StreamBufferHandle_t handle, void *data, etl::size_t size, TickType_t ticks) -> etl::size_t
Definition stubs.hpp:125
auto xStreamBufferSpacesAvailable(StreamBufferHandle_t handle) -> etl::size_t
Definition stubs.hpp:146
StreamBufferDef_t * StreamBufferHandle_t
Definition stubs.hpp:99
long BaseType_t
Definition stubs.hpp:13
auto xStreamBufferIsEmpty(StreamBufferHandle_t handle) -> BaseType_t
Definition stubs.hpp:164
auto xStreamBufferReset(StreamBufferHandle_t handle) -> BaseType_t
Definition stubs.hpp:158
etl::uint32_t TickType_t
Definition stubs.hpp:24
auto xStreamBufferIsFull(StreamBufferHandle_t handle) -> BaseType_t
Definition stubs.hpp:170
auto xStreamBufferCreate(etl::size_t bufferSizeBytes, etl::size_t triggerLevelBytes) -> StreamBufferHandle_t
Definition stubs.hpp:101
auto xStreamBufferBytesAvailable(StreamBufferHandle_t handle) -> etl::size_t
Definition stubs.hpp:140
auto xStreamBufferReceiveFromISR(StreamBufferHandle_t handle, void *data, etl::size_t size, BaseType_t *prio) -> etl::size_t
Definition stubs.hpp:132
auto vStreamBufferDelete(StreamBufferHandle_t handle) -> void
Definition stubs.hpp:138
auto xStreamBufferSendFromISR(StreamBufferHandle_t handle, void const *data, etl::size_t size, BaseType_t *prio) -> etl::size_t
Definition stubs.hpp:117
auto xStreamBufferSetTriggerLevel(StreamBufferHandle_t handle, etl::size_t triggerLevel) -> BaseType_t
Definition stubs.hpp:152