- added Msg frame work with Msg container , Msg sources, Msg sinks

- added filter by message type to nmea receiver
- show case new features in MultiClient.main()
This commit is contained in:
2026-03-08 17:46:25 +01:00
parent 1b9d07db7f
commit c6c1f26f32
7 changed files with 134 additions and 18 deletions
+15
View File
@@ -0,0 +1,15 @@
from abc import ABC
from msg_montainer import MsgContainer
from msg_sink import MsgSink
class MsgSource(ABC):
def __init__(self):
self.sinks = {}
def register_recv(self, name: str, sink: MsgSink):
self.sinks[name] = {'sink': sink}
def call_sinks(self, msg: MsgContainer):
if msg.name in self.sinks:
sink = self.sinks[msg.name]['sink']
sink.on_recv(msg)