Hi,
I am using Measurement Studio in a VC++ app.
To create a CNi4882Board object, I can do:
NI::CNi4882Board gpib_board("GPIB0")
but that means, I have to hardcode "GPIB0" in my app. I want to detect/get
the logical GPIB interface names (like "GPIB0" or "GPIB1") from somewhere.
I do not know how to do this. The purpose of this is to auto-detect gpib
interfaces and devices connected to the interfaces at run-time from my app.
The other problem is related. To create an NI::CNi4882Device object, I have
to supply the "board number" for this device. How do I get the board
number?
I can do:
NI::CNi4882Device(NI::CNi4882Address(nGpibAddress), 0,
NI::CNi4882::TimeoutValue::t10s, true, 0)
but it is only for devices connected to board "0".
I have observed that the logical board ("GPIB0") and the board number (0)
are configured in the "Measurement and Automation" app supplied by NI. Is
there any way to communicate with this app and extract the info?
Your help is much appreciated.
Best regards,
Saayan