Package com.signalquest.api
Class NtripParser
java.lang.Object
com.signalquest.api.NtripParser
Parses the NTRIP authorization and RTCM messages.
NTRIP responses can contain multiple and partial RTCM messages.
Only SitePoint-handled RTCM message types are reported.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Detail for an NTRIP authorization failure.static enum
Whether the parsed data was insufficient (send the next response chunk) or was sufficient and correct for authorization.static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
next
(int maxLength) parseAuthorized
(byte[] data) Parses an NTRIP server authorization response.void
parseRtcm
(byte[] data) Parses the RTCM messages.
-
Constructor Details
-
NtripParser
public NtripParser()Creates an NTRIP parser.
-
-
Method Details
-
parseRtcm
Parses the RTCM messages.Call after authorization is confirmed using
parseAuthorized(byte[])
. Results retrieved by callingnext(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
- INSUFFICIENT_DATA: Pass in the next response chunk.
- SUCCESS: Authorization succeeded.
- Throws:
NtripParser.AuthorizationFailure
- containing detail on why the authorization failed.
-
next
public byte[] next(int maxLength)
-