Class AisNmeaMessage


  • public class AisNmeaMessage
    extends java.lang.Object
    Wraps an NMEA line containing an AIS message with accessor methods.
    Author:
    dxm
    • Constructor Detail

      • AisNmeaMessage

        public AisNmeaMessage​(java.lang.String line)
        Constructor.
        Parameters:
        line - is an NMEA line containing an AIS message.
      • AisNmeaMessage

        public AisNmeaMessage​(NmeaMessage nmea)
    • Method Detail

      • getTime

        public java.lang.Long getTime()
        Returns the tag block unix time value.
        Returns:
      • getTalker

        public Talker getTalker()
        Returns the Talker corresponding to the first two characters of the message format type (e.g. AIVDM -> AI). If not present or not recognized then returns Talker.UNKNOWN.
        Returns:
        talker
      • getFormat

        public java.lang.String getFormat()
        Returns the NMEA format (from the first column after the tag block if it exists).
        Returns:
      • getFragmentCount

        public int getFragmentCount()
        Returns the count of fragments.
        Returns:
      • getFragmentNumber

        public int getFragmentNumber()
        Returns the current fragment number.
        Returns:
      • getSequentialMessageId

        public java.lang.String getSequentialMessageId()
        Returns the sequential message id.
        Returns:
      • getChannel

        public java.lang.String getChannel()
        Returns the channel.
        Returns:
      • getPadBits

        public int getPadBits()
      • getMessage

        public AisMessage getMessage()
        Returns the parsed contents of column 5 of the AIS NMEA line.
        Returns:
      • getTimestampedMessage

        public Timestamped<AisMessage> getTimestampedMessage()
        Returns null if there is no timestamp otherwise returns a timestamped message. Note that null is returned instead of using an Optional to reduce allocation pressures.
        Returns:
        timestamped message
      • getChecksum

        public java.lang.String getChecksum()
        Returns the checksum (last field in the NMEA line).
        Returns: