15 #include <satcat5/pkt_buffer.h>
49 u8* txbuff,
unsigned txbytes,
unsigned txpkt,
50 u8* rxbuff,
unsigned rxbytes,
unsigned rxpkt);
133 unsigned max_chunk = 512,
134 unsigned min_txnow = UINT_MAX);
140 { m_timeout_msec = msec; }
150 const unsigned m_max_chunk;
151 const unsigned m_min_txnow;
152 unsigned m_timeout_msec;
191 u8* txbuff,
unsigned txbytes,
unsigned txpkt);
BufferedCopy copies from any Readable source to any Writeable sink.
BufferedCopy(satcat5::io::Readable *src, satcat5::io::Writeable *dst, satcat5::io::CopyMode mode=CopyMode::PACKET)
Create an object that copies data from src to dst.
void data_unlink(satcat5::io::Readable *src) override
Unlink this EventListener from the designated source, because the designated Readable object is being...
satcat5::io::Readable * src()
Other accessors.
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
satcat5::io::Writeable * dst()
Other accessors.
Extensible transmit and receive buffer.
BufferedIO(u8 *txbuff, unsigned txbytes, unsigned txpkt, u8 *rxbuff, unsigned rxbytes, unsigned rxpkt)
Child provides Tx and Rx working buffers.
satcat5::io::PacketBuffer m_tx
Transmit data (user writes, child reads)
satcat5::io::PacketBuffer m_rx
Receive data (user reads, child writes)
Copy packets from a Readable source to a network address.
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
void data_unlink(satcat5::io::Readable *src) override
Unlink this EventListener from the designated source, because the designated Readable object is being...
BufferedPackets(satcat5::io::Readable *src, satcat5::net::Address *dst)
Set source, destination, APID, and chunk-size.
Copy bytes from a Readable source to a network address.
void data_unlink(satcat5::io::Readable *src) override
Unlink this EventListener from the designated source, because the designated Readable object is being...
BufferedStream(satcat5::io::Readable *src, satcat5::net::Address *dst, unsigned max_chunk=512, unsigned min_txnow=UINT_MAX)
Set source, destination, APID, and chunk-size.
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
void set_timeout(unsigned msec)
Set packetization timeout, in milliseconds.
BufferedWriter adds an inline buffer to any Writeable interface.
Event-handler interface for newly received data.
The PacketBuffer class is a wrapper for a circular buffer, with optional logic to support retention o...
Abstract API for reading byte-streams and packets.
Wrapper class for forwarding reads to another object.
Abstract API for writing byte-streams and packets.
Wrapper class for forwarding writes to another object.
Defines a generic API for sending data to a specific destination, such as a MAC address,...
I/O interface core definitions.
CopyMode
Specify read and write behavior for Readable::copy_and_finalize().
Timestamp for measuring elapsed time.
TimeRef and TimeVal define the API for monotonic timers.