32#ifndef DETERMINISTICESPASYNCWEBSERVER_DET_GATEWAY_H
33#define DETERMINISTICESPASYNCWEBSERVER_DET_GATEWAY_H
37#if DETWS_ENABLE_GATEWAY
43enum class det_gw_kind : uint8_t
66 const uint8_t *payload;
79typedef bool (*det_gw_uplink_fn)(
const det_gw_msg *msg,
void *ctx);
85typedef bool (*det_gw_tx_fn)(uint8_t port_id, uint16_t dst_addr,
const uint8_t *payload, uint16_t len,
void *ctx);
88struct det_gw_port_config
101 uint32_t up_published;
105 uint32_t down_dropped;
109void det_gw_reset(
void);
116bool det_gw_add_port(
const det_gw_port_config *cfg);
119void det_gw_set_uplink(det_gw_uplink_fn fn,
void *ctx);
122void det_gw_set_topic_prefix(
const char *prefix);
132bool det_gw_uplink(uint8_t port_id, uint16_t src_addr,
const uint8_t *payload, uint16_t len, int16_t rssi);
138bool det_gw_downlink(uint8_t port_id, uint16_t dst_addr,
const uint8_t *payload, uint16_t len);
144uint16_t det_gw_topic(
const det_gw_msg *msg,
char *buf, uint16_t buflen);
147void det_gw_get_stats(det_gw_stats *out);
151void det_gw_test_set_now(uint32_t ms);
User-facing configuration for DeterministicESPAsyncWebServer.