SetSession()
Public Function |
Declared in: NiIviDriver.h |
Declaration
inline void SetSession( const CString& rsrcName, bool reset, bool idQuery, const CString& options = "", bool destructorClosesSession = true);
Description
Constructor that creates a new session from the resource descriptor provided and assigns it to the object. If the object is already using a valid session and the DestructorClosesSession property is true, the function closes the existing session.
Parameters
Logical name that identifies the particular virtual instrument to use. The virtual instrument, in turn, identifies a specific driver and device and specifies the initial settings for the session. You configure the logical name, virtual instrument, specific driver, and device with National Instruments Measurement and Automation Explorer.
If you want to use your program with a different physical instrument, change the configuration of the logical name to use the virtual instrument for the new physical instrument. You can change the initial settings for the session by changing the configuration of the virtual instrument.
Specifies if you want to reset the instrument during the initialization procedure.
Specifies if you want the instrument driver to verify that the instrument you initialize is a type that this driver supports.
Set the initial values for the following properties:
- RangeCheck
- QueryInstrStatus
- Cache
- Simulate
- RecordCoercions
- Spy
- InterchangeCheck
The format of this string is "propertyName=value" where propertyName is the name of the property and value is the value to which the property will be set. To set multiple properties, separate their assignments with a comma. If you do not specify a value for a property, the driver uses the value from National Instruments Measurement and Automation Explorer.
Determines if the session associated with the object is closed when the object is destroyed.