MessageRouter 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.
Message routing for NMEA messages. See the Readme for an usage example. This is used to route messages between different NMEA sources and sinks. Instances of FilterRule can be used to describe which messages need to go from where to where.
public sealed class MessageRouter : Iot.Device.Nmea0183.NmeaSinkAndSource
type MessageRouter = class
inherit NmeaSinkAndSource
Public NotInheritable Class MessageRouter
Inherits NmeaSinkAndSource
- Inheritance
Constructors
MessageRouter(LoggingConfiguration) |
Creates a message router, optionally configuring the logging options |
Fields
LocalMessageSource |
The name of the local message source. This field is constant. |
LoggingSinkName |
The name of the default logger. This field is constant. |
Properties
EndPoints |
The list of routing endpoints |
InterfaceName |
Name of the interface (Inherited from NmeaSinkAndSource) |
Methods
AddEndPoint(NmeaSinkAndSource) |
Adds a routing end point |
AddFilterRule(FilterRule) |
Adds a filter rule to the end of the rule set |
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) |
Send the message to the device. From the implementation side, this is where the input data comes in (e.g. from the message dispatcher) |
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) |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for