Click or drag to resize
BioRadioDeviceGetConfiguration Method
Retrieves the current Configuration applied to the device.

Namespace: GLNeuroTech.Devices.BioRadio
Assembly: BioRadioAPI (in BioRadioAPI.dll) Version: 1.0.266.19973 (1.0.266.19973)
Syntax
public BioRadioConfiguration GetConfiguration()

Return Value

Type: BioRadioConfiguration
Examples
C#
using GLNeuroTech.Devices.BioRadio;
using GLNeuroTech.Devices.BioRadio.Configuration;

namespace BioRadioAPIExamples
{
    public class SetConfiguration
    {

        /// <summary>
        /// This sample method will connect to a device at the given mac ID and set the device configuration.
        /// </summary>
        public static void ConfigureDevice(long macID)
        {
            var bioRadioDeviceManager = new BioRadioDeviceManager();
            var connectedBioRadio = bioRadioDeviceManager.GetBluetoothDevice(macID);

            // Read and modify a local copy of the device configuration
            var config = connectedBioRadio.GetConfiguration();
            config.Termination = BioPotentialTermination.Differential;
            config.Name = "New Name";
            config.PatientGroundDriven = false;
            config.PerformLeadOffDetection = true;
            config.SampleRate = 500;

            // Program the device with the local configuration
            connectedBioRadio.SetConfiguration(config);


            // Update a channel configuration
            config.BioPotentialChannels[0].BitResolution = 12;
            config.BioPotentialChannels[0].Name = "New Channel name";
            config.BioPotentialChannels[0].Coupling = CouplingType.AC;
            config.BioPotentialChannels[0].OperationMode = BioPotentialChannelMode.Normal;
            connectedBioRadio.SetConfiguration(config);


            // Set the device configuration from an xml file
            connectedBioRadio.SetConfiguration(@"ExampleBioRadioConfiguration.xml");

            connectedBioRadio.Disconnect();
            connectedBioRadio.Dispose();
        }
    }
}
See Also