niModInst_GetInstalledDeviceAttributeViInt32

ModInst

niModInst_GetInstalledDeviceAttributeViInt32

Specific Function

C Function Prototype

ViStatus niModInst_GetInstalledDeviceAttributeViInt32 (ViSession handle, ViInt32 index, ViInt32 attributeID, ViInt32* attributeValue);

Description

Returns an integer attribute specified by the attributeID parameter for a device specified by the handle and index parameters. The handle parameter is expected to be a valid handle returned by niModInst_OpenInstalledDevicesSession. It therefore acts as a handle to a list of installed devices. The index parameter specifies the device in the list for which you want the attribute.

Input Parameters

Name Type Description
handleViSessionThe NI-ModInst session handle created by niModInst_OpenInstalledDevicesSession.
indexViInt32A zero-based index that specifies the device for which you want the attribute. This index parameter should be between 0 and (deviceCount – 1), inclusive, where deviceCount is the number of installed devices returned by niModInst_OpenInstalledDevicesSession.
attributeIDViInt32The ID of the integer attribute you want to query.

Valid Values

NIMODINST_ATTR_SLOT_NUMBER—the slot (for example, in a PXI chassis) in which the device is installed. This attribute can only be queried for PXI devices installed in a chassis that has been properly identified in MAX.

NIMODINST_ATTR_CHASSIS_NUMBER—the number of the chassis in which the device is installed. This attribute can only be queried for PXI devices installed in a chassis that has been properly identified in MAX.

NIMODINST_ATTR_BUS_NUMBER—the bus on which the device has been enumerated.

NIMODINST_ATTR_SOCKET_NUMBER—the socket number on which the device has been enumerated.

NIMODINST_ATTR_PCIEXPRESS_LINK_WIDTH—the PCI express link width negotiated between the device and the system.

NIMODINST_ATTR_MAX_PCIEXPRESS_LINK_WIDTH—the maximum PCI express link width supported by the device.

Notes  
  • The bus number and socket number can be used to form a VISA resource string for this device, of the form "PXI<bus number>::<socket number>::INSTR".
  • Traditional NI-DAQ devices do not support the chassis number, bus number, and socket number attributes.
attributeValue ViInt32* A pointer to a signed 32-bit integer variable that receives the value of the requested attribute.

Return Value