diff --git a/src/NmeaParser/Nmea/Galileo/Gagsv.cs b/src/NmeaParser/Nmea/Galileo/Gagsv.cs
index 4f191dc..a87ba9e 100644
--- a/src/NmeaParser/Nmea/Galileo/Gagsv.cs
+++ b/src/NmeaParser/Nmea/Galileo/Gagsv.cs
@@ -31,5 +31,11 @@ namespace NmeaParser.Nmea.Galileo
[NmeaMessageType("GAGSV")]
public sealed class Gagsv : Gsv
{
- }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gagsv(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gga.cs b/src/NmeaParser/Nmea/Gga.cs
index 7e2772f..943c0bf 100644
--- a/src/NmeaParser/Nmea/Gga.cs
+++ b/src/NmeaParser/Nmea/Gga.cs
@@ -27,13 +27,14 @@ namespace NmeaParser.Nmea
/// Global Positioning System Fix Data
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpgga")]
- public class Gga : NmeaMessage
+ public abstract class Gga : NmeaMessage
{
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ protected Gga(string type, string[] message) : base(type, message)
{
if (message == null || message.Length < 14)
throw new ArgumentException("Invalid GPGGA", "message");
@@ -61,62 +62,62 @@ namespace NmeaParser.Nmea
///
/// Time of day fix was taken
///
- public TimeSpan FixTime { get; private set; }
+ public TimeSpan FixTime { get; }
///
/// Latitude
///
- public double Latitude { get; private set; }
+ public double Latitude { get; }
///
/// Longitude
///
- public double Longitude { get; private set; }
+ public double Longitude { get; }
///
/// Fix Quality
///
- public Gps.Gpgga.FixQuality Quality { get; private set; }
+ public Gps.Gpgga.FixQuality Quality { get; }
///
/// Number of satellites being tracked
///
- public int NumberOfSatellites { get; private set; }
+ public int NumberOfSatellites { get; }
///
/// Horizontal Dilution of Precision
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Hdop")]
- public double Hdop { get; private set; }
+ public double Hdop { get; }
///
/// Altitude
///
- public double Altitude { get; private set; }
+ public double Altitude { get; }
///
/// Altitude units ('M' for Meters)
///
- public string AltitudeUnits { get; private set; }
+ public string AltitudeUnits { get; }
///
/// Height of geoid (mean sea level) above WGS84
///
- public double HeightOfGeoid { get; private set; }
+ public double HeightOfGeoid { get; }
///
/// Altitude units ('M' for Meters)
///
- public string HeightOfGeoidUnits { get; private set; }
+ public string HeightOfGeoidUnits { get; }
///
/// Time since last DGPS update
///
- public TimeSpan TimeSinceLastDgpsUpdate { get; private set; }
+ public TimeSpan TimeSinceLastDgpsUpdate { get; }
///
/// DGPS Station ID Number
///
- public int DgpsStationId { get; private set; }
+ public int DgpsStationId { get; }
}
}
diff --git a/src/NmeaParser/Nmea/Gll.cs b/src/NmeaParser/Nmea/Gll.cs
index e7c15bb..56a2585 100644
--- a/src/NmeaParser/Nmea/Gll.cs
+++ b/src/NmeaParser/Nmea/Gll.cs
@@ -29,13 +29,14 @@ namespace NmeaParser.Nmea
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gll")]
public abstract class Gll : NmeaMessage
{
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 4)
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ protected Gll(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 4)
throw new ArgumentException("Invalid GPGLL", "message");
Latitude = NmeaMessage.StringToLatitude(message[0], message[1]);
Longitude = NmeaMessage.StringToLongitude(message[2], message[3]);
@@ -49,17 +50,17 @@ namespace NmeaParser.Nmea
///
/// Latitude
///
- public double Latitude { get; private set; }
+ public double Latitude { get; }
///
/// Longitude
///
- public double Longitude { get; private set; }
+ public double Longitude { get; }
///
/// Time since last DGPS update
///
- public TimeSpan FixTime { get; private set; }
+ public TimeSpan FixTime { get; }
///
/// Gets a value indicating whether data is active.
@@ -67,7 +68,7 @@ namespace NmeaParser.Nmea
///
/// true if data is active; otherwise, false.
///
- public bool DataActive { get; private set; }
+ public bool DataActive { get; }
}
}
diff --git a/src/NmeaParser/Nmea/Glonass/Glgns.cs b/src/NmeaParser/Nmea/Glonass/Glgns.cs
index f114048..00d6891 100644
--- a/src/NmeaParser/Nmea/Glonass/Glgns.cs
+++ b/src/NmeaParser/Nmea/Glonass/Glgns.cs
@@ -11,5 +11,11 @@ namespace NmeaParser.Nmea.Glonass
[NmeaMessageType("GLGNS")]
public class Glgns : Gns
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Glgns(string type, string[] message) : base(type, message) { }
}
}
diff --git a/src/NmeaParser/Nmea/Glonass/Glgsv.cs b/src/NmeaParser/Nmea/Glonass/Glgsv.cs
index 5a9efa8..a54e1de 100644
--- a/src/NmeaParser/Nmea/Glonass/Glgsv.cs
+++ b/src/NmeaParser/Nmea/Glonass/Glgsv.cs
@@ -23,13 +23,19 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Glonass
{
- ///
- /// GLONASS Satellites in view
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Glgsv")]
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
- [NmeaMessageType("GLGSV")]
- public sealed class Glgsv : Gsv
- {
- }
-}
+ ///
+ /// GLONASS Satellites in view
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Glgsv")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
+ [NmeaMessageType("GLGSV")]
+ public sealed class Glgsv : Gsv
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Glgsv(string type, string[] message) : base(type, message) { }
+ }
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Glonass/Glzda.cs b/src/NmeaParser/Nmea/Glonass/Glzda.cs
index c0cb0fd..ba39b88 100644
--- a/src/NmeaParser/Nmea/Glonass/Glzda.cs
+++ b/src/NmeaParser/Nmea/Glonass/Glzda.cs
@@ -4,5 +4,11 @@
[NmeaMessageType("GLZDA")]
public class Glzda : Zda
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Glzda(string type, string[] message) : base(type, message) { }
}
-}
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gns.cs b/src/NmeaParser/Nmea/Gns.cs
index d717f3b..4278c18 100644
--- a/src/NmeaParser/Nmea/Gns.cs
+++ b/src/NmeaParser/Nmea/Gns.cs
@@ -120,10 +120,11 @@ namespace NmeaParser.Nmea
}
///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ protected Gns(string type, string[] message) : base(type, message)
{
if (message == null || message.Length < 12)
throw new ArgumentException("Invalid GNS", "message");
@@ -168,74 +169,74 @@ namespace NmeaParser.Nmea
///
/// Time of day fix was taken
///
- public TimeSpan FixTime { get; private set; }
+ public TimeSpan FixTime { get; }
///
/// Latitude
///
- public double Latitude { get; private set; }
+ public double Latitude { get; }
///
/// Longitude
///
- public double Longitude { get; private set; }
+ public double Longitude { get; }
///
/// Mode indicator for GPS
///
///
///
- public Mode GpsModeIndicator { get; private set; }
+ public Mode GpsModeIndicator { get; }
///
/// Mode indicator for GLONASS
///
///
///
- public Mode GlonassModeIndicator { get; private set; }
+ public Mode GlonassModeIndicator { get; }
///
/// Mode indicator for future constallations
///
///
///
- public Mode[] FutureModeIndicator { get; private set; }
+ public Mode[] FutureModeIndicator { get; }
///
/// Number of satellites (SVs) in use
///
- public int NumberOfSatellites { get; private set; }
+ public int NumberOfSatellites { get; }
///
/// Horizontal Dilution of Precision (HDOP), calculated using all the satellites (GPS, GLONASS, and any future satellites) used in computing the solution reported in each GNS sentence.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Hdop")]
- public double Hdop { get; private set; }
+ public double Hdop { get; }
///
/// Orthometric height in meters (MSL reference)
///
- public double OrhometricHeight { get; private set; }
+ public double OrhometricHeight { get; }
///
/// Geoidal separation in meters - the difference between the earth ellipsoid surface and mean-sea-level (geoid) surface defined by the reference datum used in the position solution
/// '-' = mean-sea-level surface below ellipsoid.
///
- public double GeoidalSeparation { get; private set; }
+ public double GeoidalSeparation { get; }
///
/// Age of differential data - if talker ID is GN, additional GNS messages follow with GP and/or GL Age of differential data
///
- public TimeSpan TimeSinceLastDgpsUpdate { get; private set; }
+ public TimeSpan TimeSinceLastDgpsUpdate { get; }
///
/// eference station ID1, range 0000-4095 - Null if talker ID is GN, additional GNS messages follow with GP and/or GL Reference station ID
///
- public string DgpsStationId { get; private set; }
+ public string DgpsStationId { get; }
///
/// Navigational status
///
- public NavigationalStatus Status { get; private set; }
+ public NavigationalStatus Status { get; }
}
}
diff --git a/src/NmeaParser/Nmea/Gnss/Gngga.cs b/src/NmeaParser/Nmea/Gnss/Gngga.cs
index 251d50d..2332652 100644
--- a/src/NmeaParser/Nmea/Gnss/Gngga.cs
+++ b/src/NmeaParser/Nmea/Gnss/Gngga.cs
@@ -23,12 +23,18 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gnss
{
- ///
- /// Global Positioning System Fix Data
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gngga")]
- [NmeaMessageType("GNGGA")]
- public class Gngga : Gga
- {
- }
-}
+ ///
+ /// Global Positioning System Fix Data
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gngga")]
+ [NmeaMessageType("GNGGA")]
+ public class Gngga : Gga
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gngga(string type, string[] message) : base(type, message) { }
+ }
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gnss/Gngll.cs b/src/NmeaParser/Nmea/Gnss/Gngll.cs
index fbbdeea..2417e82 100644
--- a/src/NmeaParser/Nmea/Gnss/Gngll.cs
+++ b/src/NmeaParser/Nmea/Gnss/Gngll.cs
@@ -23,12 +23,18 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gnss
{
- ///
- /// Geographic position, latitude / longitude
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gngll")]
- [NmeaMessageType("GNGLL")]
- public class Gngll : Gll
- {
- }
-}
+ ///
+ /// Geographic position, latitude / longitude
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gngll")]
+ [NmeaMessageType("GNGLL")]
+ public class Gngll : Gll
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gngll(string type, string[] message) : base(type, message) { }
+ }
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gnss/Gngns.cs b/src/NmeaParser/Nmea/Gnss/Gngns.cs
index 289081f..d1c1588 100644
--- a/src/NmeaParser/Nmea/Gnss/Gngns.cs
+++ b/src/NmeaParser/Nmea/Gnss/Gngns.cs
@@ -11,5 +11,11 @@ namespace NmeaParser.Nmea.Gps
[NmeaMessageType("GNGNS")]
public class Gngns : Gns
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gngns(string type, string[] message) : base(type, message) { }
}
-}
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gnss/Gngsa.cs b/src/NmeaParser/Nmea/Gnss/Gngsa.cs
index 9a3894a..5ccd65e 100644
--- a/src/NmeaParser/Nmea/Gnss/Gngsa.cs
+++ b/src/NmeaParser/Nmea/Gnss/Gngsa.cs
@@ -23,12 +23,18 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gnss
{
- ///
- /// Global Positioning System Fix Data
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gngsa")]
- [NmeaMessageType("GNGSA")]
- public class Gngsa : Gsa
- {
- }
-}
+ ///
+ /// Global Positioning System Fix Data
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gngsa")]
+ [NmeaMessageType("GNGSA")]
+ public class Gngsa : Gsa
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gngsa(string type, string[] message) : base(type, message) { }
+ }
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gnss/Gngst.cs b/src/NmeaParser/Nmea/Gnss/Gngst.cs
index f25a849..c69b74d 100644
--- a/src/NmeaParser/Nmea/Gnss/Gngst.cs
+++ b/src/NmeaParser/Nmea/Gnss/Gngst.cs
@@ -9,5 +9,11 @@ namespace NmeaParser.Nmea.Gnss
[NmeaMessageType("GNGST")]
public class Gngst : Gst
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gngst(string type, string[] message) : base(type, message) { }
}
-}
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gnss/Gnrmc.cs b/src/NmeaParser/Nmea/Gnss/Gnrmc.cs
index 2a2a534..9e6005b 100644
--- a/src/NmeaParser/Nmea/Gnss/Gnrmc.cs
+++ b/src/NmeaParser/Nmea/Gnss/Gnrmc.cs
@@ -23,12 +23,18 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gnss
{
- ///
- /// Recommended Minimum
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gnrmc")]
- [NmeaMessageType("GNRMC")]
- public class Gnrmc : Rmc
- {
- }
-}
+ ///
+ /// Recommended Minimum
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gnrmc")]
+ [NmeaMessageType("GNRMC")]
+ public class Gnrmc : Rmc
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gnrmc(string type, string[] message) : base(type, message) { }
+ }
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gnss/Gnzda.cs b/src/NmeaParser/Nmea/Gnss/Gnzda.cs
index 00e96eb..fd9ab6b 100644
--- a/src/NmeaParser/Nmea/Gnss/Gnzda.cs
+++ b/src/NmeaParser/Nmea/Gnss/Gnzda.cs
@@ -4,5 +4,11 @@
[NmeaMessageType("GNZDA")]
public class Gnzda : Zda
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gnzda(string type, string[] message) : base(type, message) { }
}
}
diff --git a/src/NmeaParser/Nmea/Gps/GPBOD.cs b/src/NmeaParser/Nmea/Gps/GPBOD.cs
index 95ab6eb..61feb75 100644
--- a/src/NmeaParser/Nmea/Gps/GPBOD.cs
+++ b/src/NmeaParser/Nmea/Gps/GPBOD.cs
@@ -23,52 +23,53 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gps
{
- ///
- /// Bearing Origin to Destination
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpbod")]
- [NmeaMessageType("GPBOD")]
- public class Gpbod : NmeaMessage
- {
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 3)
- throw new ArgumentException("Invalid GPBOD", "message");
- if (message[0].Length > 0)
- TrueBearing = double.Parse(message[0], CultureInfo.InvariantCulture);
- else
- TrueBearing = double.NaN;
- if (message[2].Length > 0)
- MagneticBearing = double.Parse(message[2], CultureInfo.InvariantCulture);
- else
- MagneticBearing = double.NaN;
- if (message.Length > 4 && !string.IsNullOrEmpty(message[4]))
- DestinationId = message[4];
- if (message.Length > 5 && !string.IsNullOrEmpty(message[5]))
- OriginId = message[5];
- }
- ///
- /// True Bearing from start to destination
- ///
- public double TrueBearing { get; private set; }
+ ///
+ /// Bearing Origin to Destination
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpbod")]
+ [NmeaMessageType("GPBOD")]
+ public class Gpbod : NmeaMessage
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpbod(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 3)
+ throw new ArgumentException("Invalid GPBOD", "message");
+ if (message[0].Length > 0)
+ TrueBearing = double.Parse(message[0], CultureInfo.InvariantCulture);
+ else
+ TrueBearing = double.NaN;
+ if (message[2].Length > 0)
+ MagneticBearing = double.Parse(message[2], CultureInfo.InvariantCulture);
+ else
+ MagneticBearing = double.NaN;
+ if (message.Length > 4 && !string.IsNullOrEmpty(message[4]))
+ DestinationId = message[4];
+ if (message.Length > 5 && !string.IsNullOrEmpty(message[5]))
+ OriginId = message[5];
+ }
+ ///
+ /// True Bearing from start to destination
+ ///
+ public double TrueBearing { get; }
- ///
- /// Magnetic Bearing from start to destination
- ///
- public double MagneticBearing { get; private set; }
+ ///
+ /// Magnetic Bearing from start to destination
+ ///
+ public double MagneticBearing { get; }
- ///
- /// Name of origin
- ///
- public string OriginId { get; private set; }
+ ///
+ /// Name of origin
+ ///
+ public string OriginId { get; }
- ///
- /// Name of destination
- ///
- public string DestinationId { get; private set; }
- }
-}
+ ///
+ /// Name of destination
+ ///
+ public string DestinationId { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gps/GPGGA.cs b/src/NmeaParser/Nmea/Gps/GPGGA.cs
index 42d2a44..62a78a8 100644
--- a/src/NmeaParser/Nmea/Gps/GPGGA.cs
+++ b/src/NmeaParser/Nmea/Gps/GPGGA.cs
@@ -58,5 +58,12 @@ namespace NmeaParser.Nmea.Gps
/// Simulation
Simulation = 8
}
- }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpgga(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gps/GPGLL.cs b/src/NmeaParser/Nmea/Gps/GPGLL.cs
index 05fb2b8..a8385b7 100644
--- a/src/NmeaParser/Nmea/Gps/GPGLL.cs
+++ b/src/NmeaParser/Nmea/Gps/GPGLL.cs
@@ -29,6 +29,12 @@ namespace NmeaParser.Nmea.Gps
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpgll")]
[NmeaMessageType("GPGLL")]
public class Gpgll : Gll
- {
- }
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpgll(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gps/GPGSA.cs b/src/NmeaParser/Nmea/Gps/GPGSA.cs
index caefb32..7f9739f 100644
--- a/src/NmeaParser/Nmea/Gps/GPGSA.cs
+++ b/src/NmeaParser/Nmea/Gps/GPGSA.cs
@@ -63,5 +63,12 @@ namespace NmeaParser.Nmea.Gps
///
Fix3D = 3
}
- }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpgsa(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gps/GPGST.cs b/src/NmeaParser/Nmea/Gps/GPGST.cs
index 5262d68..6e4a329 100644
--- a/src/NmeaParser/Nmea/Gps/GPGST.cs
+++ b/src/NmeaParser/Nmea/Gps/GPGST.cs
@@ -29,6 +29,12 @@ namespace NmeaParser.Nmea.Gps
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpgst")]
[NmeaMessageType("GPGST")]
public class Gpgst : Gst
- {
- }
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpgst(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gps/GPGSV.cs b/src/NmeaParser/Nmea/Gps/GPGSV.cs
index af55e8e..b094779 100644
--- a/src/NmeaParser/Nmea/Gps/GPGSV.cs
+++ b/src/NmeaParser/Nmea/Gps/GPGSV.cs
@@ -31,6 +31,12 @@ namespace NmeaParser.Nmea.Gps
[NmeaMessageType("GPGSV")]
public sealed class Gpgsv : Gsv
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpgsv(string type, string[] message) : base(type, message) { }
}
///
@@ -50,19 +56,19 @@ namespace NmeaParser.Nmea.Gps
///
/// SV PRN number
///
- public int PrnNumber { get; set; }
+ public int PrnNumber { get; }
///
/// Elevation in degrees, 90 maximum
///
- public double Elevation { get; private set; }
+ public double Elevation{ get; }
///
/// Azimuth, degrees from true north, 000 to 359
///
- public double Azimuth { get; private set; }
+ public double Azimuth{ get; }
///
/// Signal-to-Noise ratio, 0-99 dB (-1 when not tracking)
///
- public int SignalToNoiseRatio { get; private set; }
+ public int SignalToNoiseRatio{ get; }
///
/// Satellite system
diff --git a/src/NmeaParser/Nmea/Gps/GPRMB.cs b/src/NmeaParser/Nmea/Gps/GPRMB.cs
index edb11f4..84964be 100644
--- a/src/NmeaParser/Nmea/Gps/GPRMB.cs
+++ b/src/NmeaParser/Nmea/Gps/GPRMB.cs
@@ -23,117 +23,119 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gps
{
- ///
- /// Recommended minimum navigation information
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprmb")]
- [NmeaMessageType("GPRMB")]
- public class Gprmb : NmeaMessage
- {
- ///
- /// Data status
- ///
- public enum DataStatus
- {
- ///
- /// Ok
- ///
- Ok,
- ///
- /// Warning
- ///
- Warning
- }
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 13)
- throw new ArgumentException("Invalid GPRMB", "message");
-
- Status = message[0] == "A" ? DataStatus.Ok : Gprmb.DataStatus.Warning;
- double tmp;
- if (double.TryParse(message[1], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
- {
- CrossTrackError = tmp;
+ ///
+ /// Recommended minimum navigation information
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprmb")]
+ [NmeaMessageType("GPRMB")]
+ public class Gprmb : NmeaMessage
+ {
+ ///
+ /// Data status
+ ///
+ public enum DataStatus
+ {
+ ///
+ /// Ok
+ ///
+ Ok,
+ ///
+ /// Warning
+ ///
+ Warning
+ }
- if (message[2] == "L") //Steer left
- CrossTrackError *= -1;
- }
- else
- CrossTrackError = double.NaN;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gprmb(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 13)
+ throw new ArgumentException("Invalid GPRMB", "message");
- if(message[3].Length > 0)
- OriginWaypointId = int.Parse(message[3], CultureInfo.InvariantCulture);
- if (message[3].Length > 0)
- DestinationWaypointId = int.Parse(message[4], CultureInfo.InvariantCulture);
- DestinationLatitude = NmeaMessage.StringToLatitude(message[5], message[6]);
- DestinationLongitude = NmeaMessage.StringToLongitude(message[7], message[8]);
- if (double.TryParse(message[9], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
- RangeToDestination = tmp;
- else
- RangeToDestination = double.NaN;
- if (double.TryParse(message[10], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
- TrueBearing = tmp;
- else
- TrueBearing = double.NaN;
- if (double.TryParse(message[11], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
- Velocity = tmp;
- else
- Velocity = double.NaN;
- Arrived = message[12] == "A";
- }
-
- ///
- /// Data Status
- ///
- public DataStatus Status { get; private set; }
+ Status = message[0] == "A" ? DataStatus.Ok : Gprmb.DataStatus.Warning;
+ double tmp;
+ if (double.TryParse(message[1], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
+ {
+ CrossTrackError = tmp;
- ///
- /// Cross-track error (steer left when negative, right when positive)
- ///
- public double CrossTrackError { get; private set; }
-
- ///
- /// Origin waypoint ID
- ///
- public double OriginWaypointId { get; private set; }
+ if (message[2] == "L") //Steer left
+ CrossTrackError *= -1;
+ }
+ else
+ CrossTrackError = double.NaN;
- ///
- /// Destination waypoint ID
- ///
- public double DestinationWaypointId { get; private set; }
+ if (message[3].Length > 0)
+ OriginWaypointId = int.Parse(message[3], CultureInfo.InvariantCulture);
+ if (message[3].Length > 0)
+ DestinationWaypointId = int.Parse(message[4], CultureInfo.InvariantCulture);
+ DestinationLatitude = NmeaMessage.StringToLatitude(message[5], message[6]);
+ DestinationLongitude = NmeaMessage.StringToLongitude(message[7], message[8]);
+ if (double.TryParse(message[9], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
+ RangeToDestination = tmp;
+ else
+ RangeToDestination = double.NaN;
+ if (double.TryParse(message[10], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
+ TrueBearing = tmp;
+ else
+ TrueBearing = double.NaN;
+ if (double.TryParse(message[11], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
+ Velocity = tmp;
+ else
+ Velocity = double.NaN;
+ Arrived = message[12] == "A";
+ }
- ///
- /// Destination Latitude
- ///
- public double DestinationLatitude { get; private set; }
+ ///
+ /// Data Status
+ ///
+ public DataStatus Status { get; }
- ///
- /// Destination Longitude
- ///
- public double DestinationLongitude { get; private set; }
+ ///
+ /// Cross-track error (steer left when negative, right when positive)
+ ///
+ public double CrossTrackError { get; }
- ///
- /// Range to destination in nautical miles
- ///
- public double RangeToDestination { get; private set; }
+ ///
+ /// Origin waypoint ID
+ ///
+ public double OriginWaypointId { get; }
- ///
- /// True bearing to destination
- ///
- public double TrueBearing { get; private set; }
+ ///
+ /// Destination waypoint ID
+ ///
+ public double DestinationWaypointId { get; }
- ///
- /// Velocity towards destination in knots
- ///
- public double Velocity { get; private set; }
+ ///
+ /// Destination Latitude
+ ///
+ public double DestinationLatitude { get; }
- ///
- /// Arrived (true if arrived)
- ///
- public bool Arrived { get; private set; }
- }
+ ///
+ /// Destination Longitude
+ ///
+ public double DestinationLongitude { get; }
+
+ ///
+ /// Range to destination in nautical miles
+ ///
+ public double RangeToDestination { get; }
+
+ ///
+ /// True bearing to destination
+ ///
+ public double TrueBearing { get; }
+
+ ///
+ /// Velocity towards destination in knots
+ ///
+ public double Velocity { get; }
+
+ ///
+ /// Arrived (true if arrived)
+ ///
+ public bool Arrived { get; }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gps/GPRMC.cs b/src/NmeaParser/Nmea/Gps/GPRMC.cs
index 1b99ae8..2f7f5c9 100644
--- a/src/NmeaParser/Nmea/Gps/GPRMC.cs
+++ b/src/NmeaParser/Nmea/Gps/GPRMC.cs
@@ -29,6 +29,12 @@ namespace NmeaParser.Nmea.Gps
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprmc")]
[NmeaMessageType("GPRMC")]
public class Gprmc : Rmc
- {
- }
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gprmc(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gps/GPRTE.cs b/src/NmeaParser/Nmea/Gps/GPRTE.cs
index 9048bb7..d868c2e 100644
--- a/src/NmeaParser/Nmea/Gps/GPRTE.cs
+++ b/src/NmeaParser/Nmea/Gps/GPRTE.cs
@@ -23,86 +23,88 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gps
{
- ///
- /// Routes
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprte")]
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
- [NmeaMessageType("GPRTE")]
- public sealed class Gprte : NmeaMessage, IMultiPartMessage
- {
- ///
- /// Waypoint tpe
- ///
- public enum WaypointListType
- {
- ///
- /// Complete list of waypoints
- ///
- CompleteWaypointsList,
- ///
- /// List of remaining waypoints
- ///
- RemainingWaypointsList
- }
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 4)
- throw new ArgumentException("Invalid GPRTE", "message");
+ ///
+ /// Routes
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprte")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
+ [NmeaMessageType("GPRTE")]
+ public sealed class Gprte : NmeaMessage, IMultiPartMessage
+ {
+ ///
+ /// Waypoint tpe
+ ///
+ public enum WaypointListType
+ {
+ ///
+ /// Complete list of waypoints
+ ///
+ CompleteWaypointsList,
+ ///
+ /// List of remaining waypoints
+ ///
+ RemainingWaypointsList
+ }
- TotalMessages = int.Parse(message[0], CultureInfo.InvariantCulture);
- MessageNumber = int.Parse(message[1], CultureInfo.InvariantCulture);
- ListType = message[2] == "c" ? WaypointListType.CompleteWaypointsList : WaypointListType.RemainingWaypointsList;
- RouteId = message[3];
- Waypoints = message.Skip(4).ToArray();
- }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gprte(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 4)
+ throw new ArgumentException("Invalid GPRTE", "message");
- ///
- /// Total number of messages of this type in this cycle
- ///
- public int TotalMessages { get; private set; }
+ TotalMessages = int.Parse(message[0], CultureInfo.InvariantCulture);
+ MessageNumber = int.Parse(message[1], CultureInfo.InvariantCulture);
+ ListType = message[2] == "c" ? WaypointListType.CompleteWaypointsList : WaypointListType.RemainingWaypointsList;
+ RouteId = message[3];
+ Waypoints = message.Skip(4).ToArray();
+ }
- ///
- /// Message number
- ///
- public int MessageNumber { get; private set; }
+ ///
+ /// Total number of messages of this type in this cycle
+ ///
+ public int TotalMessages { get; }
- ///
- /// Gets the type of the list.
- ///
- public WaypointListType ListType { get; private set; }
+ ///
+ /// Message number
+ ///
+ public int MessageNumber { get; }
- ///
- /// Gets the route identifier.
- ///
- public string RouteId { get; private set; }
-
- ///
- /// Waypoints
- ///
- public IReadOnlyList Waypoints { get; private set; }
+ ///
+ /// Gets the type of the list.
+ ///
+ public WaypointListType ListType { get; }
- ///
- /// Returns an enumerator that iterates through the collection.
- ///
- /// A System.Collections.Generic.IEnumerator{T} that can be used to iterate through the collection.
- IEnumerator IEnumerable.GetEnumerator()
- {
- foreach (string waypoint in Waypoints)
- yield return waypoint;
- }
+ ///
+ /// Gets the route identifier.
+ ///
+ public string RouteId { get; }
- ///
- /// Returns an enumerator that iterates through a collection.
- ///
- /// An System.Collections.IEnumerator object that can be used to iterate through the collection.
- System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
- {
- return ((IEnumerable)this).GetEnumerator();
- }
- }
+ ///
+ /// Waypoints
+ ///
+ public IReadOnlyList Waypoints { get; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A System.Collections.Generic.IEnumerator{T} that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ foreach (string waypoint in Waypoints)
+ yield return waypoint;
+ }
+
+ ///
+ /// Returns an enumerator that iterates through a collection.
+ ///
+ /// An System.Collections.IEnumerator object that can be used to iterate through the collection.
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return ((IEnumerable)this).GetEnumerator();
+ }
+ }
}
diff --git a/src/NmeaParser/Nmea/Gps/GPVTG.cs b/src/NmeaParser/Nmea/Gps/GPVTG.cs
index 96eb2d7..731a6fd 100644
--- a/src/NmeaParser/Nmea/Gps/GPVTG.cs
+++ b/src/NmeaParser/Nmea/Gps/GPVTG.cs
@@ -28,10 +28,11 @@ namespace NmeaParser.Nmea.Gps
public class Gpvtg : NmeaMessage
{
///
- /// Called when the message is being loaded.
+ /// Initializes a new instance of the class.
///
+ /// The message type
/// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
+ public Gpvtg(string type, string[] message) : base(type, message)
{
if (message == null || message.Length < 7)
throw new ArgumentException("Invalid Gpvtg", "message");
@@ -44,21 +45,21 @@ namespace NmeaParser.Nmea.Gps
///
/// Course over ground relative to true north
///
- public double TrueCourseOverGround { get; private set; } = double.NaN;
+ public double TrueCourseOverGround { get; }
///
/// Course over ground relative to magnetic north
///
- public double MagneticCourseOverGround { get; private set; } = double.NaN;
+ public double MagneticCourseOverGround { get; }
///
/// Speed over ground in knots
///
- public double SpeedInKnots { get; private set; } = double.NaN;
+ public double SpeedInKnots { get; }
///
/// Speed over ground in kilometers/hour
///
- public double SpeedInKph { get; private set; } = double.NaN;
+ public double SpeedInKph { get; }
}
}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gps/GPZDA.cs b/src/NmeaParser/Nmea/Gps/GPZDA.cs
index 6ca6949..0574cff 100644
--- a/src/NmeaParser/Nmea/Gps/GPZDA.cs
+++ b/src/NmeaParser/Nmea/Gps/GPZDA.cs
@@ -4,5 +4,11 @@
[NmeaMessageType("GPZDA")]
public class Gpzda : Zda
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpzda(string type, string[] message) : base(type, message) { }
}
}
diff --git a/src/NmeaParser/Nmea/Gps/Garmin/PGRME.cs b/src/NmeaParser/Nmea/Gps/Garmin/PGRME.cs
index 899b1d5..649d9dd 100644
--- a/src/NmeaParser/Nmea/Gps/Garmin/PGRME.cs
+++ b/src/NmeaParser/Nmea/Gps/Garmin/PGRME.cs
@@ -30,13 +30,14 @@ namespace NmeaParser.Nmea.Gps.Garmin
[NmeaMessageType("PGRME")]
public class Pgrme : NmeaMessage
{
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 6)
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Pgrme(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 6)
throw new ArgumentException("Invalid PGRME", "message");
HorizontalError = NmeaMessage.StringToDouble(message[0]);
@@ -51,33 +52,33 @@ namespace NmeaParser.Nmea.Gps.Garmin
/// Estimated horizontal position error in meters (HPE)
///
/// Range: 0.0 to 999.9 meters
- public double HorizontalError { get; private set; }
+ public double HorizontalError{ get; }
///
/// Horizontal Error unit ('M' for Meters)
///
- public string HorizontalErrorUnits { get; private set; }
+ public string HorizontalErrorUnits{ get; }
///
/// Estimated vertical position error in meters (VPE)
///
/// Range: 0.0 to 999.9 meters
- public double VerticalError { get; private set; }
+ public double VerticalError{ get; }
///
/// Vertical Error unit ('M' for Meters)
///
- public string VerticalErrorUnits { get; private set; }
+ public string VerticalErrorUnits{ get; }
///
/// Overall spherical equivalent position error (EPE)
///
/// Range: 0.0 to 999.9 meters
- public double SphericalError { get; private set; }
+ public double SphericalError{ get; }
///
/// Spherical Error unit ('M' for Meters)
///
- public string SphericalErrorUnits { get; private set; }
+ public string SphericalErrorUnits{ get; }
}
}
diff --git a/src/NmeaParser/Nmea/Gps/Garmin/PGRMZ.cs b/src/NmeaParser/Nmea/Gps/Garmin/PGRMZ.cs
index 07b59b6..e06f19c 100644
--- a/src/NmeaParser/Nmea/Gps/Garmin/PGRMZ.cs
+++ b/src/NmeaParser/Nmea/Gps/Garmin/PGRMZ.cs
@@ -23,84 +23,86 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.Gps.Garmin
{
- ///
- /// Altitude Information
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pgrmz")]
- [NmeaMessageType("PGRMZ")]
- public class Pgrmz : NmeaMessage
- {
- ///
- /// Altitude unit
- ///
- public enum AltitudeUnit
- {
- ///
- /// Unknown
- ///
- Unknown,
- ///
- /// Feet
- ///
- Feet
- }
- ///
- /// Position Fix Dimension
- ///
- public enum PositionFixType : int
- {
- ///
- /// Unknown
- ///
- Unknown = 0,
- ///
- /// No fix
- ///
- NoFix = 1,
- ///
- /// 2D Fix
- ///
- Fix2D = 2,
- ///
- /// 3D Fix
- ///
- Fix3D = 3
- }
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 3)
- throw new ArgumentException("Invalid PGRMZ", "message");
-
- if (message[0].Length > 0)
- Altitude = double.Parse(message[0], CultureInfo.InvariantCulture);
- else
- Altitude = double.NaN;
- Unit = message[1] == "f" ? AltitudeUnit.Feet : AltitudeUnit.Unknown;
- int dim = -1;
- if (message[2].Length == 1 && int.TryParse(message[2], out dim))
- {
- if (dim >= (int)PositionFixType.NoFix && dim <= (int)PositionFixType.Fix3D)
- FixType = (PositionFixType)dim;
- }
- }
+ ///
+ /// Altitude Information
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pgrmz")]
+ [NmeaMessageType("PGRMZ")]
+ public class Pgrmz : NmeaMessage
+ {
+ ///
+ /// Altitude unit
+ ///
+ public enum AltitudeUnit
+ {
+ ///
+ /// Unknown
+ ///
+ Unknown,
+ ///
+ /// Feet
+ ///
+ Feet
+ }
+ ///
+ /// Position Fix Dimension
+ ///
+ public enum PositionFixType : int
+ {
+ ///
+ /// Unknown
+ ///
+ Unknown = 0,
+ ///
+ /// No fix
+ ///
+ NoFix = 1,
+ ///
+ /// 2D Fix
+ ///
+ Fix2D = 2,
+ ///
+ /// 3D Fix
+ ///
+ Fix3D = 3
+ }
- ///
- /// Current altitude
- ///
- public double Altitude { get; private set; }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Pgrmz(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 3)
+ throw new ArgumentException("Invalid PGRMZ", "message");
- ///
- /// Horizontal Error unit ('f' for Meters)
- ///
- public AltitudeUnit Unit { get; private set; }
+ if (message[0].Length > 0)
+ Altitude = double.Parse(message[0], CultureInfo.InvariantCulture);
+ else
+ Altitude = double.NaN;
+ Unit = message[1] == "f" ? AltitudeUnit.Feet : AltitudeUnit.Unknown;
+ int dim = -1;
+ if (message[2].Length == 1 && int.TryParse(message[2], out dim))
+ {
+ if (dim >= (int)PositionFixType.NoFix && dim <= (int)PositionFixType.Fix3D)
+ FixType = (PositionFixType)dim;
+ }
+ }
- ///
- /// Fix type
- ///
- public PositionFixType FixType { get; private set; }
- }
-}
+ ///
+ /// Current altitude
+ ///
+ public double Altitude { get; }
+
+ ///
+ /// Horizontal Error unit ('f' for Meters)
+ ///
+ public AltitudeUnit Unit { get; }
+
+ ///
+ /// Fix type
+ ///
+ public PositionFixType FixType { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Gps/Gpgns.cs b/src/NmeaParser/Nmea/Gps/Gpgns.cs
index f901423..6cb7f18 100644
--- a/src/NmeaParser/Nmea/Gps/Gpgns.cs
+++ b/src/NmeaParser/Nmea/Gps/Gpgns.cs
@@ -11,5 +11,11 @@ namespace NmeaParser.Nmea.Gps
[NmeaMessageType("GPGNS")]
public class Gpgns : Gns
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Gpgns(string type, string[] message) : base(type, message) { }
}
}
diff --git a/src/NmeaParser/Nmea/Gsa.cs b/src/NmeaParser/Nmea/Gsa.cs
index 32a7859..a908f1c 100644
--- a/src/NmeaParser/Nmea/Gsa.cs
+++ b/src/NmeaParser/Nmea/Gsa.cs
@@ -29,13 +29,14 @@ namespace NmeaParser.Nmea
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gsa")]
public abstract class Gsa : NmeaMessage
{
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 17)
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ protected Gsa(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 17)
throw new ArgumentException("Invalid GPGSA", "message");
GpsMode = message[0] == "A" ? Gps.Gpgsa.ModeSelection.Auto : Gps.Gpgsa.ModeSelection.Manual;
@@ -70,34 +71,34 @@ namespace NmeaParser.Nmea
///
/// Mode
///
- public Gps.Gpgsa.ModeSelection GpsMode { get; private set; }
+ public Gps.Gpgsa.ModeSelection GpsMode { get; }
///
/// Mode
///
- public Gps.Gpgsa.Mode FixMode { get; private set; }
+ public Gps.Gpgsa.Mode FixMode { get; }
///
/// IDs of SVs used in position fix
///
- public IReadOnlyList SVs { get; private set; }
+ public IReadOnlyList SVs { get; }
///
/// Dilution of precision
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pdop")]
- public double Pdop { get; private set; }
+ public double Pdop { get; }
///
/// Horizontal dilution of precision
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Hdop")]
- public double Hdop { get; private set; }
+ public double Hdop { get; }
///
/// Vertical dilution of precision
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Vdop")]
- public double Vdop { get; private set; }
+ public double Vdop { get; }
}
}
diff --git a/src/NmeaParser/Nmea/Gst.cs b/src/NmeaParser/Nmea/Gst.cs
index cc38c35..79e2e5e 100644
--- a/src/NmeaParser/Nmea/Gst.cs
+++ b/src/NmeaParser/Nmea/Gst.cs
@@ -30,10 +30,11 @@ namespace NmeaParser.Nmea
public abstract class Gst : NmeaMessage
{
///
- /// Called when the message is being loaded.
+ /// Initializes a new instance of the class.
///
+ /// The message type
/// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
+ protected Gst(string type, string[] message) : base(type, message)
{
if (message == null || message.Length < 8)
throw new ArgumentException("Invalid GPGST", "message");
@@ -50,28 +51,28 @@ namespace NmeaParser.Nmea
///
/// UTC of position fix
///
- public TimeSpan FixTime { get; private set; }
+ public TimeSpan FixTime { get; }
///
/// RMS value of the pseudorange residuals; includes carrier phase residuals during periods of RTK (float) and RTK (fixed) processing
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Rms")]
- public double Rms { get; private set; }
+ public double Rms { get; }
///
/// Error ellipse semi-major axis 1 sigma error, in meters
///
- public double SemiMajorError { get; private set; }
+ public double SemiMajorError { get; }
///
/// Error ellipse semi-minor axis 1 sigma error, in meters
///
- public double SemiMinorError { get; private set; }
+ public double SemiMinorError { get; }
///
/// Error ellipse orientation, degrees from true north
///
- public double ErrorOrientation { get; private set; }
+ public double ErrorOrientation { get; }
///
/// Latitude 1 sigma error, in meters
@@ -79,7 +80,7 @@ namespace NmeaParser.Nmea
///
/// The error expressed as one standard deviation.
///
- public double SigmaLatitudeError { get; private set; }
+ public double SigmaLatitudeError { get; }
///
/// Longitude 1 sigma error, in meters
@@ -87,7 +88,7 @@ namespace NmeaParser.Nmea
///
/// The error expressed as one standard deviation.
///
- public double SigmaLongitudeError { get; private set; }
+ public double SigmaLongitudeError { get; }
///
/// Height 1 sigma error, in meters
@@ -95,6 +96,6 @@ namespace NmeaParser.Nmea
///
/// The error expressed as one standard deviation.
///
- public double SigmaHeightError { get; private set; }
+ public double SigmaHeightError { get; }
}
}
diff --git a/src/NmeaParser/Nmea/Gsv.cs b/src/NmeaParser/Nmea/Gsv.cs
index 494df31..ba96b97 100644
--- a/src/NmeaParser/Nmea/Gsv.cs
+++ b/src/NmeaParser/Nmea/Gsv.cs
@@ -30,14 +30,15 @@ namespace NmeaParser.Nmea
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gsv")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public abstract class Gsv : NmeaMessage, IMultiPartMessage
- {
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 3)
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ protected Gsv(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 3)
throw new ArgumentException("Invalid GSV", "message");
TotalMessages = int.Parse(message[0], CultureInfo.InvariantCulture);
@@ -58,22 +59,22 @@ namespace NmeaParser.Nmea
///
/// Total number of messages of this type in this cycle
///
- public int TotalMessages { get; private set; }
+ public int TotalMessages { get; }
///
/// Message number
///
- public int MessageNumber { get; private set; }
+ public int MessageNumber { get; }
///
/// Total number of SVs in view
///
- public int SVsInView { get; private set; }
+ public int SVsInView { get; }
///
/// Satellite vehicles in this message part.
///
- public IReadOnlyList SVs { get; private set; }
+ public IReadOnlyList SVs { get; }
///
/// Returns an enumerator that iterates through the collection.
diff --git a/src/NmeaParser/Nmea/LaserRange/LaserRangeMessage.cs b/src/NmeaParser/Nmea/LaserRange/LaserRangeMessage.cs
index 6edde48..7817600 100644
--- a/src/NmeaParser/Nmea/LaserRange/LaserRangeMessage.cs
+++ b/src/NmeaParser/Nmea/LaserRange/LaserRangeMessage.cs
@@ -28,14 +28,15 @@ namespace NmeaParser.Nmea.LaserRange
/// Laser Range Measurement
///
public abstract class LaserRangeMessage : NmeaMessage
- {
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 9)
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ protected LaserRangeMessage(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 9)
throw new ArgumentException("Invalid Laser Range Message", "message");
HorizontalVector = message[0];
@@ -52,46 +53,46 @@ namespace NmeaParser.Nmea.LaserRange
///
/// Gets the horizontal vector.
///
- public string HorizontalVector { get; private set; }
+ public string HorizontalVector { get; }
///
/// Gets the horizontal distance.
///
- public double HorizontalDistance { get; private set; }
+ public double HorizontalDistance { get; }
///
/// Gets the units of the value.
///
- public char HorizontalDistanceUnits { get; private set; }
+ public char HorizontalDistanceUnits { get; }
///
/// Gets the horizontal angle.
///
- public double HorizontalAngle { get; private set; }
+ public double HorizontalAngle { get; }
///
/// Gets the units of the value.
///
- public char HorizontalAngleUnits { get; private set; }
+ public char HorizontalAngleUnits { get; }
///
/// Gets the vertical angle.
///
- public double VerticalAngle { get; private set; }
+ public double VerticalAngle { get; }
///
/// Gets the units of the value.
///
- public char VerticalAngleUnits { get; private set; }
+ public char VerticalAngleUnits { get; }
///
/// Gets the slope distance.
///
- public double SlopeDistance { get; private set; }
+ public double SlopeDistance { get; }
///
/// Gets the units of the value.
///
- public char SlopeDistanceUnits { get; private set; }
+ public char SlopeDistanceUnits { get; }
}
}
diff --git a/src/NmeaParser/Nmea/LaserRange/LaserTech/PLTIT.cs b/src/NmeaParser/Nmea/LaserRange/LaserTech/PLTIT.cs
index aadbd95..c32bc4d 100644
--- a/src/NmeaParser/Nmea/LaserRange/LaserTech/PLTIT.cs
+++ b/src/NmeaParser/Nmea/LaserRange/LaserTech/PLTIT.cs
@@ -29,6 +29,12 @@ namespace NmeaParser.Nmea.LaserRange.LaserTech
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pltit")]
[NmeaMessageType("PLTIT")]
public class Pltit : LaserRangeMessage
- {
- }
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Pltit(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLA.cs b/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLA.cs
index 89a05c3..26e80fb 100644
--- a/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLA.cs
+++ b/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLA.cs
@@ -29,6 +29,12 @@ namespace NmeaParser.Nmea.LaserRange.Trimble
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ptnla")]
[NmeaMessageType("PTNLA")]
public class Ptnla : LaserRangeMessage
- {
- }
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Ptnla(string type, string[] message) : base(type, message) { }
+ }
}
diff --git a/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLB.cs b/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLB.cs
index c10975a..c6bd5ed 100644
--- a/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLB.cs
+++ b/src/NmeaParser/Nmea/LaserRange/Trimble/PTNLB.cs
@@ -23,61 +23,63 @@ using System.Threading.Tasks;
namespace NmeaParser.Nmea.LaserRange.Trimble
{
- ///
- /// Tree Measurement
- ///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ptnlb")]
- [NmeaMessageType("PTNLB")]
- public class Ptnlb : NmeaMessage
- {
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 6)
- throw new ArgumentException("Invalid PTNLB", "message");
-
- TreeHeight = message[0];
- MeasuredTreeHeight = double.Parse(message[1], CultureInfo.InvariantCulture);
- MeasuredTreeHeightUnits = message[2][0];
- TreeDiameter = message[3];
- MeasuredTreeDiameter = double.Parse(message[4], CultureInfo.InvariantCulture);
- MeasuredTreeDiameterUnits = message[5][0];
- }
+ ///
+ /// Tree Measurement
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ptnlb")]
+ [NmeaMessageType("PTNLB")]
+ public class Ptnlb : NmeaMessage
+ {
- ///
- /// Gets the height of the tree.
- ///
- public string TreeHeight { get; private set; }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ public Ptnlb(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 6)
+ throw new ArgumentException("Invalid PTNLB", "message");
- ///
- /// Gets the message height of the tree.
- ///
- public double MeasuredTreeHeight { get; private set; }
+ TreeHeight = message[0];
+ MeasuredTreeHeight = double.Parse(message[1], CultureInfo.InvariantCulture);
+ MeasuredTreeHeightUnits = message[2][0];
+ TreeDiameter = message[3];
+ MeasuredTreeDiameter = double.Parse(message[4], CultureInfo.InvariantCulture);
+ MeasuredTreeDiameterUnits = message[5][0];
+ }
- ///
- /// Gets the units of the value.
- ///
- public char MeasuredTreeHeightUnits { get; private set; }
+ ///
+ /// Gets the height of the tree.
+ ///
+ public string TreeHeight { get; }
- ///
- /// Gets the tree diameter.
- ///
- public string TreeDiameter { get; private set; }
+ ///
+ /// Gets the message height of the tree.
+ ///
+ public double MeasuredTreeHeight { get; }
- ///
- /// Gets the measured tree diameter.
- ///
- public double MeasuredTreeDiameter { get; private set; }
+ ///
+ /// Gets the units of the value.
+ ///
+ public char MeasuredTreeHeightUnits { get; }
- ///
- /// Gets the units of the value.
- ///
- public char MeasuredTreeDiameterUnits { get; private set; }
+ ///
+ /// Gets the tree diameter.
+ ///
+ public string TreeDiameter { get; }
- //more to do...
-
- }
+ ///
+ /// Gets the measured tree diameter.
+ ///
+ public double MeasuredTreeDiameter { get; }
+
+ ///
+ /// Gets the units of the value.
+ ///
+ public char MeasuredTreeDiameterUnits { get; }
+
+ //more to do...
+
+ }
}
diff --git a/src/NmeaParser/Nmea/NmeaMessage.cs b/src/NmeaParser/Nmea/NmeaMessage.cs
index ad492e7..779da33 100644
--- a/src/NmeaParser/Nmea/NmeaMessage.cs
+++ b/src/NmeaParser/Nmea/NmeaMessage.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) 2014 Morten Nielsen
//
// Licensed under the Microsoft Public License (Ms-PL) (the "License");
@@ -49,6 +49,44 @@ namespace NmeaParser.Nmea
///
public abstract class NmeaMessage
{
+ private static Dictionary messageTypes;
+
+ ///
+ /// Initializes an instance of the NMEA message
+ ///
+ /// Type
+ /// Message values
+ protected NmeaMessage(string messageType, string[] messageParts)
+ {
+ MessageType = messageType;
+ MessageParts = messageParts;
+ }
+
+ static NmeaMessage()
+ {
+ messageTypes = new Dictionary();
+ var typeinfo = typeof(NmeaMessage).GetTypeInfo();
+ foreach (var subclass in typeinfo.Assembly.DefinedTypes.Where(t => t.IsSubclassOf(typeof(NmeaMessage))))
+ {
+ var attr = subclass.GetCustomAttribute(false);
+ if (attr != null)
+ {
+ if (!subclass.IsAbstract)
+ {
+ foreach (var c in subclass.DeclaredConstructors)
+ {
+ var pinfo = c.GetParameters();
+ if (pinfo.Length == 2 && pinfo[0].ParameterType == typeof(string) && pinfo[1].ParameterType == typeof(string[]))
+ {
+ messageTypes.Add(attr.NmeaType, c);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
///
/// Parses the specified NMEA message.
///
@@ -86,70 +124,25 @@ namespace NmeaParser.Nmea
string[] parts = message.Split(new char[] { ',' });
string MessageType = parts[0].Substring(1);
string[] MessageParts = parts.Skip(1).ToArray();
- if(messageTypes == null)
- {
- LoadResponseTypes();
- }
- NmeaMessage msg = null;
if (messageTypes.ContainsKey(MessageType))
{
- msg = (NmeaMessage)messageTypes[MessageType].Invoke(new object[] { });
+ return (NmeaMessage)messageTypes[MessageType].Invoke(new object[] { MessageType, MessageParts });
}
else
{
- msg = new UnknownMessage();
- }
- msg.MessageType = MessageType;
- msg.MessageParts = MessageParts;
- msg.OnLoadMessage(MessageParts);
- return msg;
- }
-
- private static void LoadResponseTypes()
- {
- messageTypes = new Dictionary();
- var typeinfo = typeof(NmeaMessage).GetTypeInfo();
- foreach (var subclass in typeinfo.Assembly.DefinedTypes.Where(t => t.IsSubclassOf(typeof(NmeaMessage))))
- {
- var attr = subclass.GetCustomAttribute(false);
- if (attr != null)
- {
- if (!subclass.IsAbstract)
- {
- foreach (var c in subclass.DeclaredConstructors)
- {
- var pinfo = c.GetParameters();
- if (pinfo.Length == 0)
- {
- messageTypes.Add(attr.NmeaType, c);
- break;
- }
- }
- }
- }
+ return new UnknownMessage(MessageType, MessageParts);
}
}
- private static Dictionary messageTypes;
-
///
/// Gets the NMEA message parts.
///
- protected IReadOnlyList MessageParts { get; private set; }
+ protected IReadOnlyList MessageParts { get; }
///
/// Gets the NMEA type id for the message.
///
- public string MessageType { get; private set; }
-
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- ///
- /// Implement this method to create a custom NMEA message.
- ///
- protected virtual void OnLoadMessage(string[] message) { MessageParts = message; }
+ public string MessageType { get; }
///
/// Returns a that represents this instance.
diff --git a/src/NmeaParser/Nmea/Rmc.cs b/src/NmeaParser/Nmea/Rmc.cs
index 8ef289a..cc3095e 100644
--- a/src/NmeaParser/Nmea/Rmc.cs
+++ b/src/NmeaParser/Nmea/Rmc.cs
@@ -29,13 +29,14 @@ namespace NmeaParser.Nmea
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprmc")]
public abstract class Rmc : NmeaMessage
{
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- if (message == null || message.Length < 11)
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message type
+ /// The NMEA message values.
+ protected Rmc(string type, string[] message) : base(type, message)
+ {
+ if (message == null || message.Length < 11)
throw new ArgumentException("Invalid GPRMC", "message");
if (message[8].Length == 6 && message[0].Length >= 6)
@@ -60,36 +61,36 @@ namespace NmeaParser.Nmea
///
/// Fix Time
///
- public DateTime FixTime { get; private set; }
+ public DateTime FixTime { get; }
///
/// Gets a value whether the device is active
///
- public bool Active { get; private set; }
+ public bool Active { get; }
///
/// Latitude
///
- public double Latitude { get; private set; }
+ public double Latitude { get; }
///
/// Longitude
///
- public double Longitude { get; private set; }
+ public double Longitude { get; }
///
/// Speed over the ground in knots
///
- public double Speed { get; private set; }
+ public double Speed { get; }
///
/// Track angle in degrees True
///
- public double Course { get; private set; }
+ public double Course { get; }
///
/// Magnetic Variation
///
- public double MagneticVariation { get; private set; }
+ public double MagneticVariation { get; }
}
}
diff --git a/src/NmeaParser/Nmea/UnknownMessage.cs b/src/NmeaParser/Nmea/UnknownMessage.cs
index 5c20ced..e1c1531 100644
--- a/src/NmeaParser/Nmea/UnknownMessage.cs
+++ b/src/NmeaParser/Nmea/UnknownMessage.cs
@@ -27,16 +27,11 @@ namespace NmeaParser.Nmea
///
public class UnknownMessage : NmeaMessage
{
+ internal UnknownMessage(string type, string[] messageParts) : base(type, messageParts) { }
+
///
/// Gets the nmea value array.
///
public IReadOnlyList Values { get { return base.MessageParts; } }
- ///
- /// Called when the message is being loaded.
- ///
- /// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
- {
- }
}
}
diff --git a/src/NmeaParser/Nmea/Zda.cs b/src/NmeaParser/Nmea/Zda.cs
index 7d2b851..53e4633 100644
--- a/src/NmeaParser/Nmea/Zda.cs
+++ b/src/NmeaParser/Nmea/Zda.cs
@@ -10,14 +10,15 @@ namespace NmeaParser.Nmea
public abstract class Zda : NmeaMessage
{
///
- /// Called when the message is being loaded.
+ /// Initializes a new instance of the class.
///
+ /// The message type
/// The NMEA message values.
- protected override void OnLoadMessage(string[] message)
+ protected Zda(string type, string[] message) : base(type, message)
{
if (message?.Length != 6)
{
- throw new ArgumentException("Invalid GNGST", nameof(message));
+ throw new ArgumentException("Invalid ZDA", nameof(message));
}
var time = StringToTimeSpan(message[0]);
@@ -33,6 +34,9 @@ namespace NmeaParser.Nmea
// specify this, so we're just ignoring it.
}
- public DateTime FixDateTime { get; private set; }
+ ///
+ /// Gets the time of fix
+ ///
+ public DateTime FixDateTime { get; }
}
}
diff --git a/src/NmeaParser/NmeaDevice.cs b/src/NmeaParser/NmeaDevice.cs
index adfe1a7..6d379de 100644
--- a/src/NmeaParser/NmeaDevice.cs
+++ b/src/NmeaParser/NmeaDevice.cs
@@ -298,13 +298,15 @@ namespace NmeaParser
internal NmeaMessageReceivedEventArgs(Nmea.NmeaMessage message) {
Message = message;
}
+
///
/// Gets the nmea message.
///
///
/// The nmea message.
///
- public Nmea.NmeaMessage Message { get; private set; }
+ public Nmea.NmeaMessage Message { get; }
+
///
/// Gets a value indicating whether this instance is a multi part message.
///
@@ -312,6 +314,7 @@ namespace NmeaParser
/// true if this instance is multi part; otherwise, false.
///
public bool IsMultipart { get; internal set; }
+
///
/// Gets the message parts if this is a multi-part message and all message parts has been received.
///
diff --git a/src/NmeaParser/NmeaParser.csproj b/src/NmeaParser/NmeaParser.csproj
index 4fa8287..0156347 100644
--- a/src/NmeaParser/NmeaParser.csproj
+++ b/src/NmeaParser/NmeaParser.csproj
@@ -1,70 +1,72 @@
-
-
-
- netstandard1.4;net451;monoandroid50;monoandroid70;xamarinios10;uap10.0
- true
- true
- Debug;Release
- AnyCPU
- Morten Nielsen
- Morten Nielsen
- An NMEA stream parser for serial port, bluetooth and file-based nmea simulation.
- nmea winrt wpf uwp xamarin gps serialport bluetooth
- SharpGIS.NmeaParser
- 1.11
- http://opensource.org/licenses/ms-pl.html
- https://github.com/dotMorten/NmeaParser
- https://github.com/dotMorten/NmeaParser
- en-US
- Copyright © Morten Nielsen 2015-2018
- $(MSBuildThisFileDirectory)..\Bin\$(Configuration)
- $(OutDir)
- 1.10.1.0
- 1.10.1.0
- Fixed missing shutdown of Android location device.
-Exposed non-NMEA based Accuracy estimate on Android location device.
-
-
-
- $(DefineConstants);NETSTANDARD
- NMEA Parser - .NET Standard 1.4
-
-
-
- $(DefineConstants);NETFX
- NMEA Parser - .NET Framework 4.5.1
-
-
-
- $(DefineConstants);XAMARIN;API_LEVEL_21
- NMEA Parser - Android
-
-
- $(DefineConstants);XAMARIN;API_LEVEL_24
- NMEA Parser - Android
-
-
-
- $(DefineConstants);XAMARIN
- NMEA Parser - iOS
-
-
-
- UAP
- 10.0.14393.0
- 10.0.14393.0
- NMEA Parser - UWP
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ netstandard1.4;net451;monoandroid50;monoandroid70;xamarinios10;uap10.0
+ true
+ true
+ Debug;Release
+ AnyCPU
+ Morten Nielsen
+ Morten Nielsen
+ An NMEA stream parser for serial port, bluetooth and file-based nmea simulation.
+ nmea winrt wpf uwp xamarin gps serialport bluetooth
+ SharpGIS.NmeaParser
+ 1.11
+ Apache-2.0
+ https://github.com/dotMorten/NmeaParser
+ https://github.com/dotMorten/NmeaParser
+ en-US
+ Copyright © Morten Nielsen 2015-2019
+ $(MSBuildThisFileDirectory)..\Bin\$(Configuration)
+ $(OutDir)
+ Lots of API cleanup to avoid null-references. Simplify object model for creation (semi-breaking). Updated license to Apache 2.0
+ true
+ true
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+ 7.3
+
+
+
+ $(DefineConstants);NETSTANDARD
+ NMEA Parser - .NET Standard 1.4
+
+
+
+ $(DefineConstants);NETFX
+ NMEA Parser - .NET Framework 4.5.1
+
+
+
+ $(DefineConstants);XAMARIN;API_LEVEL_21
+ NMEA Parser - Android
+
+
+ $(DefineConstants);XAMARIN;API_LEVEL_24
+ NMEA Parser - Android
+
+
+
+ $(DefineConstants);XAMARIN
+ NMEA Parser - iOS
+
+
+
+ UAP
+ 10.0.14393.0
+ 10.0.14393.0
+ NMEA Parser - UWP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/UnitTests/NmeaParser.Tests.NET45/NmeaParser.Tests.NET45.csproj b/src/UnitTests/NmeaParser.Tests.NET45/NmeaParser.Tests.NET45.csproj
index 4f1a169..dc76ce7 100644
--- a/src/UnitTests/NmeaParser.Tests.NET45/NmeaParser.Tests.NET45.csproj
+++ b/src/UnitTests/NmeaParser.Tests.NET45/NmeaParser.Tests.NET45.csproj
@@ -42,10 +42,10 @@
- 1.2.0
+ 1.4.0
- 1.2.0
+ 1.4.0