Edit

Share via


NmeaTcpClient Class

Definition

A TCP Server bidirectional sink and source. Provides NMEA sentences to each connected client.

public class NmeaTcpClient : Iot.Device.Nmea0183.NmeaSinkAndSource
type NmeaTcpClient = class
    inherit NmeaSinkAndSource
Public Class NmeaTcpClient
Inherits NmeaSinkAndSource
Inheritance
NmeaTcpClient

Constructors

NmeaTcpClient(String, String, Int32)

Creates a server with the given source name bound to the given local IP and port. This will not open the server yet. Use StartDecode() to open the network port.

Properties

Connected

Returns true if this client is connected

InterfaceName

Name of the interface

(Inherited from NmeaSinkAndSource)
RetryInterval

Time between reconnection attempts. Default 5 seconds.

Methods

DispatchSentenceEvents(NmeaSentence)

Forwards the given sentence to listeners, as needed. Use the current instance as source.

(Inherited from NmeaSinkAndSource)
DispatchSentenceEvents(NmeaSinkAndSource, NmeaSentence)

Forwards the given sentence to listeners, as needed.

(Inherited from NmeaSinkAndSource)
Dispose()

Standard dispose method

(Inherited from NmeaSinkAndSource)
Dispose(Boolean)

Dispose this instance

(Inherited from NmeaSinkAndSource)
FireOnParserError(String, NmeaError)

Fire an event informing about parser errors

(Inherited from NmeaSinkAndSource)
SendSentence(NmeaSentence)

Send the given sentence to the interface.

(Inherited from NmeaSinkAndSource)
SendSentence(NmeaSinkAndSource, NmeaSentence)

Sends the sentence to all our clients. If it is needed to make distinctions for what needs to be sent to which client, create multiple server instances. This will allow for proper filtering.

SendSentences(IEnumerable<NmeaSentence>)

Sends a list of messages at once

(Inherited from NmeaSinkAndSource)
StartDecode()

Starts connecting to the server. A failure to connect will not cause an exception. Retries will be handled automatically.

StopDecode()

Stops sending or receiving messages from and to this interface. Any pending messages are discarded.

Events

OnNewPosition

This is fired when a new position is available

(Inherited from NmeaSinkAndSource)
OnNewSequence

This is fired on every new sentence

(Inherited from NmeaSinkAndSource)
OnNewTime

This is fired when the time is updated

(Inherited from NmeaSinkAndSource)
OnParserError

This is fired when a message couldn't be parsed

(Inherited from NmeaSinkAndSource)

Applies to