public void Emulator() { NewGPSData += new SharpGPS.SerialPort.NewGPSDataHandler(gpsdatahandler); file = new System.IO.StreamReader(GPSHandler._NMEAInputFile); while (file != null) { if (file.EndOfStream) { //Start from beginning of file file.BaseStream.Seek(0, System.IO.SeekOrigin.Begin); } string line = file.ReadLine(); SharpGPS.SerialPort.GPSEventArgs e = new SharpGPS.SerialPort.GPSEventArgs(); e.TypeOfEvent = GPSHandler.String2Eventtype(line); e.Sentence = line; NewGPSData(this, e); System.Threading.Thread.Sleep(150); } }
public void Emulator() { NewGPSData += new SharpGPS.SerialPort.NewGPSDataHandler(gpsdatahandler); file = new System.IO.StreamReader(GPSHandler._NMEAInputFile); while (file!=null) { if (file.EndOfStream) { //Start from beginning of file file.BaseStream.Seek(0, System.IO.SeekOrigin.Begin); } string line = file.ReadLine(); SharpGPS.SerialPort.GPSEventArgs e = new SharpGPS.SerialPort.GPSEventArgs(); e.TypeOfEvent = GPSHandler.String2Eventtype(line); e.Sentence = line; NewGPSData(this, e); System.Threading.Thread.Sleep(150); } }
public NMEAEmulator(SharpGPS.SerialPort.NewGPSDataHandler handler) { gpsdatahandler = handler; }