Add protocol debug functions
This commit is contained in:
parent
99d3b8e788
commit
56a8a7465c
2 changed files with 24 additions and 0 deletions
|
@ -73,6 +73,15 @@ typedef void (*gmrf_scheduled_func)(gmrf_context_t *ctx, void *arg);
|
||||||
|
|
||||||
void gmrf_schedule(gmrf_t *gmrf, gmrf_scheduled_func f, void *arg, unsigned delay);
|
void gmrf_schedule(gmrf_t *gmrf, gmrf_scheduled_func f, void *arg, unsigned delay);
|
||||||
|
|
||||||
|
/* debug and simulation functions */
|
||||||
|
void gmrf_debug_init(gmrf_t *gmrf, const uint8_t *node_id, size_t len);
|
||||||
|
|
||||||
|
void gmrf_debug_neigh(gmrf_t *gmrf, gmrf_iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost);
|
||||||
|
void gmrf_debug_neigh_lost(gmrf_t *gmrf, gmrf_iface_t *iface, const gmrf_addr_t *addr);
|
||||||
|
|
||||||
|
void gmrf_debug_route(gmrf_t *gmrf, const uint8_t *node_id, size_t len, gmrf_iface_t *iface, const gmrf_addr_t *addr, int metric);
|
||||||
|
void gmrf_debug_route_lost(gmrf_t *gmrf, const uint8_t *node_id, size_t len);
|
||||||
|
|
||||||
/* implemented by protocol */
|
/* implemented by protocol */
|
||||||
extern const char *gmrf_protocol_name;
|
extern const char *gmrf_protocol_name;
|
||||||
extern const char *gmrf_protocol_version;
|
extern const char *gmrf_protocol_version;
|
||||||
|
|
|
@ -86,4 +86,19 @@ void gmrf_logf(gmrf_t *gmrf, int priority, const char *format, ...) {
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gmrf_debug_init(gmrf_t *gmrf, const uint8_t *node_id, size_t len) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void gmrf_debug_neigh(gmrf_t *gmrf, gmrf_iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void gmrf_debug_neigh_lost(gmrf_t *gmrf, gmrf_iface_t *iface, const gmrf_addr_t *addr) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void gmrf_debug_route(gmrf_t *gmrf, const uint8_t *node_id, size_t len, gmrf_iface_t *iface, const gmrf_addr_t *addr, int metric) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void gmrf_debug_route_lost(gmrf_t *gmrf, const uint8_t *node_id, size_t len) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue