Skip to content

Commit

Permalink
RemoteSource: Propagate Timing Events
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Krimm <[email protected]>
  • Loading branch information
wirew0rm committed Nov 13, 2024
1 parent 58bc9fd commit 124a900
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ui/blocks/RemoteSource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ struct RemoteStreamSource : public gr::Block<RemoteStreamSource<T>> {
} else {
std::ranges::transform(in, output.begin() + written, [](float v) { return static_cast<T>(v); });
}
for (const auto& [idx, trigger, timestamp] : std::views::zip(d.acq.triggerIndices.value(), d.acq.triggerEventNames.value(), d.acq.triggerTimestamps.value())) {
auto map = gr::property_map{{gr::tag::TRIGGER_NAME, {trigger}}, {gr::tag::TRIGGER_TIME, {timestamp}}};
output.publishTag(map, idx - d.read);
}
written += in.size();
d.read += in.size();
samples_published += in.size();
Expand Down

0 comments on commit 124a900

Please sign in to comment.