42 inline u32 port_mask()
const {
return 1u << m_index;}
44 const unsigned m_index;
58 std::vector<Port*> m_ports;
Event-handler interface for newly received data.
Abstract API for reading byte-streams and packets.
Abstract API for writing byte-streams and packets.
An "Always" object is polled whenever service() is called.
Mockup for a memory-mapped ConfigBus.
void data_unlink(satcat5::io::Readable *src) override
Unlink this EventListener from the designated source, because the designated Readable object is being...
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
Simulate the router2::Offload port's ConfigBus interface.
MockOffload(unsigned devaddr)
Create the mock interface and set ConfigBus device address.
void poll_always() override
Child class MUST override this method.
void add_port(satcat5::io::Writeable *dst, satcat5::io::Readable *src)
Link the next hardware port to a destination and source.
void port_shdn(u32 mask_shdn)
Update the reported port-status flags.
Miscellaneous simulation and test helper functions.