emulators module¶
_DataFromFile¶
- class pysmurf.core.emulators._DataFromFile.DataFromFile(*args: Any, **kwargs: Any)[source]¶
Class to stream data from a test file.
- class pysmurf.core.emulators._DataFromFile.DataMaster(*args: Any, **kwargs: Any)[source]¶
A Rogue master device, used to stream the data.
- sendData(data)[source]¶
Send a Rogue Frame. The frame contains the SMuRF header and the input data point in the first channel. The frame will contain only one channel. The SMuRF header will be only partially filled, containing only the number of channels, and a the frame counter words.
- Parameters
data (int) – Input data (must be of type int16).
- send_data(file_name)[source]¶
Send all the data from a text file. The input data file, must be a text file with data point on each line. The data must be of type int16. Each data point is read from the file, and then send on a frame with the SMuRF header, with only the first channel containing the data point.
- Parameters
file_name (str) – Path to the input data file.