|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
Controls the user config webserver. More...
#include <cstdint>Go to the source code of this file.
Enumerations | |
| enum | UserConfigState { USERCONFIG_STATE_OFF , USERCONFIG_STATE_ON , USERCONFIG_STATE_STOPPING } |
Functions | |
| void | UserConfigStart (uint32_t retry_ms) |
| Starts the user config webserver. | |
| void | UserConfigStop (uint32_t retry_ms) |
| Stops the user config webserver. | |
| int | UserConfigCurrentStatus (void) |
| Get the current user config state. | |
| void | UserConfigUpdateFromServer (void) |
Controls the user config webserver.
This files interfaces with the user config webserver. It allows starting and stopping of the webserver. There is an optional timeout to stop the server after a period of inactivity (no clients connected).
Definition in file user_config.h.
| enum UserConfigState |
| Enumerator | |
|---|---|
| USERCONFIG_STATE_OFF | |
| USERCONFIG_STATE_ON | |
| USERCONFIG_STATE_STOPPING | |
Definition at line 16 of file user_config.h.
| int UserConfigCurrentStatus | ( | void | ) |
Get the current user config state.
Definition at line 156 of file user_config.cc.
References state.
| void UserConfigStart | ( | uint32_t | retry_ms | ) |
Starts the user config webserver.
If retry_ms is 0, then autostop is disabled. Use UserConfigStop() to initiate a stop.
| retry_ms | Time between webserver stop attempts. |
Definition at line 22 of file user_config.cc.
References ControllerUserConfigSend(), ControllerUserConfigStart(), ControllerWiFiHost(), ControllerWiFiHostInfo(), pass, ssid, state, USERCONFIG_OK, USERCONFIG_STATE_ON, UserConfigLoad(), UserConfigPrint(), and UserConfigStop().
Referenced by main().
| void UserConfigStop | ( | uint32_t | retry_ms | ) |
Stops the user config webserver.
Schedule the webserver to be stopped. The webesrver can be prevented from stopping if there is still a client connected. The argument retry_ms specifies how long to go between stop attempts.
| retry_ms | Time between webserver stop attempts. |
Definition at line 117 of file user_config.cc.
References state, USERCONFIG_STATE_STOPPING, and UserConfigStopCallback().
Referenced by UserConfigStart(), and UserConfigStopCallback().
| void UserConfigUpdateFromServer | ( | void | ) |
Definition at line 91 of file user_config.cc.
References ControllerUserConfigRequest(), USERCONFIG_OK, UserConfigLoad(), and UserConfigPrint().
Referenced by main().