nitypes.waveform.DigitalWaveformSignal
- class nitypes.waveform.DigitalWaveformSignal(owner: nitypes.waveform.DigitalWaveform[nitypes.waveform.typing.TDigitalState], signal_index: SupportsIndex, column_index: SupportsIndex | None = None)
Bases:
Generic[nitypes.waveform.typing.TDigitalState]A signal of a digital waveform.
To construct this object, use the
DigitalWaveform.signalsproperty and index the returned collection, e.g.waveform.signals[0]orwaveform.signals["Dev1/port0/line0"].- Parameters:
owner (nitypes.waveform.DigitalWaveform[nitypes.waveform.typing.TDigitalState])
signal_index (SupportsIndex)
column_index (SupportsIndex | None)
- __slots__ = ['_owner', '_signal_index', '_column_index', '__weakref__']
- property owner: nitypes.waveform.DigitalWaveform[nitypes.waveform.typing.TDigitalState]
The waveform that owns this signal.
- Return type:
nitypes.waveform.DigitalWaveform[nitypes.waveform.typing.TDigitalState]
- property signal_index: int
The signal’s position in the DigitalWaveform.signals collection (0-based).
- Return type:
- property column_index: int
The signal’s position in the DigitalWaveform.data array’s second dimension (0-based).
This index is used to access the signal’s data within the waveform’s data array: waveform.data[:, column_index].
Note: The column_index is reversed compared to the signal_index. column_index 0 (the leftmost column) corresponds to the highest signal_index and highest line number. The highest column_index (the rightmost column) corresponds to signal_index 0 and line 0. This matches industry conventions where line 0 is the LSB and appears as the rightmost bit.
- Return type:
- property data: numpy.typing.NDArray[nitypes.waveform.typing.TDigitalState]
The signal data, indexed by sample.
- Return type:
numpy.typing.NDArray[nitypes.waveform.typing.TDigitalState]