mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2025-12-31 22:00:15 +01:00
Added some doc
This commit is contained in:
parent
7af5e1f3e7
commit
df7b083495
|
|
@ -23,6 +23,10 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace NmeaParser
|
||||
{
|
||||
/// <summary>
|
||||
/// An abstract generic NMEA device that reads a stream at a decreased pace,
|
||||
/// mostly used to emulate NMEA input from files and strings.
|
||||
/// </summary>
|
||||
public abstract class BufferedStreamDevice : NmeaDevice
|
||||
{
|
||||
BufferedStream m_stream;
|
||||
|
|
@ -36,6 +40,7 @@ namespace NmeaParser
|
|||
{
|
||||
m_readSpeed = readSpeed;
|
||||
}
|
||||
|
||||
protected abstract Task<System.IO.Stream> GetStreamAsync();
|
||||
|
||||
protected sealed async override Task<System.IO.Stream> OpenStreamAsync()
|
||||
|
|
@ -52,8 +57,8 @@ namespace NmeaParser
|
|||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
// stream that slowly populates a buffer from a StreamReader to simulate nmea messages coming in line by line
|
||||
// at a steady stream
|
||||
// stream that slowly populates a buffer from a StreamReader to simulate nmea messages coming
|
||||
// in line by line at a steady stream
|
||||
private class BufferedStream : Stream
|
||||
{
|
||||
StreamReader m_sr;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ using Windows.Foundation;
|
|||
|
||||
namespace NmeaParser
|
||||
{
|
||||
/// <summary>
|
||||
/// A generic abstract NMEA device
|
||||
/// </summary>
|
||||
public abstract class NmeaDevice : IDisposable
|
||||
{
|
||||
private object m_lockObject = new object();
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace NmeaParser
|
||||
{
|
||||
/// <summary>
|
||||
/// A file-based NMEA device reading from a NMEA log file.
|
||||
/// </summary>
|
||||
public class NmeaFileDevice : BufferedStreamDevice
|
||||
{
|
||||
#if NETFX_CORE
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ using BTDevice = Windows.Networking.Proximity.PeerInformation;
|
|||
|
||||
namespace NmeaParser
|
||||
{
|
||||
/// <summary>
|
||||
/// A Bluetooth NMEA device
|
||||
/// </summary>
|
||||
public class BluetoothDevice : NmeaDevice
|
||||
{
|
||||
private BTDevice m_device;
|
||||
|
|
|
|||
Loading…
Reference in a new issue