Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
CLIConfig Class Reference

CLI interface to get and set device configuration options. More...

#include <config_cli.h>

Collaboration diagram for CLIConfig:

Static Public Member Functions

static BaseType_t enter_cli (char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString)
 Enter command line interface (CLI) mode for the given command string. More...
 

Static Public Attributes

static const std::string cmd = "config"
 CLI prefix for configuration commands. More...
 

Static Private Attributes

static DeviceConfigconfig = DeviceConfig::get()
 Current device configuration (called upon initialisation) More...
 

Detailed Description

CLI interface to get and set device configuration options.

Member Function Documentation

◆ enter_cli()

BaseType_t CLIConfig::enter_cli ( char *  pcWriteBuffer,
size_t  xWriteBufferLen,
const char *  pcCommandString 
)
static

Enter command line interface (CLI) mode for the given command string.

This function handles the following commands:

  • list: Lists the current configuration settings to the response buffer.
  • load: Loads the configuration from SPIFFS storage and outputs it to the response buffer.
  • save: Saves the current configuration to persistent storage (SPIFFS).

If an invalid command or argument is given, an error message is added to the response buffer.

Parameters
pcWriteBufferPointer to the buffer where the output string is to be written.
xWriteBufferLenMaximum length of the output string, including the null terminator.
pcCommandStringPointer to the command string input by the user.
Returns
pdTRUE if there is more data to be returned, pdFALSE otherwise.

Member Data Documentation

◆ cmd

const std::string CLIConfig::cmd = "config"
inlinestatic

CLI prefix for configuration commands.

◆ config

DeviceConfig& CLIConfig::config = DeviceConfig::get()
inlinestaticprivate

Current device configuration (called upon initialisation)


The documentation for this class was generated from the following files: