|Download Help (Windows Only)|
To form the ClassPrefix_ of the function name, use the prefix of the class driver with which you are working. For example, if you are working with the IviDmm class driver, use the prefix IviDmm_ to create the correct function name, IviDmm_init.
ViStatus ClassPrefix_init (ViRsrc logicalName, ViBoolean IDQuery, ViBoolean resetDevice, ViSession*vi);
This function performs the following initialization actions:
|Note This function creates a new session each time you invoke it. Although you can open more than one IVI session for the same resource, it is best not to do so. You can use the same session in multiple program threads. You can use the ClassPrefix_LockSession and ClassPrefix_UnlockSession functions to protect sections of code that require exclusive access to the resource.|
|Caution All IVI names, such as logical names or virtual names, are case-sensitive. If you use logical names, driver session names, or virtual names in your program, you must make sure that the name you use matches the name in the IVI Configuration Store file exactly, without any variations in the case of the characters in the name.|
|logicalName||ViRsrc||Pass the logical name that identifies the particular driver session to use. The driver session, in turn, identifies a specific driver and device and specifies the initial settings for the session. You configure the logical name, driver session, specific driver, and device in MAX. If you want to use your program with a different physical instrument, you change the configuration of the logical name to use the driver session for the new physical instrument. You can change the initial settings for the session by changing the configuration of the driver session. Default Value: SampleClassPrefix|
|IDQuery||ViBoolean||Specify whether you want the instrument driver to perform an ID Query.
Valid Range: VI_TRUE (1)Perform ID Query
Default Value: VI_FALSE (0)Skip ID Query When you set this parameter to VI_TRUE, the driver verifies that the instrument you initialize is a type that this driver supports. Circumstances can arise where it is undesirable to send an ID Query command string to the instrument. When you set this parameter to VI_FALSE, the function initializes the instrument without performing an ID Query.
|resetDevice||ViBoolean||Specify whether you want the to reset the instrument during the initialization procedure.
Valid Range: VI_TRUE (1)Reset Device
Default Value: VI_FALSE (0)Do Not Reset
|vi||ViSession||The instrument handle that you obtain from the ClassPrefix_init or ClassPrefix_InitWithOptions functions. The handle identifies a particular IVI session.|