mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-02-27 10:04:58 +01:00
Expose current serial port
This commit is contained in:
parent
017623e7ab
commit
b195c12d7a
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue