Class NmeaStreamParser
Processes streams containing lines of ASCII-encoded text, each containing an NMEA message.
Inheritance
Namespace: Ais.Net
Assembly: Ais.Net.dll
Syntax
public static class NmeaStreamParser : object
Methods
| Improve this Doc View SourceParseFileAsync(String, INmeaAisMessageStreamProcessor)
Process the contents of a file one AIS message at a time.
Declaration
public static Task ParseFileAsync(string path, INmeaAisMessageStreamProcessor processor)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path of the file to process. |
INmeaAisMessageStreamProcessor | processor | Handler for the AIS messages. |
Returns
Type | Description |
---|---|
Task | A task that completes when the stream has been processed. |
Remarks
This reassembles AIS messages that have been split over multiple NMEA lines.
ParseFileAsync(String, INmeaAisMessageStreamProcessor, NmeaParserOptions)
Process the contents of a file one AIS message at a time.
Declaration
public static Task ParseFileAsync(string path, INmeaAisMessageStreamProcessor processor, NmeaParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path of the file to process. |
INmeaAisMessageStreamProcessor | processor | Handler for the AIS messages. |
NmeaParserOptions | options | Configures parser behaviour. |
Returns
Type | Description |
---|---|
Task | A task that completes when the stream has been processed. |
Remarks
This reassembles AIS messages that have been split over multiple NMEA lines.
ParseFileAsync(String, INmeaLineStreamProcessor)
Process the contents of a file.
Declaration
public static Task ParseFileAsync(string path, INmeaLineStreamProcessor processor)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path of the file to process. |
INmeaLineStreamProcessor | processor | Handler for the parsed lines. |
Returns
Type | Description |
---|---|
Task | A task that completes when the stream has been processed. |
ParseFileAsync(String, INmeaLineStreamProcessor, NmeaParserOptions)
Process the contents of a file.
Declaration
public static Task ParseFileAsync(string path, INmeaLineStreamProcessor processor, NmeaParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path of the file to process. |
INmeaLineStreamProcessor | processor | Handler for the parsed lines. |
NmeaParserOptions | options | Configures parser behaviour. |
Returns
Type | Description |
---|---|
Task | A task that completes when the stream has been processed. |
ParseStreamAsync(Stream, INmeaLineStreamProcessor)
Process the contents of a stream.
Declaration
public static Task ParseStreamAsync(Stream stream, INmeaLineStreamProcessor processor)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to process. |
INmeaLineStreamProcessor | processor | Handler for the parsed lines. |
Returns
Type | Description |
---|---|
Task | A task that completes when the stream has been processed. |
ParseStreamAsync(Stream, INmeaLineStreamProcessor, NmeaParserOptions)
Process the contents of a stream.
Declaration
public static Task ParseStreamAsync(Stream stream, INmeaLineStreamProcessor processor, NmeaParserOptions options)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream to process. |
INmeaLineStreamProcessor | processor | Handler for the parsed lines. |
NmeaParserOptions | options | Configures parser behaviour. |
Returns
Type | Description |
---|---|
Task | A task that completes when the stream has been processed. |