samna.unifirm.waveformGenerator#

Submodules#

Module content#

class samna.unifirm.waveformGenerator.WaveformGenerator#

Bases: pybind11_object

DAC8830 module is used to generate custom waveform for the light source.

config_dac(self: samna.unifirm.waveformGenerator.WaveformGenerator, arg0: int) None#

Config the DAC through SPI interface.

Parameters:

data – DAC value in uint16_t

config_mem(self: samna.unifirm.waveformGenerator.WaveformGenerator, arg0: List[int]) None#

Config the DAC module memory inside the fpga.

Parameters:

data (list) – list of configuration in uint16_t

get_source_node(self: samna.unifirm.waveformGenerator.WaveformGenerator) samna.DeviceSourceNode_unifirm_waveform_generator_wave_done#

Get the handle to the model source node.

Returns:

A handle to the model source node.

set_pulse_mode(self: samna.unifirm.waveformGenerator.WaveformGenerator, arg0: bool) None#

Set the pulse mode. The pulse number is controlled by set_pulse_number if set to True, otherwise it generates infinite number of pulse.

Parameters:

pulseMode (bool) – pulse mode

set_pulse_number(self: samna.unifirm.waveformGenerator.WaveformGenerator, arg0: int) None#

Set the number of pulse, only valid if set_pulse_mode is set to True.

Parameters:

pulseNumber (int) – number of pulse

set_sample_factor(self: samna.unifirm.waveformGenerator.WaveformGenerator, arg0: int) None#

Set the sample resolution in microsecond, must larger than 3 microsecond.

Parameters:

factor (int) – the sample resolution

set_spi_clk_rate(self: samna.unifirm.waveformGenerator.WaveformGenerator, arg0: int) None#

Config the spi clock rate, debug only.

set_waveform_length(self: samna.unifirm.waveformGenerator.WaveformGenerator, arg0: int) None#

Set the number of sample points

Parameters:

waveformLength (int) – number of sample points

start_waveform(self: samna.unifirm.waveformGenerator.WaveformGenerator) None#

Start wave.

stop_waveform(self: samna.unifirm.waveformGenerator.WaveformGenerator) None#

Stop wave.