LiliyGo-HiGrow-Sensor/build/gen/mgos_config.c

666 lines
31 KiB
C
Raw Normal View History

2018-02-18 05:47:44 +00:00
/* Generated file - do not edit. */
#include <stddef.h>
#include "mgos_config.h"
2018-02-20 07:44:16 +00:00
const struct mgos_conf_entry mgos_config_schema_[99] = {
{.type = CONF_TYPE_OBJECT, .key = "", .num_desc = 98},
2018-02-18 05:47:44 +00:00
{.type = CONF_TYPE_OBJECT, .key = "device", .num_desc = 2},
{.type = CONF_TYPE_STRING, .key = "id", .offset = offsetof(struct mgos_config, device.id)},
{.type = CONF_TYPE_STRING, .key = "password", .offset = offsetof(struct mgos_config, device.password)},
{.type = CONF_TYPE_OBJECT, .key = "debug", .num_desc = 8},
{.type = CONF_TYPE_STRING, .key = "udp_log_addr", .offset = offsetof(struct mgos_config, debug.udp_log_addr)},
{.type = CONF_TYPE_INT, .key = "level", .offset = offsetof(struct mgos_config, debug.level)},
{.type = CONF_TYPE_STRING, .key = "filter", .offset = offsetof(struct mgos_config, debug.filter)},
{.type = CONF_TYPE_INT, .key = "stdout_uart", .offset = offsetof(struct mgos_config, debug.stdout_uart)},
{.type = CONF_TYPE_INT, .key = "stderr_uart", .offset = offsetof(struct mgos_config, debug.stderr_uart)},
{.type = CONF_TYPE_INT, .key = "factory_reset_gpio", .offset = offsetof(struct mgos_config, debug.factory_reset_gpio)},
{.type = CONF_TYPE_STRING, .key = "mg_mgr_hexdump_file", .offset = offsetof(struct mgos_config, debug.mg_mgr_hexdump_file)},
{.type = CONF_TYPE_INT, .key = "mbedtls_level", .offset = offsetof(struct mgos_config, debug.mbedtls_level)},
{.type = CONF_TYPE_OBJECT, .key = "sys", .num_desc = 10},
{.type = CONF_TYPE_OBJECT, .key = "mount", .num_desc = 5},
{.type = CONF_TYPE_STRING, .key = "path", .offset = offsetof(struct mgos_config, sys.mount.path)},
{.type = CONF_TYPE_STRING, .key = "dev_type", .offset = offsetof(struct mgos_config, sys.mount.dev_type)},
{.type = CONF_TYPE_STRING, .key = "dev_opts", .offset = offsetof(struct mgos_config, sys.mount.dev_opts)},
{.type = CONF_TYPE_STRING, .key = "fs_type", .offset = offsetof(struct mgos_config, sys.mount.fs_type)},
{.type = CONF_TYPE_STRING, .key = "fs_opts", .offset = offsetof(struct mgos_config, sys.mount.fs_opts)},
{.type = CONF_TYPE_STRING, .key = "tz_spec", .offset = offsetof(struct mgos_config, sys.tz_spec)},
{.type = CONF_TYPE_INT, .key = "wdt_timeout", .offset = offsetof(struct mgos_config, sys.wdt_timeout)},
{.type = CONF_TYPE_STRING, .key = "pref_ota_lib", .offset = offsetof(struct mgos_config, sys.pref_ota_lib)},
{.type = CONF_TYPE_INT, .key = "esp32_adc_vref", .offset = offsetof(struct mgos_config, sys.esp32_adc_vref)},
{.type = CONF_TYPE_STRING, .key = "conf_acl", .offset = offsetof(struct mgos_config, conf_acl)},
{.type = CONF_TYPE_OBJECT, .key = "bt", .num_desc = 12},
{.type = CONF_TYPE_BOOL, .key = "enable", .offset = offsetof(struct mgos_config, bt.enable)},
{.type = CONF_TYPE_STRING, .key = "dev_name", .offset = offsetof(struct mgos_config, bt.dev_name)},
{.type = CONF_TYPE_BOOL, .key = "adv_enable", .offset = offsetof(struct mgos_config, bt.adv_enable)},
{.type = CONF_TYPE_STRING, .key = "scan_rsp_data_hex", .offset = offsetof(struct mgos_config, bt.scan_rsp_data_hex)},
{.type = CONF_TYPE_BOOL, .key = "keep_enabled", .offset = offsetof(struct mgos_config, bt.keep_enabled)},
{.type = CONF_TYPE_BOOL, .key = "allow_pairing", .offset = offsetof(struct mgos_config, bt.allow_pairing)},
{.type = CONF_TYPE_INT, .key = "max_paired_devices", .offset = offsetof(struct mgos_config, bt.max_paired_devices)},
{.type = CONF_TYPE_BOOL, .key = "random_address", .offset = offsetof(struct mgos_config, bt.random_address)},
{.type = CONF_TYPE_OBJECT, .key = "gatts", .num_desc = 2},
{.type = CONF_TYPE_INT, .key = "min_sec_level", .offset = offsetof(struct mgos_config, bt.gatts.min_sec_level)},
{.type = CONF_TYPE_BOOL, .key = "require_pairing", .offset = offsetof(struct mgos_config, bt.gatts.require_pairing)},
{.type = CONF_TYPE_BOOL, .key = "config_svc_enable", .offset = offsetof(struct mgos_config, bt.config_svc_enable)},
{.type = CONF_TYPE_OBJECT, .key = "mjs", .num_desc = 1},
{.type = CONF_TYPE_BOOL, .key = "generate_jsc", .offset = offsetof(struct mgos_config, mjs.generate_jsc)},
{.type = CONF_TYPE_OBJECT, .key = "rpc", .num_desc = 20},
{.type = CONF_TYPE_BOOL, .key = "enable", .offset = offsetof(struct mgos_config, rpc.enable)},
{.type = CONF_TYPE_INT, .key = "max_frame_size", .offset = offsetof(struct mgos_config, rpc.max_frame_size)},
{.type = CONF_TYPE_INT, .key = "max_queue_length", .offset = offsetof(struct mgos_config, rpc.max_queue_length)},
{.type = CONF_TYPE_INT, .key = "default_out_channel_idle_close_timeout", .offset = offsetof(struct mgos_config, rpc.default_out_channel_idle_close_timeout)},
{.type = CONF_TYPE_STRING, .key = "acl_file", .offset = offsetof(struct mgos_config, rpc.acl_file)},
{.type = CONF_TYPE_STRING, .key = "auth_domain", .offset = offsetof(struct mgos_config, rpc.auth_domain)},
{.type = CONF_TYPE_STRING, .key = "auth_file", .offset = offsetof(struct mgos_config, rpc.auth_file)},
{.type = CONF_TYPE_OBJECT, .key = "ws", .num_desc = 7},
{.type = CONF_TYPE_BOOL, .key = "enable", .offset = offsetof(struct mgos_config, rpc.ws.enable)},
{.type = CONF_TYPE_STRING, .key = "server_address", .offset = offsetof(struct mgos_config, rpc.ws.server_address)},
{.type = CONF_TYPE_INT, .key = "reconnect_interval_min", .offset = offsetof(struct mgos_config, rpc.ws.reconnect_interval_min)},
{.type = CONF_TYPE_INT, .key = "reconnect_interval_max", .offset = offsetof(struct mgos_config, rpc.ws.reconnect_interval_max)},
{.type = CONF_TYPE_STRING, .key = "ssl_server_name", .offset = offsetof(struct mgos_config, rpc.ws.ssl_server_name)},
{.type = CONF_TYPE_STRING, .key = "ssl_ca_file", .offset = offsetof(struct mgos_config, rpc.ws.ssl_ca_file)},
{.type = CONF_TYPE_STRING, .key = "ssl_client_cert_file", .offset = offsetof(struct mgos_config, rpc.ws.ssl_client_cert_file)},
{.type = CONF_TYPE_OBJECT, .key = "uart", .num_desc = 4},
{.type = CONF_TYPE_INT, .key = "uart_no", .offset = offsetof(struct mgos_config, rpc.uart.uart_no)},
{.type = CONF_TYPE_INT, .key = "baud_rate", .offset = offsetof(struct mgos_config, rpc.uart.baud_rate)},
{.type = CONF_TYPE_INT, .key = "fc_type", .offset = offsetof(struct mgos_config, rpc.uart.fc_type)},
{.type = CONF_TYPE_BOOL, .key = "wait_for_start_frame", .offset = offsetof(struct mgos_config, rpc.uart.wait_for_start_frame)},
{.type = CONF_TYPE_OBJECT, .key = "wifi", .num_desc = 30},
{.type = CONF_TYPE_OBJECT, .key = "sta", .num_desc = 13},
{.type = CONF_TYPE_BOOL, .key = "enable", .offset = offsetof(struct mgos_config, wifi.sta.enable)},
{.type = CONF_TYPE_STRING, .key = "ssid", .offset = offsetof(struct mgos_config, wifi.sta.ssid)},
{.type = CONF_TYPE_STRING, .key = "pass", .offset = offsetof(struct mgos_config, wifi.sta.pass)},
{.type = CONF_TYPE_STRING, .key = "user", .offset = offsetof(struct mgos_config, wifi.sta.user)},
{.type = CONF_TYPE_STRING, .key = "anon_identity", .offset = offsetof(struct mgos_config, wifi.sta.anon_identity)},
{.type = CONF_TYPE_STRING, .key = "cert", .offset = offsetof(struct mgos_config, wifi.sta.cert)},
{.type = CONF_TYPE_STRING, .key = "key", .offset = offsetof(struct mgos_config, wifi.sta.key)},
{.type = CONF_TYPE_STRING, .key = "ca_cert", .offset = offsetof(struct mgos_config, wifi.sta.ca_cert)},
{.type = CONF_TYPE_STRING, .key = "ip", .offset = offsetof(struct mgos_config, wifi.sta.ip)},
{.type = CONF_TYPE_STRING, .key = "netmask", .offset = offsetof(struct mgos_config, wifi.sta.netmask)},
{.type = CONF_TYPE_STRING, .key = "gw", .offset = offsetof(struct mgos_config, wifi.sta.gw)},
{.type = CONF_TYPE_STRING, .key = "nameserver", .offset = offsetof(struct mgos_config, wifi.sta.nameserver)},
{.type = CONF_TYPE_STRING, .key = "dhcp_hostname", .offset = offsetof(struct mgos_config, wifi.sta.dhcp_hostname)},
{.type = CONF_TYPE_OBJECT, .key = "ap", .num_desc = 15},
{.type = CONF_TYPE_BOOL, .key = "enable", .offset = offsetof(struct mgos_config, wifi.ap.enable)},
{.type = CONF_TYPE_STRING, .key = "ssid", .offset = offsetof(struct mgos_config, wifi.ap.ssid)},
{.type = CONF_TYPE_STRING, .key = "pass", .offset = offsetof(struct mgos_config, wifi.ap.pass)},
{.type = CONF_TYPE_BOOL, .key = "hidden", .offset = offsetof(struct mgos_config, wifi.ap.hidden)},
{.type = CONF_TYPE_INT, .key = "channel", .offset = offsetof(struct mgos_config, wifi.ap.channel)},
{.type = CONF_TYPE_INT, .key = "max_connections", .offset = offsetof(struct mgos_config, wifi.ap.max_connections)},
{.type = CONF_TYPE_STRING, .key = "ip", .offset = offsetof(struct mgos_config, wifi.ap.ip)},
{.type = CONF_TYPE_STRING, .key = "netmask", .offset = offsetof(struct mgos_config, wifi.ap.netmask)},
{.type = CONF_TYPE_STRING, .key = "gw", .offset = offsetof(struct mgos_config, wifi.ap.gw)},
{.type = CONF_TYPE_STRING, .key = "dhcp_start", .offset = offsetof(struct mgos_config, wifi.ap.dhcp_start)},
{.type = CONF_TYPE_STRING, .key = "dhcp_end", .offset = offsetof(struct mgos_config, wifi.ap.dhcp_end)},
{.type = CONF_TYPE_INT, .key = "trigger_on_gpio", .offset = offsetof(struct mgos_config, wifi.ap.trigger_on_gpio)},
{.type = CONF_TYPE_INT, .key = "disable_after", .offset = offsetof(struct mgos_config, wifi.ap.disable_after)},
{.type = CONF_TYPE_STRING, .key = "hostname", .offset = offsetof(struct mgos_config, wifi.ap.hostname)},
{.type = CONF_TYPE_BOOL, .key = "keep_enabled", .offset = offsetof(struct mgos_config, wifi.ap.keep_enabled)},
2018-02-20 07:44:16 +00:00
{.type = CONF_TYPE_OBJECT, .key = "higrow", .num_desc = 6},
2018-02-18 05:47:44 +00:00
{.type = CONF_TYPE_STRING, .key = "deviceId", .offset = offsetof(struct mgos_config, higrow.deviceId)},
{.type = CONF_TYPE_DOUBLE, .key = "temperature", .offset = offsetof(struct mgos_config, higrow.temperature)},
{.type = CONF_TYPE_DOUBLE, .key = "humidity", .offset = offsetof(struct mgos_config, higrow.humidity)},
2018-02-20 07:44:16 +00:00
{.type = CONF_TYPE_INT, .key = "statuslight", .offset = offsetof(struct mgos_config, higrow.statuslight)},
2018-02-18 05:47:44 +00:00
{.type = CONF_TYPE_INT, .key = "moisture", .offset = offsetof(struct mgos_config, higrow.moisture)},
{.type = CONF_TYPE_BOOL, .key = "connected", .offset = offsetof(struct mgos_config, higrow.connected)},
};
const struct mgos_conf_entry *mgos_config_schema() {
return mgos_config_schema_;
}
/* Global instance */
struct mgos_config mgos_sys_config;
/* Getters {{{ */
const struct mgos_config_device *mgos_config_get_device(struct mgos_config *cfg) {
return &cfg->device;
}
const char *mgos_config_get_device_id(struct mgos_config *cfg) {
return cfg->device.id;
}
const char *mgos_config_get_device_password(struct mgos_config *cfg) {
return cfg->device.password;
}
const struct mgos_config_debug *mgos_config_get_debug(struct mgos_config *cfg) {
return &cfg->debug;
}
const char *mgos_config_get_debug_udp_log_addr(struct mgos_config *cfg) {
return cfg->debug.udp_log_addr;
}
int mgos_config_get_debug_level(struct mgos_config *cfg) {
return cfg->debug.level;
}
const char *mgos_config_get_debug_filter(struct mgos_config *cfg) {
return cfg->debug.filter;
}
int mgos_config_get_debug_stdout_uart(struct mgos_config *cfg) {
return cfg->debug.stdout_uart;
}
int mgos_config_get_debug_stderr_uart(struct mgos_config *cfg) {
return cfg->debug.stderr_uart;
}
int mgos_config_get_debug_factory_reset_gpio(struct mgos_config *cfg) {
return cfg->debug.factory_reset_gpio;
}
const char *mgos_config_get_debug_mg_mgr_hexdump_file(struct mgos_config *cfg) {
return cfg->debug.mg_mgr_hexdump_file;
}
int mgos_config_get_debug_mbedtls_level(struct mgos_config *cfg) {
return cfg->debug.mbedtls_level;
}
const struct mgos_config_sys *mgos_config_get_sys(struct mgos_config *cfg) {
return &cfg->sys;
}
const struct mgos_config_sys_mount *mgos_config_get_sys_mount(struct mgos_config *cfg) {
return &cfg->sys.mount;
}
const char *mgos_config_get_sys_mount_path(struct mgos_config *cfg) {
return cfg->sys.mount.path;
}
const char *mgos_config_get_sys_mount_dev_type(struct mgos_config *cfg) {
return cfg->sys.mount.dev_type;
}
const char *mgos_config_get_sys_mount_dev_opts(struct mgos_config *cfg) {
return cfg->sys.mount.dev_opts;
}
const char *mgos_config_get_sys_mount_fs_type(struct mgos_config *cfg) {
return cfg->sys.mount.fs_type;
}
const char *mgos_config_get_sys_mount_fs_opts(struct mgos_config *cfg) {
return cfg->sys.mount.fs_opts;
}
const char *mgos_config_get_sys_tz_spec(struct mgos_config *cfg) {
return cfg->sys.tz_spec;
}
int mgos_config_get_sys_wdt_timeout(struct mgos_config *cfg) {
return cfg->sys.wdt_timeout;
}
const char *mgos_config_get_sys_pref_ota_lib(struct mgos_config *cfg) {
return cfg->sys.pref_ota_lib;
}
int mgos_config_get_sys_esp32_adc_vref(struct mgos_config *cfg) {
return cfg->sys.esp32_adc_vref;
}
const char *mgos_config_get_conf_acl(struct mgos_config *cfg) {
return cfg->conf_acl;
}
const struct mgos_config_bt *mgos_config_get_bt(struct mgos_config *cfg) {
return &cfg->bt;
}
int mgos_config_get_bt_enable(struct mgos_config *cfg) {
return cfg->bt.enable;
}
const char *mgos_config_get_bt_dev_name(struct mgos_config *cfg) {
return cfg->bt.dev_name;
}
int mgos_config_get_bt_adv_enable(struct mgos_config *cfg) {
return cfg->bt.adv_enable;
}
const char *mgos_config_get_bt_scan_rsp_data_hex(struct mgos_config *cfg) {
return cfg->bt.scan_rsp_data_hex;
}
int mgos_config_get_bt_keep_enabled(struct mgos_config *cfg) {
return cfg->bt.keep_enabled;
}
int mgos_config_get_bt_allow_pairing(struct mgos_config *cfg) {
return cfg->bt.allow_pairing;
}
int mgos_config_get_bt_max_paired_devices(struct mgos_config *cfg) {
return cfg->bt.max_paired_devices;
}
int mgos_config_get_bt_random_address(struct mgos_config *cfg) {
return cfg->bt.random_address;
}
const struct mgos_config_bt_gatts *mgos_config_get_bt_gatts(struct mgos_config *cfg) {
return &cfg->bt.gatts;
}
int mgos_config_get_bt_gatts_min_sec_level(struct mgos_config *cfg) {
return cfg->bt.gatts.min_sec_level;
}
int mgos_config_get_bt_gatts_require_pairing(struct mgos_config *cfg) {
return cfg->bt.gatts.require_pairing;
}
int mgos_config_get_bt_config_svc_enable(struct mgos_config *cfg) {
return cfg->bt.config_svc_enable;
}
const struct mgos_config_mjs *mgos_config_get_mjs(struct mgos_config *cfg) {
return &cfg->mjs;
}
int mgos_config_get_mjs_generate_jsc(struct mgos_config *cfg) {
return cfg->mjs.generate_jsc;
}
const struct mgos_config_rpc *mgos_config_get_rpc(struct mgos_config *cfg) {
return &cfg->rpc;
}
int mgos_config_get_rpc_enable(struct mgos_config *cfg) {
return cfg->rpc.enable;
}
int mgos_config_get_rpc_max_frame_size(struct mgos_config *cfg) {
return cfg->rpc.max_frame_size;
}
int mgos_config_get_rpc_max_queue_length(struct mgos_config *cfg) {
return cfg->rpc.max_queue_length;
}
int mgos_config_get_rpc_default_out_channel_idle_close_timeout(struct mgos_config *cfg) {
return cfg->rpc.default_out_channel_idle_close_timeout;
}
const char *mgos_config_get_rpc_acl_file(struct mgos_config *cfg) {
return cfg->rpc.acl_file;
}
const char *mgos_config_get_rpc_auth_domain(struct mgos_config *cfg) {
return cfg->rpc.auth_domain;
}
const char *mgos_config_get_rpc_auth_file(struct mgos_config *cfg) {
return cfg->rpc.auth_file;
}
const struct mgos_config_rpc_ws *mgos_config_get_rpc_ws(struct mgos_config *cfg) {
return &cfg->rpc.ws;
}
int mgos_config_get_rpc_ws_enable(struct mgos_config *cfg) {
return cfg->rpc.ws.enable;
}
const char *mgos_config_get_rpc_ws_server_address(struct mgos_config *cfg) {
return cfg->rpc.ws.server_address;
}
int mgos_config_get_rpc_ws_reconnect_interval_min(struct mgos_config *cfg) {
return cfg->rpc.ws.reconnect_interval_min;
}
int mgos_config_get_rpc_ws_reconnect_interval_max(struct mgos_config *cfg) {
return cfg->rpc.ws.reconnect_interval_max;
}
const char *mgos_config_get_rpc_ws_ssl_server_name(struct mgos_config *cfg) {
return cfg->rpc.ws.ssl_server_name;
}
const char *mgos_config_get_rpc_ws_ssl_ca_file(struct mgos_config *cfg) {
return cfg->rpc.ws.ssl_ca_file;
}
const char *mgos_config_get_rpc_ws_ssl_client_cert_file(struct mgos_config *cfg) {
return cfg->rpc.ws.ssl_client_cert_file;
}
const struct mgos_config_rpc_uart *mgos_config_get_rpc_uart(struct mgos_config *cfg) {
return &cfg->rpc.uart;
}
int mgos_config_get_rpc_uart_uart_no(struct mgos_config *cfg) {
return cfg->rpc.uart.uart_no;
}
int mgos_config_get_rpc_uart_baud_rate(struct mgos_config *cfg) {
return cfg->rpc.uart.baud_rate;
}
int mgos_config_get_rpc_uart_fc_type(struct mgos_config *cfg) {
return cfg->rpc.uart.fc_type;
}
int mgos_config_get_rpc_uart_wait_for_start_frame(struct mgos_config *cfg) {
return cfg->rpc.uart.wait_for_start_frame;
}
const struct mgos_config_wifi *mgos_config_get_wifi(struct mgos_config *cfg) {
return &cfg->wifi;
}
const struct mgos_config_wifi_sta *mgos_config_get_wifi_sta(struct mgos_config *cfg) {
return &cfg->wifi.sta;
}
int mgos_config_get_wifi_sta_enable(struct mgos_config *cfg) {
return cfg->wifi.sta.enable;
}
const char *mgos_config_get_wifi_sta_ssid(struct mgos_config *cfg) {
return cfg->wifi.sta.ssid;
}
const char *mgos_config_get_wifi_sta_pass(struct mgos_config *cfg) {
return cfg->wifi.sta.pass;
}
const char *mgos_config_get_wifi_sta_user(struct mgos_config *cfg) {
return cfg->wifi.sta.user;
}
const char *mgos_config_get_wifi_sta_anon_identity(struct mgos_config *cfg) {
return cfg->wifi.sta.anon_identity;
}
const char *mgos_config_get_wifi_sta_cert(struct mgos_config *cfg) {
return cfg->wifi.sta.cert;
}
const char *mgos_config_get_wifi_sta_key(struct mgos_config *cfg) {
return cfg->wifi.sta.key;
}
const char *mgos_config_get_wifi_sta_ca_cert(struct mgos_config *cfg) {
return cfg->wifi.sta.ca_cert;
}
const char *mgos_config_get_wifi_sta_ip(struct mgos_config *cfg) {
return cfg->wifi.sta.ip;
}
const char *mgos_config_get_wifi_sta_netmask(struct mgos_config *cfg) {
return cfg->wifi.sta.netmask;
}
const char *mgos_config_get_wifi_sta_gw(struct mgos_config *cfg) {
return cfg->wifi.sta.gw;
}
const char *mgos_config_get_wifi_sta_nameserver(struct mgos_config *cfg) {
return cfg->wifi.sta.nameserver;
}
const char *mgos_config_get_wifi_sta_dhcp_hostname(struct mgos_config *cfg) {
return cfg->wifi.sta.dhcp_hostname;
}
const struct mgos_config_wifi_ap *mgos_config_get_wifi_ap(struct mgos_config *cfg) {
return &cfg->wifi.ap;
}
int mgos_config_get_wifi_ap_enable(struct mgos_config *cfg) {
return cfg->wifi.ap.enable;
}
const char *mgos_config_get_wifi_ap_ssid(struct mgos_config *cfg) {
return cfg->wifi.ap.ssid;
}
const char *mgos_config_get_wifi_ap_pass(struct mgos_config *cfg) {
return cfg->wifi.ap.pass;
}
int mgos_config_get_wifi_ap_hidden(struct mgos_config *cfg) {
return cfg->wifi.ap.hidden;
}
int mgos_config_get_wifi_ap_channel(struct mgos_config *cfg) {
return cfg->wifi.ap.channel;
}
int mgos_config_get_wifi_ap_max_connections(struct mgos_config *cfg) {
return cfg->wifi.ap.max_connections;
}
const char *mgos_config_get_wifi_ap_ip(struct mgos_config *cfg) {
return cfg->wifi.ap.ip;
}
const char *mgos_config_get_wifi_ap_netmask(struct mgos_config *cfg) {
return cfg->wifi.ap.netmask;
}
const char *mgos_config_get_wifi_ap_gw(struct mgos_config *cfg) {
return cfg->wifi.ap.gw;
}
const char *mgos_config_get_wifi_ap_dhcp_start(struct mgos_config *cfg) {
return cfg->wifi.ap.dhcp_start;
}
const char *mgos_config_get_wifi_ap_dhcp_end(struct mgos_config *cfg) {
return cfg->wifi.ap.dhcp_end;
}
int mgos_config_get_wifi_ap_trigger_on_gpio(struct mgos_config *cfg) {
return cfg->wifi.ap.trigger_on_gpio;
}
int mgos_config_get_wifi_ap_disable_after(struct mgos_config *cfg) {
return cfg->wifi.ap.disable_after;
}
const char *mgos_config_get_wifi_ap_hostname(struct mgos_config *cfg) {
return cfg->wifi.ap.hostname;
}
int mgos_config_get_wifi_ap_keep_enabled(struct mgos_config *cfg) {
return cfg->wifi.ap.keep_enabled;
}
const struct mgos_config_higrow *mgos_config_get_higrow(struct mgos_config *cfg) {
return &cfg->higrow;
}
const char *mgos_config_get_higrow_deviceId(struct mgos_config *cfg) {
return cfg->higrow.deviceId;
}
double mgos_config_get_higrow_temperature(struct mgos_config *cfg) {
return cfg->higrow.temperature;
}
double mgos_config_get_higrow_humidity(struct mgos_config *cfg) {
return cfg->higrow.humidity;
}
2018-02-20 07:44:16 +00:00
int mgos_config_get_higrow_statuslight(struct mgos_config *cfg) {
return cfg->higrow.statuslight;
2018-02-18 05:47:44 +00:00
}
int mgos_config_get_higrow_moisture(struct mgos_config *cfg) {
return cfg->higrow.moisture;
}
int mgos_config_get_higrow_connected(struct mgos_config *cfg) {
return cfg->higrow.connected;
}
/* }}} */
/* Setters {{{ */
void mgos_config_set_device_id(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->device.id, val);
}
void mgos_config_set_device_password(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->device.password, val);
}
void mgos_config_set_debug_udp_log_addr(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->debug.udp_log_addr, val);
}
void mgos_config_set_debug_level(struct mgos_config *cfg, int val) {
cfg->debug.level = val;
}
void mgos_config_set_debug_filter(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->debug.filter, val);
}
void mgos_config_set_debug_stdout_uart(struct mgos_config *cfg, int val) {
cfg->debug.stdout_uart = val;
}
void mgos_config_set_debug_stderr_uart(struct mgos_config *cfg, int val) {
cfg->debug.stderr_uart = val;
}
void mgos_config_set_debug_factory_reset_gpio(struct mgos_config *cfg, int val) {
cfg->debug.factory_reset_gpio = val;
}
void mgos_config_set_debug_mg_mgr_hexdump_file(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->debug.mg_mgr_hexdump_file, val);
}
void mgos_config_set_debug_mbedtls_level(struct mgos_config *cfg, int val) {
cfg->debug.mbedtls_level = val;
}
void mgos_config_set_sys_mount_path(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->sys.mount.path, val);
}
void mgos_config_set_sys_mount_dev_type(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->sys.mount.dev_type, val);
}
void mgos_config_set_sys_mount_dev_opts(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->sys.mount.dev_opts, val);
}
void mgos_config_set_sys_mount_fs_type(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->sys.mount.fs_type, val);
}
void mgos_config_set_sys_mount_fs_opts(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->sys.mount.fs_opts, val);
}
void mgos_config_set_sys_tz_spec(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->sys.tz_spec, val);
}
void mgos_config_set_sys_wdt_timeout(struct mgos_config *cfg, int val) {
cfg->sys.wdt_timeout = val;
}
void mgos_config_set_sys_pref_ota_lib(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->sys.pref_ota_lib, val);
}
void mgos_config_set_sys_esp32_adc_vref(struct mgos_config *cfg, int val) {
cfg->sys.esp32_adc_vref = val;
}
void mgos_config_set_conf_acl(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->conf_acl, val);
}
void mgos_config_set_bt_enable(struct mgos_config *cfg, int val) {
cfg->bt.enable = val;
}
void mgos_config_set_bt_dev_name(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->bt.dev_name, val);
}
void mgos_config_set_bt_adv_enable(struct mgos_config *cfg, int val) {
cfg->bt.adv_enable = val;
}
void mgos_config_set_bt_scan_rsp_data_hex(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->bt.scan_rsp_data_hex, val);
}
void mgos_config_set_bt_keep_enabled(struct mgos_config *cfg, int val) {
cfg->bt.keep_enabled = val;
}
void mgos_config_set_bt_allow_pairing(struct mgos_config *cfg, int val) {
cfg->bt.allow_pairing = val;
}
void mgos_config_set_bt_max_paired_devices(struct mgos_config *cfg, int val) {
cfg->bt.max_paired_devices = val;
}
void mgos_config_set_bt_random_address(struct mgos_config *cfg, int val) {
cfg->bt.random_address = val;
}
void mgos_config_set_bt_gatts_min_sec_level(struct mgos_config *cfg, int val) {
cfg->bt.gatts.min_sec_level = val;
}
void mgos_config_set_bt_gatts_require_pairing(struct mgos_config *cfg, int val) {
cfg->bt.gatts.require_pairing = val;
}
void mgos_config_set_bt_config_svc_enable(struct mgos_config *cfg, int val) {
cfg->bt.config_svc_enable = val;
}
void mgos_config_set_mjs_generate_jsc(struct mgos_config *cfg, int val) {
cfg->mjs.generate_jsc = val;
}
void mgos_config_set_rpc_enable(struct mgos_config *cfg, int val) {
cfg->rpc.enable = val;
}
void mgos_config_set_rpc_max_frame_size(struct mgos_config *cfg, int val) {
cfg->rpc.max_frame_size = val;
}
void mgos_config_set_rpc_max_queue_length(struct mgos_config *cfg, int val) {
cfg->rpc.max_queue_length = val;
}
void mgos_config_set_rpc_default_out_channel_idle_close_timeout(struct mgos_config *cfg, int val) {
cfg->rpc.default_out_channel_idle_close_timeout = val;
}
void mgos_config_set_rpc_acl_file(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->rpc.acl_file, val);
}
void mgos_config_set_rpc_auth_domain(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->rpc.auth_domain, val);
}
void mgos_config_set_rpc_auth_file(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->rpc.auth_file, val);
}
void mgos_config_set_rpc_ws_enable(struct mgos_config *cfg, int val) {
cfg->rpc.ws.enable = val;
}
void mgos_config_set_rpc_ws_server_address(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->rpc.ws.server_address, val);
}
void mgos_config_set_rpc_ws_reconnect_interval_min(struct mgos_config *cfg, int val) {
cfg->rpc.ws.reconnect_interval_min = val;
}
void mgos_config_set_rpc_ws_reconnect_interval_max(struct mgos_config *cfg, int val) {
cfg->rpc.ws.reconnect_interval_max = val;
}
void mgos_config_set_rpc_ws_ssl_server_name(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->rpc.ws.ssl_server_name, val);
}
void mgos_config_set_rpc_ws_ssl_ca_file(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->rpc.ws.ssl_ca_file, val);
}
void mgos_config_set_rpc_ws_ssl_client_cert_file(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->rpc.ws.ssl_client_cert_file, val);
}
void mgos_config_set_rpc_uart_uart_no(struct mgos_config *cfg, int val) {
cfg->rpc.uart.uart_no = val;
}
void mgos_config_set_rpc_uart_baud_rate(struct mgos_config *cfg, int val) {
cfg->rpc.uart.baud_rate = val;
}
void mgos_config_set_rpc_uart_fc_type(struct mgos_config *cfg, int val) {
cfg->rpc.uart.fc_type = val;
}
void mgos_config_set_rpc_uart_wait_for_start_frame(struct mgos_config *cfg, int val) {
cfg->rpc.uart.wait_for_start_frame = val;
}
void mgos_config_set_wifi_sta_enable(struct mgos_config *cfg, int val) {
cfg->wifi.sta.enable = val;
}
void mgos_config_set_wifi_sta_ssid(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.ssid, val);
}
void mgos_config_set_wifi_sta_pass(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.pass, val);
}
void mgos_config_set_wifi_sta_user(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.user, val);
}
void mgos_config_set_wifi_sta_anon_identity(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.anon_identity, val);
}
void mgos_config_set_wifi_sta_cert(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.cert, val);
}
void mgos_config_set_wifi_sta_key(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.key, val);
}
void mgos_config_set_wifi_sta_ca_cert(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.ca_cert, val);
}
void mgos_config_set_wifi_sta_ip(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.ip, val);
}
void mgos_config_set_wifi_sta_netmask(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.netmask, val);
}
void mgos_config_set_wifi_sta_gw(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.gw, val);
}
void mgos_config_set_wifi_sta_nameserver(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.nameserver, val);
}
void mgos_config_set_wifi_sta_dhcp_hostname(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.sta.dhcp_hostname, val);
}
void mgos_config_set_wifi_ap_enable(struct mgos_config *cfg, int val) {
cfg->wifi.ap.enable = val;
}
void mgos_config_set_wifi_ap_ssid(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.ssid, val);
}
void mgos_config_set_wifi_ap_pass(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.pass, val);
}
void mgos_config_set_wifi_ap_hidden(struct mgos_config *cfg, int val) {
cfg->wifi.ap.hidden = val;
}
void mgos_config_set_wifi_ap_channel(struct mgos_config *cfg, int val) {
cfg->wifi.ap.channel = val;
}
void mgos_config_set_wifi_ap_max_connections(struct mgos_config *cfg, int val) {
cfg->wifi.ap.max_connections = val;
}
void mgos_config_set_wifi_ap_ip(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.ip, val);
}
void mgos_config_set_wifi_ap_netmask(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.netmask, val);
}
void mgos_config_set_wifi_ap_gw(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.gw, val);
}
void mgos_config_set_wifi_ap_dhcp_start(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.dhcp_start, val);
}
void mgos_config_set_wifi_ap_dhcp_end(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.dhcp_end, val);
}
void mgos_config_set_wifi_ap_trigger_on_gpio(struct mgos_config *cfg, int val) {
cfg->wifi.ap.trigger_on_gpio = val;
}
void mgos_config_set_wifi_ap_disable_after(struct mgos_config *cfg, int val) {
cfg->wifi.ap.disable_after = val;
}
void mgos_config_set_wifi_ap_hostname(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->wifi.ap.hostname, val);
}
void mgos_config_set_wifi_ap_keep_enabled(struct mgos_config *cfg, int val) {
cfg->wifi.ap.keep_enabled = val;
}
void mgos_config_set_higrow_deviceId(struct mgos_config *cfg, const char *val) {
mgos_conf_set_str(&cfg->higrow.deviceId, val);
}
void mgos_config_set_higrow_temperature(struct mgos_config *cfg, double val) {
cfg->higrow.temperature = val;
}
void mgos_config_set_higrow_humidity(struct mgos_config *cfg, double val) {
cfg->higrow.humidity = val;
}
2018-02-20 07:44:16 +00:00
void mgos_config_set_higrow_statuslight(struct mgos_config *cfg, int val) {
cfg->higrow.statuslight = val;
2018-02-18 05:47:44 +00:00
}
void mgos_config_set_higrow_moisture(struct mgos_config *cfg, int val) {
cfg->higrow.moisture = val;
}
void mgos_config_set_higrow_connected(struct mgos_config *cfg, int val) {
cfg->higrow.connected = val;
}
/* }}} */