27 virtual void onFrame(
const uint8_t* frame, uint16_t len) = 0;
41 virtual bool begin(
const char* productName) = 0;
45 virtual bool send(
const uint8_t* frame, uint16_t len) = 0;
63 virtual bool begin(
const char* ssid,
const char* password) = 0;
80 virtual bool sendFrame(
const uint8_t* frame, uint16_t len) = 0;
Printf-style logging through the global TWD_LOGGER object.
Raw Ethernet access to the uplink network (bridge mode).
virtual void setFrameReceiver(FrameReceiver *receiver)=0
Frames coming from the uplink network are passed to receiver.
virtual ~FrameLink()=default
virtual const uint8_t * macAddress()=0
MAC address the uplink network knows this device by.
virtual bool sendFrame(const uint8_t *frame, uint16_t len)=0
Sends a frame to the uplink network; false if it was dropped.
Consumer of Ethernet frames.
virtual void onFrame(const uint8_t *frame, uint16_t len)=0
The frame is only valid during the call; copy it if it must be kept.
virtual ~FrameReceiver()=default
The connection to the WiFi network the traffic is bridged to.
virtual bool connected()=0
True while associated with the access point.
virtual ~Uplink()=default
virtual bool begin(const char *ssid, const char *password)=0
Start joining the network; returns at once, see connected().
Moves Ethernet frames between the MCU and the USB host.
virtual bool begin(const char *productName)=0
Registers the USB network interface (before the USB stack is started).
virtual void setReceiver(FrameReceiver *receiver)=0
Frames coming from the host are passed to receiver.
virtual bool send(const uint8_t *frame, uint16_t len)=0
Queues a frame for the host. Never blocks; false if it was dropped.
virtual void setHostMac(const uint8_t mac[6])=0
virtual bool ready()=0
The host has enumerated and configured the device.
virtual ~UsbTransport()=default