Skip to content

Commit

Permalink
Update to latest graph-prototype and fix qa_Picoscope4000a
Browse files Browse the repository at this point in the history
Adapt Picoscope4000a to API changes, esp. the new lifecycle API.
  • Loading branch information
frankosterfeld committed Jan 18, 2024
1 parent 8b0ea27 commit 117e39c
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 152 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(ENABLE_TESTING OFF)
FetchContent_Declare(
graph-prototype
GIT_REPOSITORY https://github.com/fair-acc/graph-prototype.git
GIT_TAG 953501708db91ecda21805b6e2dd8af1da50399c # main as of 2024-01-02
GIT_TAG 7d22e962c7f67fee95fd98c38bdb32ccde78d616 # main as of 2024-01-17
)

FetchContent_Declare(
Expand Down
21 changes: 0 additions & 21 deletions blocklib/helpers/HelperBlocks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@ struct VectorSink : public gr::Block<VectorSink<T>> {
}
};

template<typename T>
struct TagDebug : public gr::Block<TagDebug<T>> {
gr::PortIn<T> in;
gr::PortOut<T> out;
std::vector<gr::Tag> seen_tags;
std::size_t samples_seen = 0;

gr::work::Status
processBulk(std::span<const T> input, std::span<T> output) noexcept {
std::copy(input.begin(), input.end(), output.begin());
if (this->input_tags_present()) {
auto tag = this->input_tags()[0];
tag.index += static_cast<int64_t>(samples_seen);
seen_tags.push_back(std::move(tag));
}
samples_seen += input.size();
return gr::work::Status::OK;
}
};

template<typename T>
struct CountSink : public gr::Block<CountSink<T>> {
gr::PortIn<T> in;
Expand All @@ -81,7 +61,6 @@ struct CountSink : public gr::Block<CountSink<T>> {

ENABLE_REFLECTION_FOR_TEMPLATE(fair::helpers::VectorSource, out, data);
ENABLE_REFLECTION_FOR_TEMPLATE(fair::helpers::VectorSink, in, data);
ENABLE_REFLECTION_FOR_TEMPLATE(fair::helpers::TagDebug, in, out);
ENABLE_REFLECTION_FOR_TEMPLATE(fair::helpers::CountSink, in);

#endif
Loading

0 comments on commit 117e39c

Please sign in to comment.