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

Allow access to the internal buffers of raw messages #203

Open
brkydnc opened this issue Nov 7, 2023 · 2 comments
Open

Allow access to the internal buffers of raw messages #203

brkydnc opened this issue Nov 7, 2023 · 2 comments

Comments

@brkydnc
Copy link

brkydnc commented Nov 7, 2023

Currently, the MAVLinkV1MessageRaw and the MAVLinkV2MessageRaw types prevent mutable access to the internal buffers they use to store the raw bytes coming from any type of connection, which is problematic for libraries that built on top of this crate.

What is actually being problematic is that this crate enforces you to use the synchronous reads (e.g read_v2_raw_message) in order to fill the raw message buffer using a reader, and there is no other way.

Building functionality over these raw packets is exclusive to the rust-mavlink library at the moment, preventing other libraries to interact with rust-mavlink in a flexible way. For example, to be able to implement a new read() function (e.g an async) for MAVLink messages from another library, access to the internal buffer of a raw message is required, which is not possible at the moment.

I highly suggest that these types somehow allow mutable access to the internal buffers.

@brkydnc brkydnc changed the title Make raw messages more flexible Allow access to the internal buffers of raw messages Nov 7, 2023
@patrickelectric
Copy link
Member

Hi @brkydnc, sadly I'm out of time to help improve the library. But I'm here to help if you are willing to change what is necessary.

@patrickelectric
Copy link
Member

Probably related to: #95

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

No branches or pull requests

2 participants