From 41f95375a65a3f67a75258680d6d8b03bb4d678b Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Wed, 23 Jul 2025 14:05:13 +0200 Subject: Working with hardcoded routing table --- daemon/src/types.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'daemon/src/types.h') diff --git a/daemon/src/types.h b/daemon/src/types.h index 2942c0b..a5c6165 100644 --- a/daemon/src/types.h +++ b/daemon/src/types.h @@ -1,5 +1,7 @@ #pragma once +#include "sender.h" + #include #include #include @@ -29,9 +31,20 @@ enum class Message_Type using Device_Id = std::string; using Device_Map = std::map; - -using Send_Callback = std::function const & payload)>; -using Target_List = std::vector; +using Target_List = std::vector>; using Route_Map = std::map>; +struct Message +{ + Device_Id const * source_id; + std::array bytes; + + Message_Type + type() const + { + if ((bytes[0] & 0xF0) == 0xF0) return static_cast(bytes[0]); + else return static_cast(bytes[0] >> 4); + } +}; + } // namespace midi_router -- cgit v1.2.3