static void Main(string[] args)
        {
            // create stream info and outlet
            liblsl.StreamInfo inf = new liblsl.StreamInfo("Test1", "Markers", 1, 0, liblsl.channel_format_t.cf_string, "giu4569");
            liblsl.StreamOutlet outl = new liblsl.StreamOutlet(inf);

            Random rnd = new Random();
            string[] strings = new string[] { "Test", "ABC", "123" };
            string[] sample = new string[1];
            for (int k = 0; ; k++)
            {
                // send a marker and wait for a random interval
                sample[0] = strings[k % 3];
                outl.push_sample(sample);
                System.Threading.Thread.Sleep(rnd.Next(1000));
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Random rnd = new Random();

            // create stream info and outlet
            liblsl.StreamInfo info = new liblsl.StreamInfo("BioSemi", "EEG", 8, 100, liblsl.channel_format_t.cf_float32, "sddsfsdf");
            liblsl.StreamOutlet outlet = new liblsl.StreamOutlet(info);
            float[] data = new float[8];
            while (true)
            {
                // generate random data and send it
                for (int k = 0; k < data.Length; k++)
                    data[k] = rnd.Next(-100, 100);
                outlet.push_sample(data);
                System.Threading.Thread.Sleep(10);
            }

            System.Console.ReadKey();
        }