libtcspc.PyAcquisitionReader¶
- class libtcspc.PyAcquisitionReader[source]¶
Bases:
ABCAcquisition reader implemented in Python and supplied as an argument upon creation of the execution context.
See also
AcquireSource processor that drives the reader.
AcquireAccessRuntime access object providing
halt().
- abstractmethod __call__(buffer)[source]¶
Read acquired data into the given buffer.
The element type of the buffer will match that of the
Acquireprocessor. An implementation of this method should read at most the number of elements that fit inbuffer, and return the number read. If the end of the data stream has been reached, returnNoneinstead. To signal a read error, raise an exception; do not returnNonefor error conditions.Implementations must not store
buffer; accessing it after returning will crash the Python interpreter (this dangerous behavior is a compromise for performance, to avoid copying the data unnecessarily).