Table of Contents

Class MappedStepColumns

Namespace
Hi.Mapping
Assembly
HiMech.dll

Internal Use Only. The rule the two paths that carry CSV columns onto steps share — MapSingleByCsvFile(ClStrip, string, string, IProgress<IMessage>, Func<DateTime, TimeSpan>, MapSingleCsvConfig, IStepPropertyAccessHost) and a CSV program's residual columns (CsvActDataSemantic, registered by CsvSegmenter): a column named like a built-in step property (IsBuiltInKey(string)) is skipped — the registry reads the step's own value under that key, never one written onto the step. A step file HiNC wrote carries those columns as simulated values, so mapping one back loses nothing; a column of another file under such a name (a controller's own spindle speed, say) is kept only after its header is renamed, which the skip message says. Every other column is written onto the steps and registered as a step variable (unit none, format G4) unless its key is registered already, so a variable registered before the mapping keeps its name, unit and format.

public static class MappedStepColumns
Inheritance
MappedStepColumns
Inherited Members

Fields

FormatString

The display format a mapped column is registered with.

public const string FormatString = "G4"

Field Value

string

Methods

Describe(IReadOnlyList<string>)

The skipped titles for a message: the first five, then an ellipsis when there are more.

public static string Describe(IReadOnlyList<string> skipped)

Parameters

skipped IReadOnlyList<string>

The skipped titles (the second half of Split(IEnumerable<string>)).

Returns

string

IsSkipped(string)

Whether the column title is skipped: a built-in step property has that name.

public static bool IsSkipped(string title)

Parameters

title string

The column title.

Returns

bool

Register(IStepPropertyAccessHost, IEnumerable<string>)

Registers each of kept on host as a step variable (unit none, format FormatString) unless the registry holds the key already; an empty title is passed over; then tells the host the values are on the steps (NotifyStepValuesWritten()). No-op without a host.

public static void Register(IStepPropertyAccessHost host, IEnumerable<string> kept)

Parameters

host IStepPropertyAccessHost

The step-property registry; null registers nothing.

kept IEnumerable<string>

The titles written onto the steps (the first half of Split(IEnumerable<string>)).

Split(IEnumerable<string>)

Splits titles into the columns written onto the steps and the ones skipped (IsSkipped(string)), each in its original order.

public static (List<string> Kept, List<string> Skipped) Split(IEnumerable<string> titles)

Parameters

titles IEnumerable<string>

The column titles carrying no role of their own.

Returns

(List<string> Kept, List<string> Skipped)