-
Notifications
You must be signed in to change notification settings - Fork 3
Filtering on connects_to_bus_type is not working #67
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Filtering on a specific connected bus type does not work.
def print_resource():
format_string = "{0: <16} {1: <32} {2: <21} {3}"
with nisyscfg.Session() as session:
filter = session.create_filter()
filter.is_ni_product = True
filter.is_chassis = False
filter.connects_to_bus_type = BusType.PCI_PXI
print(format_string.format("Expert", "Alias", "Model", "Bus Type (#)"))
print(format_string.format("------", "-----", "-----", "------------"))
for resource in session.find_hardware(filter):
print(
format_string.format(
resource.expert_name[0],
resource.expert_user_alias[0],
resource.product_name,
f"{resource.connects_to_bus_type.name} ({resource.connects_to_bus_type.value})",
)
)
Output is an empty list.
Expert Alias Model Bus Type (#)
------ ----- ----- ------------
When commenting out the line: filter.connects_to_bus_type = BusType.PCI_PXI the output is:
Expert Alias Model Bus Type (#)
------ ----- ----- ------------
daqmx DIO_6509_C1_USB NI USB-6509 USB (2)
daqmx PPS_P143 NI PXI-4110 PCI_PXI (1)
daqmx SYNC_CHASSIS_1 NI PXIe-6674T PCI_PXI (1)
daqmx RELAY_P162_P118 NI PXI-2567 PCI_PXI (1)
nidcpower416x SMU_P142_CH4-7 NI PXIe-4147 PCI_PXI (1)
nidcpower416x SMU_P142_CH0-3 NI PXIe-4147 PCI_PXI (1)
nidcpower416x SMU_P175_P167 NI PXIe-4162 PCI_PXI (1)
nidigital657x HSD_P174 NI PXIe-6571 PCI_PXI (1)
nidigital657x HSD_P154 NI PXIe-6571 PCI_PXI (1)
nidmm408x DMM_P143 NI PXIe-4081 PCI_PXI (1)
LabVIEW does list devices filtered by connected bus type correctly:

To Reproduce
Steps to reproduce the behavior:
Run above snippet on a PXI system
Expected behavior
To return only the PCI_PXI connected devices.
Screenshots
NA
Desktop (please complete the following information):
- OS: Windows 11
- Version: NI System Configuration 2025 Q1 & nisyscfg 0.2.0
Additional context
NA
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working