Table of Contents

Class NcRunner

Namespace
Hi.Numerical.FilePlayers
Assembly
HiNc.dll

Provides functionality for running and processing NC code lines.

public class NcRunner : IControlRunner
Inheritance
NcRunner
Implements
Inherited Members
Extension Methods

Constructors

NcRunner(PacePlayer, NcEnv, SessionMessageHost)

Initializes a new instance of the NcRunner class.

public NcRunner(PacePlayer pacePlayer, NcEnv ncEnv, SessionMessageHost millingProcessMessage)

Parameters

pacePlayer PacePlayer
ncEnv NcEnv

The NC environment settings

millingProcessMessage SessionMessageHost

The milling process message host

Properties

FileIndexOnRunCommand

Gets the current file index for run commands.

public int FileIndexOnRunCommand { get; }

Property Value

int

NcEnv

Gets the NC environment settings.

public NcEnv NcEnv { get; set; }

Property Value

NcEnv

NcLines

Gets the linked list of NC lines.

public LinkedList<NcLine> NcLines { get; }

Property Value

LinkedList<NcLine>

PacePlayer

public PacePlayer PacePlayer { get; }

Property Value

PacePlayer

SessionMessageHost

External Hosted.

public SessionMessageHost SessionMessageHost { get; set; }

Property Value

SessionMessageHost

Methods

ResetFileIndex()

Resets the file index to zero.

public void ResetFileIndex()

RunControlLines(string, IEnumerable<string>, CancellationToken)

Runs raw NC lines and yields NcLine and Act pairs.

public IEnumerable<SourceCommandActEntry> RunControlLines(string relNcFilePath, IEnumerable<string> lines, CancellationToken cancellationToken)

Parameters

relNcFilePath string

The relative path of the NC file

lines IEnumerable<string>

The enumerable collection of NC code lines

cancellationToken CancellationToken

Cancellation token to cancel the operation

Returns

IEnumerable<SourceCommandActEntry>

Enumerable of NcLine and Act pairs

RunToLineEnd()

Set EnumerablePlayer before use the function.

public void RunToLineEnd()