-
Notifications
You must be signed in to change notification settings - Fork 0
/
nebulo-cfg.h
166 lines (161 loc) · 7.94 KB
/
nebulo-cfg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// This file is generated, please do not edit.
// Change nebulo-cfg.h.py instead.
enum ConfigEntryType : unsigned short {
Config_Type_Bool,
Config_Type_UInt,
Config_Type_Time,
Config_Type_String,
Config_Type_Password,
Config_Type_Hex
};
struct ConfigShapeEntry {
enum ConfigEntryType cfg_type;
unsigned short cfg_len;
const char* _cfg_key;
union {
void* as_void;
bool* as_bool;
unsigned int* as_uint;
char* as_str;
} cfg_val;
const __FlashStringHelper* cfg_key() const { return FPSTR(_cfg_key); }
};
enum ConfigShapeId {
Config_has_wifi,
Config_has_lora,
Config_appeui,
Config_deveui,
Config_appkey,
Config_current_lang,
Config_wlanssid,
Config_wlanpwd,
Config_www_username,
Config_www_password,
Config_fs_ssid,
Config_fs_pwd,
Config_www_basicauth_enabled,
Config_sds_read,
Config_npm_read,
Config_npm_fulltime,
Config_bmx280_read,
Config_height_above_sealevel,
Config_gps_read,
Config_send2dusti,
Config_ssl_dusti,
Config_send2madavi,
Config_ssl_madavi,
Config_send2csv,
Config_has_ssd1306,
Config_display_wifi_info,
Config_display_lora_info,
Config_display_device_info,
Config_debug,
Config_sending_intervall_ms,
Config_time_for_wifi_config,
Config_send2custom,
Config_host_custom,
Config_url_custom,
Config_port_custom,
Config_user_custom,
Config_pwd_custom,
Config_ssl_custom,
Config_send2custom2,
Config_host_custom2,
Config_url_custom2,
Config_port_custom2,
Config_user_custom2,
Config_pwd_custom2,
Config_ssl_custom2,
};
static constexpr char CFG_KEY_HAS_WIFI[] PROGMEM = "has_wifi";
static constexpr char CFG_KEY_HAS_LORA[] PROGMEM = "has_lora";
static constexpr char CFG_KEY_APPEUI[] PROGMEM = "appeui";
static constexpr char CFG_KEY_DEVEUI[] PROGMEM = "deveui";
static constexpr char CFG_KEY_APPKEY[] PROGMEM = "appkey";
static constexpr char CFG_KEY_CURRENT_LANG[] PROGMEM = "current_lang";
static constexpr char CFG_KEY_WLANSSID[] PROGMEM = "wlanssid";
static constexpr char CFG_KEY_WLANPWD[] PROGMEM = "wlanpwd";
static constexpr char CFG_KEY_WWW_USERNAME[] PROGMEM = "www_username";
static constexpr char CFG_KEY_WWW_PASSWORD[] PROGMEM = "www_password";
static constexpr char CFG_KEY_FS_SSID[] PROGMEM = "fs_ssid";
static constexpr char CFG_KEY_FS_PWD[] PROGMEM = "fs_pwd";
static constexpr char CFG_KEY_WWW_BASICAUTH_ENABLED[] PROGMEM = "www_basicauth_enabled";
static constexpr char CFG_KEY_SDS_READ[] PROGMEM = "sds_read";
static constexpr char CFG_KEY_NPM_READ[] PROGMEM = "npm_read";
static constexpr char CFG_KEY_NPM_FULLTIME[] PROGMEM = "npm_fulltime";
static constexpr char CFG_KEY_BMX280_READ[] PROGMEM = "bmx280_read";
static constexpr char CFG_KEY_HEIGHT_ABOVE_SEALEVEL[] PROGMEM = "height_above_sealevel";
static constexpr char CFG_KEY_GPS_READ[] PROGMEM = "gps_read";
static constexpr char CFG_KEY_SEND2DUSTI[] PROGMEM = "send2dusti";
static constexpr char CFG_KEY_SSL_DUSTI[] PROGMEM = "ssl_dusti";
static constexpr char CFG_KEY_SEND2MADAVI[] PROGMEM = "send2madavi";
static constexpr char CFG_KEY_SSL_MADAVI[] PROGMEM = "ssl_madavi";
static constexpr char CFG_KEY_SEND2CSV[] PROGMEM = "send2csv";
static constexpr char CFG_KEY_HAS_SSD1306[] PROGMEM = "has_ssd1306";
static constexpr char CFG_KEY_DISPLAY_WIFI_INFO[] PROGMEM = "display_wifi_info";
static constexpr char CFG_KEY_DISPLAY_LORA_INFO[] PROGMEM = "display_lora_info";
static constexpr char CFG_KEY_DISPLAY_DEVICE_INFO[] PROGMEM = "display_device_info";
static constexpr char CFG_KEY_DEBUG[] PROGMEM = "debug";
static constexpr char CFG_KEY_SENDING_INTERVALL_MS[] PROGMEM = "sending_intervall_ms";
static constexpr char CFG_KEY_TIME_FOR_WIFI_CONFIG[] PROGMEM = "time_for_wifi_config";
static constexpr char CFG_KEY_SEND2CUSTOM[] PROGMEM = "send2custom";
static constexpr char CFG_KEY_HOST_CUSTOM[] PROGMEM = "host_custom";
static constexpr char CFG_KEY_URL_CUSTOM[] PROGMEM = "url_custom";
static constexpr char CFG_KEY_PORT_CUSTOM[] PROGMEM = "port_custom";
static constexpr char CFG_KEY_USER_CUSTOM[] PROGMEM = "user_custom";
static constexpr char CFG_KEY_PWD_CUSTOM[] PROGMEM = "pwd_custom";
static constexpr char CFG_KEY_SSL_CUSTOM[] PROGMEM = "ssl_custom";
static constexpr char CFG_KEY_SEND2CUSTOM2[] PROGMEM = "send2custom2";
static constexpr char CFG_KEY_HOST_CUSTOM2[] PROGMEM = "host_custom2";
static constexpr char CFG_KEY_URL_CUSTOM2[] PROGMEM = "url_custom2";
static constexpr char CFG_KEY_PORT_CUSTOM2[] PROGMEM = "port_custom2";
static constexpr char CFG_KEY_USER_CUSTOM2[] PROGMEM = "user_custom2";
static constexpr char CFG_KEY_PWD_CUSTOM2[] PROGMEM = "pwd_custom2";
static constexpr char CFG_KEY_SSL_CUSTOM2[] PROGMEM = "ssl_custom2";
static constexpr ConfigShapeEntry configShape[] PROGMEM = {
{ Config_Type_Bool, 0, CFG_KEY_HAS_WIFI, &cfg::has_wifi },
{ Config_Type_Bool, 0, CFG_KEY_HAS_LORA, &cfg::has_lora },
{ Config_Type_Hex, sizeof(cfg::appeui)-1, CFG_KEY_APPEUI, cfg::appeui },
{ Config_Type_Hex, sizeof(cfg::deveui)-1, CFG_KEY_DEVEUI, cfg::deveui },
{ Config_Type_Hex, sizeof(cfg::appkey)-1, CFG_KEY_APPKEY, cfg::appkey },
{ Config_Type_String, sizeof(cfg::current_lang)-1, CFG_KEY_CURRENT_LANG, cfg::current_lang },
{ Config_Type_String, sizeof(cfg::wlanssid)-1, CFG_KEY_WLANSSID, cfg::wlanssid },
{ Config_Type_Password, sizeof(cfg::wlanpwd)-1, CFG_KEY_WLANPWD, cfg::wlanpwd },
{ Config_Type_String, sizeof(cfg::www_username)-1, CFG_KEY_WWW_USERNAME, cfg::www_username },
{ Config_Type_Password, sizeof(cfg::www_password)-1, CFG_KEY_WWW_PASSWORD, cfg::www_password },
{ Config_Type_String, sizeof(cfg::fs_ssid)-1, CFG_KEY_FS_SSID, cfg::fs_ssid },
{ Config_Type_Password, sizeof(cfg::fs_pwd)-1, CFG_KEY_FS_PWD, cfg::fs_pwd },
{ Config_Type_Bool, 0, CFG_KEY_WWW_BASICAUTH_ENABLED, &cfg::www_basicauth_enabled },
{ Config_Type_Bool, 0, CFG_KEY_SDS_READ, &cfg::sds_read },
{ Config_Type_Bool, 0, CFG_KEY_NPM_READ, &cfg::npm_read },
{ Config_Type_Bool, 0, CFG_KEY_NPM_FULLTIME, &cfg::npm_fulltime },
{ Config_Type_Bool, 0, CFG_KEY_BMX280_READ, &cfg::bmx280_read },
{ Config_Type_String, sizeof(cfg::height_above_sealevel)-1, CFG_KEY_HEIGHT_ABOVE_SEALEVEL, cfg::height_above_sealevel },
{ Config_Type_Bool, 0, CFG_KEY_GPS_READ, &cfg::gps_read },
{ Config_Type_Bool, 0, CFG_KEY_SEND2DUSTI, &cfg::send2dusti },
{ Config_Type_Bool, 0, CFG_KEY_SSL_DUSTI, &cfg::ssl_dusti },
{ Config_Type_Bool, 0, CFG_KEY_SEND2MADAVI, &cfg::send2madavi },
{ Config_Type_Bool, 0, CFG_KEY_SSL_MADAVI, &cfg::ssl_madavi },
{ Config_Type_Bool, 0, CFG_KEY_SEND2CSV, &cfg::send2csv },
{ Config_Type_Bool, 0, CFG_KEY_HAS_SSD1306, &cfg::has_ssd1306 },
{ Config_Type_Bool, 0, CFG_KEY_DISPLAY_WIFI_INFO, &cfg::display_wifi_info },
{ Config_Type_Bool, 0, CFG_KEY_DISPLAY_LORA_INFO, &cfg::display_lora_info },
{ Config_Type_Bool, 0, CFG_KEY_DISPLAY_DEVICE_INFO, &cfg::display_device_info },
{ Config_Type_UInt, 0, CFG_KEY_DEBUG, &cfg::debug },
{ Config_Type_Time, 0, CFG_KEY_SENDING_INTERVALL_MS, &cfg::sending_intervall_ms },
{ Config_Type_Time, 0, CFG_KEY_TIME_FOR_WIFI_CONFIG, &cfg::time_for_wifi_config },
{ Config_Type_Bool, 0, CFG_KEY_SEND2CUSTOM, &cfg::send2custom },
{ Config_Type_String, sizeof(cfg::host_custom)-1, CFG_KEY_HOST_CUSTOM, cfg::host_custom },
{ Config_Type_String, sizeof(cfg::url_custom)-1, CFG_KEY_URL_CUSTOM, cfg::url_custom },
{ Config_Type_UInt, 0, CFG_KEY_PORT_CUSTOM, &cfg::port_custom },
{ Config_Type_String, sizeof(cfg::user_custom)-1, CFG_KEY_USER_CUSTOM, cfg::user_custom },
{ Config_Type_Password, sizeof(cfg::pwd_custom)-1, CFG_KEY_PWD_CUSTOM, cfg::pwd_custom },
{ Config_Type_Bool, 0, CFG_KEY_SSL_CUSTOM, &cfg::ssl_custom },
{ Config_Type_Bool, 0, CFG_KEY_SEND2CUSTOM2, &cfg::send2custom2 },
{ Config_Type_String, sizeof(cfg::host_custom2)-1, CFG_KEY_HOST_CUSTOM2, cfg::host_custom2 },
{ Config_Type_String, sizeof(cfg::url_custom2)-1, CFG_KEY_URL_CUSTOM2, cfg::url_custom2 },
{ Config_Type_UInt, 0, CFG_KEY_PORT_CUSTOM2, &cfg::port_custom2 },
{ Config_Type_String, sizeof(cfg::user_custom2)-1, CFG_KEY_USER_CUSTOM2, cfg::user_custom2 },
{ Config_Type_Password, sizeof(cfg::pwd_custom2)-1, CFG_KEY_PWD_CUSTOM2, cfg::pwd_custom2 },
{ Config_Type_Bool, 0, CFG_KEY_SSL_CUSTOM2, &cfg::ssl_custom2 },
};