### Example Usage Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.BluetoothDevice.html Example of how to connect to a Bluetooth device and receive NMEA messages. ```APIDOC ```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 } ``` ``` -------------------------------- ### EAAccessoryDevice Configuration Example Source: https://dotmorten.github.io/NmeaParser/api/ios/NmeaParser.EAAccessoryDevice.html Example of how to initialize, open, and send a configuration command to a Bad Elf GPS receiver. ```APIDOC ```csharp var device = new EAAccessoryDevice(accessory, "com.bad-elf.gps"); await device.OpenAsync(); // BadElf start packet. // See https://github.com/BadElf/gps-sdk/blob/master/README.md#extended-nmea-sentences-with-gsa-and-gsv-satellite-data-and-dop-values byte[] startPacket = new byte[] { 0x24, 0xbe, 0x00, 0x11, 0x16, 0x01, 0x02, 0xf4, 0x31, 0x0a, 0x32, 0x04, 0x33, 0x02, 0x5a, 0x0d, 0x0a }; await device.WriteAsync(startPacket, 0, startPacket.Length); ``` ``` -------------------------------- ### Info.plist Configuration Example Source: https://dotmorten.github.io/NmeaParser/api/ios/NmeaParser.EAAccessoryDevice.GetDevices.html This example shows how to configure the Info.plist file to enable specific EAAccessory devices. Only devices listed here will be recognized by the system. ```xml UISupportedExternalAccessoryProtocols com.bad-elf.gps ``` -------------------------------- ### Install NmeaParser via NuGet Source: https://dotmorten.github.io/NmeaParser/concepts/index.html Use this command in the Package Manager Console to install the NmeaParser library. ```powershell PM> Install-Package SharpGIS.NmeaParser ``` -------------------------------- ### Install OmdGenerator Tool Source: https://dotmorten.github.io/NmeaParser/api/omd.html Installs the dotMorten.OmdGenerator tool globally using the .NET CLI. This command is required before running the generation command. ```bash dotnet tool install --global dotMorten.OmdGenerator ``` -------------------------------- ### Get NMEA Message Type Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Messages.NmeaMessageTypeAttribute.NmeaType.html Use this property to get the string representation of the NMEA message type. Special handling is required if the type name starts with '--', as this signifies applicability to all talker types. ```csharp public string NmeaType { get; } ``` -------------------------------- ### NmeaType Property Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Messages.NmeaMessageTypeAttribute.NmeaType.html Gets the NMEA message type name. If the type name starts with '--', this message can apply to all talker types. ```APIDOC ## Property: NmeaType ### Description Gets the NMEA message type name. If the type name starts with '--', this message can apply to all talker types. ### Declaration ```csharp public string NmeaType { get; } ``` ### Property Value - **Type**: string - **Description**: The NMEA message type name. ``` -------------------------------- ### Initialize and Use SerialPortDevice Source: https://dotmorten.github.io/NmeaParser/api/uwp/NmeaParser.SerialPortDevice.html This example demonstrates how to find a serial device, configure its properties, and initialize the SerialPortDevice. It also shows how to subscribe to the MessageReceived event. ```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 } ``` -------------------------------- ### Client Constructor (host, port, username, password) Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.Ntrip.Client.-ctor.html Initializes a new instance of the Client class with host, port, username, and password. ```APIDOC ## Client(string host, int port, string? username, string? password) ### Description Initializes a new instance of the Client class. ### Parameters #### Path Parameters - **host** (string) - Required - Host name - **port** (int) - Required - Port, usually 2101 - **username** (string?) - Optional - Username - **password** (string?) - Optional - Password ``` -------------------------------- ### Get SatellitesInView Count Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.GnssMonitor.SatellitesInView.html Access the SatellitesInView property to get the number of satellites in view. This is a read-only property. ```csharp public int SatellitesInView { get; } ``` -------------------------------- ### Client Constructor (Host and Port) Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.Ntrip.Client.-ctor.html Initializes a new instance of the Client class with the specified host and port. Use this when no authentication is required. ```csharp public Client(string host, int port) ``` -------------------------------- ### Client Constructor (Host, Port, Username, Password) Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.Ntrip.Client.-ctor.html Initializes a new instance of the Client class with host, port, and optional username and password. Use this for authenticated NTRIP connections. ```csharp public Client(string host, int port, string? username, string? password) ``` -------------------------------- ### Get NMEA File Name Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaFileDevice.FileName.html Access the FileName property to get the name of the NMEA file. This property is read-only. ```csharp public string FileName { get; } ``` -------------------------------- ### GeoidHeight Property Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.GnssMonitor.GeoidHeight.html Gets the Geoid Height. Add this value to Altitude to get the Geoid heights which is roughly MSL heights. ```APIDOC ## Property GeoidHeight ### Description Gets the Geoid Height. Add this value to Altitude to get the Geoid heights which is roughly MSL heights. ### Declaration ```csharp public double GeoidHeight { get; } ``` ### Property Value Type | Description ---|--- double | ``` -------------------------------- ### Client Constructor (host, port) Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.Ntrip.Client.-ctor.html Initializes a new instance of the Client class with the specified host and port. ```APIDOC ## Client(string host, int port) ### Description Initializes a new instance of the Client class. ### Parameters #### Path Parameters - **host** (string) - Required - Host name - **port** (int) - Required - Port, usually 2101 ``` -------------------------------- ### Constructors Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaFileDevice.html Initializes a new instance of the NmeaFileDevice class with a specified file path and optional buffer size. ```APIDOC ## Constructors ### NmeaFileDevice(string fileName) Initializes a new instance of the NmeaFileDevice class with the specified file name. ### NmeaFileDevice(string fileName, int bufferSize) Initializes a new instance of the NmeaFileDevice class with the specified file name and buffer size. ``` -------------------------------- ### Connect to a Bluetooth NMEA Device Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.BluetoothDevice.html This example demonstrates how to find a specific Bluetooth device by its name, retrieve its service, instantiate a BluetoothDevice, and connect to it. Ensure the MessageReceived event handler is set up to process incoming NMEA messages. ```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 } ``` -------------------------------- ### NtripStream.Format Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Gnss.Ntrip.NtripStream.Format.html Gets the stream format. ```APIDOC ## Property Format ### Description Gets the stream format. ### Declaration ```csharp public string Format { get; } ``` ### Property Value Type | Description ---|--- string | ``` -------------------------------- ### Constructors Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.NmeaFileDevice.html Initializes a new instance of the NmeaFileDevice class. ```APIDOC ## NmeaFileDevice Constructors ### NmeaFileDevice(string fileName) Initializes a new instance of the NmeaFileDevice class with the specified file name. ### NmeaFileDevice(string fileName, int bufferSize) Initializes a new instance of the NmeaFileDevice class with the specified file name and buffer size. ``` -------------------------------- ### Message Property Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.NmeaMessageReceivedEventArgs.Message.html Gets the nmea message. ```APIDOC ## Message Property ### Description Gets the nmea message. ### Declaration ```csharp public NmeaMessage Message { get; } ``` ### Property Value - **Type**: NmeaMessage - **Description**: The nmea message. ``` -------------------------------- ### NmeaFileDevice(IStorageFile) Source: https://dotmorten.github.io/NmeaParser/api/uwp/NmeaParser.NmeaFileDevice.-ctor.html Initializes a new instance of the NmeaFileDevice class using an IStorageFile object. ```APIDOC ## NmeaFileDevice(IStorageFile) ### Description Initializes a new instance of the NmeaFileDevice class. ### Parameters #### Path Parameters - **storageFile** (IStorageFile) - Description: The storage file object. ``` -------------------------------- ### DestinationLatitude Property Source: https://dotmorten.github.io/NmeaParser/api/netstd/NmeaParser.Messages.Rmb.DestinationLatitude.html Gets the destination latitude. ```APIDOC ## Property DestinationLatitude ### Description Gets the destination latitude. ### Declaration ```csharp public double DestinationLatitude { get; } ``` ### Property Value - **Type**: `double` - **Description**: The latitude of the destination waypoint. ``` -------------------------------- ### RouteId Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Messages.Rte.RouteId.html Gets the route identifier. ```APIDOC ## RouteId Property ### Description Gets the route identifier. ### Declaration ```csharp public string RouteId { get; } ``` ### Property Value Type | Description ---|--- string | ### Applies to Platforms and versions Target| Versions ---|--- **.NET Standard 2.0**| main, v3.0, v2.2, v2.1, v2.0 **.NET**| main, v3.0 **.NET Windows**| main, v3.0 **.NET Android**| main, v3.0 **.NET iOS**| main, v3.0 **.NET Framework**| main, v3.0, v2.2, v2.1, v2.0 **UWP**| main, v3.0, v2.2, v2.1, v2.0 **Xamarin.Android**| v2.2, v2.1, v2.0 **Xamarin.iOS**| v2.2, v2.1, v2.0 ``` -------------------------------- ### Connecting to a Serial Device Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.WinRTSerialDevice.html This example demonstrates how to find and connect to a serial device using its COM port, configure its properties, and attach a message received event handler. ```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; } ``` ```csharp private void device_NmeaMessageReceived(NmeaParser.NmeaDevice sender, NmeaMessageReceivedEventArgs args) { // called when a message is received } ``` -------------------------------- ### SystemNmeaDevice Constructor Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.SystemNmeaDevice.-ctor.html Initializes a new instance of the SystemNmeaDevice class with the provided Context. ```APIDOC ## SystemNmeaDevice(Context) ### Description Initializes a new instance of the SystemNmeaDevice class. ### Method Constructor ### Parameters #### Path Parameters - **context** (Context) - Description: The Android Context required for device operations. ``` -------------------------------- ### DestinationLongitude Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Messages.Rmb.DestinationLongitude.html Gets the destination longitude. ```APIDOC ## Property DestinationLongitude ### Description Gets the destination longitude. ### Declaration ```csharp public double DestinationLongitude { get; } ``` ### Property Value | Type | Description | | ------ | ----------- | | double | | ``` -------------------------------- ### Constructors Source: https://dotmorten.github.io/NmeaParser/api/uwp/NmeaParser.NmeaFileDevice.html Initializes a new instance of the NmeaFileDevice class with various parameters. ```APIDOC ## Constructors ### NmeaFileDevice(string fileName) Initializes a new instance of the NmeaFileDevice class with the specified file name. ### NmeaFileDevice(string fileName, int bufferSize) Initializes a new instance of the NmeaFileDevice class with the specified file name and buffer size. ### NmeaFileDevice(IStorageFile storageFile) Initializes a new instance of the NmeaFileDevice class with the specified storage file. ### NmeaFileDevice(IStorageFile storageFile, int bufferSize) Initializes a new instance of the NmeaFileDevice class with the specified storage file and buffer size. ``` -------------------------------- ### HorizontalVector Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Messages.LaserRangeMessage.HorizontalVector.html Gets the horizontal vector. ```APIDOC ## HorizontalVector Property ### Description Gets the horizontal vector. ### Declaration ```csharp public string HorizontalVector { get; } ``` ### Property Value - **Type**: string - **Description**: ``` -------------------------------- ### Network Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Gnss.Ntrip.NtripStream.Network.html Gets the network for the stream. ```APIDOC ## Network Property ### Description Gets the network for the stream. ### Declaration ```csharp public string Network { get; } ``` ### Property Value Type | Description ---|--- string | ### Applies to Platforms and versions Target| Versions ---|--- **.NET Standard 2.0**| main, v3.0, v2.2, v2.1 **.NET**| main, v3.0 **.NET Windows**| main, v3.0 **.NET Android**| main, v3.0 **.NET iOS**| main, v3.0 **.NET Framework**| main, v3.0, v2.2, v2.1 **UWP**| main, v3.0, v2.2, v2.1 **Xamarin.Android**| v2.2, v2.1 **Xamarin.iOS**| v2.2, v2.1 ``` -------------------------------- ### SystemNmeaDevice Constructors Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.SystemNmeaDevice.html Initializes a new instance of the SystemNmeaDevice class. ```APIDOC ## SystemNmeaDevice(Context) ### Description Initializes a new instance of the SystemNmeaDevice class. ### Parameters #### Path Parameters - **context** (Context) - Required - The Android context to access location services. ``` -------------------------------- ### NmeaFileDevice(string fileName) Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaFileDevice.-ctor.html Initializes a new instance of the NmeaFileDevice class with the specified file name. ```APIDOC ## NmeaFileDevice(string fileName) ### Description Initializes a new instance of the NmeaFileDevice class. ### Method Constructor ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA file to be read. ### Applies to Platforms and versions: - .NET Standard 2.0 - .NET - .NET Windows - .NET Android - .NET iOS - .NET Framework - UWP - Xamarin.Android - Xamarin.iOS ``` -------------------------------- ### Identifier Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Gnss.Ntrip.Caster.Identifier.html Gets the caster identifier. ```APIDOC ## Identifier Property ### Description Gets the caster identifier. ### Declaration ```csharp public string Identifier { get; } ``` ### Property Value Type | Description ---|--- string | ``` -------------------------------- ### HorizontalAngle Property Source: https://dotmorten.github.io/NmeaParser/api/net/NmeaParser.Messages.LaserRangeMessage.HorizontalAngle.html Gets the horizontal angle. ```APIDOC ## HorizontalAngle Property ### Description Gets the horizontal angle. ### Declaration ```csharp public double HorizontalAngle { get; } ``` ### Property Value | Type | Description | |--------|-------------| | double | | ``` -------------------------------- ### Client Constructors Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.Ntrip.Client.html Initializes a new instance of the Client class for connecting to an NTRIP server. ```APIDOC ## Client Constructors ### Client(string host, int port) Initializes a new instance of the Client class with the specified host and port. ### Client(string host, int port, string? username, string? password) Initializes a new instance of the Client class with the specified host, port, username, and password. ``` -------------------------------- ### Connecting to a Serial Port with SerialPortDevice Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.SerialPortDevice.html Example of how to connect to a serial port, instantiate SerialPortDevice, and subscribe to message events. Ensure the port name and baud rate match your device's configuration. ```csharp string portname = "COM3"; // Change to match the name of the port your device is connected to int baudrate = 9600; // Change to the baud rate your device communicates at (usually specified in the manual) var port = new System.IO.Ports.SerialPort(portname, baudrate); var device = new NmeaParser.SerialPortDevice(port); device.MessageReceived += OnNmeaMessageReceived; device.OpenAsync(); ... private void OnNmeaMessageReceived(NmeaParser.NmeaDevice sender, NmeaParser.NmeaMessageReceivedEventArgs args) { // called when a message is received } ``` -------------------------------- ### Operator Property Source: https://dotmorten.github.io/NmeaParser/api/net/NmeaParser.Gnss.Ntrip.Caster.Operator.html Gets the caster operator. ```APIDOC ## Operator Property ### Description Gets the caster operator. ### Declaration ```csharp public string Operator { get; } ``` ### Property Value - **Type**: string - **Description**: ``` -------------------------------- ### NmeaFileDevice(IStorageFile, int) Source: https://dotmorten.github.io/NmeaParser/api/uwp/NmeaParser.NmeaFileDevice.-ctor.html Initializes a new instance of the NmeaFileDevice class using an IStorageFile object and a read speed. ```APIDOC ## NmeaFileDevice(IStorageFile, int) ### Description Initializes a new instance of the NmeaFileDevice class. ### Parameters #### Path Parameters - **storageFile** (IStorageFile) - Description: The storage file object. - **readSpeed** (int) - Description: The time to wait between each group of lines being read in milliseconds. ``` -------------------------------- ### Format Property Source: https://dotmorten.github.io/NmeaParser/api/ios/NmeaParser.Gnss.Ntrip.NtripStream.Format.html Gets the stream format. ```APIDOC ## Format Property ### Description Gets the stream format. ### Declaration ```csharp public string Format { get; } ``` ### Property Value Type | Description ---|--- string | ### Applies to Platforms and versions: Target| Versions ---|--- .NET Standard 2.0| main, v3.0, v2.2, v2.1 .NET| main, v3.0 .NET Windows| main, v3.0 .NET Android| main, v3.0 .NET iOS| main, v3.0 .NET Framework| main, v3.0, v2.2, v2.1 UWP| main, v3.0, v2.2, v2.1 Xamarin.Android| v2.2, v2.1 Xamarin.iOS| v2.2, v2.1 ``` -------------------------------- ### Latitude Property Source: https://dotmorten.github.io/NmeaParser/api/ios/NmeaParser.Gnss.Ntrip.Caster.Latitude.html Gets the latitude for the caster. ```APIDOC ## Latitude Property ### Description Gets the latitude for the caster. ### Declaration ```csharp public double Latitude { get; } ``` ### Property Value - **Type**: double - **Description**: Retrieves the latitude value. ``` -------------------------------- ### NmeaFileDevice(string fileName, int readSpeed) Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaFileDevice.-ctor.html Initializes a new instance of the NmeaFileDevice class with the specified file name and read speed. ```APIDOC ## NmeaFileDevice(string fileName, int readSpeed) ### Description Initializes a new instance of the NmeaFileDevice class with a specified read speed. ### Method Constructor ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA file to be read. - **readSpeed** (int) - Required - The time to wait between each group of lines being read in milliseconds. ### Applies to Platforms and versions: - .NET Standard 2.0 - .NET - .NET Windows - .NET Android - .NET iOS - .NET Framework - UWP - Xamarin.Android - Xamarin.iOS ``` -------------------------------- ### HorizontalDistance Property Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Messages.LaserRangeMessage.HorizontalDistance.html Gets the horizontal distance. ```APIDOC ## HorizontalDistance ### Description Gets the horizontal distance. ### Declaration ```csharp public double HorizontalDistance { get; } ``` ### Property Value | Type | Description | | ------ | ----------- | | double | | ``` -------------------------------- ### NmeaFileDevice Constructors Source: https://dotmorten.github.io/NmeaParser/api/omd.html Initializes a new instance of the NmeaFileDevice class. ```APIDOC ## NmeaFileDevice(string fileName) ### Description Initializes a new instance of the NmeaFileDevice class with the specified file name. ### Method Constructor ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA file. ``` ```APIDOC ## NmeaFileDevice(string fileName, int readSpeed) ### Description Initializes a new instance of the NmeaFileDevice class with the specified file name and read speed. ### Method Constructor ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA file. - **readSpeed** (int) - Required - The speed at which to read the file. ``` -------------------------------- ### Longitude Property Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.Ntrip.Caster.Longitude.html Gets the longitude for the caster. ```APIDOC ## Longitude Property ### Description Gets the longitude for the caster. ### Declaration ```csharp public double Longitude { get; } ``` ### Property Value - **Type**: double - **Description**: The longitude value. ``` -------------------------------- ### NmeaFileDevice Constructors Source: https://dotmorten.github.io/NmeaParser/api/netstd/NmeaParser.NmeaFileDevice.html Initializes a new instance of the NmeaFileDevice class with a specified file name or file name and buffer size. ```APIDOC ## NmeaFileDevice(string fileName) ### Description Initializes a new instance of the NmeaFileDevice class with the specified file name. ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA log file to read from. ### Method Constructor ``` ```APIDOC ## NmeaFileDevice(string fileName, int bufferSize) ### Description Initializes a new instance of the NmeaFileDevice class with the specified file name and buffer size. ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA log file to read from. - **bufferSize** (int) - Required - The size of the buffer to use for reading. ### Method Constructor ``` -------------------------------- ### NmeaFileDevice Constructors Source: https://dotmorten.github.io/NmeaParser/api/net/NmeaParser.NmeaFileDevice.html Initializes a new instance of the NmeaFileDevice class with a specified file name and optionally a buffer size. ```APIDOC ## NmeaFileDevice(string fileName) ### Description Initializes a new instance of the NmeaFileDevice class with the specified file name. ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA log file to read from. ### Applies Target| Versions ---|--- **.NET Standard 2.0**| main, v3.0, v2.2, v2.1, v2.0 **.NET**| main, v3.0 **.NET Windows**| main, v3.0 **.NET Android**| main, v3.0 **.NET iOS**| main, v3.0 **.NET Framework**| main, v3.0, v2.2, v2.1, v2.0 **UWP**| main, v3.0, v2.2, v2.1, v2.0 **Xamarin.Android**| v2.2, v2.1, v2.0 **Xamarin.iOS**| v2.2, v2.1, v2.0 ``` ```APIDOC ## NmeaFileDevice(string fileName, int bufferSize) ### Description Initializes a new instance of the NmeaFileDevice class with the specified file name and buffer size. ### Parameters #### Path Parameters - **fileName** (string) - Required - The name of the NMEA log file to read from. - **bufferSize** (int) - Required - The size of the buffer to use for reading. ### Applies Target| Versions ---|--- **.NET Standard 2.0**| main, v3.0, v2.2, v2.1, v2.0 **.NET**| main, v3.0 **.NET Windows**| main, v3.0 **.NET Android**| main, v3.0 **.NET iOS**| main, v3.0 **.NET Framework**| main, v3.0, v2.2, v2.1, v2.0 **UWP**| main, v3.0, v2.2, v2.1, v2.0 **Xamarin.Android**| v2.2, v2.1, v2.0 **Xamarin.iOS**| v2.2, v2.1, v2.0 ``` -------------------------------- ### Speed Property Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.GnssMonitor.Speed.html Gets the speed in knots. ```APIDOC ## Speed Property ### Description Gets the speed in knots. ### Declaration ```csharp public double Speed { get; } ``` ### Property Value Type | Description ---|--- double | ``` -------------------------------- ### Altitude Property Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.GnssMonitor.Altitude.html Gets the height above the ellipsoid. ```APIDOC ## Property Altitude ### Description Gets the height above the ellipsoid. ### Declaration ```csharp public double Altitude { get; } ``` ### Property Value - **Type**: double - **Description**: The altitude value. ``` -------------------------------- ### Constructors Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.BufferedStreamDevice.html Initializes a new instance of the BufferedStreamDevice class. ```APIDOC ## BufferedStreamDevice() ### Description Initializes a new instance of the BufferedStreamDevice class. ### Syntax ```csharp public BufferedStreamDevice() ``` ``` ```APIDOC ## BufferedStreamDevice(int) ### Description Initializes a new instance of the BufferedStreamDevice class with a specified buffer size. ### Syntax ```csharp public BufferedStreamDevice(int bufferSize) ``` ### Parameters #### Path Parameters - **bufferSize** (int) - The size of the buffer. ``` -------------------------------- ### TrueBearing Property Source: https://dotmorten.github.io/NmeaParser/api/uwp/NmeaParser.Messages.Rmb.TrueBearing.html Gets the true bearing to the destination. ```APIDOC ## Property TrueBearing ### Description Gets the true bearing to the destination. ### Declaration ```csharp public double TrueBearing { get; } ``` ### Property Value Type | Description ---|--- double | The true bearing to the destination. ``` -------------------------------- ### Initialize and Use SerialPortDevice Source: https://dotmorten.github.io/NmeaParser/concepts/SerialPortUWP.html This C# code demonstrates how to find a serial device, configure its properties, and create an NmeaParser.SerialPortDevice instance. Ensure the serial device capability is enabled in your app manifest. ```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 } ``` -------------------------------- ### OriginWaypointId Property Source: https://dotmorten.github.io/NmeaParser/api/uwp/NmeaParser.Messages.Rmb.OriginWaypointId.html Gets the ID of the origin waypoint. ```APIDOC ## Property OriginWaypointId ### Description Gets the ID of the origin waypoint. ### Declaration ```csharp public double OriginWaypointId { get; } ``` ### Property Value - **Type**: double - **Description**: The ID of the origin waypoint. ``` -------------------------------- ### GetSerialDevicesAsync Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.WinRTSerialDevice.GetSerialDevicesAsync.html Gets a list of serial devices available. ```APIDOC ## GetSerialDevicesAsync() ### Description Gets a list of serial devices available. ### Method public static Task> GetSerialDevicesAsync() ### Returns Type | Description --- Task> | A set of serial devices available. ``` -------------------------------- ### BufferedStreamDevice() Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.BufferedStreamDevice.-ctor.html Initializes a new instance of the BufferedStreamDevice class with default settings. ```APIDOC ## BufferedStreamDevice() ### Description Initializes a new instance of the BufferedStreamDevice class. ### Declaration ```csharp protected BufferedStreamDevice() ``` ### Applies to Platforms and versions: | Target | Versions | |---|---| | .NET Standard 2.0 | main, v3.0, v2.2, v2.1, v2.0 | | .NET | main, v3.0 | | .NET Windows | main, v3.0 | | .NET Android | main, v3.0 | | .NET iOS | main, v3.0 | | .NET Framework | main, v3.0, v2.2, v2.1, v2.0 | | UWP | main, v3.0, v2.2, v2.1, v2.0 | | Xamarin.Android | v2.2, v2.1, v2.0 | | Xamarin.iOS | v2.2, v2.1, v2.0 | ``` -------------------------------- ### Rma.PositioningStatus Status Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.Messages.Rma.Status.html Gets the positioning system status. ```APIDOC ## Rma.PositioningStatus Status ### Description Gets the positioning system status. ### Declaration ```csharp public Rma.PositioningStatus Status { get; } ``` ### Property Value Type | Description ---|--- Rma.PositioningStatus | ### Applies to Platforms and versions Target| Versions ---|--- **.NET Standard 2.0**| main, v3.0, v2.2, v2.1, v2.0 **.NET**| main, v3.0 **.NET Windows**| main, v3.0 **.NET Android**| main, v3.0 **.NET iOS**| main, v3.0 **.NET Framework**| main, v3.0, v2.2, v2.1, v2.0 **UWP**| main, v3.0, v2.2, v2.1, v2.0 **Xamarin.Android**| v2.2, v2.1, v2.0 **Xamarin.iOS**| v2.2, v2.1, v2.0 ``` -------------------------------- ### OpenAsync Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaDevice.OpenAsync.html Creates and opens the stream the NmeaDevice will be working on top off. ```APIDOC ## OpenAsync() ### Description Creates and opens the stream the NmeaDevice will be working on top off. ### Method `public Task OpenAsync()` ### Returns - **Task**: A task that represents the asynchronous action. ``` -------------------------------- ### NmeaMessage.Checksum Property Source: https://dotmorten.github.io/NmeaParser/api/netstd/NmeaParser.Messages.NmeaMessage.Checksum.html Gets the checksum value of the message. ```APIDOC ## Property Checksum ### Description Gets the checksum value of the message. ### Declaration ```csharp public byte Checksum { get; } ``` ### Property Value | Type | |---|---| | byte | ### Applies to Platforms and versions: | Target | Versions | |---|---| | .NET Standard 2.0 | main, v3.0, v2.2, v2.1, v2.0 | | .NET | main, v3.0 | | .NET Windows | main, v3.0 | | .NET Android | main, v3.0 | | .NET iOS | main, v3.0 | | .NET Framework | main, v3.0, v2.2, v2.1, v2.0 | | UWP | main, v3.0, v2.2, v2.1, v2.0 | | Xamarin.Android | v2.2, v2.1, v2.0 | | Xamarin.iOS | v2.2, v2.1, v2.0 | ``` -------------------------------- ### OpenStreamAsync Method Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.SystemNmeaDevice.OpenStreamAsync.html Creates and opens the stream the NmeaDevice is working on top off. Requires ACCESS_FINE_LOCATION permission. ```APIDOC ## OpenStreamAsync() ### Description Creates and opens the stream the NmeaDevice is working on top off. ### Declaration ```csharp [RequiresPermission("android.permission.ACCESS_FINE_LOCATION")] protected override Task OpenStreamAsync() ``` ### Returns Type | Description --- Task | The opened data stream. ### Overrides NmeaDevice.OpenStreamAsync() ### See Also CloseStreamAsync(Stream) ``` -------------------------------- ### Port Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.SerialPortDevice.Port.html Gets the active serial port. ```APIDOC ## Port Property ### Description Gets the active serial port. ### Declaration ```csharp public SerialPort Port { get; } ``` ### Property Value **Type:** SerialPort **Description:** Represents the serial port instance. ``` -------------------------------- ### NmeaDevice Constructors Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaDevice.html Initializes a new instance of the NmeaDevice class. ```APIDOC ## NmeaDevice() ### Description Initializes a new instance of the NmeaDevice class. ### Syntax ```csharp public NmeaDevice() ``` ``` -------------------------------- ### BluetoothDevice Constructors Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.BluetoothDevice.html Initializes a new instance of the BluetoothDevice class. ```APIDOC ## BluetoothDevice Constructors ### BluetoothDevice(BluetoothDevice) Initializes a new instance of the BluetoothDevice class. ### BluetoothDevice(BluetoothDevice, Context) Initializes a new instance of the BluetoothDevice class with a Context. ``` -------------------------------- ### Message Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.NmeaMessageReceivedEventArgs.Message.html Gets the NMEA message received. ```APIDOC ## Property Message ### Declaration ```csharp public NmeaMessage Message { get; } ``` ### Property Value - **Type**: NmeaMessage - **Description**: The NMEA message. ``` -------------------------------- ### NmeaDevice Methods Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaDevice.html Includes methods for managing the device's lifecycle and data operations. Use OpenAsync and CloseAsync for asynchronous stream management. ReadAsync and WriteAsync handle data transfer, with WriteAsync requiring a check of CanWrite first. ```csharp public Task CloseAsync() ``` ```csharp public Task CloseStreamAsync(Stream stream) ``` ```csharp public void Dispose() ``` ```csharp protected virtual void Dispose(bool disposing) ``` ```csharp public Task OpenAsync() ``` ```csharp public Task OpenStreamAsync() ``` ```csharp public abstract Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) ``` ```csharp public Task WriteAsync(byte[] buffer, int offset, int count) ``` -------------------------------- ### Checksum Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Messages.NmeaMessage.Checksum.html Gets the checksum value of the message. ```APIDOC ## Checksum Property ### Description Gets the checksum value of the message. ### Declaration ```csharp public byte Checksum { get; } ``` ### Property Value - **Type**: byte - **Description**: ``` -------------------------------- ### SlopeDistance Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Messages.LaserRangeMessage.SlopeDistance.html Gets the slope distance from a LaserRangeMessage. ```APIDOC ## Property SlopeDistance ### Description Gets the slope distance. ### Declaration ```csharp public double SlopeDistance { get; } ``` ### Property Value | Type | Description | |--------|-------------| | double | | ``` -------------------------------- ### BluetoothDevice Constructor with PeerInformation Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.BluetoothDevice.-ctor.html Initializes a new instance of the BluetoothDevice class using PeerInformation. ```APIDOC ## BluetoothDevice(PeerInformation) ### Description Initializes a new instance of the BluetoothDevice class. ### Method Signature ```csharp public BluetoothDevice(PeerInformation peer) ``` ### Parameters #### Parameters - **peer** (PeerInformation) - The peer information device. ``` -------------------------------- ### WinRTSerialDevice Constructors Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.WinRTSerialDevice.html Initializes a new instance of the WinRTSerialDevice class. ```APIDOC ## WinRTSerialDevice(SerialDevice) ### Description Initializes a new instance of the SerialPortDevice class. ### Parameters #### Path Parameters - **serialDevice** (SerialDevice) - Required - The SerialDevice object to initialize with. ``` -------------------------------- ### HorizontalDistanceUnits Property Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Messages.LaserRangeMessage.HorizontalDistanceUnits.html Gets the units of the HorizontalDistance value. ```APIDOC ## HorizontalDistanceUnits Property ### Description Gets the units of the HorizontalDistance value. ### Declaration ```csharp public char HorizontalDistanceUnits { get; } ``` ### Property Value - **Type**: `char` - **Description**: Represents the unit of measurement for the horizontal distance. ``` -------------------------------- ### NmeaDevice Constructor Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaDevice.html Initializes a new instance of the NmeaDevice class. This is a parameterless constructor. ```csharp public NmeaDevice() ``` -------------------------------- ### GetSourceTable() Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Gnss.Ntrip.Client.GetSourceTable.html Gets a list of sources from the NTRIP endpoint. ```APIDOC ## GetSourceTable() ### Description Gets a list of sources from the NTRIP endpoint. ### Method ``` public IEnumerable GetSourceTable() ``` ### Returns - **Type**: IEnumerable - **Description**: A collection of NtripSource objects representing available sources. ``` -------------------------------- ### Methods Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.NmeaFileDevice.html Methods available for the NmeaFileDevice class. ```APIDOC ## Methods ### GetStreamAsync() Gets the stream to perform buffer reads on. ``` -------------------------------- ### MeasuredTreeHeight Property Source: https://dotmorten.github.io/NmeaParser/api/net/NmeaParser.Messages.Trimble.Ptnlb.MeasuredTreeHeight.html Gets the message height of the tree. ```APIDOC ## MeasuredTreeHeight ### Description Gets the message height of the tree. ### Declaration ```csharp public double MeasuredTreeHeight { get; } ``` ### Property Value | Type | Description | |--------|-------------| | double | | ``` -------------------------------- ### HorizontalVector Property Source: https://dotmorten.github.io/NmeaParser/api/net/NmeaParser.Messages.LaserRangeMessage.HorizontalVector.html Gets the horizontal vector from a LaserRangeMessage. ```APIDOC ## Property HorizontalVector ### Description Gets the horizontal vector. ### Declaration ```csharp public string HorizontalVector { get; } ``` ### Property Value Type | Description ---|--- string | ### Applies to Platforms and versions Target| Versions ---|--- .NET Standard 2.0| main, v3.0, v2.2, v2.1, v2.0 .NET| main, v3.0 .NET Windows| main, v3.0 .NET Android| main, v3.0 .NET iOS| main, v3.0 .NET Framework| main, v3.0, v2.2, v2.1, v2.0 UWP| main, v3.0, v2.2, v2.1, v2.0 Xamarin.Android| v2.2, v2.1, v2.0 Xamarin.iOS| v2.2, v2.1, v2.0 ``` -------------------------------- ### Caster Constructor Source: https://dotmorten.github.io/NmeaParser/api/android/NmeaParser.Gnss.Ntrip.Caster.-ctor.html Initializes a new instance of the Caster class with detailed connection parameters. Use this to set up an Ntrip caster connection. ```csharp public Caster(IPAddress address, int port, string identifier, string _operator, bool supportsNmea, string countryCode, double latitude, double longitude, IPAddress fallbackkAddress) ``` -------------------------------- ### Latitude Property Source: https://dotmorten.github.io/NmeaParser/api/net/NmeaParser.Messages.IGeographicLocation.Latitude.html Gets the latitude component of the location. ```APIDOC ## Latitude Property ### Description Gets the latitude component of the location. ### Declaration ```csharp double Latitude { get; } ``` ### Property Value **Type:** double **Description:** The latitude value. ``` -------------------------------- ### BluetoothDevice Constructor with RfcommDeviceService Source: https://dotmorten.github.io/NmeaParser/api/netwin/NmeaParser.BluetoothDevice.-ctor.html Initializes a new instance of the BluetoothDevice class using an RfcommDeviceService. ```APIDOC ## BluetoothDevice(RfcommDeviceService, bool) ### Description Initializes a new instance of the BluetoothDevice class. ### Method Signature ```csharp public BluetoothDevice(RfcommDeviceService service, bool disposeService = false) ``` ### Parameters #### Parameters - **service** (RfcommDeviceService) - The RF Comm Device service. - **disposeService** (bool) - Whether this device should also dispose the RfcommDeviceService provided when this device disposes. Defaults to false. ``` -------------------------------- ### GnssMonitor.Speed Source: https://dotmorten.github.io/NmeaParser/api/net/NmeaParser.Gnss.GnssMonitor.Speed.html Gets the speed in knots from the GNSS monitor. ```APIDOC ## Property Speed ### Description Gets the speed in knots. ### Declaration ```csharp public double Speed { get; } ``` ### Property Value - **Type**: double - **Description**: ### Applies to - .NET Standard 2.0 - .NET - .NET Windows - .NET Android - .NET iOS - .NET Framework - UWP - Xamarin.Android - Xamarin.iOS ``` -------------------------------- ### NtripSource Constructor Source: https://dotmorten.github.io/NmeaParser/api/netfx/NmeaParser.Gnss.Ntrip.NtripSource.html Initializes a new instance of the NtripSource class. ```APIDOC ## NtripSource() ### Description Initializes a new instance of the NtripSource class. ### Syntax ```csharp public NtripSource() ``` ``` -------------------------------- ### EAAccessoryDevice Constructor Source: https://dotmorten.github.io/NmeaParser/api/ios/NmeaParser.EAAccessoryDevice.-ctor.html Initializes a new instance of the EAAccessoryDevice class with the specified accessory and protocol. ```APIDOC ## EAAccessoryDevice(EAAccessory, string) ### Description Initializes a new instance of the EAAccessoryDevice class. ### Method Constructor ### Parameters #### Parameters - **accessory** (EAAccessory) - Description not provided. - **protocol** (string) - Description not provided. ### Applies to - **.NET iOS**: main, v3.0 - **Xamarin.iOS**: v2.2 ``` -------------------------------- ### GnssSignalId Property Source: https://dotmorten.github.io/NmeaParser/api/ios/NmeaParser.Messages.SatelliteVehicle.GnssSignalId.html Gets the GNSS Signal ID. ```APIDOC ## Property GnssSignalId ### Description Gets the GNSS Signal ID. ### Declaration ```csharp public char GnssSignalId { get; } ``` ### Property Value Type | Description ---|--- char | ### Applies to Platforms and versions: Target| Versions ---|--- .NET Standard 2.0| main, v3.0, v2.2 .NET| main, v3.0 .NET Windows| main, v3.0 .NET Android| main, v3.0 .NET iOS| main, v3.0 .NET Framework| main, v3.0, v2.2 UWP| main, v3.0, v2.2 Xamarin.Android| v2.2 Xamarin.iOS| v2.2 ``` -------------------------------- ### Vlw Constructor Source: https://dotmorten.github.io/NmeaParser/api/netstd/NmeaParser.Messages.Vlw.html Initializes a new instance of the Vlw class. ```APIDOC ## Vlw(string, string[]) ### Description Initializes a new instance of the Vlw class. ### Parameters * **messageId** (string) - Description not available. * **parts** (string[]) - Description not available. ```