Package NMEA

Class NMEADataBlock


public class NMEADataBlock extends PamDataBlock<NMEADataUnit>
Special type of data block, just for NMEA data. Instead of deleting data on a timer or owing to the wishes of subscribers, it keeps exactly one copy of each NMEA sentence.
Author:
Doug Gillespie
See Also:
  • Constructor Details

    • NMEADataBlock

      public NMEADataBlock(String dataName, PamProcess parentProcess, int channelMap)
  • Method Details

    • addPamData

      public void addPamData(NMEADataUnit pamDataUnit)
      Description copied from class: PamDataBlock
      Adds a new PamDataUnit to the PamDataBlock. When the data unit is added, PamObservers that have subscribed to the block will be notified.
      If the data unit already has a UID, it will be left as is.
      Overrides:
      addPamData in class PamDataBlock<NMEADataUnit>
      Parameters:
      pamDataUnit - Reference to a PamDataUnit
    • isNmeaStartCharacter

      public static boolean isNmeaStartCharacter(char ch)
    • getSubString

      public static String getSubString(StringBuffer stringBuffer, int pos)
      Extract a sub string only using standard NMEA separator characters , and *
      Parameters:
      stringBuffer - string to separate
      pos - substring position
      Returns:
      sub string
    • getSubString

      public static String getSubString(StringBuffer stringBuffer, int pos, Character[] deliminators)
      Can call with a different list of separators for sub string. Used in some of the Network REceive functions which include ; which must not be used in the standard data or it messes up AIS.
      Parameters:
      stringBuffer - string buffer to separate
      pos - sub string number
      deliminators - list of separator characters.
      Returns:
      sub string.
    • findNMEADataUnit

      public NMEADataUnit findNMEADataUnit(String stringName)
    • six2eight

      public static NMEABitArray six2eight(String charData, int fillBits)