Skip to content
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

Send a message directly on NetworkRuntime #34

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

stuart-auterion
Copy link
Contributor

Add a means to send a message directly on a network runtime without need for a connection object.

Quoting Thomas here as I initially forgot about this change and had it lumped into another PR

What's this for?
Generally, the NetworkInterface shouldn't be the interface for sending Messages, the Connection Object should be it. Directly sending messages on the Network Interface with default constructed ConnectionPartner would mean broadcasting a message to all known clients - a feature we probably don't want in the public API as it is an anti-pattern except for HEARTBEAT.

Generally I agree with you, and what I'm doing here is definitely not the preferred use. However, we have a program where the majority of the MAVLink messaging is done by a third-party autonomy engine (a completely separate piece of hardware on the network). But in case the user wants to do direct manual control from our GCS, we have a way to tell the autonomy engine to open a link to the vehicle and we can send out manual control messages (technically it'll forward any message, but manual control is the intended use). The link basically operates as a repeater and its only one way, so we don't get any data back. This means no heartbeats, and a Connection is useless because it will time out for lack of heartbeats.

Open to exploring other way to solve this problem if you have suggestions, but this seemed the simplest to me.

Copy link

sonarcloud bot commented Dec 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ThomasDebrunner
Copy link
Contributor

@stuart-auterion Would you be okay with injectMessage? Since it is a bit different from "sending"

@ThomasDebrunner ThomasDebrunner force-pushed the qgcgov-changes-send-message-directly branch from db88593 to c92860e Compare January 22, 2024 14:23
@ThomasDebrunner
Copy link
Contributor

Cool, changed and rebased to main

@ThomasDebrunner ThomasDebrunner merged commit 2831956 into main Jan 22, 2024
3 checks passed
@stuart-auterion stuart-auterion deleted the qgcgov-changes-send-message-directly branch March 1, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants