接口 SentenceListener
- 所有超级接口:
EventListener
- 所有已知实现类:
AbstractAISMessageListener,AbstractProvider,AbstractSentenceListener,AbstractUBXMessageListener,AISListenerExample,FileExample,HeadingProvider,PositionProvider,SatelliteInfoProvider,SentenceListenerExamples.GSAListener,SentenceListenerExamples.MultiSentenceListener,SentenceListenerExamples.SingleSentenceListener,SerialPortExample,TypedSentenceListenerExample
Base interface for listening to SentenceEvents.
- 作者:
- Kimmo Tuukkanen
- 另请参阅:
-
方法概要
修饰符和类型方法说明voidCalled afterSentenceReaderhas timed out for receiving new data.voidCalled beforeSentenceReaderstarts dispatching events.voidCalled afterSentenceReaderhas permanently stopped reading, either due to an error or by calling theSentenceReader.stop()method.voidsentenceRead(SentenceEvent event) Called bySentenceReaderwhen a single NMEA 0183 sentence has been read and parsed from the data stream.
-
方法详细资料
-
readingPaused
void readingPaused()Called after
SentenceReaderhas timed out for receiving new data. Indicates that the reader is still active and waiting for new data which isn't currently available for some reason. For example, the device may have stopped broadcasting or the end of a file has been reached.Default time for timeout is defined by
SentenceReader.DEFAULT_TIMEOUT. This value can be overridden withSentenceReader.setPauseTimeout(int). -
readingStarted
void readingStarted()Called beforeSentenceReaderstarts dispatching events. Indicates that the reader is active and receiving data. Also, this notification occurs when the dispatching continues again afterreadingPaused()has occurred. -
readingStopped
void readingStopped()Called afterSentenceReaderhas permanently stopped reading, either due to an error or by calling theSentenceReader.stop()method. -
sentenceRead
Called bySentenceReaderwhen a single NMEA 0183 sentence has been read and parsed from the data stream. By default, only supported sentences defined inSentenceIdare dispatched.- 参数:
event- SentenceEvent containing the data.
-