コード例 #1
0
 /// <summary>
 /// Returns a thread-safe wrapper for SequenceOutputDataStream.
 /// </summary>
 /// <param name="s"></param>
 /// <returns></returns>
 public static SequenceOutputDataStream Synchronized(SequenceOutputDataStream s)
 {
     return new SyncSequenceOutputDataStream(s);
 }
コード例 #2
0
 internal SyncSequenceOutputDataStream(SequenceOutputDataStream stream)
 {
     _stream = stream;
 }
コード例 #3
0
        public void SetUp()
        {
            const int srate = 1000;
            IList<IMeasurement> list = Enumerable.Range(0, srate * 2).Select(i => new Measurement(i, "V") as IMeasurement).ToList();
            var data = new OutputData(list, new Measurement(srate, "Hz"));

            var stim1 = new RenderedStimulus("stim1", new Dictionary<string, object>(), data);
            stream1 = new StimulusOutputDataStream(stim1, TimeSpan.FromSeconds(0.1));

            var stim2 = new RenderedStimulus("stim2", new Dictionary<string, object>(), data);
            stream2 = new StimulusOutputDataStream(stim2, TimeSpan.FromSeconds(0.1));

            seqData = data.Concat(data);

            seqStream = new SequenceOutputDataStream();
            seqStream.Add(stream1);
            seqStream.Add(stream2);
        }