public Int32 In32(short bar, long barOffset) { int readval; int error = AgVisa32.viIn32(mSession, bar, (int)barOffset, out readval); if (error < 0) { AgVisa32Exception.Throw(error); } return(readval); }
/// <summary> /// Perform an input /// </summary> /// <param name="BAR"></param> /// <param name="offset"></param> /// <returns></returns> public Int32 In32(short BAR, int offset) { if (IsSimulated) { // For now, trivial implementation of simulation ... simply echo what was last written return(mSimulatedRegisters.ContainsKey(offset) ? (int)mSimulatedRegisters[offset] : 0); } Int32 value; CheckStatus(AgVisa32.viIn32(mSession, BAR, offset, out value)); return(value); }