From 3571fdec12acea1ea2b143770a6c260a13069fac Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Sun, 19 Jan 2020 18:30:43 -0800 Subject: [PATCH 1/3] Added DocFX documentation --- .gitignore | 1 + build/DownloadDocFX.ps1 | 18 ++++ build/GenerateDoc.cmd | 20 +++++ docs/.gitignore | 9 ++ docs/Features.md | 15 ++++ docs/api/android/index.md | 3 + docs/api/index.md | 24 ++++++ docs/api/ios/index.md | 3 + docs/api/netcore/index.md | 3 + docs/api/netfx/index.md | 3 + docs/api/netstd/index.md | 3 + docs/api/uwp/index.md | 3 + docs/concepts/ArcGISRuntime.md | 53 ++++++++++++ docs/concepts/BluetoothAndroid.md | 3 + docs/concepts/BluetoothUWP.md | 34 ++++++++ docs/concepts/BluetoothiOS.md | 3 + docs/concepts/CustomMessages.md | 83 ++++++++++++++++++ docs/concepts/SerialPortNetCore.md | 14 +++ docs/concepts/SerialPortNetFX.md | 14 +++ docs/concepts/SerialPortUWP.md | 32 +++++++ docs/concepts/index.md | 30 +++++++ docs/concepts/toc.yml | 30 +++++++ docs/docfx.json | 131 +++++++++++++++++++++++++++++ docs/index.md | 21 +++++ docs/toc.yml | 10 +++ 25 files changed, 563 insertions(+) create mode 100644 build/DownloadDocFX.ps1 create mode 100644 build/GenerateDoc.cmd create mode 100644 docs/.gitignore create mode 100644 docs/Features.md create mode 100644 docs/api/android/index.md create mode 100644 docs/api/index.md create mode 100644 docs/api/ios/index.md create mode 100644 docs/api/netcore/index.md create mode 100644 docs/api/netfx/index.md create mode 100644 docs/api/netstd/index.md create mode 100644 docs/api/uwp/index.md create mode 100644 docs/concepts/ArcGISRuntime.md create mode 100644 docs/concepts/BluetoothAndroid.md create mode 100644 docs/concepts/BluetoothUWP.md create mode 100644 docs/concepts/BluetoothiOS.md create mode 100644 docs/concepts/CustomMessages.md create mode 100644 docs/concepts/SerialPortNetCore.md create mode 100644 docs/concepts/SerialPortNetFX.md create mode 100644 docs/concepts/SerialPortUWP.md create mode 100644 docs/concepts/index.md create mode 100644 docs/concepts/toc.yml create mode 100644 docs/docfx.json create mode 100644 docs/index.md create mode 100644 docs/toc.yml diff --git a/.gitignore b/.gitignore index 54780d3..6b45e70 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ Tools/Nuget/*.nupkg src/NmeaParser.sln.ide/ project.lock.json src/.vs/ +artifacts diff --git a/build/DownloadDocFX.ps1 b/build/DownloadDocFX.ps1 new file mode 100644 index 0000000..5f6c629 --- /dev/null +++ b/build/DownloadDocFX.ps1 @@ -0,0 +1,18 @@ +[cmdletbinding()] +param([string]$Version="2.48.1",[string]$Folder) +Add-Type -AssemblyName System.IO.Compression.FileSystem +[Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 + +function DownloadDocFX([string]$version, [string]$folder) +{ + Write-Output "Using folder $folder" + $path = "$folder\v$version" + if (!(Test-Path $path)) + { + New-Item -ItemType Directory -Force -Path $path + Write-Output "Downloading DocFX v$version..." + Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v$version/docfx.zip" -OutFile "$folder\docfx_v$version.zip" + [System.IO.Compression.ZipFile]::ExtractToDirectory("$folder\docfx_v$version.zip",$path ) + } +} +DownloadDocFX -version $Version -folder $Folder \ No newline at end of file diff --git a/build/GenerateDoc.cmd b/build/GenerateDoc.cmd new file mode 100644 index 0000000..3915b5b --- /dev/null +++ b/build/GenerateDoc.cmd @@ -0,0 +1,20 @@ +@ECHO OFF + +SET DocFXVersion=2.48.1 +SET DocFxFolder=..\artifacts\toolset + +REM Download DocFx +powershell -ExecutionPolicy ByPass -command "./DownloadDocFX.ps1" -Version %DocFXVersion% -Folder %DocFxFolder% + +REM Build metadata for all platforms (uses configuration in docfx.json in this folder) +%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docs\docfx.json metadata + +REM Merge output (not implemented) +REM %DocFxFolder%\v%DocFXVersion%\docfx.exe merge + +REM Generate OMD +dotnet tool install --global dotMorten.OmdGenerator +generateomd /source=../src/NmeaParser /output=../artifacts/docs/api/omd.html + +REM Build the output site (HTML) from the generated metadata and input files (uses configuration in docfx.json in this folder) +%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docs\docfx.json build diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..4378419 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,9 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site diff --git a/docs/Features.md b/docs/Features.md new file mode 100644 index 0000000..f611bd8 --- /dev/null +++ b/docs/Features.md @@ -0,0 +1,15 @@ +# Features + +- Most common NMEA messages fully supported + - GNSS: BOD, GGA, GLL, GNS, GSA, GST, GSV, RMB, RMA, RMB, RMC, RTE, VTG, ZDA + - Garmin Proprietary: PGRME, PGRMZ + - Trimble Laser Range Finder: PTNLA, PTNLB + - TruePulse Laser Range Finder: PLTIT +- Automatic merging of multi-sentence messages for simplified usage. +- Extensible with custom NMEA messages [see here](concepts/CustomMessages.html) +- Multiple input devices out of the box + - System.IO.Stream (all platforms) + - Emulation from NMEA log file (all platforms) + - Serial Device: .NET Framework, .NET Core (Windows, Linux, Mac) and Windows Universal. + - Bluetooth: Windows Universal and Android. .NET Core/.NET Framework is supported using the bluetooth device via the SerialPortDevice. + diff --git a/docs/api/android/index.md b/docs/api/android/index.md new file mode 100644 index 0000000..d9154fe --- /dev/null +++ b/docs/api/android/index.md @@ -0,0 +1,3 @@ +# NMEAParser API Reference + +Select an API from the menu on the left. diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 0000000..1cd5530 --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,24 @@ +# Library reference + +**Select your platform:** + +- [.NET Standard API Reference](netstd/index.html) + +- [.NET Framework API Reference](netfx/index.html) + +- [.NET Core API Reference](netcore/index.html) + +- [UWP API Reference](uwp/index.html) + +- [Android API Reference](android/index.html) + +- [iOS API Reference](ios/index.html) + +### Object model diagram: + +[Click here](omd.html) to see the full object model diagram + +### Platform specific devices: + +Note: The library reference is identical on each platform, except some platforms have platform-specific additional NMEA devices to simplify usage on those platforms. While they may be named the same, they might be have slightly different or take different platform-specific arguments. +See the menu in the "[Getting Started](../concepts/index.html)" section for more info on these. \ No newline at end of file diff --git a/docs/api/ios/index.md b/docs/api/ios/index.md new file mode 100644 index 0000000..d9154fe --- /dev/null +++ b/docs/api/ios/index.md @@ -0,0 +1,3 @@ +# NMEAParser API Reference + +Select an API from the menu on the left. diff --git a/docs/api/netcore/index.md b/docs/api/netcore/index.md new file mode 100644 index 0000000..d9154fe --- /dev/null +++ b/docs/api/netcore/index.md @@ -0,0 +1,3 @@ +# NMEAParser API Reference + +Select an API from the menu on the left. diff --git a/docs/api/netfx/index.md b/docs/api/netfx/index.md new file mode 100644 index 0000000..d9154fe --- /dev/null +++ b/docs/api/netfx/index.md @@ -0,0 +1,3 @@ +# NMEAParser API Reference + +Select an API from the menu on the left. diff --git a/docs/api/netstd/index.md b/docs/api/netstd/index.md new file mode 100644 index 0000000..d9154fe --- /dev/null +++ b/docs/api/netstd/index.md @@ -0,0 +1,3 @@ +# NMEAParser API Reference + +Select an API from the menu on the left. diff --git a/docs/api/uwp/index.md b/docs/api/uwp/index.md new file mode 100644 index 0000000..d9154fe --- /dev/null +++ b/docs/api/uwp/index.md @@ -0,0 +1,3 @@ +# NMEAParser API Reference + +Select an API from the menu on the left. diff --git a/docs/concepts/ArcGISRuntime.md b/docs/concepts/ArcGISRuntime.md new file mode 100644 index 0000000..bce0bd5 --- /dev/null +++ b/docs/concepts/ArcGISRuntime.md @@ -0,0 +1,53 @@ +# Creating a location provider for ArcGIS Runtime SDK + +Below is an implementation for use with the [ArcGIS Runtime SDK for .NET](http://developers.arcgis.com/net). Use this location provider on the MapView's LocationDisplay to send it location data from your NMEA device to display your current location on a map. + +**Usage:** +```csharp +NmeaParser.NmeaDevice device = new NmeaParser.NmeaFileDevice("NmeaSampleData.txt"); +mapView.LocationDisplay.LocationProvider = new NmeaLocationProvider(device); +mapView.LocationDisplay.IsEnabled = true; +``` + +**NmeaLocationProvider.cs** +```csharp +using System; +using System.Threading.Tasks; +using Esri.ArcGISRuntime.Geometry; +using Esri.ArcGISRuntime.Location; + +namespace NmeaParser.ArcGIS +{ + public class NmeaLocationProvider : ILocationProvider + { + public event EventHandler LocationChanged; + private readonly NmeaParser.NmeaDevice device; + + public NmeaLocationProvider(NmeaParser.NmeaDevice device) + { + this.device = device; + device.MessageReceived += device_MessageReceived; + } + + void device_MessageReceived(object sender, NmeaParser.NmeaMessageReceivedEventArgs e) + { + var message = e.Message; + if (message is NmeaParser.Messages.Rmc rmc && rmc.Active) + { + LocationChanged?.Invoke(this, new LocationInfo() + { + Course = rmc.Course, + Speed = rmc.Speed, + Location = new MapPoint(rmc.Longitude, rmc.Latitude, SpatialReferences.Wgs84) + }); + } + } + + public Task StartAsync() => device.OpenAsync(); + + public Task StopAsync() => device.CloseAsync(); + } +} + +``` + diff --git a/docs/concepts/BluetoothAndroid.md b/docs/concepts/BluetoothAndroid.md new file mode 100644 index 0000000..f7317d4 --- /dev/null +++ b/docs/concepts/BluetoothAndroid.md @@ -0,0 +1,3 @@ +# Creating a Bluetooth device in an Android app + +TODO... diff --git a/docs/concepts/BluetoothUWP.md b/docs/concepts/BluetoothUWP.md new file mode 100644 index 0000000..1eb661a --- /dev/null +++ b/docs/concepts/BluetoothUWP.md @@ -0,0 +1,34 @@ +# Creating a Bluetooth device in a Windows Universal App + +To use the NMEA Parser against a bluetooth device in a Windows Store or Windows Phone WinRT/Universal App, ensure the bluetooth capability is enabled by opening package.appxmanifest in a text editor, and add the following to the `` section: +```xml + + + + + +``` +See more here on bluetooth device capabilities in WinStore: http://msdn.microsoft.com/en-us/library/windows/apps/dn263090.aspx + +Make sure your Bluetooth device is paired with your Windows Device. + +```csharp +//Get list of devices +string serialDeviceType = RfcommDeviceService.GetDeviceSelector(RfcommServiceId.SerialPort); +var devices = await DeviceInformation.FindAllAsync(serialDeviceType); +//Select device by name (in this case TruePulse 360B Laser Range Finder) +var TruePulse360B = devices.Where(t => t.Name.StartsWith("TP360B-")).FirstOrDefault(); +//Get service +RfcommDeviceService rfcommService = await RfcommDeviceService.FromIdAsync(TruePulse360B.Id); +if (rfcommService != null) +{ + var rangeFinder = new NmeaParser.BluetoothDevice(rfcommService); + rangeFinder.MessageReceived += device_NmeaMessageReceived; + await rangeFinder.OpenAsync(); +} +... +private void device_NmeaMessageReceived(object sender, NmeaParser.NmeaMessageReceivedEventArgs args) +{ + // called when a message is received +} +``` diff --git a/docs/concepts/BluetoothiOS.md b/docs/concepts/BluetoothiOS.md new file mode 100644 index 0000000..5edcffd --- /dev/null +++ b/docs/concepts/BluetoothiOS.md @@ -0,0 +1,3 @@ +# Creating a Bluetooth device in an iOS app + +TODO... diff --git a/docs/concepts/CustomMessages.md b/docs/concepts/CustomMessages.md new file mode 100644 index 0000000..2bd7b21 --- /dev/null +++ b/docs/concepts/CustomMessages.md @@ -0,0 +1,83 @@ +# Creating custom NMEA messages + +Custom NMEA messages can be registered for parsing as well. +To create a new message, add the NmeaMessageType attribute to the class, and declare the 5-character message type. + +*Note: You can use `--` as the first two characters to make it independent of the Talker Type.* + +Next ensure you have a constructor that takes the `TypeName` string parameter first, and a second `string[]` parameter that will contain all the message values: + + +Example: +```cs + [NmeaMessageType("PTEST")] + public class CustomMessage : NmeaMessage + { + public CustomMessage(string type, string[] parameters) : base(type, parameters) + { + Value = parameters[0]; + } + public string Value { get; } + } +``` + +Next register this with the NMEA Parser using either: + +```cs +NmeaMessage.RegisterAssembly(typeof(CustomMessage).Assembly); //Registers all types in the provided assembly +NmeaMessage.RegisterMessage(typeof(CustomMessage).GetTypeInfo()); //Registers a single NMEA message +``` + +Note that these methods will throw if the NMEA type has already been registers (there's an overload where you can declare the `replace` parameter to `true` to overwrite already registered messages. + +Next you should be able to test this method using the Parse method: +```cs +var input = "$PTEST,TEST*7C"; +var msg = NmeaMessage.Parse(input); +``` + +# Creating a multi-sentence message + +A NMEA message cannot exceed 82 characters, so often messages are split into multiple sentences. To create a custom multi message, either implement `IMultiSentenceMessage` or simply subclass `NmeaMultiSentenceMessage`. + + +```cs +[NmeaMessageType("PTST2")] +private class CustomMultiMessage : NmeaMultiSentenceMessage, IMultiSentenceMessage +{ + public CustomMultiMessage(string type, string[] parameters) : base(type, parameters) + { + } + public string Id { get; private set; } + public List Values { get; } = new List(); + // Set index in the message where the total count is: + protected override int MessageCountIndex => 0; + // Set index in the message where the message number is: + protected override int MessageNumberIndex => 1; + protected override bool ParseSentences(Talker talkerType, string[] message) + { + // Ensure this message matches the previous message. + // Use any indicator to detect message difference, so you can to error out and avoid + // appending the wrong message + if (Id == null) + Id = message[2]; //First time it's not set + else if (Id != message[2]) + return false; + Values.AddRange(message.Skip(3)); + return true; + } +} +``` +Note that the message is parsed in the `ParseSentences` method, and not the constructor. Also note that the talkerType is parsed to you, because multi-sentence messages allows a mix of talker types, if you use the `--` prefex in the NMEA type. + +Next we can parse the two messages and have the second one be appended to the first one: + +```cs +NmeaMessage.RegisterNmeaMessage(typeof(CustomMultiMessage).GetTypeInfo()); +var input1 = "$PTST2,2,1,123,A,B,C,D*2A"; +var input2 = "$PTST2,2,2,123,E,F,G,H*21"; +var msg1 = NmeaMessage.Parse(input1); +var msg2 = NmeaMessage.Parse(input2, msg1 as IMultiSentenceMessage); +``` + +If msg1 and msg2 aren't the same instance, it means the message couldn't be added to the previous message, and a new message was generated. \ No newline at end of file diff --git a/docs/concepts/SerialPortNetCore.md b/docs/concepts/SerialPortNetCore.md new file mode 100644 index 0000000..b1c0e0c --- /dev/null +++ b/docs/concepts/SerialPortNetCore.md @@ -0,0 +1,14 @@ +# Creating a Serial Port device in a .NET Core app + +```csharp +var port = new System.IO.Ports.SerialPort("COM3", 9600); //change name and baud rage to match your serial port +var device = new NmeaParser.SerialPortDevice(port); +device.MessageReceived += device_NmeaMessageReceived; +device.OpenAsync(); +... +private void device_NmeaMessageReceived(NmeaParser.NmeaDevice sender, NmeaParser.NmeaMessageReceivedEventArgs args) +{ + // called when a message is received +} +``` + diff --git a/docs/concepts/SerialPortNetFX.md b/docs/concepts/SerialPortNetFX.md new file mode 100644 index 0000000..ca0e769 --- /dev/null +++ b/docs/concepts/SerialPortNetFX.md @@ -0,0 +1,14 @@ +# Creating a Serial Port device in a .NET Framework + +```csharp +var port = new System.IO.Ports.SerialPort("COM3", 9600); //change name and baud rage to match your serial port +var device = new NmeaParser.SerialPortDevice(port); +device.MessageReceived += device_NmeaMessageReceived; +device.OpenAsync(); +... +private void device_NmeaMessageReceived(NmeaParser.NmeaDevice sender, NmeaParser.NmeaMessageReceivedEventArgs args) +{ + // called when a message is received +} +``` + diff --git a/docs/concepts/SerialPortUWP.md b/docs/concepts/SerialPortUWP.md new file mode 100644 index 0000000..f42294c --- /dev/null +++ b/docs/concepts/SerialPortUWP.md @@ -0,0 +1,32 @@ +# Creating a Serial Port device in a Windows Universal app + +To use the NMEA Parser against a serial device in a Windows 10 Universal app, ensure the serial device capability is enabled by opening package.appxmanifest in a text editor, and add the following to the `` section: +```xml + + + + + +``` + +```csharp +var selector = SerialDevice.GetDeviceSelector("COM3"); //Get the serial port on port '3' +var devices = await DeviceInformation.FindAllAsync(selector); +if(devices.Any()) //if the device is found +{ + var deviceInfo = devices.First(); + var serialDevice = await SerialDevice.FromIdAsync(deviceInfo.Id); + //Set up serial device according to device specifications: + //This might differ from device to device + serialDevice.BaudRate = 4800; + serialDevice.DataBits = 8; + serialDevice.Parity = SerialParity.None; + var device = new NmeaParser.SerialPortDevice(serialDevice); + device.MessageReceived += device_NmeaMessageReceived; +} +... +private void device_NmeaMessageReceived(NmeaParser.NmeaDevice sender, NmeaMessageReceivedEventArgs args) +{ + // called when a message is received +} +``` diff --git a/docs/concepts/index.md b/docs/concepts/index.md new file mode 100644 index 0000000..5fdcbb8 --- /dev/null +++ b/docs/concepts/index.md @@ -0,0 +1,30 @@ +# Getting started: + +### 1. Install from NuGET: + +You can get the library via [NuGet](http://www.nuget.org) if you have the extension installed for Visual Studio or via the PowerShell package manager. This control is published via NuGet at [SharpGIS.NmeaParser](https://nuget.org/packages/SharpGIS.NmeaParser). + + +
+ PM> Install-Package SharpGIS.NmeaParser +
+ +### 2. Create a new device: + +```cs + // Create one of the NMEA devices + var device = new NmeaFileDevice("PathToNmeaLogFile.txt", 1000); + // Listen to messages from the device: + device.MessageReceived += device_NmeaMessageReceived; + // Open the device and start receiving: + device.OpenAsync(); + + // Create event handler for receiving messages: + private void device_NmeaMessageReceived(NmeaDevice sender, NmeaMessageReceivedEventArgs args) + { + // called when a message is received + } +``` +See the Platform specific device creation section in the menu for more specifics on device creation. + +### 3. [Browse the API Reference](api/index.html) \ No newline at end of file diff --git a/docs/concepts/toc.yml b/docs/concepts/toc.yml new file mode 100644 index 0000000..5ace088 --- /dev/null +++ b/docs/concepts/toc.yml @@ -0,0 +1,30 @@ +- name: Getting Started + href: index.md +- name: Platform specific device creation + items: + - name: .NET Framework + items: + - name: SerialPort + href: SerialPortNetFX.md + - name: .NET Framework + items: + - name: SerialPort + href: SerialPortNetCore.md + - name: UWP + items: + - name: SerialPort + href: SerialPortUWP.md + - name: Bluetooth + href: BluetoothUWP.md + - name: Android + items: + - name: Bluetooth + href: BluetoothAndroid.md + - name: iOS + items: + - name: Bluetooth + href: BluetoothiOS.md +- name: Custom message types + href: CustomMessages.md +- name: Creating a location provider for ArcGIS Runtime SDK + href: ArcGISRuntime.md \ No newline at end of file diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..6b4376b --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,131 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ "NmeaParser/NmeaParser.csproj" ], + "src" : "../src/" + }, + ], + "dest": "../artifacts/docs/api/netstd", + "properties": { "TargetFramework": "netstandard1.4" }, + "disableGitFeatures": false, + "disableDefaultFilter": false + }, + { "src": [ + { + "files": [ "NmeaParser/NmeaParser.csproj" ], + "src" : "../src/" + }, + ], + "dest": "../artifacts/docs/api/netfx", + "properties": { "TargetFramework": "net451" }, + "disableGitFeatures": false, + "disableDefaultFilter": false + }, + { "src": [ + { + "files": [ "NmeaParser/NmeaParser.csproj" ], + "src" : "../src/" + }, + ], + "dest": "../artifacts/docs/api/netcore", + "properties": { "TargetFramework": "netcoreapp2.1" }, + "disableGitFeatures": false, + "disableDefaultFilter": false + }, + { "src": [ + { + "files": [ "NmeaParser/NmeaParser.csproj" ], + "src" : "../src/" + }, + ], + "dest": "../artifacts/docs/api/android", + "properties": { "TargetFramework": "monoandroid70" }, + "disableGitFeatures": false, + "disableDefaultFilter": false + }, + { "src": [ + { + "files": [ "NmeaParser/NmeaParser.csproj" ], + "src" : "../src/" + }, + ], + "dest": "../artifacts/docs/api/ios", + "properties": { "TargetFramework": "xamarinios10" }, + "disableGitFeatures": false, + "disableDefaultFilter": false + }, + { "src": [ + { + "files": [ "NmeaParser/NmeaParser.csproj" ], + "src" : "../src/" + }, + ], + "dest": "../artifacts/docs/api/uwp", + "properties": { "TargetFramework": "uap10.0.16299" }, + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**/index.md" + ] + }, + { + "files": [ + "api/**.yml", + "api/**/toc.yml" + ], + "src" : "../artifacts/docs" + }, + { + "files": [ + "concepts/**.md", + "concepts/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + }, + { + "files": [ + "api/omd.html" + ], + "src" : "../artifacts/docs" + } + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "../artifacts/docs_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..96ee583 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,21 @@ +# NMEA Parser + +Library for reading and parsing NMEA data message streams. It makes it easy to connect and listen for NMEA messages +coming from various devices in Windows Universal, Windows Desktop/.NET and Windows Universal apps as well +as Xamarin for iOS and Android. + + +## Sponsoring + +If you like this library and use it a lot, consider sponsoring me. Anything helps and encourages me to keep going. + +See here for details: https://github.com/sponsors/dotMorten + + +## Getting started: + +Read the [Getting Started](concepts/index.html) notes + + +![sampleapp2](https://cloud.githubusercontent.com/assets/1378165/5062460/10cc3064-6d77-11e4-8365-1e9c7c346afc.png) +![sampleapp3](https://cloud.githubusercontent.com/assets/1378165/5062461/123adfc2-6d77-11e4-8573-1fe95fa0325f.png) \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..e799097 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,10 @@ +- name: Features + href: Features.md +- name: Getting Started + href: concepts/index.md +- name: API Reference + href: api/index.md +- name: Sponsor NMEA Parser + href: https://github.com/sponsors/dotMorten +- name: GitHub + href: https://github.com/dotMorten/NmeaParser From d8be33581db4cadecb26644be545fb78540a10eb Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Sun, 19 Jan 2020 18:36:14 -0800 Subject: [PATCH 2/3] Move the docs folder to docfx --- build/GenerateDoc.cmd | 4 ++-- {docs => docfx}/.gitignore | 0 {docs => docfx}/Features.md | 0 {docs => docfx}/api/android/index.md | 0 {docs => docfx}/api/index.md | 0 {docs => docfx}/api/ios/index.md | 0 {docs => docfx}/api/netcore/index.md | 0 {docs => docfx}/api/netfx/index.md | 0 {docs => docfx}/api/netstd/index.md | 0 {docs => docfx}/api/uwp/index.md | 0 {docs => docfx}/concepts/ArcGISRuntime.md | 0 {docs => docfx}/concepts/BluetoothAndroid.md | 0 {docs => docfx}/concepts/BluetoothUWP.md | 0 {docs => docfx}/concepts/BluetoothiOS.md | 0 {docs => docfx}/concepts/CustomMessages.md | 0 {docs => docfx}/concepts/SerialPortNetCore.md | 0 {docs => docfx}/concepts/SerialPortNetFX.md | 0 {docs => docfx}/concepts/SerialPortUWP.md | 0 {docs => docfx}/concepts/index.md | 0 {docs => docfx}/concepts/toc.yml | 0 {docs => docfx}/docfx.json | 0 {docs => docfx}/index.md | 0 {docs => docfx}/toc.yml | 0 23 files changed, 2 insertions(+), 2 deletions(-) rename {docs => docfx}/.gitignore (100%) rename {docs => docfx}/Features.md (100%) rename {docs => docfx}/api/android/index.md (100%) rename {docs => docfx}/api/index.md (100%) rename {docs => docfx}/api/ios/index.md (100%) rename {docs => docfx}/api/netcore/index.md (100%) rename {docs => docfx}/api/netfx/index.md (100%) rename {docs => docfx}/api/netstd/index.md (100%) rename {docs => docfx}/api/uwp/index.md (100%) rename {docs => docfx}/concepts/ArcGISRuntime.md (100%) rename {docs => docfx}/concepts/BluetoothAndroid.md (100%) rename {docs => docfx}/concepts/BluetoothUWP.md (100%) rename {docs => docfx}/concepts/BluetoothiOS.md (100%) rename {docs => docfx}/concepts/CustomMessages.md (100%) rename {docs => docfx}/concepts/SerialPortNetCore.md (100%) rename {docs => docfx}/concepts/SerialPortNetFX.md (100%) rename {docs => docfx}/concepts/SerialPortUWP.md (100%) rename {docs => docfx}/concepts/index.md (100%) rename {docs => docfx}/concepts/toc.yml (100%) rename {docs => docfx}/docfx.json (100%) rename {docs => docfx}/index.md (100%) rename {docs => docfx}/toc.yml (100%) diff --git a/build/GenerateDoc.cmd b/build/GenerateDoc.cmd index 3915b5b..07fbf0b 100644 --- a/build/GenerateDoc.cmd +++ b/build/GenerateDoc.cmd @@ -7,7 +7,7 @@ REM Download DocFx powershell -ExecutionPolicy ByPass -command "./DownloadDocFX.ps1" -Version %DocFXVersion% -Folder %DocFxFolder% REM Build metadata for all platforms (uses configuration in docfx.json in this folder) -%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docs\docfx.json metadata +%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docfx\docfx.json metadata REM Merge output (not implemented) REM %DocFxFolder%\v%DocFXVersion%\docfx.exe merge @@ -17,4 +17,4 @@ dotnet tool install --global dotMorten.OmdGenerator generateomd /source=../src/NmeaParser /output=../artifacts/docs/api/omd.html REM Build the output site (HTML) from the generated metadata and input files (uses configuration in docfx.json in this folder) -%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docs\docfx.json build +%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docfx\docfx.json build diff --git a/docs/.gitignore b/docfx/.gitignore similarity index 100% rename from docs/.gitignore rename to docfx/.gitignore diff --git a/docs/Features.md b/docfx/Features.md similarity index 100% rename from docs/Features.md rename to docfx/Features.md diff --git a/docs/api/android/index.md b/docfx/api/android/index.md similarity index 100% rename from docs/api/android/index.md rename to docfx/api/android/index.md diff --git a/docs/api/index.md b/docfx/api/index.md similarity index 100% rename from docs/api/index.md rename to docfx/api/index.md diff --git a/docs/api/ios/index.md b/docfx/api/ios/index.md similarity index 100% rename from docs/api/ios/index.md rename to docfx/api/ios/index.md diff --git a/docs/api/netcore/index.md b/docfx/api/netcore/index.md similarity index 100% rename from docs/api/netcore/index.md rename to docfx/api/netcore/index.md diff --git a/docs/api/netfx/index.md b/docfx/api/netfx/index.md similarity index 100% rename from docs/api/netfx/index.md rename to docfx/api/netfx/index.md diff --git a/docs/api/netstd/index.md b/docfx/api/netstd/index.md similarity index 100% rename from docs/api/netstd/index.md rename to docfx/api/netstd/index.md diff --git a/docs/api/uwp/index.md b/docfx/api/uwp/index.md similarity index 100% rename from docs/api/uwp/index.md rename to docfx/api/uwp/index.md diff --git a/docs/concepts/ArcGISRuntime.md b/docfx/concepts/ArcGISRuntime.md similarity index 100% rename from docs/concepts/ArcGISRuntime.md rename to docfx/concepts/ArcGISRuntime.md diff --git a/docs/concepts/BluetoothAndroid.md b/docfx/concepts/BluetoothAndroid.md similarity index 100% rename from docs/concepts/BluetoothAndroid.md rename to docfx/concepts/BluetoothAndroid.md diff --git a/docs/concepts/BluetoothUWP.md b/docfx/concepts/BluetoothUWP.md similarity index 100% rename from docs/concepts/BluetoothUWP.md rename to docfx/concepts/BluetoothUWP.md diff --git a/docs/concepts/BluetoothiOS.md b/docfx/concepts/BluetoothiOS.md similarity index 100% rename from docs/concepts/BluetoothiOS.md rename to docfx/concepts/BluetoothiOS.md diff --git a/docs/concepts/CustomMessages.md b/docfx/concepts/CustomMessages.md similarity index 100% rename from docs/concepts/CustomMessages.md rename to docfx/concepts/CustomMessages.md diff --git a/docs/concepts/SerialPortNetCore.md b/docfx/concepts/SerialPortNetCore.md similarity index 100% rename from docs/concepts/SerialPortNetCore.md rename to docfx/concepts/SerialPortNetCore.md diff --git a/docs/concepts/SerialPortNetFX.md b/docfx/concepts/SerialPortNetFX.md similarity index 100% rename from docs/concepts/SerialPortNetFX.md rename to docfx/concepts/SerialPortNetFX.md diff --git a/docs/concepts/SerialPortUWP.md b/docfx/concepts/SerialPortUWP.md similarity index 100% rename from docs/concepts/SerialPortUWP.md rename to docfx/concepts/SerialPortUWP.md diff --git a/docs/concepts/index.md b/docfx/concepts/index.md similarity index 100% rename from docs/concepts/index.md rename to docfx/concepts/index.md diff --git a/docs/concepts/toc.yml b/docfx/concepts/toc.yml similarity index 100% rename from docs/concepts/toc.yml rename to docfx/concepts/toc.yml diff --git a/docs/docfx.json b/docfx/docfx.json similarity index 100% rename from docs/docfx.json rename to docfx/docfx.json diff --git a/docs/index.md b/docfx/index.md similarity index 100% rename from docs/index.md rename to docfx/index.md diff --git a/docs/toc.yml b/docfx/toc.yml similarity index 100% rename from docs/toc.yml rename to docfx/toc.yml From 52b90b2f45428c270e6b1fcef53d6c33b0d9ac7a Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Sun, 19 Jan 2020 18:50:47 -0800 Subject: [PATCH 3/3] Revert "Move the docs folder to docfx" This reverts commit d8be33581db4cadecb26644be545fb78540a10eb. --- build/GenerateDoc.cmd | 4 ++-- {docfx => docs}/.gitignore | 0 {docfx => docs}/Features.md | 0 {docfx => docs}/api/android/index.md | 0 {docfx => docs}/api/index.md | 0 {docfx => docs}/api/ios/index.md | 0 {docfx => docs}/api/netcore/index.md | 0 {docfx => docs}/api/netfx/index.md | 0 {docfx => docs}/api/netstd/index.md | 0 {docfx => docs}/api/uwp/index.md | 0 {docfx => docs}/concepts/ArcGISRuntime.md | 0 {docfx => docs}/concepts/BluetoothAndroid.md | 0 {docfx => docs}/concepts/BluetoothUWP.md | 0 {docfx => docs}/concepts/BluetoothiOS.md | 0 {docfx => docs}/concepts/CustomMessages.md | 0 {docfx => docs}/concepts/SerialPortNetCore.md | 0 {docfx => docs}/concepts/SerialPortNetFX.md | 0 {docfx => docs}/concepts/SerialPortUWP.md | 0 {docfx => docs}/concepts/index.md | 0 {docfx => docs}/concepts/toc.yml | 0 {docfx => docs}/docfx.json | 0 {docfx => docs}/index.md | 0 {docfx => docs}/toc.yml | 0 23 files changed, 2 insertions(+), 2 deletions(-) rename {docfx => docs}/.gitignore (100%) rename {docfx => docs}/Features.md (100%) rename {docfx => docs}/api/android/index.md (100%) rename {docfx => docs}/api/index.md (100%) rename {docfx => docs}/api/ios/index.md (100%) rename {docfx => docs}/api/netcore/index.md (100%) rename {docfx => docs}/api/netfx/index.md (100%) rename {docfx => docs}/api/netstd/index.md (100%) rename {docfx => docs}/api/uwp/index.md (100%) rename {docfx => docs}/concepts/ArcGISRuntime.md (100%) rename {docfx => docs}/concepts/BluetoothAndroid.md (100%) rename {docfx => docs}/concepts/BluetoothUWP.md (100%) rename {docfx => docs}/concepts/BluetoothiOS.md (100%) rename {docfx => docs}/concepts/CustomMessages.md (100%) rename {docfx => docs}/concepts/SerialPortNetCore.md (100%) rename {docfx => docs}/concepts/SerialPortNetFX.md (100%) rename {docfx => docs}/concepts/SerialPortUWP.md (100%) rename {docfx => docs}/concepts/index.md (100%) rename {docfx => docs}/concepts/toc.yml (100%) rename {docfx => docs}/docfx.json (100%) rename {docfx => docs}/index.md (100%) rename {docfx => docs}/toc.yml (100%) diff --git a/build/GenerateDoc.cmd b/build/GenerateDoc.cmd index 07fbf0b..3915b5b 100644 --- a/build/GenerateDoc.cmd +++ b/build/GenerateDoc.cmd @@ -7,7 +7,7 @@ REM Download DocFx powershell -ExecutionPolicy ByPass -command "./DownloadDocFX.ps1" -Version %DocFXVersion% -Folder %DocFxFolder% REM Build metadata for all platforms (uses configuration in docfx.json in this folder) -%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docfx\docfx.json metadata +%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docs\docfx.json metadata REM Merge output (not implemented) REM %DocFxFolder%\v%DocFXVersion%\docfx.exe merge @@ -17,4 +17,4 @@ dotnet tool install --global dotMorten.OmdGenerator generateomd /source=../src/NmeaParser /output=../artifacts/docs/api/omd.html REM Build the output site (HTML) from the generated metadata and input files (uses configuration in docfx.json in this folder) -%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docfx\docfx.json build +%DocFxFolder%\v%DocFXVersion%\docfx.exe ..\docs\docfx.json build diff --git a/docfx/.gitignore b/docs/.gitignore similarity index 100% rename from docfx/.gitignore rename to docs/.gitignore diff --git a/docfx/Features.md b/docs/Features.md similarity index 100% rename from docfx/Features.md rename to docs/Features.md diff --git a/docfx/api/android/index.md b/docs/api/android/index.md similarity index 100% rename from docfx/api/android/index.md rename to docs/api/android/index.md diff --git a/docfx/api/index.md b/docs/api/index.md similarity index 100% rename from docfx/api/index.md rename to docs/api/index.md diff --git a/docfx/api/ios/index.md b/docs/api/ios/index.md similarity index 100% rename from docfx/api/ios/index.md rename to docs/api/ios/index.md diff --git a/docfx/api/netcore/index.md b/docs/api/netcore/index.md similarity index 100% rename from docfx/api/netcore/index.md rename to docs/api/netcore/index.md diff --git a/docfx/api/netfx/index.md b/docs/api/netfx/index.md similarity index 100% rename from docfx/api/netfx/index.md rename to docs/api/netfx/index.md diff --git a/docfx/api/netstd/index.md b/docs/api/netstd/index.md similarity index 100% rename from docfx/api/netstd/index.md rename to docs/api/netstd/index.md diff --git a/docfx/api/uwp/index.md b/docs/api/uwp/index.md similarity index 100% rename from docfx/api/uwp/index.md rename to docs/api/uwp/index.md diff --git a/docfx/concepts/ArcGISRuntime.md b/docs/concepts/ArcGISRuntime.md similarity index 100% rename from docfx/concepts/ArcGISRuntime.md rename to docs/concepts/ArcGISRuntime.md diff --git a/docfx/concepts/BluetoothAndroid.md b/docs/concepts/BluetoothAndroid.md similarity index 100% rename from docfx/concepts/BluetoothAndroid.md rename to docs/concepts/BluetoothAndroid.md diff --git a/docfx/concepts/BluetoothUWP.md b/docs/concepts/BluetoothUWP.md similarity index 100% rename from docfx/concepts/BluetoothUWP.md rename to docs/concepts/BluetoothUWP.md diff --git a/docfx/concepts/BluetoothiOS.md b/docs/concepts/BluetoothiOS.md similarity index 100% rename from docfx/concepts/BluetoothiOS.md rename to docs/concepts/BluetoothiOS.md diff --git a/docfx/concepts/CustomMessages.md b/docs/concepts/CustomMessages.md similarity index 100% rename from docfx/concepts/CustomMessages.md rename to docs/concepts/CustomMessages.md diff --git a/docfx/concepts/SerialPortNetCore.md b/docs/concepts/SerialPortNetCore.md similarity index 100% rename from docfx/concepts/SerialPortNetCore.md rename to docs/concepts/SerialPortNetCore.md diff --git a/docfx/concepts/SerialPortNetFX.md b/docs/concepts/SerialPortNetFX.md similarity index 100% rename from docfx/concepts/SerialPortNetFX.md rename to docs/concepts/SerialPortNetFX.md diff --git a/docfx/concepts/SerialPortUWP.md b/docs/concepts/SerialPortUWP.md similarity index 100% rename from docfx/concepts/SerialPortUWP.md rename to docs/concepts/SerialPortUWP.md diff --git a/docfx/concepts/index.md b/docs/concepts/index.md similarity index 100% rename from docfx/concepts/index.md rename to docs/concepts/index.md diff --git a/docfx/concepts/toc.yml b/docs/concepts/toc.yml similarity index 100% rename from docfx/concepts/toc.yml rename to docs/concepts/toc.yml diff --git a/docfx/docfx.json b/docs/docfx.json similarity index 100% rename from docfx/docfx.json rename to docs/docfx.json diff --git a/docfx/index.md b/docs/index.md similarity index 100% rename from docfx/index.md rename to docs/index.md diff --git a/docfx/toc.yml b/docs/toc.yml similarity index 100% rename from docfx/toc.yml rename to docs/toc.yml