[in] ViSession handle for the driver session.
DriverSession::VirtualNameMappings
Returns a map of virtual names to physical names for all virtual names loaded from the IVI Configuration Store when the driver was initialized.
Syntax
Section titled “Syntax”virtual const VirtualNameMap& VirtualNameMappings() const;
const VirtualNameMap& VirtualNameMappings(ViSession Vi);Parameters
Section titled “Parameters”Vi
Return value
Section titled “Return value”Returns a map of virtual names to physical names for all virtual names loaded from the IVI Configuration Store when the driver was initialized.
Remarks
Section titled “Remarks”If the ResourceName parameter passed to the init or InitWithOptions function does not map to a logical name or driver session in the IVI Configuration Store, then this map will be empty.
The VirtualNameMap class returned here is simply an alias for a standard std::map with case-insensitive name lookup.
This function allows access to all of the virtual-to-physical name mappings at once. It is more common to need to translate individual virtual names to physical names and to translate individual physical names to virtual names. This functionality is provided by the TranslateVirtualName and TranslatePhysicalName functions. See the documentation for those functions for further information.
Example
Section titled “Example”The following code demonstrates how to use the GetDriverSetupOption function:
ViStatus _VI_FUNC acme4321_ConfigureSweep(ViSession Vi, ViReal64 StartFrequency, ViReal64 StopFrequency){ auto mappings = VirtualNameMappings(Vi); auto it = mappings.find("MyVirtualName");
if (it != std::end(mappings)) { printf(it->second.c_str()); // prints the physical name mapped to "MyVirtualName" in the config store }
// ...}