Class NmeaMessageParser


  • public class NmeaMessageParser
    extends java.lang.Object
    Parses NMEA messages.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.LinkedHashMap<java.lang.String,​java.lang.String> extractTags​(java.lang.String s)
      Returns the tags from the tag block section of the message (NMEA v4.0).
      NmeaMessage parse​(java.lang.String line)  
      NmeaMessage parse​(java.lang.String line, boolean validateChecksum)
      Return an NmeaMessage from the given NMEA line.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NmeaMessageParser

        public NmeaMessageParser()
    • Method Detail

      • parse

        public NmeaMessage parse​(java.lang.String line)
      • parse

        public NmeaMessage parse​(java.lang.String line,
                                 boolean validateChecksum)
        Return an NmeaMessage from the given NMEA line. If validate checksum is true and the line fails the checksum check then an {@link NmeaMessageParseException) is thrown.
        Parameters:
        line - NMEA line (without EOL terminator)
        validateChecksum - if true then throws NmeaMessageParseException on invalid checksum
        Returns:
        parsed message
        Throws:
        NmeaMessageParseException - if tag block badly formed or no checksum found or if validateChecksum is true and line fails the checksum check
      • extractTags

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> extractTags​(java.lang.String s)
        Returns the tags from the tag block section of the message (NMEA v4.0). If there is no tag block then returns an empty map.
        Parameters:
        s -
        Returns: