MCAEmotiv.Interop.EEGDataEntry.ParseOldFormat C# (CSharp) Method

ParseOldFormat() public static method

Parses a line of text based on a format that is essentially the raw output of the emotiv headset
public static ParseOldFormat ( string line, int onsetTime ) : EEGDataEntry
line string
onsetTime int
return EEGDataEntry
        public static EEGDataEntry ParseOldFormat(string line, int onsetTime)
        {
            var fields = line.Split(SEPARATOR);
            int time = (1000 * double.Parse(fields[Channels.Values.Count + 4])).Rounded();
            return new EEGDataEntry(int.Parse(fields[0]),
                time,
                -1,
                fields.Skip(2).Take(Channels.Values.Count).Select(double.Parse));
        }