From c5c195ff5318f00d544c0fbceb133abcc4ba7a5a Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Wed, 23 Jul 2025 22:33:05 +0200 Subject: MVP --- daemon/src/routing.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'daemon/src/routing.cpp') diff --git a/daemon/src/routing.cpp b/daemon/src/routing.cpp index ac15eff..8dce695 100644 --- a/daemon/src/routing.cpp +++ b/daemon/src/routing.cpp @@ -7,7 +7,7 @@ namespace midi_router { void -Router::route(Route_Map const & config) +Router::route(Route_Table const & config, bool verbose) { Message m; if (m_queue.wait_dequeue_timed(m, std::chrono::milliseconds(500))) @@ -20,6 +20,12 @@ Router::route(Route_Map const & config) // LTG: at least one of these map accesses can be avoided for (auto const & target: config.at(*m.source_id).at(m.type())) { + if (verbose) + { + std::cout << "[" << type2string.at(m.type()) << "] " << *m.source_id << " -> " << target.get().get_id() << " | "; + for (auto byte : m.bytes) std::cout << static_cast(byte) << " "; + std::cout << ")\n"; + } target.get().send(m.bytes); } } -- cgit v1.2.3