Click or drag to resize
BioRadioDeviceSetConfiguration Method (BioRadioConfiguration)
This will be implemented as a wrapper around the 2 lower-level commands to set global and channel Configurations.

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

Parameters

Config
Type: GLNeuroTech.Devices.BioRadio.ConfigurationBioRadioConfiguration

Return Value

Type: 
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