16 unsigned WriteableBroadcast::get_write_space()
const {
17 unsigned ws = UINT32_MAX;
18 for (
unsigned i = 0; i <
m_size; ++i) {
26 for (
unsigned i = 0; i <
m_size; ++i) {
34 for (
unsigned i = 0; i <
m_size; ++i) {
45 for (
unsigned i = 0; i <
m_size; ++i) {
53 for (
unsigned i = 0; i <
m_size; ++i) {
60 for (
unsigned i = 0; i <
m_size; ++i) {
68 for (
unsigned i = 0; i <
m_size; ++i) {
77 for (
unsigned i = 0; i <
m_size; ++i) {
Version of io::WriteableBroadcast that considers a write successful if ANY of the downstream Writeabl...
bool write_finalize() override
Finalize the in-progress write for all downstream Writeables.
unsigned get_write_space() const override
Get the max available write space of any downstream Writeable.
Forwards incoming writes to multiple downstream Writeables.
void write_bytes(unsigned nbytes, const void *src) override
Write a byte sequence to all downstream Writeables.
satcat5::io::Writeable **const m_dsts
Array of Writeables.
const unsigned m_size
Size of m_dsts.
void write_abort() override
Abort writes for all downstream Writeables.
bool write_finalize() override
Finalize the in-progress write for all downstream Writeables.
void write_overflow() override
Optional error handling for write overflow.
unsigned get_write_space() const override
Get the min available write space of downstream Writeables.
void write_next(u8 data) override
Write the next byte to the underlying buffer or device.
virtual void write_bytes(unsigned nbytes, const void *src)
Write 0 or more bytes from a buffer.
virtual void write_abort()
If possible, abort the current partially-written packet.
virtual void write_overflow()
Optional error handling for write overflow.
virtual void write_next(u8 data)=0
Write the next byte to the underlying buffer or device.
Writeable API that broadcasts copies to multiple destinations.
Miscellaneous mathematical utility functions.
constexpr unsigned min_unsigned(unsigned a, unsigned b)
Min and max functions.
constexpr unsigned max_unsigned(unsigned a, unsigned b)
Min and max functions.