# eric7.MicroPython.EthernetDialogs.EthernetController

Module implementing the Ethernet related functionality.

### Global Attributes

None

### Classes

EthernetController | Class implementing the Ethernet related functionality.

### Functions

None

## EthernetController

Class implementing the Ethernet related functionality.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

EthernetController | Constructor
__checkInternet | Private slot to check the availability of an internet connection.
__connectLan | Private method to connect the connected device to the LAN.
__connectLanDhcp | Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode).
__connectLanIp | Private slot to connect to the LAN with a fixed IPv4 address (fixed address mode).
__deactivateEthernet | Private slot to deactivate the Ethernet interface.
__disconnectLan | Private slot to disconnect from the LAN.
__removeAutoConnect | Private slot to remove the boot time connect capability.
__setNetworkTime | Private slot to synchronize the device clock to network time.
__showEthernetStatus | Private slot to show a dialog with the WiFi status of the current device.
__writeAutoConnect | Private slot to generate a script and associated configuration to connect the device during boot time.
createMenu | Public method to create the Ethernet submenu.

### Static Methods

None

#### EthernetController (Constructor)

EthernetController(microPython, parent=None)

Constructor

microPython (MicroPythonWidgep)
  reference to the MicroPython widget
parent (QObject (optional))
  reference to the parent object (defaults to None)

#### EthernetController.__checkInternet

__checkInternet()

Private slot to check the availability of an internet connection.

#### EthernetController.__connectLan

__connectLan(config, hostname)

Private method to connect the connected device to the LAN.

config (str of tuple of (str, str, str, str))
  configuration for the connection (either the string 'dhcp' for a dynamic address or a tuple of four strings with the IPv4 parameters.
hostname (str)
  host name of the device

#### EthernetController.__connectLanDhcp

__connectLanDhcp()

Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode).

#### EthernetController.__connectLanIp

__connectLanIp()

Private slot to connect to the LAN with a fixed IPv4 address (fixed address mode).

#### EthernetController.__deactivateEthernet

__deactivateEthernet()

Private slot to deactivate the Ethernet interface.

#### EthernetController.__disconnectLan

__disconnectLan()

Private slot to disconnect from the LAN.

#### EthernetController.__removeAutoConnect

__removeAutoConnect()

Private slot to remove the boot time connect capability.

This will not remove the auto-connect part of the boot script. This needs to be done manually if desired.

#### EthernetController.__setNetworkTime

__setNetworkTime()

Private slot to synchronize the device clock to network time.

#### EthernetController.__showEthernetStatus

__showEthernetStatus()

Private slot to show a dialog with the WiFi status of the current device.

#### EthernetController.__writeAutoConnect

__writeAutoConnect()

Private slot to generate a script and associated configuration to connect the device during boot time.

This will also modify the boot script to perform the automatic connection.

#### EthernetController.createMenu

createMenu(menu)

Public method to create the Ethernet submenu.

menu (QMenu)
  reference to the parent menu

Return:
  reference to the created menu

Return Type:
  QMenu

Up