BioRadioDeviceGetConfiguration Method |
Namespace: GLNeuroTech.Devices.BioRadio
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(); } } }