44 void write_bytes(
unsigned nbytes,
const void* src)
override;
59 inline unsigned len()
const
98 template <
unsigned SIZE>
109 template <
unsigned SIZE>
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.
Statically-allocated version of io::WriteableBroadcastAny.
Forwards incoming writes to multiple downstream Writeables.
void port_set(unsigned idx, Writeable *dst)
Designate the Nth downstream Writeable object.
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.
constexpr WriteableBroadcast(unsigned n_dsts, satcat5::io::Writeable **dsts)
Constructor takes a pointer to an array of io::Writeable pointers along with the length of the given ...
unsigned len() const
Length of the output array.
unsigned get_write_space() const override
Get the min available write space of downstream Writeables.
Writeable *& operator[](unsigned idx)
Access or assign the Nth downstream Writeable object.
void write_next(u8 data) override
Write the next byte to the underlying buffer or device.
Statically-allocated version of io::WriteableBroadcast.
Abstract API for writing byte-streams and packets.
"Writeable" I/O interface core definitions
Basic type aliases and prototypes used throughout SatCat5.