public EmulFileWriter(string fileName, IEmulFile emulFile) { this.fileName = fileName; Header = emulFile.Header; Quants = emulFile.Quants; }
public MeasurementReader(IEmulFile file) { Channels = new Dictionary<byte, Channel>(); Module = file.Header.Modules.FirstOrDefault(m => m.ModuleType == ModuleType); if (!Module.Equals(default(EmulModuleInfo))) { // Создаем каналы. for (byte i = 0; i < Module.Channels; i++) { Channels.Add(i, new Channel()); } byte moduleId = Module.Id; var points = from quant in file.Quants where quant.ModuleID == moduleId && quant.DataType == DataType.Data select new { Data = BitConverter.ToInt32(quant.Data, 0), ChannelID = quant.ChannelID }; foreach (var point in points) { Channels[point.ChannelID].Points.Add(point.Data); } } }
public EcgReader(IEmulFile file) : base(file) { Multipliers = new double[Module.Channels]; if (Module.Params != null && Module.Params.Count >= Module.Channels + 2) { double m = Module.Params[1].Value / Math.Round(Math.Pow(2, (int)Module.Params[0].Value)); for (int i = 0; i < Multipliers.Length; i++) { Multipliers[i] = 1000 * m / Module.Params[i + 2].Value; } } }