18 lines
515 B
C
18 lines
515 B
C
#pragma once
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
typedef enum { NOTIF_ALERT = 0, NOTIF_TEST } notif_kind_t;
|
|
|
|
typedef struct {
|
|
bool wifi_connected;
|
|
char ip[16];
|
|
uint32_t sent_ok, sent_failed, dropped;
|
|
bool wifi_configured;
|
|
} notifier_stats_t;
|
|
|
|
esp_err_t notifier_init(void); // Wi-Fi + network task
|
|
bool notifier_send(notif_kind_t kind, const char *msg); // non-blocking enqueue, false if queue full
|
|
void notifier_get_stats(notifier_stats_t *out);
|