1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use ;
/// Decoded waveform payloads.
///
/// This enum represents three types of waveform data:
/// - [`Waveform::Analog`]: Voltage waveforms from oscilloscope analog channels
/// - [`Waveform::Digital`]: Bit waveforms from digital inputs or logic probes
/// - [`Waveform::Iq`]: Complex I/Q waveforms from spectrum or RF analysis
///
/// ```rust
/// use tekhsi_rs::data::{AnalogSamples, AnalogWaveform, Waveform};
/// use smol_str::SmolStr;
///
/// let analog = AnalogWaveform {
/// source_name: SmolStr::new("ch1"),
/// y_axis_values: AnalogSamples::I8(vec![1, 2]),
/// y_axis_spacing: 1.0,
/// y_axis_offset: 0.0,
/// y_axis_units: SmolStr::new("V"),
/// x_axis_spacing: 1.0,
/// x_axis_units: SmolStr::new("s"),
/// trigger_index: 0.0,
/// };
/// let waveform = Waveform::Analog(analog);
/// assert_eq!(waveform.record_length(), 2);
/// ```