/* * rt_mesh.h * ESP-NOW mesh relay between Espilon agents. */ #pragma once #include #include #include #ifdef __cplusplus extern "C" { #endif /* Start ESP-NOW mesh (init, register callbacks, start probe/relay). */ bool rt_mesh_start(void); /* Stop ESP-NOW mesh. */ void rt_mesh_stop(void); /* Is mesh running? */ bool rt_mesh_is_running(void); /* Send data via ESP-NOW relay (Agent A → Agent B → C2). */ bool rt_mesh_send(const uint8_t *data, size_t len); /* Broadcast a probe to find connected agents. */ void rt_mesh_probe(void); /* Get best relay peer info (device_id, RSSI). Empty if none found. */ typedef struct { uint8_t mac[6]; char device_id[16]; int8_t rssi; bool available; } rt_mesh_peer_t; bool rt_mesh_get_relay(rt_mesh_peer_t *out); #ifdef __cplusplus } #endif