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.

get_frame_cnt()[source]

Get the number of sent frames

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.

_StreamDataEmulatorI16

class pysmurf.core.emulators._StreamDataEmulatorI16.StreamDataEmulatorI16(*args: Any, **kwargs: Any)[source]

StreamDataEmulatorI16 Block

getSmurfDevice()[source]

Returns a reference to the underlying smurf device.

_StreamDataEmulatorI32

class pysmurf.core.emulators._StreamDataEmulatorI32.StreamDataEmulatorI32(*args: Any, **kwargs: Any)[source]

StreamDataEmulatorI32 Block

getSmurfDevice()[source]

Returns a reference to the underlying smurf device.

_StreamDataSource

class pysmurf.core.emulators._StreamDataSource.StreamDataSource(*args: Any, **kwargs: Any)[source]

StreamDataSource Block