Expose current serial port

This commit is contained in:
mort5161 2015-03-20 12:39:23 -07:00
parent 017623e7ab
commit b195c12d7a

View file

@ -31,14 +31,28 @@ namespace NmeaParser
private System.IO.Ports.SerialPort m_port;
/// <summary>
/// Initializes a new instance of the <see cref="SerialPortDevice"/> class.
/// Initializes a new instance of the <see cref="SerialPortDevice" /> class.
/// </summary>
/// <param name="port">The serial port.</param>
/// <exception cref="System.ArgumentNullException">port</exception>
public SerialPortDevice(System.IO.Ports.SerialPort port)
{
if (port == null)
throw new ArgumentNullException("port");
m_port = port;
}
/// <summary>
/// Gets the active serial port.
/// </summary>
public System.IO.Ports.SerialPort Port
{
get
{
return m_port;
}
}
/// <summary>
/// Creates the stream the NmeaDevice is working on top off.
/// </summary>