Table of Contents

Class StepTimeShotUtil

Namespace
Hi.Mapping
Assembly
HiMech.dll

Utility methods for working with time-based shots (measurements) and mapping them to machining steps.

public static class StepTimeShotUtil
Inheritance
StepTimeShotUtil
Inherited Members

Methods

GetStepToShotsDictionaryByActualTime(ClStrip, CycleSamplingMode, string, GetTimeShotByFileDelegate, IDictionary<int, List<ITimeShot>>, SessionMessageHost, CancellationToken?)

Gets a dictionary mapping step indices to time shots based on actual time.

public static void GetStepToShotsDictionaryByActualTime(ClStrip clStrip, StepTimeShotUtil.CycleSamplingMode cycleSamplingMode, string timeShotRelFile, StepTimeShotUtil.GetTimeShotByFileDelegate getTimeShotByRelFileFunc, IDictionary<int, List<ITimeShot>> dstStepToShotsDictionary, SessionMessageHost sessionMessageHost, CancellationToken? cancellationToken)

Parameters

clStrip ClStrip

The cutter location strip.

cycleSamplingMode StepTimeShotUtil.CycleSamplingMode

The cycle sampling mode.

timeShotRelFile string

The relative file path for time shots.

getTimeShotByRelFileFunc StepTimeShotUtil.GetTimeShotByFileDelegate

The delegate function to get time shots by relative file path.

dstStepToShotsDictionary IDictionary<int, List<ITimeShot>>

The destination dictionary to store the mapping.

sessionMessageHost SessionMessageHost

The session message host for logging.

cancellationToken CancellationToken?

The cancellation token.

GetTimeShotByFile(string, Action<int>, CancellationToken?)

Gets time shots from a file, reading and parsing force acceleration data.

public static List<ITimeShot> GetTimeShotByFile(string file, Action<int> lineReaded, CancellationToken? cancellationToken = null)

Parameters

file string

The file path to read time shots from.

lineReaded Action<int>

Action to call when a line is read, providing progress feedback with the current line number.

cancellationToken CancellationToken?

Optional cancellation token to cancel the reading operation.

Returns

List<ITimeShot>

A list of time shots read from the file, or null if the file cannot be read or is invalid.