Click or drag to resize

DriverSession::InherentOptions

Returns a map of the inherent options passed to the InitWithOptions function when the driver session was created.

virtual const DriverSettingsMap<std::string>& InherentOptions() const;

const DriverSettingsMap<std::string>& InherentOptions(ViSession Vi);
Parameters
Vi

[in] ViSession handle for the driver session.

Return Value

A map of name-value pairs representing the values of all inherent options passed to the InitWithOptions function when the driver session was created. The map returned uses case-insensitive lookups for the option name.

Remarks

The IVI specifications define six inherent options (in addition to the DriverSetup) option that maybe be passed in the OptionsString parameter to the InitWithOptions function. These six inherent options are:

  • Cache

  • InterchangeCheck

  • QueryInstrStatus

  • RangeCheck

  • RecordCoercions

  • Simulate

The DriverSettingsMap is simply an alias for a standard std::map with case-insensitive name lookup.

Important note Important

The values stored in this map do not represent values that may have been loaded from the IVI Configuration Store during initialization nor do they necessarily represent the current values of the corresponding IVI driver attributes. To retrieve the current values of the corresponding attributes use functions such as CacheEnabled and SimulationEnabled or CacheEnabledOriginal and SimulationEnabledOriginal. Those functions take into account values that may have been loaded from the IVI Configuration Store as well as changes to the values that the user may have performed after the driver was initialized.

Example

The following code demonstrates use of the InherentOptions function:

C++
ViStatus _VI_FUNC acme4321_ConfigureSweep(ViSession Vi, ViReal64 StartFrequency, ViReal64 StopFrequency)
{
    auto options = InherentOptions(Vi);
    auto it = options.find("simulate");

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

    // ...
}

Download a complete CHM version of this documentation here.