914 lines
33 KiB
HTML
914 lines
33 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Class TimeMapping | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Class TimeMapping | HiAPI-C# 2025 ">
|
|
|
|
<meta name="description" content="Provides mapping between machining steps and time-based measurements (shots). It is one step to many data mapping (one-many).">
|
|
<link rel="icon" href="../img/HiAPI.favicon.ico">
|
|
<link rel="stylesheet" href="../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../public/main.css">
|
|
<meta name="docfx:navrel" content="../toc.html">
|
|
<meta name="docfx:tocrel" content="toc.html">
|
|
|
|
<meta name="docfx:rel" content="../">
|
|
|
|
|
|
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
|
|
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="Hi.Mapping.TimeMapping">
|
|
|
|
|
|
|
|
<h1 id="Hi_Mapping_TimeMapping" data-uid="Hi.Mapping.TimeMapping" class="text-break">
|
|
Class TimeMapping
|
|
</h1>
|
|
|
|
<div class="facts text-secondary">
|
|
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.Mapping.html">Mapping</a></dd></dl>
|
|
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
|
|
</div>
|
|
|
|
<div class="markdown summary"><p>Provides mapping between machining steps and time-based measurements (shots).
|
|
It is one step to many data mapping (one-many).</p>
|
|
</div>
|
|
<div class="markdown conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public class TimeMapping : IMakeXmlSource, IDisposable</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<dl class="typelist inheritance">
|
|
<dt>Inheritance</dt>
|
|
<dd>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
|
<div><span class="xref">TimeMapping</span></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl class="typelist implements">
|
|
<dt>Implements</dt>
|
|
<dd>
|
|
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<dl class="typelist inheritedMembers">
|
|
<dt>Inherited Members</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
<dl class="typelist extensionMethods">
|
|
<dt>Extension Methods</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate<TSelf>(TSelf, params object[])</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke<TSrc>(TSrc, Action<TSrc>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke<TSrc, TDst>(TSrc, Func<TSrc, TDst>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="constructors">Constructors
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping__ctor_" data-uid="Hi.Mapping.TimeMapping.#ctor*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping__ctor_System_Func_System_String__" data-uid="Hi.Mapping.TimeMapping.#ctor(System.Func{System.String})">
|
|
TimeMapping(Func<string>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Hi.Mapping.TimeMapping.html">TimeMapping</a> class with the specified CL strip and tool house.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public TimeMapping(Func<string> baseDirectoryGetter)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>baseDirectoryGetter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd><p>The function to get the base directory for file paths.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping__ctor_" data-uid="Hi.Mapping.TimeMapping.#ctor*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping__ctor_System_Xml_Linq_XElement_System_Func_System_String__" data-uid="Hi.Mapping.TimeMapping.#ctor(System.Xml.Linq.XElement,System.Func{System.String})">
|
|
TimeMapping(XElement, Func<string>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Hi.Mapping.TimeMapping.html">TimeMapping</a> class from XML data.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public TimeMapping(XElement src, Func<string> baseDirectoryGetter)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
|
|
<dd><p>The XML element containing the mapping data.</p>
|
|
</dd>
|
|
<dt><code>baseDirectoryGetter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd><p>The function to get the base directory for resolving relative file paths.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Hi_Mapping_TimeMapping__ctor_System_Xml_Linq_XElement_System_Func_System_String___remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>This constructor supports legacy XML formats and automatically converts them to the current format.
|
|
Legacy formats include:</p>
|
|
<ul>
|
|
<li>NcMapping with MarkIdToFileTimeSection element</li>
|
|
<li>Entries with MarkID attributes</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="properties">Properties
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_BaseDirectory_" data-uid="Hi.Mapping.TimeMapping.BaseDirectory*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_BaseDirectory" data-uid="Hi.Mapping.TimeMapping.BaseDirectory">
|
|
BaseDirectory
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets or sets the base directory for resolving file paths.
|
|
All relative file paths in the mapping are resolved against this directory.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public string BaseDirectory { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_BaseDirectoryGetter_" data-uid="Hi.Mapping.TimeMapping.BaseDirectoryGetter*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_BaseDirectoryGetter" data-uid="Hi.Mapping.TimeMapping.BaseDirectoryGetter">
|
|
BaseDirectoryGetter
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets or sets the function to get the base directory for resolving file paths.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public Func<string> BaseDirectoryGetter { get; set; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_KeyToRelFileTimeSectionDictionary_" data-uid="Hi.Mapping.TimeMapping.KeyToRelFileTimeSectionDictionary*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_KeyToRelFileTimeSectionDictionary" data-uid="Hi.Mapping.TimeMapping.KeyToRelFileTimeSectionDictionary">
|
|
KeyToRelFileTimeSectionDictionary
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets or sets the dictionary mapping keys to file time sections.
|
|
Each entry maps a unique identifier to a file time section that specifies
|
|
which portion of a measurement file corresponds to a particular machining operation.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public Dictionary<string, FileTimeSection> KeyToRelFileTimeSectionDictionary { get; set; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="Hi.Mappings.FileTimeSection.html">FileTimeSection</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_RelFileToTimeShotListDictionary_" data-uid="Hi.Mapping.TimeMapping.RelFileToTimeShotListDictionary*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_RelFileToTimeShotListDictionary" data-uid="Hi.Mapping.TimeMapping.RelFileToTimeShotListDictionary">
|
|
RelFileToTimeShotListDictionary
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets or sets the cache of time shot lists loaded from files.
|
|
This is a thread-safe dictionary that maps file paths to tasks that load and parse the files.
|
|
The cache prevents multiple reads of the same file and enables concurrent access.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ConcurrentDictionary<string, Task<List<ITimeShot>>> RelFileToTimeShotListDictionary { get; set; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.concurrent.concurrentdictionary-2">ConcurrentDictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="Hi.Mapping.ITimeShot.html">ITimeShot</a>>>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_StepToTimeShotListDictionary_" data-uid="Hi.Mapping.TimeMapping.StepToTimeShotListDictionary*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_StepToTimeShotListDictionary" data-uid="Hi.Mapping.TimeMapping.StepToTimeShotListDictionary">
|
|
StepToTimeShotListDictionary
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets a concurrent dictionary mapping step indices to their corresponding time shot lists.
|
|
This dictionary is populated during the mapping process.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ConcurrentDictionary<int, List<ITimeShot>> StepToTimeShotListDictionary { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.concurrent.concurrentdictionary-2">ConcurrentDictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="Hi.Mapping.ITimeShot.html">ITimeShot</a>>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_XName_" data-uid="Hi.Mapping.TimeMapping.XName*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_XName" data-uid="Hi.Mapping.TimeMapping.XName">
|
|
XName
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets the XML element name used for serialization.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Hi_Mapping_TimeMapping_XName_remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>This name is used as the root element when serializing TimeMapping instances to XML.
|
|
It matches the class name to maintain consistency between code and XML representation.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="methods">Methods
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_CallTimeShotByRelFile_" data-uid="Hi.Mapping.TimeMapping.CallTimeShotByRelFile*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_CallTimeShotByRelFile_System_String_System_IProgress_System_Object__System_Nullable_System_Threading_CancellationToken__" data-uid="Hi.Mapping.TimeMapping.CallTimeShotByRelFile(System.String,System.IProgress{System.Object},System.Nullable{System.Threading.CancellationToken})">
|
|
CallTimeShotByRelFile(string, IProgress<object>, CancellationToken?)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Retrieves time shots from a file, using cached results if available.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public List<ITimeShot> CallTimeShotByRelFile(string relFile, IProgress<object> messageHost, CancellationToken? cancellationToken = null)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The relative path to the file containing time shots.</p>
|
|
</dd>
|
|
<dt><code>messageHost</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
|
<dd><p>The message host for logging progress.</p>
|
|
</dd>
|
|
<dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a>?</dt>
|
|
<dd><p>Optional token to cancel the loading operation.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="Hi.Mapping.ITimeShot.html">ITimeShot</a>></dt>
|
|
<dd><p>A list of time shots from the file. The results are cached for subsequent calls.
|
|
If the file is already being loaded by another thread, waits for that operation to complete.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Hi_Mapping_TimeMapping_CallTimeShotByRelFile_System_String_System_IProgress_System_Object__System_Nullable_System_Threading_CancellationToken___remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>This method is thread-safe and ensures each file is only read once, even with concurrent access.
|
|
Any exceptions during file reading are captured and can be inspected through the task's exception property.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_Clear_" data-uid="Hi.Mapping.TimeMapping.Clear*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_Clear" data-uid="Hi.Mapping.TimeMapping.Clear">
|
|
Clear()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Clears all mappings and data, including the key-to-file time section dictionary.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Clear()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_ClearCache_" data-uid="Hi.Mapping.TimeMapping.ClearCache*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_ClearCache" data-uid="Hi.Mapping.TimeMapping.ClearCache">
|
|
ClearCache()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Clears the cache of loaded time shot data, including file-to-time shot list and step-to-time shot list dictionaries.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void ClearCache()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_Dispose_" data-uid="Hi.Mapping.TimeMapping.Dispose*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_Dispose" data-uid="Hi.Mapping.TimeMapping.Dispose">
|
|
Dispose()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_Dispose_" data-uid="Hi.Mapping.TimeMapping.Dispose*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_Dispose_System_Boolean_" data-uid="Hi.Mapping.TimeMapping.Dispose(System.Boolean)">
|
|
Dispose(bool)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>disposing</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_GetShots_" data-uid="Hi.Mapping.TimeMapping.GetShots*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_GetShots_System_Int32_" data-uid="Hi.Mapping.TimeMapping.GetShots(System.Int32)">
|
|
GetShots(int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets the time shots associated with a specific step index.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public List<ITimeShot> GetShots(int stepIndex)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>stepIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The index of the step to get shots for.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="Hi.Mapping.ITimeShot.html">ITimeShot</a>></dt>
|
|
<dd><p>A list of time shots associated with the specified step, or null if no shots are found.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_LoadTimeShotFiles_" data-uid="Hi.Mapping.TimeMapping.LoadTimeShotFiles*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_LoadTimeShotFiles_System_IProgress_System_Object__System_Nullable_System_Threading_CancellationToken__" data-uid="Hi.Mapping.TimeMapping.LoadTimeShotFiles(System.IProgress{System.Object},System.Nullable{System.Threading.CancellationToken})">
|
|
LoadTimeShotFiles(IProgress<object>, CancellationToken?)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Loads all time shot files referenced in the KeyToFileTimeSectionMapping.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void LoadTimeShotFiles(IProgress<object> messageHost, CancellationToken? cancellationToken = null)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>messageHost</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
|
<dd><p>The message host for logging progress.</p>
|
|
</dd>
|
|
<dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a>?</dt>
|
|
<dd><p>Optional cancellation token to cancel the operation.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_MakeXmlSource_" data-uid="Hi.Mapping.TimeMapping.MakeXmlSource*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.Mapping.TimeMapping.MakeXmlSource(System.String,System.String,System.Boolean)">
|
|
MakeXmlSource(string, string, bool)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Creates an XML representation of the time mapping data.
|
|
<code class="paramref">relFile</code> is not used in current implementation.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The base directory for resolving relative paths</p>
|
|
</dd>
|
|
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The relative file path for the XML source</p>
|
|
</dd>
|
|
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd><p>if true, the extended file creation is suppressed.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
|
|
<dd><p>An XML element containing the complete time mapping data.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Hi_Mapping_TimeMapping_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>The XML structure includes:</p>
|
|
<ul>
|
|
<li>A root TimeMapping element</li>
|
|
<li>An Entrys element containing Entry elements</li>
|
|
<li>Each Entry has a Key attribute and FileTimeSection child element</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_Map_" data-uid="Hi.Mapping.TimeMapping.Map*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_Map_Hi_Common_Range_System_Int32__Hi_Mappings_FileTimeSection_Hi_Mapping_StepTimeShotUtil_CycleSamplingMode_Hi_CutterLocations_ClStrips_ClStrip_System_IProgress_System_Object__System_Nullable_System_Threading_CancellationToken__" data-uid="Hi.Mapping.TimeMapping.Map(Hi.Common.Range{System.Int32},Hi.Mappings.FileTimeSection,Hi.Mapping.StepTimeShotUtil.CycleSamplingMode,Hi.CutterLocations.ClStrips.ClStrip,System.IProgress{System.Object},System.Nullable{System.Threading.CancellationToken})">
|
|
Map(Range<int>, FileTimeSection, CycleSamplingMode, ClStrip, IProgress<object>, CancellationToken?)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Maps the specified step section to time shots using the provided file time section and cycle sampling mode.
|
|
This method is thread-safe and can be called concurrently.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Map(Range<int> stepSection, FileTimeSection relFileTimeSection, StepTimeShotUtil.CycleSamplingMode cycleSamplingMode, ClStrip clStrip, IProgress<object> messageHost, CancellationToken? cancellationToken = null)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>stepSection</code> <a class="xref" href="Hi.Common.Range-1.html">Range</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>></dt>
|
|
<dd><p>The range of step indices to process.</p>
|
|
</dd>
|
|
<dt><code>relFileTimeSection</code> <a class="xref" href="Hi.Mappings.FileTimeSection.html">FileTimeSection</a></dt>
|
|
<dd><p>The file time section containing file path and time range.</p>
|
|
</dd>
|
|
<dt><code>cycleSamplingMode</code> <a class="xref" href="Hi.Mapping.StepTimeShotUtil.html">StepTimeShotUtil</a>.<a class="xref" href="Hi.Mapping.StepTimeShotUtil.CycleSamplingMode.html">CycleSamplingMode</a></dt>
|
|
<dd><p>The cycle sampling mode to use.</p>
|
|
</dd>
|
|
<dt><code>clStrip</code> <a class="xref" href="Hi.CutterLocations.ClStrips.ClStrip.html">ClStrip</a></dt>
|
|
<dd><p>The cutter location strip to map.</p>
|
|
</dd>
|
|
<dt><code>messageHost</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
|
<dd><p>The message host for logging progress.</p>
|
|
</dd>
|
|
<dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a>?</dt>
|
|
<dd><p>Optional cancellation token to cancel the operation.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_MapSeriesByActualTime_" data-uid="Hi.Mapping.TimeMapping.MapSeriesByActualTime*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_MapSeriesByActualTime_System_String_Hi_Mapping_StepTimeShotUtil_CycleSamplingMode_Hi_CutterLocations_ClStrips_ClStrip_System_IProgress_System_Object__System_Nullable_System_Threading_CancellationToken__" data-uid="Hi.Mapping.TimeMapping.MapSeriesByActualTime(System.String,Hi.Mapping.StepTimeShotUtil.CycleSamplingMode,Hi.CutterLocations.ClStrips.ClStrip,System.IProgress{System.Object},System.Nullable{System.Threading.CancellationToken})">
|
|
MapSeriesByActualTime(string, CycleSamplingMode, ClStrip, IProgress<object>, CancellationToken?)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Maps steps to time shots based on actual time.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void MapSeriesByActualTime(string timeShotRelFile, StepTimeShotUtil.CycleSamplingMode cycleSamplingMode, ClStrip clStrip, IProgress<object> messageHost, CancellationToken? cancellationToken = null)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>timeShotRelFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The relative file path for time shots.</p>
|
|
</dd>
|
|
<dt><code>cycleSamplingMode</code> <a class="xref" href="Hi.Mapping.StepTimeShotUtil.html">StepTimeShotUtil</a>.<a class="xref" href="Hi.Mapping.StepTimeShotUtil.CycleSamplingMode.html">CycleSamplingMode</a></dt>
|
|
<dd><p>The cycle sampling mode.</p>
|
|
</dd>
|
|
<dt><code>clStrip</code> <a class="xref" href="Hi.CutterLocations.ClStrips.ClStrip.html">ClStrip</a></dt>
|
|
<dd><p>The cutter location strip to map.</p>
|
|
</dd>
|
|
<dt><code>messageHost</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
|
<dd><p>The session message host for logging.</p>
|
|
</dd>
|
|
<dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a>?</dt>
|
|
<dd><p>The cancellation token.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Mapping_TimeMapping_WaitMapping_" data-uid="Hi.Mapping.TimeMapping.WaitMapping*"></a>
|
|
|
|
<h3 id="Hi_Mapping_TimeMapping_WaitMapping" data-uid="Hi.Mapping.TimeMapping.WaitMapping">
|
|
WaitMapping()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Waits for all mapping operations to complete.
|
|
This method blocks until all concurrent mapping tasks have finished.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void WaitMapping()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|