PL::BlackBoxHardwareInterfaceConfiguration class

class BlackBoxHardwareInterfaceConfiguration : public PL::Lockable, public PL::BlackBoxConfiguration

BlackBox hardware interface configuration.

Subclassed by PL::BlackBoxNetworkInterfaceConfiguration, PL::BlackBoxUartConfiguration

Public Functions

BlackBoxHardwareInterfaceConfiguration(std::shared_ptr<HardwareInterface> hardwareInterface, std::string nvsNamespaceName)

Creates a BlackBox hardware interface configuration.

Parameters:
  • hardwareInterface – hardware interface

  • nvsNamespaceName – NVS namespace name

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 Load() override

Loads the configuration.

virtual void Save() override

Saves the configuration.

virtual void Erase() override

Erases the configuration.

virtual void Apply()

Applies the configuration to the hardware interface.

Public Members

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

enabled parameter

Public Static Attributes

static const std::string enabledNvsKey

enabled parameter NVS key