PL::BlackBoxEthernetConfiguration class

class BlackBoxEthernetConfiguration : public PL::BlackBoxNetworkInterfaceConfiguration

BlackBox Ethernet configuration.

Public Functions

BlackBoxEthernetConfiguration(std::shared_ptr<Ethernet> ethernet, std::string nvsNamespaceName)

Creates a BlackBox Ethernet configuration.

Parameters:
  • ethernetEthernet

  • nvsNamespaceName – NVS namespace name

virtual void Load() override

Loads the configuration.

virtual void Save() override

Saves the configuration.

virtual void Apply() override

Applies the configuration to the hardware interface.

std::shared_ptr<HardwareInterface> GetHardwareInterface()

Gets the hardware interface.

Returns:

hardware interface

virtual esp_err_t Lock(TickType_t timeout = portMAX_DELAY) override

Locks the object.

Parameters:

timeout – timeout in FreeRTOS ticks

Returns:

error code

virtual esp_err_t Unlock() override

Unlocks the object.

Returns:

error code

virtual void Erase() override

Erases the configuration.

Public Members

BlackBoxConfigurationParameter<IpV4Address> ipV4Address

IPv4 address parameter.

BlackBoxConfigurationParameter<IpV4Address> ipV4Netmask

IPv4 netmask parameter.

BlackBoxConfigurationParameter<IpV4Address> ipV4Gateway

IPv4 gateway parameter.

BlackBoxConfigurationParameter<IpV6Address> ipV6GlobalAddress

IPv6 global address parameter.

BlackBoxConfigurationParameter<bool> ipV4DhcpClientEnabled

IPv4 DHCP client enabled parameter.

BlackBoxConfigurationParameter<bool> ipV6DhcpClientEnabled

IPv6 DHCP client enabled parameter.

BlackBoxConfigurationParameter<bool> enabled = BlackBoxConfigurationParameter<bool>(true)

enabled parameter

Public Static Attributes

static const std::string ipV4AddressNvsKey

IPv4 address parameter NVS key.

static const std::string ipV4NetmaskNvsKey

IPv4 netmask parameter NVS key.

static const std::string ipV4GatewayNvsKey

IPv4 gateway parameter NVS key.

static const std::string ipV6GlobalAddressNvsKey

IPv6 global address parameter NVS key.

static const std::string ipV4DhcpClientEnabledNvsKey

IPv4 DHCP client enabled parameter NVS key.

static const std::string ipV6DhcpClientEnabledNvsKey

IPv6 DHCP client enabled parameter NVS key.

static const std::string enabledNvsKey

enabled parameter NVS key