Class NtripParser

java.lang.Object
com.signalquest.api.NtripParser

public class NtripParser extends Object
Parses the NTRIP authorization and RTCM messages.

NTRIP responses can contain multiple and partial RTCM messages.

Only SitePoint-handled RTCM message types are reported.

  • Constructor Details

    • NtripParser

      public NtripParser()
      Creates an NTRIP parser.
  • Method Details

    • parseRtcm

      public void parseRtcm(@NonNull byte[] data) throws NtripParser.ParseException
      Parses the RTCM messages.

      Call after authorization is confirmed using parseAuthorized(byte[]). Results retrieved by calling next(int).

      Parameters:
      data - The bytes, after a successful authorization response, from the aiding NTRIP server
      Throws:
      NtripParser.ParseException - with a message to relay to SignalQuest.
    • parseAuthorized

      public NtripParser.AuthorizationResult parseAuthorized(@NonNull byte[] data) throws NtripParser.AuthorizationFailure
      Parses an NTRIP server authorization response.
      Parameters:
      data - The initial response bytes from an NTRIP server aiding request
      Returns:
      AuthorizationResult
      1. INSUFFICIENT_DATA: Pass in the next response chunk.
      2. SUCCESS: Authorization succeeded.
      Throws:
      NtripParser.AuthorizationFailure - containing detail on why the authorization failed.
    • next

      public byte[] next(int maxLength)