Skip to content

Is a description of parameters available ? #280

@Greece2

Description

@Greece2

Hi,
I tried to find the answers in the examples, the documentation, the source code etc., without success. Possibly because
everyone thinks this is obvious and self-explanatory ;-)

Is there a description of the following parameters ?
IotWebConfTextParameter stringParam = IotWebConfTextParameter("String param", "stringParam", stringParamValue, STRING_LEN);
Starting from the left:

  • stringParam holds the entered string ?
  • "String param" seems to be the text that is displayed in the form
  • "stringParam" does what ?
  • stringParamValue does what ?
  • STRING_LEN is the max. number of characters

is it possible to have a default string? And if so, where and how would that be placed ?

Same question for this
IotWebConfNumberParameter intParam = IotWebConfNumberParameter("Int param", "intParam", intParamValue, NUMBER_LEN, "20", "1..100", "min='1' max='100' step='1'");

  • intParam holds the entered integer value ?
  • "Int param" seems to be the text displayed in the form
  • "intParam" does what ?
  • intParamValue does what ?
  • NUMBER_LEN seems to be the max. number of digits
  • "20" seems to be the default value
  • "1..100" seems to be a text displayed in the form
  • "min='1' max='100' step='1'" seems to set the possible range

Same questions for all other possible enties like:

IotWebConfParameterGroup group1 = IotWebConfParameterGroup("group1", "");
IotWebConfNumberParameter floatParam = IotWebConfNumberParameter("Float param", "floatParam", floatParamValue, NUMBER_LEN,  nullptr, "e.g. 23.4", "step='0.1'");
IotWebConfCheckboxParameter checkboxParam = IotWebConfCheckboxParameter("Check param", "checkParam", checkboxParamValue, STRING_LEN,  true);
IotWebConfSelectParameter chooserParam = IotWebConfSelectParameter("Choose param", "chooseParam", chooserParamValue, STRING_LEN, (char*)chooserValues, (char*)chooserNames, sizeof(chooserValues) / STRING_LEN, STRING_LEN);

As one usually has more than one parameter of each type (like 2 integers for upper and lower limits, several strings for name, street, address etc.), how would one do that ?
As all the examples always only show one of each type, it would be nice to have an example showing how to have more than one integer etc.

I know, it seems to be obvious to everyone else but me ;-) Still, I'd like to make some progress and continue to learn :-)

Thanks and best regards !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions