|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
#include "user_config.h"#include <libents/controller/modules/power.h>#include <libents/controller/modules/wifi.h>#include <libents/controller/modules/wifi_userconfig.h>#include <libents/user_config.h>#include <libtock/net/eui64.h>#include <libtock/services/alarm.h>#include <ulog.h>Go to the source code of this file.
Functions | |
| void | UserConfigStopCallback (uint32_t, uint32_t, void *ptr) |
| Stops the user config webserver. | |
| void | UserConfigStart (uint32_t retry_ms) |
| Starts the user config webserver. | |
| void | UserConfigUpdateFromServer (void) |
| void | UserConfigStop (uint32_t retry_ms) |
| Stops the user config webserver. | |
| int | UserConfigCurrentStatus (void) |
| Get the current user config state. | |
Variables | |
| UserConfigState | state = USERCONFIG_STATE_OFF |
| 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 UserConfigStopCallback | ( | uint32_t | , |
| uint32_t | , | ||
| void * | ptr | ||
| ) |
Stops the user config webserver.
Definition at line 123 of file user_config.cc.
References ControllerPowerSleep(), ControllerWiFiHostInfo(), ControllerWiFiStopHost(), state, USERCONFIG_STATE_OFF, UserConfigGet(), and UserConfigStop().
Referenced by UserConfigStop().
| void UserConfigUpdateFromServer | ( | void | ) |
Definition at line 91 of file user_config.cc.
References ControllerUserConfigRequest(), USERCONFIG_OK, UserConfigLoad(), and UserConfigPrint().
Referenced by main().
| UserConfigState state = USERCONFIG_STATE_OFF |
Definition at line 11 of file user_config.cc.
Referenced by EncodeTestCommand(), lorawan_init(), lorawan_join(), lorawan_timesync(), lorawan_upload_fport(), ModuleHandler::Module::Reset(), ModuleHandler::Module::State(), UserConfigCurrentStatus(), UserConfigStart(), UserConfigStop(), and UserConfigStopCallback().