NmeaUdpServer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This server distributes all incoming messages via UDP. The advantage is that clients do not need to know the IP of the server, which is useful if DHCP keeps reassigning addresses.
public class NmeaUdpServer : Iot.Device.Nmea0183.NmeaSinkAndSource
type NmeaUdpServer = class
inherit NmeaSinkAndSource
Public Class NmeaUdpServer
Inherits NmeaSinkAndSource
- Inheritance
Constructors
NmeaUdpServer(String, Int32, Int32) |
Create an UDP server with the given name on the given port, using an alternate outgoing port. The outgoing and incoming port may be equal only if the sender and the receiver are not on the same computer. |
NmeaUdpServer(String, Int32) |
Create an UDP server with the given name on the given port |
NmeaUdpServer(String) |
Create an UDP server with the given name on the default port 10110 |
Properties
InterfaceName |
Name of the interface (Inherited from NmeaSinkAndSource) |
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) |
GetLocalIPAddress() |
Get the default IP address to bind to |
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() |
Start receiving messages from this interface. An implementation should open streams, connect to sockets or create receiver threads, as appropriate. |
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) |