12-20-2013 03:29 PM - edited 12-20-2013 03:31 PM
Mason,
This is so close. I'm on the right track, so THANKS FOR HELPING!!!!
When I run that example, entering localhost and either Y or N for the network devices, I get the computer's IO ports (serial, ...) and these:
Device Alias : PXI1Slot5
Product Name : NI PXI-4065
Serial Number : 01870247
Device Alias : PXI1Slot2
Product Name : NI PXIe-2527
Serial Number : 018A2800
Device Alias : PXI1Slot6
Product Name : NI PXI-2564
Serial Number : 01899ED8
Device Alias : Remote Controller
Product Name : NI PXIe-8360
Serial Number :
Device Alias : Upstream MXI Device
Product Name : NI Expresscard 8360
Serial Number :
Device Alias : CAN1,CAN2
Product Name : NI PXI-8512
Serial Number : 188AAC0
All GREAT infomation!
But, it is still not showing the PXIe Chassis like the Measurement and Automation Explorer does (see attached picture).
It looks like this
status = NISysCfgInitializeSession(target, NULL, NULL, NISysCfgLocaleDefault, NISysCfgBoolTrue, 10000, NULL, &session)
is what starts getting information about the devices. So, perhaps this is something that can be modified to get the chassis information?
Or, perhaps there is one other interface that will access that?
OK, so, I tinkered with these functions, and tried Help, but it didn't give details of the parameters to find the chassis.
I found the header file nisyscfg.h, and in there I found NISysCfgFilterPropertyIsChassis which is in a group that is used by the function NISysCfgSetFilterProperty().
So, I used the line from the example:
NISysCfgSetFilterProperty(filter, NISysCfgFilterPropertyIsDevice, NISysCfgBoolTrue);
and changed Device to Chassis:
NISysCfgSetFilterProperty(filter, NISysCfgFilterPropertyIsChassis, NISysCfgBoolTrue);
and when I run I get this:
Device Alias : Chassis 1
Product Name : NI PXIe-1082
Serial Number : 302B80C
So, now I can read the chassis and determine if I am running on a PXIe!!!!
Thanks again, again, Mason. Now I can create the function to do this in my code, and use it to determine what platform I am running on.
PS: I clicked Mason's reply above as the solution, because it led me to this, which has the details of the solution I needed, but couldn't have gotten without his help. So, I'm not usre that is properly marked, but that is what is is, unless someone changes it!!!