Abstract Service class. More...
#include <Ethernet.h>
Public Member Functions | |
virtual void | end ()=0 |
Tear down the ethernet connection. More... | |
virtual MacAddress | getMacAddress () const =0 |
Get MAC address. More... | |
virtual bool | setMacAddress (const MacAddress &addr)=0 |
Set MAC address. More... | |
virtual bool | setSpeed (Speed speed)=0 |
Set speed of MAC. More... | |
virtual bool | setFullDuplex (bool enable)=0 |
Set duplex mode of MAC. More... | |
virtual bool | setLinkState (bool up)=0 |
Set link status of MAC. More... | |
virtual bool | setPromiscuous (bool enable)=0 |
Set MAC promiscuous mode. More... | |
virtual void | setHostname (const String &hostname)=0 |
Set DHCP hostname. More... | |
virtual String | getHostname () const =0 |
Get DHCP hostname. More... | |
virtual IpAddress | getIP () const =0 |
Get current IP address. More... | |
virtual bool | setIP (IpAddress address, IpAddress netmask, IpAddress gateway)=0 |
Set static IP address. More... | |
virtual bool | isEnabledDHCP () const =0 |
Determine if DHCP is active for this interface. More... | |
virtual bool | enableDHCP (bool enable)=0 |
Enable/disable DHCP on this interface. More... | |
void | onEvent (EventDelegate callback) |
Set callback for ethernet events. More... | |
void | onGotIp (GotIpDelegate callback) |
Set callback for 'station connected with IP address' event. More... | |
Protected Attributes | |
EventDelegate | eventCallback |
GotIpDelegate | gotIpCallback |
Detailed Description
Abstract Service class.
Provides a common implementation for TCP/IP ethernet support.
An Ethernet interface requires a MAC layer plus PHY.
The ESP32, for example, contains a MAC but requires an external PHY. Other solutions, such as the W5500, contain MAC+PHY and require the correct PhyFactory to work.
Ethernet implementations should provide appropriate setup methods which are called by the application before invoking begin()
.
Member Function Documentation
◆ enableDHCP()
Enable/disable DHCP on this interface.
Implemented in Ethernet::IdfService.
◆ end()
|
pure virtual |
Tear down the ethernet connection.
Implemented in Ethernet::IdfService.
◆ getHostname()
|
pure virtual |
Get DHCP hostname.
Implemented in Ethernet::IdfService.
◆ getIP()
|
pure virtual |
Get current IP address.
Implemented in Ethernet::IdfService.
◆ getMacAddress()
|
pure virtual |
Get MAC address.
Implemented in Ethernet::IdfService.
◆ isEnabledDHCP()
|
pure virtual |
Determine if DHCP is active for this interface.
Implemented in Ethernet::IdfService.
◆ onEvent()
|
inline |
Set callback for ethernet events.
◆ onGotIp()
|
inline |
Set callback for 'station connected with IP address' event.
◆ setFullDuplex()
Set duplex mode of MAC.
Implemented in Ethernet::IdfService.
◆ setHostname()
|
pure virtual |
Set DHCP hostname.
Implemented in Ethernet::IdfService.
◆ setIP()
|
pure virtual |
Set static IP address.
Implemented in Ethernet::IdfService.
◆ setLinkState()
Set link status of MAC.
Implemented in Ethernet::IdfService.
◆ setMacAddress()
|
pure virtual |
Set MAC address.
Implemented in Ethernet::IdfService.
◆ setPromiscuous()
Set MAC promiscuous mode.
Implemented in Ethernet::IdfService.
◆ setSpeed()
Set speed of MAC.
Implemented in Ethernet::IdfService.
Member Data Documentation
◆ eventCallback
|
protected |
◆ gotIpCallback
|
protected |
The documentation for this class was generated from the following file: