PL::BlackBoxServerConfiguration class

class BlackBoxServerConfiguration : public PL::Lockable, public PL::BlackBoxConfiguration

BlackBox server configuration.

Subclassed by PL::BlackBoxModbusServerConfiguration, PL::BlackBoxNetworkServerConfiguration, PL::BlackBoxStreamServerConfiguration

Public Functions

BlackBoxServerConfiguration(std::shared_ptr<Server> server, std::string nvsNamespaceName)

Creates a BlackBox server configuration.

Parameters:
  • server – server

  • nvsNamespaceName – NVS namespace name

std::shared_ptr<Server> GetServer()

Gets the server.

Returns:

server

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 server.

Public Members

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

enabled parameter

Public Static Attributes

static const std::string enabledNvsKey

enabled parameter NVS key