Class MappedStepColumns
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
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
skippedIReadOnlyList<string>The skipped titles (the second half of Split(IEnumerable<string>)).
Returns
IsSkipped(string)
Whether the column title is skipped: a built-in step property has that
name.
public static bool IsSkipped(string title)
Parameters
titlestringThe column title.
Returns
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
hostIStepPropertyAccessHostThe step-property registry; null registers nothing.
keptIEnumerable<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
titlesIEnumerable<string>The column titles carrying no role of their own.