Support config introspection

This commit is contained in:
Sassa NF
2024-12-22 22:00:53 +00:00
parent edf66ec9ee
commit ae7bef7b3e
5 changed files with 182 additions and 50 deletions
+10 -1
View File
@@ -15,7 +15,8 @@ enum MessageType
WRAP = 0,
SCAN,
SCAN_RESULT,
_MAX_MESSAGE_TYPE = SCAN_RESULT
CONFIG_TASK,
_MAX_MESSAGE_TYPE = CONFIG_TASK
};
struct Wrapper
@@ -37,12 +38,20 @@ struct ScanTaskResult
int16_t *rssis;
};
struct ConfigTask
{
String *key;
String *value;
bool is_set;
};
struct Message
{
MessageType type;
union
{
Wrapper wrap;
ConfigTask config;
ScanTask scan;
ScanTaskResult dump;
} payload;