예제 #1
0
 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);
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 public NMEAEmulator(SharpGPS.SerialPort.NewGPSDataHandler handler)
 {
     gpsdatahandler = handler;
 }
예제 #4
0
 public NMEAEmulator(SharpGPS.SerialPort.NewGPSDataHandler handler)
 {
     gpsdatahandler = handler;
 }