接口 AISSentence
- 所有超级接口:
Sentence
Base interface for all AIS sentences (Automatic Identification System). Notice that "AIS" does not refer to NMEA sentence type, but another system/standard that transmits it's messages using NMEA 0183.
AIS sentences are parsed in two phases and they all share the same NMEA sentence layout, so there is no dedicated interfaces for each AIS sentence type (VDM, VDO etc).
Example:
!AIVDM,1,1,,B,177KQJ5000G?tO`K>RA1wUbN0TKH,0*5C
- 作者:
- Lázár József, Kimmo Tuukkanen
-
字段概要
从接口继承的字段 net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR -
方法概要
修饰符和类型方法说明intReturns the number of fill bits required to pad the data payload to a 6 bit boundary, ranging from 0 to 5.intReturns the fragment number of this sentence (1-based).Returns the sequential message ID for multi-sentence messages.intNumber of fragments in the currently accumulating message.Returns the raw 6-bit decoded message.Returns the radio channel information of the messsage.booleanTells if this is the first fragment in message sequence.booleanTells if the AIS message is being delivered over multiple sentences.booleanTells if this is the last fragment in message sequence.booleanisPartOfMessage(AISSentence sentence) Tells if given sentence is part of message sequence.从接口继承的方法 net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
-
方法详细资料
-
getNumberOfFragments
int getNumberOfFragments()Number of fragments in the currently accumulating message.- 返回:
- number of fragments.
-
getFragmentNumber
int getFragmentNumber()Returns the fragment number of this sentence (1-based).- 返回:
- fragment index
-
getMessageId
String getMessageId()Returns the sequential message ID for multi-sentence messages.- 返回:
- sequential message ID
-
getRadioChannel
String getRadioChannel()Returns the radio channel information of the messsage.- 返回:
- radio channel id
-
getPayload
String getPayload()Returns the raw 6-bit decoded message.- 返回:
- message body
-
getFillBits
int getFillBits()Returns the number of fill bits required to pad the data payload to a 6 bit boundary, ranging from 0 to 5. Equivalently, subtracting 5 from this tells how many least significant bits of the last 6-bit nibble in the data payload should be ignored.- 返回:
- number of fill bits
-
isFragmented
boolean isFragmented()Tells if the AIS message is being delivered over multiple sentences.- 返回:
- true if this sentence is part of a sequence
-
isFirstFragment
boolean isFirstFragment()Tells if this is the first fragment in message sequence.- 返回:
- true if first fragment in sequence
-
isLastFragment
boolean isLastFragment()Tells if this is the last fragment in message sequence.- 返回:
- true if last part of a sequence
-
isPartOfMessage
Tells if given sentence is part of message sequence.
Sentences are considered to belong in same sequence when the given sentence meets the following conditions:
- Same number of fragments, higher fragment #, same channel and same message id
- Same number of fragments, next fragment #, and either same channel or same message id
- 参数:
sentence- AISSentence to compare with.- 返回:
- true if this and given sentence belong in same sequence
-