Click or drag to resize
BioRadioDeviceSetConfiguration Method (String)
Accepts a file path to a file which contains an xml configuration and uses this file to set the configuration for the BioRadioDevice

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

Parameters

filePath
Type: SystemString
The path to the file that contains the BioRadio configuration
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();
        }
    }
}
Examples
This is an example of an XML representation of the device configuration.
<?xml version="1.0" encoding="utf-16"?>
<BioRadioConfiguration>
  <Name>test</Name>
  <Termination>SingleEnded</Termination>
  <PatientGroundDriven>True</PatientGroundDriven>
  <PerformLeadOffDetection>True</PerformLeadOffDetection>
  <SampleRate>500</SampleRate>
  <BioPotentialChannels>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>1</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>2</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>3</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>4</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>5</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>6</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>7</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
    <BioPotentialChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>8</ChannelIndex>
      <Name>test</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>123</PresetCode>
      <Gain>2</Gain>
      <OperationMode>Normal</OperationMode>
      <Coupling>DC</Coupling>
      <BitResolution>12</BitResolution>
    </BioPotentialChannelConfiguration>
  </BioPotentialChannels>
  <EventMarkerChannel>
    <EventMarkerChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>9</ChannelIndex>
      <Name>EventMarker</Name>
      <Enabled>true</Enabled>
      <Saved>true</Saved>
      <Streamed>true</Streamed>
      <PresetCode>0</PresetCode>
    </EventMarkerChannelConfiguration>
  </EventMarkerChannel>
  <MemsChannel>
    <MemsChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelIndex>10</ChannelIndex>
      <Name>Mems</Name>
      <Enabled>true</Enabled>
      <Saved>false</Saved>
      <Streamed>true</Streamed>
      <PresetCode>0</PresetCode>
      <Range>SixteenG</Range>
    </MemsChannelConfiguration>
  </MemsChannel>
  <ExternalSensors>
    <ArrayOfChannelConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>11</ChannelIndex>
        <Name />
        <Enabled>true</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>2</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>12</ChannelIndex>
        <Name />
        <Enabled>true</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>13</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>14</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>15</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>16</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>17</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>18</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>19</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
      <ChannelConfiguration xsi:type="NotConnectedExternalSensorConfiguration">
        <ChannelIndex>20</ChannelIndex>
        <Name />
        <Enabled>false</Enabled>
        <Saved>true</Saved>
        <Streamed>true</Streamed>
        <PresetCode>0</PresetCode>
      </ChannelConfiguration>
    </ArrayOfChannelConfiguration>
  </ExternalSensors>
</BioRadioConfiguration>
See Also