Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
EthernetInterface Class Reference

#include <EthernetInterface.h>

Inheritance diagram for EthernetInterface:
EMACInterface EthInterface NetworkInterface NetworkInterface DNS DNS

Public Member Functions

 EthernetInterface (EMAC &emac=EMAC::get_default_instance(), OnboardNetworkStack &stack=OnboardNetworkStack::get_default_instance())
 
- Public Member Functions inherited from EMACInterface
 EMACInterface (EMAC &emac=EMAC::get_default_instance(), OnboardNetworkStack &stack=OnboardNetworkStack::get_default_instance())
 
virtual nsapi_error_t set_network (const char *ip_address, const char *netmask, const char *gateway)
 
virtual nsapi_error_t set_dhcp (bool dhcp)
 
virtual nsapi_error_t connect ()
 
virtual nsapi_error_t disconnect ()
 
virtual const char * get_mac_address ()
 
virtual const char * get_ip_address ()
 
virtual const char * get_netmask ()
 
virtual const char * get_gateway ()
 
virtual void attach (mbed::Callback< void(nsapi_event_t, intptr_t)> status_cb)
 
virtual nsapi_connection_status_t get_connection_status () const
 
virtual nsapi_error_t set_blocking (bool blocking)
 
EMACget_emac () const
 
virtual EMACInterfaceemacInterface ()
 
- Public Member Functions inherited from NetworkInterface
virtual nsapi_error_t gethostbyname (const char *host, SocketAddress *address, nsapi_version_t version=NSAPI_UNSPEC)
 
virtual nsapi_value_or_error_t gethostbyname_async (const char *host, hostbyname_cb_t callback, nsapi_version_t version=NSAPI_UNSPEC)
 
virtual nsapi_error_t gethostbyname_async_cancel (int id)
 
virtual nsapi_error_t add_dns_server (const SocketAddress &address)
 
virtual WiFiInterfacewifiInterface ()
 
virtual MeshInterfacemeshInterface ()
 
virtual CellularBasecellularBase ()
 
- Public Member Functions inherited from EthInterface
virtual EthInterfaceethInterface ()
 

Additional Inherited Members

- Public Types inherited from NetworkInterface
typedef mbed::Callback< void(nsapi_error_t result, SocketAddress *address)> hostbyname_cb_t
 
- Public Types inherited from DNS
typedef mbed::Callback< void(nsapi_error_t result, SocketAddress *address)> hostbyname_cb_t
 
- Static Public Member Functions inherited from NetworkInterface
static NetworkInterfaceget_default_instance ()
 
- Static Public Member Functions inherited from EthInterface
static EthInterfaceget_default_instance ()
 
- Protected Member Functions inherited from EMACInterface
virtual NetworkStackget_stack ()
 
- Static Protected Member Functions inherited from NetworkInterface
static NetworkInterfaceget_target_default_instance ()
 
- Static Protected Member Functions inherited from EthInterface
static EthInterfaceget_target_default_instance ()
 
- Protected Attributes inherited from EMACInterface
EMAC_emac
 
OnboardNetworkStack_stack
 
OnboardNetworkStack::Interface_interface
 
bool _dhcp
 
bool _blocking
 
char _mac_address [18]
 
char _ip_address [40]
 
char _netmask [16]
 
char _gateway [16]
 
Callback< void(nsapi_event_t, intptr_t)> _connection_status_cb
 

Detailed Description

EthernetInterface class Implementation of the NetworkStack for an EMAC-based Ethernet driver

Constructor & Destructor Documentation

EthernetInterface::EthernetInterface ( EMAC emac = EMAC::get_default_instance(),
OnboardNetworkStack stack = OnboardNetworkStack::get_default_instance() 
)
inline

Create an EMAC-based ethernet interface.

The default arguments obtain the default EMAC, which will be target- dependent (and the target may have some JSON option to choose which is the default, if there are multiple). The default stack is configured by JSON option nsapi.default-stack.

Due to inability to return errors from the constructor, no real work is done until the first call to connect().

Parameters
emacReference to EMAC to use
stackReference to onboard-network stack to use

The documentation for this class was generated from the following file:
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.