Add protocol debug functions

This commit is contained in:
Matthias Schiffer 2014-03-17 17:18:59 +01:00
parent 99d3b8e788
commit 56a8a7465c
2 changed files with 24 additions and 0 deletions

View file

@ -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;

View file

@ -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) {
}
} }