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

Undocumented error codes for custom transport #94

Open
Ryanf55 opened this issue Feb 20, 2024 · 0 comments
Open

Undocumented error codes for custom transport #94

Ryanf55 opened this issue Feb 20, 2024 · 0 comments

Comments

@Ryanf55
Copy link

Ryanf55 commented Feb 20, 2024

It's not clear what the error codes are used in the custom transport.

size_t my_custom_transport_read(
        uxrCustomTransport* transport,
        uint8_t* buffer,
        size_t length,
        int timeout,
        uint8_t* errcode)
{
    ...
}

The error code is a pointer to a uint8_t. In ArduPilot, which is based on ChibiOS, we have written a custom transport adapter here, which passes error codes from LWIP to MicroXRCEDDS like so:
https://github.com/ArduPilot/ardupilot/blob/c54529aaf850390f7cc3d1583541e0055fc4c7ad/libraries/AP_DDS/AP_DDS_UDP.cpp#L65

The trouble is, what are the actual error codes used by MicroXRCEDDSGen?

I would much prefer if this was exposed as an enum so we could tell whether the codes were matched up, or at least documented what the supported codes are.

The result of this is a long-standing bug in ArduPilot - UDP transport doesn't work ChibiOS:
ArduPilot/ardupilot#25784

Should we expect a code 11 to result in MicroXRCEDDSAgent trying a read/write at a later time and not to drop the data?

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

1 participant