コード例 #1
0
 /// <summary>
 ///     Create a new NMEA GPS object and attach to the specified serial port.
 /// </summary>
 /// <param name="port">Serial port attached to the GPS.</param>
 /// <param name="baudRate">Baud rate.</param>
 /// <param name="parity">Parity.</param>
 /// <param name="dataBits">Number of data bits.</param>
 /// <param name="stopBits">Number of stop bits.</param>
 public NMEA(IIODevice device, SerialPortName port, int baudRate, Parity parity, int dataBits, StopBits stopBits)
 {
     gps = new SerialTextFile(device, port, baudRate, parity, dataBits, stopBits, "\r\n");
     gps.OnLineReceived += GpsOnLineReceived;
 }
コード例 #2
0
ファイル: NMEA.cs プロジェクト: patridge/Meadow.Foundation
 /// <summary>
 ///     Create a new NMEA GPS object and attach to the specified serial port.
 /// </summary>
 /// <param name="port">Serial port attached to the GPS.</param>
 /// <param name="baudRate">Baud rate.</param>
 /// <param name="parity">Parity.</param>
 /// <param name="dataBits">Number of data bits.</param>
 /// <param name="stopBits">Number of stop bits.</param>
 public NMEA(string port, int baudRate, ParityType parity, int dataBits, NumberOfStopBits stopBits)
 {
     _gps = new SerialTextFile(port, baudRate, parity, dataBits, stopBits, "\r\n");
     _gps.OnLineReceived += _gps_OnLineReceived;
 }