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

Update of StreamToDataSet block #414

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Update of StreamToDataSet block #414

merged 1 commit into from
Sep 25, 2024

Conversation

drslebedev
Copy link
Contributor

@drslebedev drslebedev commented Sep 20, 2024

  • Support several parallel DataSet accumulation
  • Support sample accumulation between work() iterations
  • Update unit tests

Notes:

  • n_pre must be less than the size of the output port's CircularBuffer. The blok waits until all n_pre samples can be written to the output in a single iteration.
  • In stream-to-stream mode, the "stop" Tag is not included in the output.
  • Stream-to-stream mode has limited support for overlapping triggers. Configurations such as Start-Stop-Start-Stop work as expected, but configurations like Start-Start-Stop-Stop result in undefined behavior. If data accumulation is active, the second "start" is ignored, and the output may vary depending on subsequent tags.
  • In stream-to-dataset modes, the "stop" Tag is included in the DataSet output.
  • Tags for pre-samples are not stored and are not included in the output.
  • It is expected that "start" and "stop" Tags will come from different iterations. If multiple "start" Tags arrive in a single merged tag, only one DataSet is created. The same applies for "stop" Tags. This may lead to incorrect or unexpected output.
  • Currently used Matcher doesn't really support overlapping DataSets

Example of Stream-to-Dataset with overlapping datasets and pre/post samples:
IMG_6168

Copy link
Member

@RalphSteinhagen RalphSteinhagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

I like the way you refactored the processBulk(..) into two independent sub-versions, one for 'stream-to-stream' and the other 'stream-to-dataset' this makes the testing much easier. Also, the latter allows for (partially overlapping) start-stop sequences to produce independent DataSets.... well done.

Thanks also for documenting the edge-cases that are presently UB. Perhaps, it would be better to transfer these from PR/code-only documentation to proper Doc<"..."> doc string. This could be done in a follow-up commit thought.

* Support several parallel DataSet accumulation
* Support sample accumulation between work() iterations
* Update unit tests

Signed-off-by: drslebedev <dr.s.lebedev@gmail.com>
@drslebedev drslebedev merged commit 4e711fb into main Sep 25, 2024
9 of 11 checks passed
@drslebedev drslebedev deleted the fix_ci branch September 25, 2024 05:17
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