Change gmrf_iface_t arguments in monitors to iface_t
This commit is contained in:
parent
dff97425cd
commit
2096f29487
5 changed files with 15 additions and 15 deletions
|
@ -63,17 +63,17 @@ public:
|
||||||
monitor->handle_init(node, node_id, len);
|
monitor->handle_init(node, node_id, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void node_neigh(node_t *node, gmrf_iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost) {
|
void node_neigh(node_t *node, iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost) {
|
||||||
for (auto monitor : monitors)
|
for (auto monitor : monitors)
|
||||||
monitor->handle_neigh(node, iface, addr, rxcost, txcost);
|
monitor->handle_neigh(node, iface, addr, rxcost, txcost);
|
||||||
}
|
}
|
||||||
|
|
||||||
void node_neigh_lost(node_t *node, gmrf_iface_t *iface, const gmrf_addr_t *addr) {
|
void node_neigh_lost(node_t *node, iface_t *iface, const gmrf_addr_t *addr) {
|
||||||
for (auto monitor : monitors)
|
for (auto monitor : monitors)
|
||||||
monitor->handle_neigh_lost(node, iface, addr);
|
monitor->handle_neigh_lost(node, iface, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void node_route(node_t *node, const uint8_t *node_id, size_t len, gmrf_iface_t *iface, const gmrf_addr_t *addr, int metric) {
|
void node_route(node_t *node, const uint8_t *node_id, size_t len, iface_t *iface, const gmrf_addr_t *addr, int metric) {
|
||||||
for (auto monitor : monitors)
|
for (auto monitor : monitors)
|
||||||
monitor->handle_route(node, node_id, len, iface, addr, metric);
|
monitor->handle_route(node, node_id, len, iface, addr, metric);
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,17 +101,17 @@ 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(gmrf_t *gmrf, gmrf_iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost) {
|
||||||
node_t *node = static_cast<node_t*>(gmrf);
|
node_t *node = static_cast<node_t*>(gmrf);
|
||||||
node->get_context()->node_neigh(node, iface, addr, rxcost, txcost);
|
node->get_context()->node_neigh(node, static_cast<iface_t*>(iface), addr, rxcost, txcost);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gmrf_debug_neigh_lost(gmrf_t *gmrf, gmrf_iface_t *iface, const gmrf_addr_t *addr) {
|
void gmrf_debug_neigh_lost(gmrf_t *gmrf, gmrf_iface_t *iface, const gmrf_addr_t *addr) {
|
||||||
node_t *node = static_cast<node_t*>(gmrf);
|
node_t *node = static_cast<node_t*>(gmrf);
|
||||||
node->get_context()->node_neigh_lost(node, iface, addr);
|
node->get_context()->node_neigh_lost(node, static_cast<iface_t*>(iface), 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(gmrf_t *gmrf, const uint8_t *node_id, size_t len, gmrf_iface_t *iface, const gmrf_addr_t *addr, int metric) {
|
||||||
node_t *node = static_cast<node_t*>(gmrf);
|
node_t *node = static_cast<node_t*>(gmrf);
|
||||||
node->get_context()->node_route(node, node_id, len, iface, addr, metric);
|
node->get_context()->node_route(node, node_id, len, static_cast<iface_t*>(iface), addr, metric);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gmrf_debug_route_lost(gmrf_t *gmrf, const uint8_t *node_id, size_t len) {
|
void gmrf_debug_route_lost(gmrf_t *gmrf, const uint8_t *node_id, size_t len) {
|
||||||
|
|
|
@ -41,10 +41,10 @@ public:
|
||||||
|
|
||||||
virtual void handle_init(node_t *node, const uint8_t *node_id, size_t len) = 0;
|
virtual void handle_init(node_t *node, const uint8_t *node_id, size_t len) = 0;
|
||||||
|
|
||||||
virtual void handle_neigh(node_t *node, gmrf_iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost) = 0;
|
virtual void handle_neigh(node_t *node, iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost) = 0;
|
||||||
virtual void handle_neigh_lost(node_t *node, gmrf_iface_t *iface, const gmrf_addr_t *addr) = 0;
|
virtual void handle_neigh_lost(node_t *node, iface_t *iface, const gmrf_addr_t *addr) = 0;
|
||||||
|
|
||||||
virtual void handle_route(node_t *node, const uint8_t *node_id, size_t len, gmrf_iface_t *iface, const gmrf_addr_t *addr, int metric) = 0;
|
virtual void handle_route(node_t *node, const uint8_t *node_id, size_t len, iface_t *iface, const gmrf_addr_t *addr, int metric) = 0;
|
||||||
virtual void handle_route_lost(node_t *node, const uint8_t *node_id, size_t len) = 0;
|
virtual void handle_route_lost(node_t *node, const uint8_t *node_id, size_t len) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,13 +38,13 @@ void monitor_log_t::handle_log(node_t *node, int priority, const std::string &me
|
||||||
void monitor_log_t::handle_init(node_t *node UNUSED, const uint8_t *node_id UNUSED, size_t len UNUSED) {
|
void monitor_log_t::handle_init(node_t *node UNUSED, const uint8_t *node_id UNUSED, size_t len UNUSED) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void monitor_log_t::handle_neigh(node_t *node UNUSED, gmrf_iface_t *iface UNUSED, const gmrf_addr_t *addr UNUSED, float rxcost UNUSED, float txcost UNUSED) {
|
void monitor_log_t::handle_neigh(node_t *node UNUSED, iface_t *iface UNUSED, const gmrf_addr_t *addr UNUSED, float rxcost UNUSED, float txcost UNUSED) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void monitor_log_t::handle_neigh_lost(node_t *node UNUSED, gmrf_iface_t *iface UNUSED, const gmrf_addr_t *addr UNUSED) {
|
void monitor_log_t::handle_neigh_lost(node_t *node UNUSED, iface_t *iface UNUSED, const gmrf_addr_t *addr UNUSED) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void monitor_log_t::handle_route(node_t *node UNUSED, const uint8_t *node_id UNUSED, size_t len UNUSED, gmrf_iface_t *iface UNUSED, const gmrf_addr_t *addr UNUSED, int metric UNUSED) {
|
void monitor_log_t::handle_route(node_t *node UNUSED, const uint8_t *node_id UNUSED, size_t len UNUSED, iface_t *iface UNUSED, const gmrf_addr_t *addr UNUSED, int metric UNUSED) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void monitor_log_t::handle_route_lost(node_t *node UNUSED, const uint8_t *node_id UNUSED, size_t len UNUSED) {
|
void monitor_log_t::handle_route_lost(node_t *node UNUSED, const uint8_t *node_id UNUSED, size_t len UNUSED) {
|
||||||
|
|
|
@ -36,10 +36,10 @@ public:
|
||||||
|
|
||||||
virtual void handle_init(node_t *node, const uint8_t *node_id, size_t len);
|
virtual void handle_init(node_t *node, const uint8_t *node_id, size_t len);
|
||||||
|
|
||||||
virtual void handle_neigh(node_t *node, gmrf_iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost);
|
virtual void handle_neigh(node_t *node, iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost);
|
||||||
virtual void handle_neigh_lost(node_t *node, gmrf_iface_t *iface, const gmrf_addr_t *addr);
|
virtual void handle_neigh_lost(node_t *node, iface_t *iface, const gmrf_addr_t *addr);
|
||||||
|
|
||||||
virtual void handle_route(node_t *node, const uint8_t *node_id, size_t len, gmrf_iface_t *iface, const gmrf_addr_t *addr, int metric);
|
virtual void handle_route(node_t *node, const uint8_t *node_id, size_t len, iface_t *iface, const gmrf_addr_t *addr, int metric);
|
||||||
virtual void handle_route_lost(node_t *node, const uint8_t *node_id, size_t len);
|
virtual void handle_route_lost(node_t *node, const uint8_t *node_id, size_t len);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue