Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1f7d1fa
add _raw_index
Nov 19, 2025
7a92534
line_index and line_names
Nov 20, 2025
9819c31
more tests
Nov 20, 2025
0c7e0e0
fix new test
Nov 20, 2025
101e9c1
data_index and documentation
Nov 20, 2025
ab0894d
fix doc types
Nov 21, 2025
acd1a8c
documentation improvements
Nov 21, 2025
1e60206
documentation improvements
Nov 21, 2025
61d2fc2
documentation improvements
Nov 21, 2025
897b3bd
clean up NI_LineNames in tests
Nov 21, 2025
1d558c0
remove DigitalWaveformFailure.data_index
Nov 24, 2025
b5ea682
Merge remote-tracking branch 'origin/main' into users/mprosser/bug-31…
Nov 24, 2025
992cac1
test___signal_with_line_names___change_line_names_property___signal_r…
Nov 25, 2025
329abd5
Merge remote-tracking branch 'origin/main' into users/mprosser/bug-31…
Dec 3, 2025
9d0eb7d
signal_column_index
Dec 3, 2025
957e82c
line lengths
Dec 3, 2025
9f5f60d
italics for 'See "Signal index vs. signal column index"' notes
Dec 3, 2025
63e4e70
add bitorder to from_port, and default to the industry standard 'big'
Dec 4, 2025
4968e62
rename to column_index
Dec 5, 2025
7ac5a23
bitorder != sys.byteorder
Dec 5, 2025
72a5b27
add on_key_changed to ExtendedPropertyDictionary
Dec 5, 2025
91f2810
change tests to big-endian
Dec 5, 2025
62dbd68
make on_key_changed private
Dec 8, 2025
a14f5c3
cleanup
Dec 8, 2025
2e774ac
from typing_extensions import TypeAlias, to fix python 3.9
Dec 8, 2025
a408007
fix pickling and copying issues with callbacks
Dec 10, 2025
7adf82c
change on_key_changed to a list of weak methods, so ExtendedPropertyD…
Dec 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/nitypes/waveform/_digital/_waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ class DigitalWaveform(Generic[TDigitalState]):

* :attr:`DigitalWaveformSignal.signal_index` - The position in the :attr:`DigitalWaveform.signals`
collection (0-based from the first signal). signal_index 0 is the rightmost column in the data.
* :attr:`DigitalWaveformSignal.column_index` - The position in the :attr:`DigitalWaveform.data`
array's second dimension (0-based from the first column). column_index 0 is the leftmost column
in the data.
* :attr:`DigitalWaveformSignal.column_index` - The column in the :attr:`DigitalWaveform.data`
array, e.g. `waveform.data[:, column_index]`. column_index 0 is the leftmost column in the data.

These indices are reversed with respect to each other. signal_index 0 (line 0) corresponds to
the highest column_index, and the highest signal_index (the highest line) corresponds to
Expand Down Expand Up @@ -838,7 +837,7 @@ def __init__(
):
extended_properties = ExtendedPropertyDictionary(extended_properties)
self._extended_properties = extended_properties
self._extended_properties.on_key_changed = self._on_extended_property_changed
self._extended_properties._on_key_changed = self._on_extended_property_changed

if timing is None:
timing = Timing.empty
Expand Down
13 changes: 3 additions & 10 deletions src/nitypes/waveform/_extended_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from collections.abc import Callable, Iterator, Mapping, MutableMapping
from typing import TYPE_CHECKING

from typing_extensions import TypeAlias

from nitypes.waveform.typing import ExtendedPropertyValue

# Extended property keys
Expand All @@ -12,7 +14,7 @@
UNIT_DESCRIPTION = "NI_UnitDescription"

if TYPE_CHECKING:
OnKeyChangedCallback = Callable[[str], None]
OnKeyChangedCallback: TypeAlias = Callable[[str], None]


class ExtendedPropertyDictionary(MutableMapping[str, ExtendedPropertyValue]):
Expand All @@ -32,15 +34,6 @@ def __init__(self, properties: Mapping[str, ExtendedPropertyValue] | None = None
if properties is not None:
self._properties.update(properties)

@property
def on_key_changed(self) -> OnKeyChangedCallback | None:
"""Callback invoked when a key is set or deleted."""
return self._on_key_changed

@on_key_changed.setter
def on_key_changed(self, value: OnKeyChangedCallback | None) -> None:
self._on_key_changed = value

def __len__(self) -> int:
"""Return len(self)."""
return len(self._properties)
Expand Down