Click or drag to resize

DriverSession::ConfigSettings

Retrieves all of the configurable initial settings (of a particular type) associated with either the driver session or the software module in the IVI Configuration Store.

virtual const DriverSettingsMap<bool>& ConfigSettingsBoolean() const;
virtual const DriverSettingsMap<int>& ConfigSettingsInt32() const;
virtual const DriverSettingsMap<double>& ConfigSettingsReal64() const;
virtual const DriverSettingsMap<std::string>& ConfigSettingsString() const;

const DriverSettingsMap<bool>& ConfigSettingsBoolean(ViSession Vi);
const DriverSettingsMap<int>& ConfigSettingsInt32(ViSession Vi);
const DriverSettingsMap<double>& ConfigSettingsReal64(ViSession Vi);
const DriverSettingsMap<std::string>& ConfigSettingsString(ViSession Vi);
Parameters
Vi

[in] ViSession handle for the driver session.

Return Value

Returns a map of name-value pairs for all of the configurable initial settings loaded from the IVI Configuration Store. The map uses case-insensitive lookups for the setting name.

Remarks

The IVI Configuration Store supports arbitrary name-value pairs that can be associated with either a driver session or a software module. These name-value pairs are called configurable initial settings and can be set by the driver installer or they may be added or modified by an end user. The IVI specifications do not prescribe any particular use for configurable initial settings. They are intended as a means to store driver-defined data in a standard location that other drivers, tools, and application can readily access.

Nimbus automatically loads any configurable initial settings associated with the driver's IVI Configuration Store session or software module. Four different functions are provided to access the settings loaded during driver initialization -- one function for each of the four data types supported by the IVI Configuration Store.

This function is used to retrieve all of the configurable initial settings of a particular type. The DriverSettingsMap is simply an alias for a standard std::map with case-insensitive name lookup. To retrieve individual settings, see the GetConfigSetting Functions.

Example

The following code demonstrates use of the GetConfigSettingInt32 function:

C++
ViStatus _VI_FUNC acme4321_ConfigureSweep(ViSession Vi, ViReal64 StartFrequency, ViReal64 StopFrequency)
{
    auto settings = ConfigSettingsInt32(Vi);
    auto it = settings.find("MySetting");

    if (it != std::end(settings))
    {
        auto myValue = it->second;
    }

    // ...
}

Download a complete CHM version of this documentation here.