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

Enhance canardTxPush to support scattered transfer payload buffers. #223

Open
serges147 opened this issue Apr 22, 2024 · 0 comments
Open

Comments

@serges147
Copy link
Contributor

serges147 commented Apr 22, 2024

@pavel-kirienko
... if we support scattered buffers, DSDL serialization could be sped up considerably in cases where there are large byte arrays present in the message (like imagery data) because the serializer would be able to serialize only non-trivial parts of the message and keep references to the blobs:

uavcan.time.SynchronizedTimestamp.1.0 timestamp  # NON ZERO-COPY
uint16 IMAGE_WIDTH  = 1280
uint16 IMAGE_HEIGHT = 800
uint8 BITS_PER_PIXEL = 24
uint8[IMAGE_WIDTH * IMAGE_HEIGHT * BITS_PER_PIXEL / 8] pixel_data  # ZERO-COPY!

If we go this way, to support full end-to-end low-copy operation, the application would need to allocate the message object itself from the media memory resource.

One side effect of scattered input buffers is that an output frame may end up straddling multiple fragments; to support this we will need to allow a tx queue item to reference not just one but an arbitrary number of fragments from the input buffer.

See OpenCyphal-Garage/libcyphal#343

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