libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
Readers for acquisition

Description

Readers that wrap pull-style device acquisition APIs.

Note
Not to be confused with Input streams, which wrap file-like, byte-oriented sources of stored data. Acquisition readers are for live data acquisition from TCSPC hardware via pull-style driver APIs.

A reader is a move-constructible (usually noncopyable) object that defines the function call operator:

  • auto operator()(std::span<T> buffer) -> std::optional<std::size_t>, in which buffer is the span into which data should be placed. The return value is std::nullopt if the end of the acquired data has been reached; otherwise it is the number of T elements actually read; this may be zero. If there was an error, an exception should be thrown.

The interface described above is captured by the tcspc::acquisition_reader concept.

Concepts

concept  tcspc::acquisition_reader
 Concept that is satisfied when R conforms to the libtcspc acquisition reader interface for element type T.

Classes

struct  tcspc::null_reader< T >
 Acquisition reader that reads an empty stream. More...
struct  tcspc::stuck_reader< T >
 Acquisition reader that waits indefinitely without producing data. More...