-
-
Notifications
You must be signed in to change notification settings - Fork 25
[feat/multicast]: Add multi-instance multicast module with active trigger system #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KoenigMjr
wants to merge
12
commits into
BOSWatch:develop
Choose a base branch
from
KoenigMjr:feat/multicast
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0b9387a
[feat/multicast]: add multi-instance multicast module with active tri…
KoenigMjr e53cb8c
[feat/multicast] adding Config-Editor
KoenigMjr 7dabc78
[feat/multicast] correction of wakeup_trigger sending method to offic…
KoenigMjr 1ebcbf2
[feat/multicast] Code quality fixes and cleanup
KoenigMjr 08d09b4
[feat/multicast] refactor: move packet filtering from module to downs…
KoenigMjr dada0d6
[feat/multicast]: refactor: isolate module state by moving class vari…
KoenigMjr ff000ce
Merge branch 'develop' into feat/multicast
Schrolli91 5e44c7f
[feat/multicast]: revert changes in moduleBase and pluginBase to origin
KoenigMjr 44aae57
[feat/multicast]: refactor(router): implement recursive sub-routing f…
KoenigMjr 144b0d1
[feat/multicast] preserve native UNIX timestamp float format
KoenigMjr 539e89f
Merge branch 'develop' into feat/multicast
KoenigMjr 74cf611
[feat/multicast] addition to the common documentation
KoenigMjr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hier komm ich noch nicht ganz mit.
Normal gibt ein Router ja ein Paket zurück.
Der Manager ruft dann ggf. den nächsten Router auf wenn die Verarbeitung weitergehen soll.
Verstehe ich das Richtig, dass hier der Router ebenfalls wieder eine Liste der Pakete zurück gibt und der Manager den nächsten Router dann ebenfalls wieder mit einer Liste aufruft, welcher dann intern wieder rekursiv vereinzelt für die Abarbeitung seines Routing-Prozess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das ist gedanklich im ersten Moment tatsächlich ein kleiner Knoten, aber der Manager muss keine Listen verarbeiten. Das komplette Splitten bleibt vollständig innerhalb des Routers gekapselt.
Der Trick liegt darin, dass der Router bei einer Liste die normale Schleife abbricht und die verbleibende Route selbst per Rekursion zu Ende führt.
Das lässt sich an den drei entscheidenden Code-Schritten in der
_process_route_recursivezeigen:Ein Modul (wie z. B. multicast) gibt eine Liste zurück. Das fangen wir in der Schleife direkt ab:
Anstatt die Liste nach oben an den Manager zu werfen, iteriert der Router selbst über jedes einzelne Paket und ruft sich selbst rekursiv für den Rest der Route (i + 1) auf:
Das bedeutet: single_packet läuft ab hier als ganz normales, einzelnes bwPacket durch alle nachfolgenden Module und Sub-Router. Der Manager bekommt davon gar nichts mit.
Da die rekursiven Aufrufe den kompletten restlichen Pfad für alle abgezweigten Pakete bereits vollständig bis zum Ende abgearbeitet haben, ist der Job auf der aktuellen Schleifen-Ebene erledigt. Wir brechen hier sofort ab, damit die flache Schleife nicht weiterläuft:
Fazit:
Für den Manager ändert sich absolut nichts. Er schiebt ganz normal ein einzelnes Paket in runRouter und bekommt am Ende das Ergebnis. Er wird niemals eine Liste an den nächsten Router übergeben müssen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ich bin mir nicht sicher, ob die AI generierte Antwort überhaupt etwas mit der Frage zu tun hat... Aber wenn die AI hier recht hat, ist da sogar ein Fehler im Code -> Results ist eine Liste und die geht an den Manager zurück.
Was aber prinzipiell auch so sein muss, denn die Router können ja kaskadiert werden. Und sobald einmal ein Paket "aufgefächert" wurde, muss es auch so weiterverarbeitet werden, in meinen Augen,
Nochmal die ursprüngliche Frage anschauen, bitte.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sry, erwischt :) muss mir dafür mehr Zeit nehmen, deine Frage ausführlich zu beantworten - dauert aber ein paar Tage... Gerade aber bissl stressig... Kann eine Woche dauern bis ich ein Zeitfenster dazu finde. Wollte mit der KI den Prozess des Reviews beschleunigen, aber ich nehme mir doch wieder die Zeit!