Skip to content

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);

Vi

[in] ViSession handle for the driver session.

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.

The IVI specifications define six inherent options (in addition to the DriverSetup option) that may 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.

The following code demonstrates use of the InherentOptions function:

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;
}
// ...
}