/// <summary> /// Get the specified attribute /// </summary> /// <param name="attribute"></param> /// <returns></returns> public int GetSessionAttribute(int attribute) { int value; CheckStatus(AgVisa32.viGetAttribute(mSession, attribute, out value)); return(value); }
public VisaSession NewSession() { VisaSession newSession = new VisaSession(); Int32 lockMode; AgVisa32.viGetAttribute(mSession, AgVisa32.VI_ATTR_RSRC_LOCK_STATE, out lockMode); if (lockMode != AgVisa32.VI_NO_LOCK) { // Unlock the old session so it can be shared. AgVisa32.viUnlock(mSession); } // Open a new session with the same resource descriptor // and simulation mode as the old session. newSession.Open(mViDesc, mTimeout, IsSimulated, false); return(newSession); }