Currently, buffer size is set to 0 initially here and will return the actual buffer size needed after calling xxx_chans for the first time. Calling xxx_chans for the second time (with the actual buffer size) will return error -201194 due to AB#2393824.
This PR is a temporary workaround to get the buffer size at xxx_chans property and passing the buffer size to get_read_attribute_string or get_write_attribute_string at _library_interpreter so that xxx_chans doesn't need to be called more than once.
What does this Pull Request accomplish?
This PR aims to address issue mentioned in https://github.com/ni/nidaqmx-python/issues/189:
xxx_chans
for the first time. Callingxxx_chans
for the second time (with the actual buffer size) will return error -201194 due to AB#2393824.xxx_chans
property and passing the buffer size toget_read_attribute_string
orget_write_attribute_string
at_library_interpreter
so thatxxx_chans
doesn't need to be called more than once.Why should this Pull Request be merged?
In this PR to address https://github.com/ni/nidaqmx-python/issues/189, following changes have been made:
task.channel_names
.xxx_chans
property and passing it toget_read_attribute_string
orget_write_attribute_string
assize_hint
.size_hint=0
by default if buffer size is not assigned (for nonxxx_chans
method/property).What testing has been done?
Manually tested
overtemperature_chans
with overtemp real device TS-15200.Results:
overtemperature chans: ['TS1Mod1/power']