public void WaitForWfmListToAddWfms(IEXTSOURCE extSource, string numEntries, string seconds) { UTILS.HiPerfTimer timer = new UTILS.HiPerfTimer(); double totalTime = 0; int currentEntries = Int16.Parse(extSource.ExtSrcWfmListSize); int expectedEntries = Int16.Parse(numEntries) + currentEntries; while ((totalTime < double.Parse(seconds))) { timer.Start(); extSource.GetExtSrcWfmListSize(); if (Int16.Parse(extSource.ExtSrcWfmListSize) == expectedEntries) { return; } Thread.Sleep(50); // Have to make sure this is between the start/stop commands timer.Stop(); // Add the current interval to the total totalTime = totalTime + timer.Duration; } Assert.Fail("Waveform entries were not added in the allowed " + seconds + " seconds time limit. Waveform Entries Found: " + extSource.ExtSrcWfmListSize); }
/// <summary> /// Gets the the size(number of waveforms) of the waveform list from the externl source /// /// WLISt:SIZE? /// </summary> /// <param name="extSource">the EXTSOURCE object</param> /// <returns>the size(number of waveforms) of the waveform list</returns> public void GetExtSrcWfmListSize(IEXTSOURCE extSource) { extSource.GetExtSrcWfmListSize(); }