Show / Hide Table of Contents

Interface INmeaLineStreamProcessor

Receives the lines parsed from an NMEA file by NmeaStreamParser.

Namespace: Ais.Net
Assembly: Ais.Net.dll
Syntax
public interface INmeaLineStreamProcessor
Remarks

Processors implementing this interface will receive each separate line, which might contain only a fragment of an AIS message. If you want to process entire AIS messages, implement INmeaAisMessageStreamProcessor instead.

Methods

| Improve this Doc View Source

OnCompleted()

Called when all lines have been processed.

Declaration
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
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
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
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.

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