mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-01-04 15:50:27 +01:00
Added some doc + added support for writing to the serial port
This commit is contained in:
parent
df7b083495
commit
8e6cc7b00b
|
|
@ -23,6 +23,9 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace NmeaParser
|
||||
{
|
||||
/// <summary>
|
||||
/// A Serial Port NMEA device
|
||||
/// </summary>
|
||||
public class SerialPortDevice : NmeaDevice
|
||||
{
|
||||
private System.IO.Ports.SerialPort m_port;
|
||||
|
|
@ -43,5 +46,17 @@ namespace NmeaParser
|
|||
m_port.Close();
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes data to the serial port (useful for RTCM/dGPS scenarios)
|
||||
/// </summary>
|
||||
/// <param name="buffer">The byte array that contains the data to write to the port.</param>
|
||||
/// <param name="offset">The zero-based byte offset in the buffer parameter at which to begin copying
|
||||
/// bytes to the port.</param>
|
||||
/// <param name="count">The number of bytes to write.</param>
|
||||
public void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
m_port.Write(buffer, offset, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue