eclipse-score / eclipse-score/communication

Extend C++ API to support receive with retain of resuable samples

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
rust-api
Dominant language
C++
Stars
62
Forks
97
Avg merge
1d 1h
Merged PRs (30d)
72

Description

As discussed in the Rust API workshop https://github.com/orgs/eclipse-score/discussions/1076 the C++ API needs to be extended to support the following receive mechanism:

- If there are less than max_samples in the communication buffer, the method will reuse samples contained in the provided sample container, beginning from the last, going backwards.

- If the input container is empty on call, it will exclusively be filled with new samples.
- If the input container contains more samples than max_samples before the call, it will contain max_samples samples, potentially removing samples from the container, even if no new samples were added.

Returns the updated buffer and the number of newly added samples. All new samples are added to the back of the buffer, with the last sample being the newest. If less than max_samples could be added to the buffer, the samples that had been inside the buffer are retained, with the first samples getting removed as new samples are added to the back of the buffer.

This also depends on #13 to sort samples in the container

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.