From 8e6cc7b00b56224a9b358108babc3163f0f88d95 Mon Sep 17 00:00:00 2001 From: mort5161 Date: Tue, 11 Nov 2014 17:36:55 -0800 Subject: [PATCH] Added some doc + added support for writing to the serial port --- src/NmeaParser.WinDesktop/SerialPortDevice.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/NmeaParser.WinDesktop/SerialPortDevice.cs b/src/NmeaParser.WinDesktop/SerialPortDevice.cs index 3f810a3..01a3cd2 100644 --- a/src/NmeaParser.WinDesktop/SerialPortDevice.cs +++ b/src/NmeaParser.WinDesktop/SerialPortDevice.cs @@ -23,6 +23,9 @@ using System.Threading.Tasks; namespace NmeaParser { + /// + /// A Serial Port NMEA device + /// public class SerialPortDevice : NmeaDevice { private System.IO.Ports.SerialPort m_port; @@ -43,5 +46,17 @@ namespace NmeaParser m_port.Close(); return Task.FromResult(true); } + + /// + /// Writes data to the serial port (useful for RTCM/dGPS scenarios) + /// + /// The byte array that contains the data to write to the port. + /// The zero-based byte offset in the buffer parameter at which to begin copying + /// bytes to the port. + /// The number of bytes to write. + public void Write(byte[] buffer, int offset, int count) + { + m_port.Write(buffer, offset, count); + } } }