Table of Contents

Class NavigationalWarningSet

Namespace
EncDotNet.S100.Datasets.Pipelines
Assembly
EncDotNet.S100.Core.dll

Every loaded navigational warning, judged together: a warning's status depends on the others, which may cancel it or, as an in-force bulletin, leave it out (S-124 Edition 2.0.0 §9.2.1, §9.3).

public sealed class NavigationalWarningSet
Inheritance
NavigationalWarningSet
Inherited Members

Remarks

StatusAt(NavigationalWarningInfo, DateTimeOffset) applies, in order: the warning's own cancellation date; a warning that cancels it and was published at or before the time; for an in-force bulletin, a later bulletin for the same series; the latest in-force bulletin for its series published at or before the time, when the warning was published before that bulletin and the bulletin doesn't list it; and last the warning's validity ranges (StatusAt(DateTimeOffset)).

Only the latest bulletin counts. A warning without a series, a number or a publication time, and a bulletin without a publication time, are never judged by bulletins: without them "prior to and not found in" can't be decided, and keeping a warning in force is the safe way to be wrong. Edition 1.0.0 gives no publication time, so it has no bulletin rule.

A warning left out of the bulletin is reported as cancelled, as S-98 Edition 2.0.0 §12.12 has ECDIS do: it stays listed, marked cancelled, and isn't drawn on the navigation screen. (S-124 §9.3 forbids producers from using the bulletin to cancel; that is about encoding, not this status.) IsDrawnAt(NavigationalWarningInfo, DateTimeOffset, bool) is the one test a renderer needs; it adds the mariner's choice to see warnings not yet in force to IsInForceAt(NavigationalWarningInfo, DateTimeOffset).

Constructors

NavigationalWarningSet(IEnumerable<NavigationalWarningInfo>)

Builds the set.

public NavigationalWarningSet(IEnumerable<NavigationalWarningInfo> warnings)

Parameters

warnings IEnumerable<NavigationalWarningInfo>

Every loaded warning, including cancellations and in-force bulletins without parts. A warning may appear more than once (once per part).

Properties

Count

How many warnings (or parts) the set was built from.

public int Count { get; }

Property Value

int

Empty

An empty set, in which each warning is judged on its own.

public static NavigationalWarningSet Empty { get; }

Property Value

NavigationalWarningSet

Methods

IsDrawnAt(NavigationalWarningInfo, DateTimeOffset, bool)

Whether the map draws the warning at time (S-98 Edition 2.0.0 §12.12). An ended or cancelled warning is never drawn (§12.12.3). One not yet in force is drawn only when showNotYetInForce is set, and only from its publication time (§12.12.2 Example 1); with no publication time, as in Edition 1.0.0, from any time before its range starts.

public bool IsDrawnAt(NavigationalWarningInfo warning, DateTimeOffset time, bool showNotYetInForce)

Parameters

warning NavigationalWarningInfo

The warning (or one of its parts).

time DateTimeOffset

The view time.

showNotYetInForce bool

The mariner's choice to see warnings before they start.

Returns

bool

true when the warning is drawn.

IsInForceAt(NavigationalWarningInfo, DateTimeOffset)

Whether the warning is in force at time, judged with the set.

public bool IsInForceAt(NavigationalWarningInfo warning, DateTimeOffset time)

Parameters

warning NavigationalWarningInfo

The warning (or one of its parts).

time DateTimeOffset

The time to test.

Returns

bool

true when StatusAt(NavigationalWarningInfo, DateTimeOffset) gives InForce.

LatestBulletin(string, DateTimeOffset)

The latest in-force bulletin for a series published at or before time, or null.

public NavigationalWarningInfo? LatestBulletin(string series, DateTimeOffset time)

Parameters

series string

The series name (e.g. "NAVAREA X"), compared ignoring case and spacing.

time DateTimeOffset

The time.

Returns

NavigationalWarningInfo

The bulletin, or null when none is loaded.

LatestBulletins(DateTimeOffset)

The latest in-force bulletin of each series published at or before time, with the listed warnings that aren't loaded (§9.2.2), latest first.

public IReadOnlyList<NavigationalWarningBulletinReport> LatestBulletins(DateTimeOffset time)

Parameters

time DateTimeOffset

The time.

Returns

IReadOnlyList<NavigationalWarningBulletinReport>

One report per series that has a bulletin by then.

StatusAt(NavigationalWarningInfo, DateTimeOffset)

The warning's status at time, with the reason. The warning need not be in the set; it is judged against the set's warnings.

public NavigationalWarningState StatusAt(NavigationalWarningInfo warning, DateTimeOffset time)

Parameters

warning NavigationalWarningInfo

The warning (or one of its parts).

time DateTimeOffset

The time to test, usually the view time.

Returns

NavigationalWarningState

The status and why.

WithdrawnAt(NavigationalWarningInfo, DateTimeOffset)

Why the warning has ended at time whatever its validity ranges say: its cancellation date, a cancellation, or an in-force bulletin. null when nothing withdraws it.

public NavigationalWarningState? WithdrawnAt(NavigationalWarningInfo warning, DateTimeOffset time)

Parameters

warning NavigationalWarningInfo

The warning (or one of its parts).

time DateTimeOffset

The time to test.

Returns

NavigationalWarningState

An Ended state, or null.