summaryrefslogtreecommitdiffstats
path: root/mmss/monitor_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mmss/monitor_file.cpp')
-rw-r--r--mmss/monitor_file.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/mmss/monitor_file.cpp b/mmss/monitor_file.cpp
index 249d779..0de8a92 100644
--- a/mmss/monitor_file.cpp
+++ b/mmss/monitor_file.cpp
@@ -55,6 +55,20 @@ void monitor_file_t::handle_init(node_t *node, const uint8_t *node_id, size_t le
std::fprintf(file, "\n");
}
+void monitor_file_t::handle_network(network_t *net) {
+ std::fprintf(file, "%llu NETWORK %s\n", (unsigned long long)net->get_context()->now(), net->get_name().c_str());
+}
+
+void monitor_file_t::handle_iface(node_t *node, iface_t *iface) {
+ std::fprintf(file, "%llu IFACE %s %s %s ", (unsigned long long)node->get_context()->now(), node->get_name().c_str(), iface->get_name().c_str(), iface->get_network()->get_name().c_str());
+
+ const gmrf_addr_t *addr = iface->get_address();
+ for (size_t i = 0; i < GMRF_ADDR_LEN; i++)
+ std::fprintf(file, "%02x", addr->d[i]);
+
+ std::fprintf(file, "\n");
+}
+
void monitor_file_t::handle_neigh(node_t *node, iface_t *iface, const gmrf_addr_t *addr, float rxcost, float txcost) {
std::fprintf(file, "%llu NEIGH %s %s ", (unsigned long long)node->get_context()->now(), node->get_name().c_str(), iface->get_name().c_str());
for (size_t i = 0; i < GMRF_ADDR_LEN; i++)