Table of Contents

Class S101AlertPortrayal

Namespace
EncDotNet.S100.Datasets.S101
Assembly
EncDotNet.S100.Datasets.S101.dll

Runs an S-101 cell's portrayal rules for chosen features and reports the alerts each raises (AlertReference), at the context parameters a route check gives: the S-101 NavHazard, ProhAre and SafetyContour alerts depend on the safety contour.

public sealed class S101AlertPortrayal : IDisposable
Inheritance
S101AlertPortrayal
Implements
Inherited Members

Remarks

One Lua state is kept per set of mariner settings and each feature is portrayed once, so a route check that asks leg by leg pays the rules' set-up once. Thread-safe.

Constructors

S101AlertPortrayal(ILuaEngine, S101Dataset, S101PortrayalCatalogue, FeatureCatalogue)

Creates the alert portrayal for a cell.

public S101AlertPortrayal(ILuaEngine luaEngine, S101Dataset dataset, S101PortrayalCatalogue catalogue, FeatureCatalogue featureCatalogue)

Parameters

luaEngine ILuaEngine

The Lua engine.

dataset S101Dataset

The cell.

catalogue S101PortrayalCatalogue

The S-101 (or S-401) portrayal catalogue.

featureCatalogue FeatureCatalogue

The matching feature catalogue.

S101AlertPortrayal(ILuaEngine, S101Dataset, Func<CancellationToken, Task<(S101PortrayalCatalogue Portrayal, FeatureCatalogue Features)>>)

Creates the alert portrayal for a cell whose catalogues are loaded on first use, for hosts that read cells without portraying them.

public S101AlertPortrayal(ILuaEngine luaEngine, S101Dataset dataset, Func<CancellationToken, Task<(S101PortrayalCatalogue Portrayal, FeatureCatalogue Features)>> catalogues)

Parameters

luaEngine ILuaEngine

The Lua engine.

dataset S101Dataset

The cell.

catalogues Func<CancellationToken, Task<(S101PortrayalCatalogue Portrayal, FeatureCatalogue Features)>>

Loads the portrayal and feature catalogues.

Methods

AlertsAsync(IReadOnlyCollection<string>, MarinerSettings?, CancellationToken)

The alerts the features raise at the mariner settings.

public Task<IReadOnlyDictionary<string, IReadOnlyList<FeatureAlert>>> AlertsAsync(IReadOnlyCollection<string> featureIds, MarinerSettings? mariner, CancellationToken cancellationToken = default)

Parameters

featureIds IReadOnlyCollection<string>

The features' record ids, as strings.

mariner MarinerSettings

The settings the rules see. A route check sets the safety contour and safety depth; the rest keep their defaults. null keeps the settings of the last call (else the defaults), for alerts that don't depend on them, such as ProhAre.

cancellationToken CancellationToken

Cancels the portrayal.

Returns

Task<IReadOnlyDictionary<string, IReadOnlyList<FeatureAlert>>>

Each feature's alerts, distinct and in emission order; empty for a feature that raises none.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()