类 AISMessageParser
java.lang.Object
net.sf.marineapi.ais.parser.AISMessageParser
- 所有已实现的接口:
AISMessage
Base class for all AIS messages.
- 作者:
- Lázár József, Kimmo Tuukkanen
-
构造器概要
构造器限定符构造器说明Default constructor.protectedConstructor with six-bit content decoder.protectedAISMessageParser(Sixbit sb, int len) Constructor with six-bit content decoder.protectedAISMessageParser(Sixbit sb, int min, int max) Constructor with six-bit content decoder.AISMessageParser(AISSentence... sentences) Construct a parser with given AIS sentences. -
方法概要
修饰符和类型方法说明protected voidAdd a new rule violation to this messageintReturns the message type.intgetMMSI()Returns the unique identifier of the transmitting ship (MMSI, Maritime Mobile Service Identity).intReturns the number of violations.intTells how many times the message has been repeated.Returns list of discoverd data violations.
-
构造器详细资料
-
AISMessageParser
public AISMessageParser()Default constructor. Message content musts be appended before using the parser.- 另请参阅:
-
append(String, int, int)
-
AISMessageParser
Construct a parser with given AIS sentences. The result will parser for common AIS fields (type, repeat and MMSI), from which the actual message type can be determined for further parsing.- 参数:
sentences- Single AIS sentence or a sequence of sentences.
-
AISMessageParser
Constructor with six-bit content decoder.- 参数:
sb- A non-empty six-bit decoder.
-
AISMessageParser
Constructor with six-bit content decoder.- 参数:
sb- A non-empty six-bit decoder.len- Expected message length (bits)
-
AISMessageParser
Constructor with six-bit content decoder.- 参数:
sb- A non-empty six-bit decoder.min- Expected minimum length of message (bits)max- Expected maximum length of message (bits)
-
-
方法详细资料
-
addViolation
Add a new rule violation to this message- 参数:
v- Violation to add
-
getNrOfViolations
public int getNrOfViolations()Returns the number of violations.- 返回:
- Number of violations.
-
getViolations
Returns list of discoverd data violations.- 返回:
- Number of violations.
-
getMessageType
public int getMessageType()从接口复制的说明:AISMessageReturns the message type.- 指定者:
getMessageType在接口中AISMessage- 返回:
- Message type in range from 1 to 27.
-
getRepeatIndicator
public int getRepeatIndicator()从接口复制的说明:AISMessageTells how many times the message has been repeated.- 指定者:
getRepeatIndicator在接口中AISMessage- 返回:
- the number of repeats
-
getMMSI
public int getMMSI()从接口复制的说明:AISMessageReturns the unique identifier of the transmitting ship (MMSI, Maritime Mobile Service Identity).- 指定者:
getMMSI在接口中AISMessage- 返回:
- MMSI identifier
-