6 #include <satcat5/pkt_combiner.h>
11 u8* buff,
unsigned buffbytes)
14 , m_buff(buff, buffbytes, 0)
The PacketCombiner class combines packets written to it into a single packet, and forwards it to a Wr...
void set_timeout(unsigned msec)
Set a timeout for automatic data forwarding after a period, if the buffer is not yet full.
void send_now()
Send the buffer now.
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
void timer_event() override
Child class MUST override this method.
Abstract API for reading byte-streams and packets.
virtual void read_finalize()
Consume any remaining bytes in this frame, if applicable.
virtual void set_callback(satcat5::io::EventListener *callback)
Update registered callback for data_rcvd() events.
unsigned copy_to(satcat5::io::Writeable *dst)
Copy data to a Writeable object, without finalizing.
virtual unsigned get_read_ready() const =0
How many bytes can be read without blocking?
Abstract API for writing byte-streams and packets.
virtual unsigned get_write_space() const =0
How many bytes can be written without blocking?
virtual bool write_finalize()
Mark end of frame and release temporary working data.
Wrapper class for forwarding writes to another object.
void timer_stop()
Stop all future notifications.
void timer_once(unsigned msec)
Configure a one-time notification after X milliseconds.