Click or drag to resize
BioRadioDeviceStartAcquisition Method
Starts acquisition of signal data from the device.

Namespace: GLNeuroTech.Devices.BioRadio
Assembly: BioRadioAPI (in BioRadioAPI.dll) Version: 1.0.266.19973 (1.0.266.19973)
Syntax
public override void StartAcquisition()

Implements

IDaqDeviceStartAcquisition
Examples
C#
using System;
using GLNeuroTech.Devices.BioRadio;

namespace BioRadioAPIExamples
{
    public class AcquisitionDemo
    {
        /// <summary>
        /// This sample method will connect to a device at the given mac ID and read data from the signal channels.
        /// </summary>
        public static void AcquireData(long macID)
        {
            BioRadioDeviceManager deviceManager = new BioRadioDeviceManager();

            try
            {
                using (BioRadioDevice device = deviceManager.GetBluetoothDevice(macID))
                {
                    device.StartAcquisition();
                    while (!Console.KeyAvailable)
                    {
                        foreach (var signalGroup in device.SignalGroups)
                        {
                            foreach (BioRadioSignal signal in signalGroup)
                            {
                                var samples = signal.GetScaledValueArray();
                                foreach (var val in samples)
                                {
                                    Console.Write(val.ToString("##.####   "));
                                }
                            }
                        }
                    }
                    device.StopAcquisition();
                    device.Disconnect();
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            finally
            {

            }
        }
    }
}
See Also