Show / Hide Table of Contents

Class NmeaLineToAisStreamAdapter

Processes NMEA message lines, and passes their payloads as complete AIS messages to an INmeaAisMessageStreamProcessor, reassembling any messages that were split across multiple NMEA lines.

Inheritance
System.Object
NmeaLineToAisStreamAdapter
Implements
INmeaLineStreamProcessor
IDisposable
Namespace: Ais.Net
Assembly: Ais.Net.dll
Syntax
public class NmeaLineToAisStreamAdapter : object, INmeaLineStreamProcessor, IDisposable

Constructors

| Improve this Doc View Source

NmeaLineToAisStreamAdapter(INmeaAisMessageStreamProcessor)

Creates a NmeaLineToAisStreamAdapter.

Declaration
public NmeaLineToAisStreamAdapter(INmeaAisMessageStreamProcessor messageProcessor)
Parameters
Type Name Description
INmeaAisMessageStreamProcessor messageProcessor

The message process to which complete AIS messages are to be passed.

| Improve this Doc View Source

NmeaLineToAisStreamAdapter(INmeaAisMessageStreamProcessor, NmeaParserOptions)

Creates a NmeaLineToAisStreamAdapter.

Declaration
public NmeaLineToAisStreamAdapter(INmeaAisMessageStreamProcessor messageProcessor, NmeaParserOptions options)
Parameters
Type Name Description
INmeaAisMessageStreamProcessor messageProcessor

The message process to which complete AIS messages are to be passed.

NmeaParserOptions options

Configures parser behaviour.

Methods

| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

OnCompleted()

Called when all lines have been processed.

Declaration
public void OnCompleted()
| Improve this Doc View Source

OnError(ReadOnlySpan<Byte>, Exception, Int32)

Called when a line cannot be parsed, e.g. it does not contain a well-formed NMEA message.

Declaration
public void OnError(in ReadOnlySpan<byte> line, Exception error, int lineNumber)
Parameters
Type Name Description
ReadOnlySpan<System.Byte> line

The line that cannot be parsed.

Exception error

An exception describing the problem.

System.Int32 lineNumber

The 1-based line number on which the error was detected.

| Improve this Doc View Source

OnNext(NmeaLineParser, Int32)

Called for each non-empty line.

Declaration
public void OnNext(in NmeaLineParser parsedLine, int lineNumber)
Parameters
Type Name Description
NmeaLineParser parsedLine

The parsed line.

System.Int32 lineNumber

The 1-based line number.

| Improve this Doc View Source

Progress(Boolean, Int32, Int32, Int32, Int32)

Called regularly to provide progress reports, and always called at the end.

Declaration
public void Progress(bool done, int totalLines, int totalTicks, int linesSinceLastUpdate, int ticksSinceLastUpdate)
Parameters
Type Name Description
System.Boolean done

True if all processing is complete.

System.Int32 totalLines

The number of lines processed.

System.Int32 totalTicks

The number of milliseconds of processing.

System.Int32 linesSinceLastUpdate

The number of lines since the last progress notification.

System.Int32 ticksSinceLastUpdate

The number of ticks since the last progress notification.

Implements

INmeaLineStreamProcessor
IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX