SentenceCache 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.
Caches the last sentence(s) of each type for later retrieval. This is a helper class for AutopilotController and PositionProvider. Use PositionProvider to query the position from the most appropriate messages.
public sealed class SentenceCache : IDisposable
type SentenceCache = class
interface IDisposable
Public NotInheritable Class SentenceCache
Implements IDisposable
- Inheritance
-
SentenceCache
- Implements
Constructors
SentenceCache(NmeaSinkAndSource) |
Creates an new cache using the given source |
Properties
StoreRawSentences |
True to (also) store raw sentences. Otherwise only recognized decoded sentences are stored. Defaults to false. |
Methods
Add(NmeaSentence) |
Adds the given sentence to the cache - if manual filling is preferred |
Clear() |
Clears the cache |
Dispose() |
Clean up everything |
GetLastSentence(SentenceId) |
Gets the last sentence of the given type. Does not return sentences that are part of a group (i.e. GSV, RTE) |
GetLastSentence(SentenceId, TimeSpan) |
Gets the last sentence of the given type. Does not return sentences that are part of a group (i.e. GSV, RTE) |
GetLastSentence(String, SentenceId) |
Gets the last sentence with the given id from the given talker. |
GetSatellitesInView(Int32) |
Returns the list of satellites in view |
QueryActiveRouteSentences(List<RoutePart>) |
Returns the last RTE sentences received, to construct the active route. A set of at most 100 elements is returned, with the newest entry first. |
QuerySatellitesInView(List<SatellitesInView>) |
Returns a list of recently received SatellitesInView (GSV) messages. |
TryGetCurrentPosition(GeographicPosition, Angle, Speed, Nullable<Angle>) |
Get the current position from the latest message containing any of the relevant data parts. This does not extrapolate the position if the last received message is old |
TryGetCurrentPosition(GeographicPosition, Boolean, Angle, Speed, Nullable<Angle>) |
Get the current position from the latest message containing any of the relevant data parts.
If |
TryGetCurrentRoute(List<RoutePoint>) |
Returns the current route |
TryGetLastDinSentence<T>(Int32, T) |
Tries to get a DIN sentence type |
TryGetLastSentence<T>(SentenceId, T) |
Tries to get a sentence of the given type |
TryGetTransducerData(String, TransducerDataSet) |
Gets the last transducer data set (from an XDR sentence, see TransducerMeasurement) if one with the given name exists. |
TryGetWayPoint(String, Waypoint) |
Queries the waypoint with the given name |
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