Base Ethernet service for IDF SDK. More...

#include <IdfService.h>

Inheritance diagram for Ethernet::IdfService:
Collaboration diagram for Ethernet::IdfService:

Public Member Functions

 IdfService (PhyFactory &phyFactory)
 
void end () override
 Tear down the ethernet connection. More...
 
MacAddress getMacAddress () const override
 Get MAC address. More...
 
bool setMacAddress (const MacAddress &addr) override
 Set MAC address. More...
 
bool setSpeed (Ethernet::Speed speed) override
 Set speed of MAC. More...
 
bool setFullDuplex (bool enable) override
 Set duplex mode of MAC. More...
 
bool setLinkState (bool up) override
 Set link status of MAC. More...
 
bool setPromiscuous (bool enable) override
 Set MAC promiscuous mode. More...
 
void setHostname (const String &hostname) override
 Set DHCP hostname. More...
 
String getHostname () const override
 Get DHCP hostname. More...
 
IpAddress getIP () const override
 Get current IP address. More...
 
bool setIP (IpAddress address, IpAddress netmask, IpAddress gateway) override
 Set static IP address. More...
 
bool isEnabledDHCP () const override
 Determine if DHCP is active for this interface. More...
 
bool enableDHCP (bool enable) override
 Enable/disable DHCP on this interface. More...
 
- Public Member Functions inherited from Ethernet::Service
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 Member Functions

void enableEventCallback (bool enable)
 
void enableGotIpCallback (bool enable)
 

Protected Attributes

PhyFactoryphyFactory
 
void * handle {nullptr}
 
esp_netif_obj * netif {nullptr}
 
void * netif_glue {nullptr}
 
esp_eth_mac_s * mac {nullptr}
 
esp_eth_phy_s * phy {nullptr}
 
Event state {Event::Disconnected}
 
- Protected Attributes inherited from Ethernet::Service
EventDelegate eventCallback
 
GotIpDelegate gotIpCallback
 

Detailed Description

Base Ethernet service for IDF SDK.

Constructor & Destructor Documentation

◆ IdfService()

Ethernet::IdfService::IdfService ( PhyFactory phyFactory)
inline

Member Function Documentation

◆ enableDHCP()

bool Ethernet::IdfService::enableDHCP ( bool  enable)
overridevirtual

Enable/disable DHCP on this interface.

Implements Ethernet::Service.

◆ enableEventCallback()

void Ethernet::IdfService::enableEventCallback ( bool  enable)
protected

◆ enableGotIpCallback()

void Ethernet::IdfService::enableGotIpCallback ( bool  enable)
protected

◆ end()

void Ethernet::IdfService::end ( )
overridevirtual

Tear down the ethernet connection.

Implements Ethernet::Service.

◆ getHostname()

String Ethernet::IdfService::getHostname ( ) const
overridevirtual

Get DHCP hostname.

Implements Ethernet::Service.

◆ getIP()

IpAddress Ethernet::IdfService::getIP ( ) const
overridevirtual

Get current IP address.

Implements Ethernet::Service.

◆ getMacAddress()

MacAddress Ethernet::IdfService::getMacAddress ( ) const
overridevirtual

Get MAC address.

Implements Ethernet::Service.

◆ isEnabledDHCP()

bool Ethernet::IdfService::isEnabledDHCP ( ) const
overridevirtual

Determine if DHCP is active for this interface.

Implements Ethernet::Service.

◆ setFullDuplex()

bool Ethernet::IdfService::setFullDuplex ( bool  enable)
overridevirtual

Set duplex mode of MAC.

Implements Ethernet::Service.

◆ setHostname()

void Ethernet::IdfService::setHostname ( const String hostname)
overridevirtual

Set DHCP hostname.

Implements Ethernet::Service.

◆ setIP()

bool Ethernet::IdfService::setIP ( IpAddress  address,
IpAddress  netmask,
IpAddress  gateway 
)
overridevirtual

Set static IP address.

Implements Ethernet::Service.

◆ setLinkState()

bool Ethernet::IdfService::setLinkState ( bool  up)
overridevirtual

Set link status of MAC.

Implements Ethernet::Service.

◆ setMacAddress()

bool Ethernet::IdfService::setMacAddress ( const MacAddress addr)
overridevirtual

Set MAC address.

Implements Ethernet::Service.

◆ setPromiscuous()

bool Ethernet::IdfService::setPromiscuous ( bool  enable)
overridevirtual

Set MAC promiscuous mode.

Implements Ethernet::Service.

◆ setSpeed()

bool Ethernet::IdfService::setSpeed ( Ethernet::Speed  speed)
overridevirtual

Set speed of MAC.

Implements Ethernet::Service.

Member Data Documentation

◆ handle

void* Ethernet::IdfService::handle {nullptr}
protected

◆ mac

esp_eth_mac_s* Ethernet::IdfService::mac {nullptr}
protected

◆ netif

esp_netif_obj* Ethernet::IdfService::netif {nullptr}
protected

◆ netif_glue

void* Ethernet::IdfService::netif_glue {nullptr}
protected

◆ phy

esp_eth_phy_s* Ethernet::IdfService::phy {nullptr}
protected

◆ phyFactory

PhyFactory& Ethernet::IdfService::phyFactory
protected

◆ state

Event Ethernet::IdfService::state {Event::Disconnected}
protected

The documentation for this class was generated from the following file: