Generic signal class.
More...
#include <libsmu.hpp>
|
| Signal (const sl_signal_info *info=NULL) |
| internal: Do not call the constructor directly; obtain a Signal from a Device.
|
|
const sl_signal_info * | info () const |
| Get the descriptor struct of the Signal. Pointed-to memory is valid for the lifetime of the Device.
|
|
void | constant (std::vector< float > &buf, uint64_t samples, float val) |
| Generate a constant waveform. More...
|
|
void | square (std::vector< float > &buf, uint64_t samples, float midpoint, float peak, double period, double phase, double duty) |
| Generate a square waveform. More...
|
|
void | sawtooth (std::vector< float > &buf, uint64_t samples, float midpoint, float peak, double period, double phase) |
| Generate a sawtooth waveform. More...
|
|
void | stairstep (std::vector< float > &buf, uint64_t samples, float midpoint, float peak, double period, double phase) |
| Generate a stairstep waveform. More...
|
|
void | sine (std::vector< float > &buf, uint64_t samples, float midpoint, float peak, double period, double phase) |
| Generate a sinusoidal waveform. More...
|
|
void | triangle (std::vector< float > &buf, uint64_t samples, float midpoint, float peak, double period, double phase) |
| Generate a triangle waveform. More...
|
|
|
float | get_sample () |
| Generate value for currently selected waveform.
|
|
◆ constant()
void smu::Signal::constant |
( |
std::vector< float > & |
buf, |
|
|
uint64_t |
samples, |
|
|
float |
val |
|
) |
| |
Generate a constant waveform.
- Parameters
-
buf | Buffer object to store waveform into. |
samples | Number of samples to create for the waveform. |
val | The constant value used to populate the buffer |
◆ sawtooth()
void smu::Signal::sawtooth |
( |
std::vector< float > & |
buf, |
|
|
uint64_t |
samples, |
|
|
float |
midpoint, |
|
|
float |
peak, |
|
|
double |
period, |
|
|
double |
phase |
|
) |
| |
Generate a sawtooth waveform.
- Parameters
-
buf | Buffer object to store waveform into. |
samples | Number of samples to create for the waveform. |
midpoint | Value at the middle of the wave. |
peak | Maximum value of the wave. |
period | Number of samples the wave takes for one cycle. |
phase | Position in time (sample number) that the wave starts at. |
◆ sine()
void smu::Signal::sine |
( |
std::vector< float > & |
buf, |
|
|
uint64_t |
samples, |
|
|
float |
midpoint, |
|
|
float |
peak, |
|
|
double |
period, |
|
|
double |
phase |
|
) |
| |
Generate a sinusoidal waveform.
- Parameters
-
buf | Buffer object to store waveform into. |
samples | Number of samples to create for the waveform. |
midpoint | Value at the middle of the wave. |
peak | Maximum value of the wave. |
period | Number of samples the wave takes for one cycle. |
phase | Position in time (sample number) that the wave starts at. |
◆ square()
void smu::Signal::square |
( |
std::vector< float > & |
buf, |
|
|
uint64_t |
samples, |
|
|
float |
midpoint, |
|
|
float |
peak, |
|
|
double |
period, |
|
|
double |
phase, |
|
|
double |
duty |
|
) |
| |
Generate a square waveform.
- Parameters
-
buf | Buffer object to store waveform into. |
samples | Number of samples to create for the waveform. |
midpoint | Value at the middle of the wave. |
peak | Maximum value of the wave. |
period | Number of samples the wave takes for one cycle. |
phase | Position in time (sample number) that the wave starts at. |
duty | Duty cycle of the waveform (fraction of time in which the signal is active, e.g. 0.5 is half the time). |
◆ stairstep()
void smu::Signal::stairstep |
( |
std::vector< float > & |
buf, |
|
|
uint64_t |
samples, |
|
|
float |
midpoint, |
|
|
float |
peak, |
|
|
double |
period, |
|
|
double |
phase |
|
) |
| |
Generate a stairstep waveform.
- Parameters
-
buf | Buffer object to store waveform into. |
samples | Number of samples to create for the waveform. |
midpoint | Value at the middle of the wave. |
peak | Maximum value of the wave. |
period | Number of samples the wave takes for one cycle. |
phase | Position in time (sample number) that the wave starts at. |
◆ triangle()
void smu::Signal::triangle |
( |
std::vector< float > & |
buf, |
|
|
uint64_t |
samples, |
|
|
float |
midpoint, |
|
|
float |
peak, |
|
|
double |
period, |
|
|
double |
phase |
|
) |
| |
Generate a triangle waveform.
- Parameters
-
buf | Buffer object to store waveform into. |
samples | Number of samples to create for the waveform. |
midpoint | Value at the middle of the wave. |
peak | Maximum value of the wave. |
period | Number of samples the wave takes for one cycle. |
phase | Position in time (sample number) that the wave starts at. |
The documentation for this class was generated from the following file: