[feat/multicast]: Add multi-instance multicast module with active trigger system#154
Open
KoenigMjr wants to merge 5 commits intoBOSWatch:developfrom
Open
[feat/multicast]: Add multi-instance multicast module with active trigger system#154KoenigMjr wants to merge 5 commits intoBOSWatch:developfrom
KoenigMjr wants to merge 5 commits intoBOSWatch:developfrom
Conversation
…gger system
Introduce a robust multicast processing module for POCSAG that correlates
empty tone-RICs (recipients) with subsequent text-RICs (content).
Key Features:
- Four Output Modes: Internally supports 'complete', 'incomplete', 'single',
and 'control'. Functional alarms are delivered as the first three, while
technical 'control' packets (Delimiters/NetIdent) are filtered by default.
- Active Trigger System: Implements a loss-free deferred delivery mechanism
using a loopback socket (TCP) to re-inject wakeup packets, flushing the
internal queue during auto-clear timeouts.
- Shared State & Multi-Instance: State is shared across instances but
separated by frequency to prevent crosstalk in multi-frequency setups.
- Data Aggregation: Automatically generates '{FIELD}_list' wildcards (e.g.,
RIC_LIST, DESCRIPTION_LIST) for all collected recipients, enabling
consolidated notifications in downstream plugins.
- Dynamic Filtering: Automatically blocks Delimiter and NetIdent RICs from
reaching subsequent plugins if they are defined in the configuration.
Infrastructural Changes:
- ModuleBase: Expanded return semantics to support:
* False: Explicitly blocks/drops a packet.
* List: Allows a module to expand one input into multiple output packets.
- PluginBase: Updated to handle lists of packets, ensuring a full
setup->alarm->teardown lifecycle for every individual element.
- Remove redundant list-handling block in doWork() - already handled by moduleBase._run()
- Fix bare except to except (ValueError, TypeError) in _copy_packet_dict_to_packet()
- Replace f-string logging with lazy %-style in _enrich_normal_alarm() and _set_mcast_metadata()
- Remove unused _trigger_ric_mode variable
- Simplify instance name from dynamic MCAST_{id} to static "Multicast" (no debug value)
- Update doWork() docstring to reflect single-packet-only parameter
- Add extension hook comment to _perform_instance_tick()
…tream Remove internal filtering of delimiter and netident packets from the multicast module. All packets are now passed through with multicastRole metadata set, allowing downstream filters (e.g. filter.regexFilter) to handle filtering as needed. Tone-RICs remain internally consumed as they carry no alarm-relevant information outside the module. Update documentation to reflect new behavior and add regexFilter example for filtering by multicastRole.
Contributor
Author
|
🇩🇪 DE 🇬🇧 EN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🇩🇪 DE
Ich habe die Idee von thierry3000 aufgeschnappt und in den letzten Monaten ein Multicast-Modul geschrieben.
Sollte somit das Issue #87 und auch den PR #88 schließen.
Kurz und bündig
Dieses PR implementiert ein vollständiges Multicast-Modul für BOSWatch 3, das es ermöglicht, Alarmnachrichten automatisch an mehrere Empfänger (RICs) zu verteilen. Das Modul integriert sich nahtlos in das bestehende System und erweitert die Kernmodule um die Fähigkeit, Paketlisten zu verarbeiten.
Detaillierte Änderungen
1. Kernmodul module/multicast.py
2. Ergänzungen am bestehenden Programmcode
module/moduleBase.py
plugin/pluginBase.py
3. Dokumentation
Wichtige Punkte
🇬🇧 EN
I picked up the idea from thierry3000 and developed a multicast module over the past few months.
This should resolve Issue #87 as well as PR #88.
In a nutshell
This PR implements a complete multicast module for BOSWatch 3, enabling alarm messages to be automatically distributed to multiple recipients (RICs). The module integrates seamlessly into the existing system and extends the core modules with the ability to process packet lists.
Detailed Changes
1. Core Module module/multicast.py
Full multicast alarm processing with automatic distribution
Active Trigger System: Ensures lossless packet delivery via loopback socket
Multi-instance operation: Multiple module instances with shared thread-safe state
Frequency separation: Prevents mixing of alarms from different transmitters
Automatic filtering: Delimiter and network identifier RICs are intelligently filtered out
Configurable parameters:
2. Enhancements to Existing Codebase
module/moduleBase.py
plugin/pluginBase.py
3. Documentation
Key Points