public final class GnssNavigationMessage extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
GnssNavigationMessage.Callback
Used for receiving GNSS satellite Navigation Messages from the GNSS engine.
|
static interface |
GnssNavigationMessage.GnssNavigationMessageType
The type of the GNSS Navigation Message
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<GnssNavigationMessage> |
CREATOR |
static int |
STATUS_PARITY_PASSED
The Navigation Message was received without any parity error in its navigation words.
|
static int |
STATUS_PARITY_REBUILT
The Navigation Message was received with words that failed parity check, but the receiver was
able to correct those words.
|
static int |
STATUS_UNKNOWN
The Navigation Message Status is 'unknown'.
|
static int |
TYPE_BDS_D1
Beidou D1 message contained in the structure.
|
static int |
TYPE_BDS_D2
Beidou D2 message contained in the structure.
|
static int |
TYPE_GAL_F
Galileo F/NAV message contained in the structure.
|
static int |
TYPE_GAL_I
Galileo I/NAV message contained in the structure.
|
static int |
TYPE_GLO_L1CA
Glonass L1 CA message contained in the structure.
|
static int |
TYPE_GPS_CNAV2
GPS CNAV-2 message contained in the structure.
|
static int |
TYPE_GPS_L1CA
GPS L1 C/A message contained in the structure.
|
static int |
TYPE_GPS_L2CNAV
GPS L2-CNAV message contained in the structure.
|
static int |
TYPE_GPS_L5CNAV
GPS L5-CNAV message contained in the structure.
|
static int |
TYPE_UNKNOWN
Message type unknown
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
GnssNavigationMessage() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
byte[] |
getData()
Gets the data of the reported GPS message.
|
int |
getMessageId()
Gets the Message identifier.
|
int |
getStatus()
Gets the Status of the navigation message contained in the object.
|
int |
getSubmessageId()
Gets the sub-message identifier, relevant to the
getType() of the message. |
int |
getSvid()
Gets the satellite ID.
|
int |
getType()
Gets the type of the navigation message contained in the object.
|
void |
reset()
Resets all the contents to its original state.
|
void |
set(GnssNavigationMessage navigationMessage)
Sets all contents to the values stored in the provided object.
|
void |
setData(byte[] value)
Sets the data associated with the Navigation Message.
|
void |
setMessageId(int value)
Sets the Message Identifier.
|
void |
setStatus(int value)
Sets the status of the navigation message.
|
void |
setSubmessageId(int value)
Sets the Sub-message identifier.
|
void |
setSvid(int value)
Sets the satellite ID.
|
void |
setType(int value)
Sets the type of the navigation message.
|
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel parcel,
int flags)
Flatten this object in to a Parcel.
|
public static final int TYPE_UNKNOWN
public static final int TYPE_GPS_L1CA
public static final int TYPE_GPS_L2CNAV
public static final int TYPE_GPS_L5CNAV
public static final int TYPE_GPS_CNAV2
public static final int TYPE_GLO_L1CA
public static final int TYPE_BDS_D1
public static final int TYPE_BDS_D2
public static final int TYPE_GAL_I
public static final int TYPE_GAL_F
public static final int STATUS_UNKNOWN
public static final int STATUS_PARITY_PASSED
public static final int STATUS_PARITY_REBUILT
public static final Parcelable.Creator<GnssNavigationMessage> CREATOR
public void set(GnssNavigationMessage navigationMessage)
public void reset()
public int getType()
public void setType(int value)
public int getSvid()
Range varies by constellation. See definition at GnssStatus#getSvid(int)
public void setSvid(int value)
public int getMessageId()
This provides an index to help with complete Navigation Message assembly. Similar identifiers within the data bits themselves often supplement this information, in ways even more specific to each message type; see the relevant satellite constellation ICDs for details.
public void setMessageId(int value)
public int getSubmessageId()
getType()
of the message.
public void setSubmessageId(int value)
public byte[] getData()
The bytes (or words) specified using big endian format (MSB first).
public void setData(byte[] value)
public int getStatus()
public void setStatus(int value)
public void writeToParcel(Parcel parcel, int flags)
Parcelable
writeToParcel
in interface Parcelable
parcel
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())