9 #include <satcat5/eth_address.h>
14 #include <satcat5/udp_core.h>
71 ~
Tpipe() SATCAT5_OPTIONAL_DTOR;
75 void frame_rcvd(satcat5::io::LimitedRead& src) override;
146 inline bool ready()
const {
return m_addr.ready();}
170 inline bool ready()
const {
return m_addr.ready();}
Inheritable container for a eth::Address.
Implemention of "net::Dispatch" for Ethernet frames.
Simple network pipe service over raw Ethernet.
bool ready() const
Is this connection ready to send and receive?
Extensible transmit and receive buffer.
constexpr Readable(satcat5::io::EventListener *callback=0)
Only children should create or destroy the base class.
Defines a generic API for sending data to a specific destination, such as a MAC address,...
A net::Protocol is the counterpart to net::Dispatch that handles a particular data stream,...
Simple network pipe service for reliable byte-streams.
bool completed() const
Has all queued data been acknowledged?
u16 m_txref
Transmit reference.
u8 m_txbuff[MAX_WINDOW]
Working buffer (transmit)
void timer_event() override
Child class MUST override this method.
void set_retransmit(u16 msec)
Adjust retransmit interval.
void close()
Close the active connection.
u16 m_rxpos
Receive position.
u8 m_rxbuff[MAX_WINDOW]
Working buffer (receive)
static constexpr u16 STATE_READY
Connection acknowledged.
u16 m_rxref
Receive reference.
static constexpr u16 STATE_TXBUSY
Tx sent, wait for ack.
u16 m_retransmit
Retransmit timeout (msec)
void send_start()
Special case of send_block used to open a new connection.
u16 m_txpos
Transmit position.
static constexpr u16 FLAG_STOP
Connection is closing.
static constexpr unsigned MAX_WINDOW
Buffer size is set by the maximum transmit window.
static constexpr u16 FLAG_LEN
Data length.
static constexpr u16 FLAG_START
Open new connection.
u16 m_timeout
Connection timeout (msec)
u16 m_retry
Retry elapsed time (msec)
Tpipe(satcat5::net::Address *dst)
Create link and set the transport service.
satcat5::net::Address *const m_iface
Network interface.
void set_txonly()
Enable unidirectional transmission? Transmit-only endpoints do not wait for acknowledgements.
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
static constexpr u16 STATE_OPENREQ
Opening new connection.
void set_timeout(u16 msec)
Adjust lost-connection timeout.
void frame_rcvd(satcat5::io::LimitedRead &src) override
Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value.
static constexpr u16 STATE_TXONLY
Unidirectional streaming.
void send_block()
Send a synchronization packet, with data if applicable.
static constexpr u16 STATE_CLOSING
Closing connection.
Timer objects are polled after a fixed delay or at a regular interval.
Inheritable container for a udp::Address.
Dispatcher sorts incoming UDP messages by port index.
Simple network pipe service over raw Ethernet.
bool ready() const
Is this connection ready to send and receive?
Buffered I/O wrappers for PacketBuffer.
Generic network Dispatch API.
Core event-processing loop for SatCat5 software.
An Ethernet MAC address (with serializable interface).
EtherType field (uint16) is used a protocol-ID [1536..65535].
Header contents for an 802.1Q Virtual-LAN tag.
IPv4 address is a 32-bit unsigned integer.
UDP and TCP ports are both 16-bit unsigned integers.
TimeRef and TimeVal define the API for monotonic timers.