Archived
497 lines
38 KiB
HTML
497 lines
38 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Editing Contract | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Editing Contract | HiAPI-C# 2025 ">
|
|
|
|
|
|
<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="">
|
|
<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="Anatomy-ControllerEditingContract">
|
|
<h1 id="editing-contract">Editing Contract</h1>
|
|
|
|
<p>Every leaf of the Controller branch edits a different table, and almost all of them edit it the same
|
|
way. This page is that shared way: what a leaf panel fetches, when an edit commits, what a failed
|
|
write does, what a panel shows while its table is absent, and what it never notices. It owns no
|
|
Control-Tree node of its own — it holds over every panel of the Controller branch on
|
|
<code>/general-setup</code>: the root at <code>equipment/controller</code>, and every leaf beneath
|
|
<code>equipment/controller/machine</code> and <code>equipment/controller/program-data</code>. Each leaf page can then
|
|
state only what is its own. The last section is the other half of the contract: every panel that
|
|
departs from it.</p>
|
|
<div class="IMPORTANT">
|
|
<h5>Important</h5>
|
|
<p>Anatomy makes no claim that these ids are stable across versions. See
|
|
<a class="xref" href="../../platform/tree-ids-and-routes.html">Tree Ids and Routes</a> for the migration hop that keeps an older
|
|
link resolving.</p>
|
|
</div>
|
|
<h2 id="the-shape-of-a-leaf-panel">The Shape of a Leaf Panel</h2>
|
|
<p>Each leaf panel takes one prop, the tree node, and reads the shared runner snapshot through a
|
|
module-singleton composable whose installer it calls synchronously while its script runs rather than
|
|
on mount. The installer is idempotent, so whichever panel mounts first pays for it and the rest get
|
|
the cache. Only four panels read the node prop at all: two use its id to tell apart the sibling
|
|
leaves they serve, and two use it as the scope of the structural change they report.</p>
|
|
<p>Beyond that shared snapshot, a panel owns its own table. It imports its reader and its setters
|
|
directly from the branch's typed API module and fetches once, in <code>onMounted</code>. There is no store, no
|
|
request queue and no batch: one panel, one read, one table. The two panels that fetch nothing — the
|
|
branch root and Controller Brand — are exactly the two that have no table of their own and render
|
|
off the snapshot alone. How the branch itself is built, rebuilt and selected belongs to the
|
|
Control-Tree engine and is described in <a class="xref" href="../../platform/control-tree.html">Control Tree</a>.</p>
|
|
<p>Only one panel is mounted at a time. The editor row's remount key is composed from the node id, the
|
|
node key and the mission stamp; controller nodes carry an empty key and no mission record, so the
|
|
key reduces to the node id alone. Moving the selection therefore remounts and refetches; re-clicking
|
|
the row already selected does neither. No controller item type registers a large content view, so
|
|
the General Setup content column keeps its own empty hint for every selection in this branch.</p>
|
|
<h2 id="when-an-edit-commits">When an Edit Commits</h2>
|
|
<p>The commit rule is per control kind, and every panel that uses a given kind uses it the same way.</p>
|
|
<p><strong>Numeric fields</strong> are the shared numeric widget, and it commits on blur or on Enter and on nothing
|
|
else — never per keystroke. Its full contract, including what a bound violation does to the box, is
|
|
<a class="xref" href="../../widget/numeric-input.html">Numeric Input</a>. Three consequences matter here. Enter commits without
|
|
moving focus, so leaving the field afterwards commits the same value a second time. The widget
|
|
carries no equality guard, so a field that is focused and left unchanged still emits. And the two
|
|
halves of the rule are not wired alike: blur is the input component's own event and is raised only
|
|
while the field is editable, whereas Enter is a plain listener on the underlying element and still
|
|
fires on a read-only one — which is why a read-only cell can still commit.</p>
|
|
<p><strong>Checkboxes, toggles and selects</strong> commit immediately, on the click or the pick. That covers the
|
|
block-skip layer boxes, the tool-change <em>Stays put</em> box, the M-code tool-change box and its Spindle
|
|
and Coolant selects, the tool-word trigger toggle, the cutter-compensation and tool-axis selects,
|
|
and the tool-offset <em>Set ideal offset dependent on tool house</em> toggle.</p>
|
|
<p><strong>Plain text fields</strong> have no shared widget and are wired twice over. The M-code <em>Not-simulated
|
|
note</em> commits on the field's own change event, which carries the string and fires on Enter or on
|
|
leaving a changed field. The two subprogram folder inputs bind blur and Enter explicitly, and commit
|
|
as a pair.</p>
|
|
<p><strong>Row actions</strong> — the datum reset-to-zero button, the work-coordinate P0 and M0 buttons, a delete
|
|
button, an add button — commit on the click, and are not optimistic: they write first and touch the
|
|
local rows only after the request resolves.</p>
|
|
<p>Two panels do not commit per control at all; they stage a draft behind an explicit button, and both
|
|
are named below.</p>
|
|
<h2 id="the-optimistic-write">The Optimistic Write</h2>
|
|
<p>A per-control commit follows one fixed shape. The handler captures the current value, assigns the
|
|
new one so the screen updates at once, awaits the setter, and on failure restores the captured value
|
|
and raises a toast. Nothing is queued and nothing is retried.</p>
|
|
<p>Two details of that shape are easy to misread from the screen:</p>
|
|
<ul>
|
|
<li><strong>The write is row-scoped even though the handler is per cell.</strong> Editing one cell of a work
|
|
coordinate, a datum row, a frame or a tool-offset row sends the whole row or the whole XYZ triad
|
|
as it stands after the edit. An M-code edit likewise sends all four declaration fields, which is
|
|
why the wire format is a whole-declaration replace rather than a patch.</li>
|
|
<li><strong>The rollback restores what the handler captured, which is usually narrower than what it sent.</strong>
|
|
A work-coordinate, datum, frame or tool-offset handler captures the one cell it edited and puts
|
|
back only that, though the request carried the whole row. Three handlers capture the whole set
|
|
they send and restore it intact — the M-code declaration row, the tool-change <em>Stays put</em> pair,
|
|
and the two subprogram folders. Either way, a failure the server had partly applied leaves the two
|
|
sides disagreeing; the panel's recovery is the toast and a later remount, not a re-read.</li>
|
|
</ul>
|
|
<p>Adds and removes are outside this shape, and the local rows never move before the request resolves.
|
|
Two panels then append the returned row themselves — the generic tool-offset table and the Siemens
|
|
<code>$TC_DP</code> table, the two whose add hands back a freshly minted key. The other five re-read their whole
|
|
table instead: M-Code Declarations, Tool Names, R Parameters, Retained Common Variables and
|
|
Parameters (Native). A delete usually filters the row out in place; Parameters (Native) re-reads
|
|
there too. Three deletions are guarded by a confirmation dialog first: a tool-offset row, a Siemens
|
|
<code>$TC_DP</code> row, and a native parameter. M-code declarations, tool names, R parameters and retained
|
|
common variables delete on the click with no confirmation.</p>
|
|
<h2 id="when-a-write-fails">When a Write Fails</h2>
|
|
<p>The branch's REST surface answers a missing dependency inside a success envelope rather than with an
|
|
error status: the dependency lookup returns HTTP 200 carrying <code>success: false</code> and a message naming
|
|
the type it could not find, such as <code>No IStrokeLimitConfig on the active runner</code>, and an exception
|
|
raised inside the same lookup is reported the same way. The shared fetch helper turns both a non-2xx
|
|
status and a <code>success: false</code> body into a thrown error, so a panel cannot tell the two apart; the
|
|
first arrives with the status prefixed to the message, the second as the server's own sentence.</p>
|
|
<p>What the user sees is one negative toast, three seconds, composed as the panel's localized context
|
|
followed by the raw server message — the locale bundle stores each error key as the bare context and
|
|
the code appends the separator and the message. A failed write leaves no inline error state, no
|
|
retry affordance and no dirty marker: once the toast expires, nothing on screen records that it
|
|
happened. (The <em>unsaved</em> badge and the staged-brand banner on the two draft panels mark a pending
|
|
edit, not a failed one.) A console error accompanies the toast.</p>
|
|
<p>The server message is not localized. Only a coded error payload can be re-rendered in the app
|
|
locale, and the envelope this branch answers with carries no code, so its English sentence is
|
|
appended verbatim under any language. The two writes that replace the whole runner answer with real
|
|
status codes instead of the envelope: installing one through Object Management, and switching brand.
|
|
Of the codes they raise, only <em>not found</em> with no project loaded carries the coded payload — the
|
|
conflict raised rather than swapping the parser under a playing NC program, and the refusals of an
|
|
unknown key or an unknown brand, are all bare English sentences. One further status code sits on the
|
|
datum routes, a defensive 400 for a table segment that is neither <code>preset</code> nor <code>shift</code>; the panel
|
|
sends only those two, so nothing reachable from the branch produces it.</p>
|
|
<h2 id="the-two-empty-layers">The Two Empty Layers</h2>
|
|
<p>A leaf panel opens with two guards, in this order.</p>
|
|
<p><strong>Layer one is the shared snapshot.</strong> The shared empty state renders the single line <em>"No NC runner
|
|
— load a project first."</em> whenever the snapshot reports no runner. Every leaf panel carries it; the
|
|
branch root is the one panel that does not, because it renders a richer block of its own.</p>
|
|
<p>Reaching that line by navigating is not possible: a leaf node is created only when the snapshot
|
|
already reported a runner, and a deep link naming an id the built tree lacks is refused. The guard
|
|
is live rather than navigational — it answers the snapshot emptying under a panel that is already
|
|
mounted, which is what closing the project does.</p>
|
|
<p><strong>Layer two is the panel's own read.</strong> Where the runner resolves but its table does not, the panel
|
|
renders one line naming the absent table — <em>"No block-skip config on the active runner."</em>, <em>"No
|
|
Siemens frame table on the active runner."</em>, <em>"No tool-offset table on the active runner."</em>, and so
|
|
on, one string per table. Three panels key that line on one table: Controller Parameters, M-Code
|
|
Declarations and Parameters (Native) all gate on the brand's controller parameter table and all
|
|
render <em>"No controller parameter table on the active runner."</em> Controller Parameters is the loosest
|
|
fit — its two iteration-guard fields resolve through dependencies of their own, and only its
|
|
presence flag is the parameter table.</p>
|
|
<p>Controller Brand, which reads no table, has no second layer at all; every other leaf has one. Only
|
|
after both guards does the editor body render. One panel keys its second layer on something other
|
|
than its read's presence flag, and it is named below.</p>
|
|
<h2 id="what-a-mounted-panel-does-not-see">What a Mounted Panel Does Not See</h2>
|
|
<p>The shared snapshot is fetched once per load of the application. The installer's flag lives at module
|
|
scope, so a later call does nothing and only a browser reload starts over, and the snapshot is
|
|
re-read on exactly three events afterwards: the project store's has-a-project flag turning <em>true</em>, an
|
|
Object-Management install of a runner, and a brand switch. The flag turning false re-reads nothing —
|
|
it clears the snapshot in place. No panel re-reads it either; the composable exposes a reload
|
|
function that nothing in the branch calls.</p>
|
|
<p>Three consequences follow, and they are the contract's sharpest edges.</p>
|
|
<ul>
|
|
<li><strong>A project-to-project load does not refresh it.</strong> The has-a-project flag is derived from the
|
|
project path being non-empty, and loading another project assigns the new path directly, so the
|
|
flag never leaves true and the watch never fires. The page itself is destroyed and rebuilt, because
|
|
the layout keys its keep-alive on a project epoch — but the rebuilt panels call the same
|
|
now-idempotent installer, which does nothing. Meanwhile the branch builder makes its own,
|
|
independent request for the same snapshot, so the tree shape can be built from the new project
|
|
while every leaf gates on the old one.</li>
|
|
<li><strong>Nothing pushes changes at a mounted panel.</strong> No panel holds a watcher, a poll or a status-hub
|
|
subscription over its table. A write made by another browser tab, by an NC run, or by the server's
|
|
own sweep after a brand switch is invisible until the panel is remounted by moving the selection
|
|
away and back.</li>
|
|
<li><strong>A panel's own edits do not update the snapshot or the branch.</strong> Deleting the last row of a table
|
|
leaves both the cached snapshot and the tree branch as they were until one of the three refresh
|
|
events happens.</li>
|
|
</ul>
|
|
<p>Because the shared snapshot is a reactive reference, a panel does track it live once it changes —
|
|
but with one panel mounted at a time, the change that matters in practice is a project close.</p>
|
|
<h2 id="the-table-primitive">The Table Primitive</h2>
|
|
<p>Where a leaf renders a table it is Quasar's markup table — dense, flat, bordered — with a
|
|
hand-written header and body and a repeat over the rows. No panel in the branch uses the data-table
|
|
component, and the four data tables left in the application are the legacy controller tabs this
|
|
branch supersedes. The practical difference is that these tables have no built-in sort, no pagination
|
|
and no column menu: what the header says is what the column is.</p>
|
|
<p>Key columns are rendered as plain text and cannot be edited: the tool and edge numbers of a <code>$TC_DP</code>
|
|
row, a tool name, an <code>R</code> number, a <code>#</code> variable number, a datum row index, a native parameter id, and
|
|
the axis names of every per-axis table, which follow the machining chain rather than the panel. The
|
|
one renameable key is the generic tool-offset row's tool number, and it is guarded against duplicates
|
|
on both sides of the wire.</p>
|
|
<p>A table that can grow carries an add control, and the branch spells it three ways. Five carry a true
|
|
footer below the table — the new row's fields, then a primary button: <strong>Add / Set</strong> on Tool Names,
|
|
R Parameters, Retained Common Variables and Parameters (Native), <strong>Declare</strong> on M-Code Declarations.
|
|
Two carry a fieldless button in the toolbar above the table instead, because the server mints the
|
|
key: <strong>Add</strong> on Tool Offsets and <strong>Add Tool</strong> on the Siemens <code>$TC_DP</code> table. The last is <strong>Add
|
|
Position</strong> on Indexing Position Tables, which appends an empty row to the local draft and sends
|
|
nothing. Two tables carry a <strong>Show all</strong> toggle that hides an all-zero extended tail, on Work
|
|
Coordinates and on Frames.</p>
|
|
<h2 id="nothing-guards-a-switch-away">Nothing Guards a Switch Away</h2>
|
|
<p>No panel in the branch registers the Control-Tree host's before-switch gate, and none exposes
|
|
anything to the host at all. Selecting another node therefore always succeeds immediately. For the
|
|
per-control panels that is exactly right — every edit is already on the server. For the two draft
|
|
panels it means an unsaved draft and a staged brand are discarded silently when the selection moves,
|
|
with no prompt and no warning.</p>
|
|
<h2 id="where-the-wave-is-not-uniform">Where the Wave Is Not Uniform</h2>
|
|
<p>Everything above is the rule. What follows is every place the branch departs from it, panel by
|
|
panel. A contract page without this section invites the next editor to tidy it into a uniformity that
|
|
was never true.</p>
|
|
<h3 id="machine-limits--rapid-feedrates--home-reference--the-presence-flag-is-discarded">Machine Limits / Rapid Feedrates / Home Reference — the presence flag is discarded</h3>
|
|
<p>The axis-table panel serves three leaves and is the one panel whose second empty layer is not its
|
|
read's presence flag: it keys on the row count instead. The rows and the flag are independent on the
|
|
server, which builds one row per chain axis whether or not the backing config resolves and reports
|
|
presence separately. So a runner with axes but no stroke-limit, rapid-feedrate or home config still
|
|
renders a full, editable table, and every commit fails with a toast naming the missing dependency.
|
|
What fills the cells differs by leaf: the stroke-limit and home values are nullable and come through
|
|
blank, while a rapid rate is a plain number the server defaults to <code>0</code>, so that one leaf shows a
|
|
table of zeros that never signals the absence at all.</p>
|
|
<h3 id="controller-brand--staged-confirmed-and-destructive-by-design">Controller Brand — staged, confirmed, and destructive by design</h3>
|
|
<p>Controller Brand is one of two panels with no table read of its own, the only panel with no local
|
|
error handler, and one of the two whose write replaces the whole runner — the branch root's
|
|
Object-Management install is the other. The select stages a pending brand rather than applying it;
|
|
<strong>Revert</strong> drops the staging, an orange banner spells out what the switch destroys, and <strong>Apply
|
|
brand</strong> opens a confirmation dialog before the request. Its failures surface through the shared
|
|
composable's global notification rather than the panel's own, so the console line names the shared
|
|
state and not the panel.</p>
|
|
<h3 id="controller-root--its-own-empty-block-its-own-toast">Controller root — its own empty block, its own toast</h3>
|
|
<p>The branch root panel does not use the shared empty state. It renders an hourglass over its own
|
|
no-runner title and hint. Its error path also differs: it takes an already-composed string from the
|
|
Object-Management button, omits the console line, and uses a longer toast than every other panel.</p>
|
|
<h3 id="indexing-position-tables--draft-validate-save-whole">Indexing Position Tables — draft, validate, save whole</h3>
|
|
<p>The one draft table. Its numeric cells bind straight into a local draft row with no handler, an
|
|
<em>unsaved</em> badge appears while the draft differs from what was saved, and nothing reaches the server
|
|
until the per-table <strong>Save Table</strong> button, which stays disabled while the draft fails validation. The
|
|
validation mirrors the endpoint's own rules — a per-table maximum, strictly ascending values, and a
|
|
<code>0 ≤ position < 360</code> range when a modular rotary axis reads the table — and reports the first
|
|
violation under the table. A failed save deliberately does <strong>not</strong> roll the draft back: the draft
|
|
stays dirty so the edit is not lost, which is the opposite of every other panel.</p>
|
|
<p>Its axis-assignment table above the drafts is display-only. The assignment is not editable on this
|
|
panel and the endpoint exposes no writer for it; the value is edited as a per-axis integer parameter
|
|
in Parameters (Native), which is what the panel's own hint says.</p>
|
|
<h3 id="subprogram-folders--two-fields-one-write">Subprogram Folders — two fields, one write</h3>
|
|
<p>The two folder inputs are plain text fields committed together on blur or Enter of either one, and
|
|
the guard against a redundant write is a saved snapshot of both values rather than a per-field
|
|
captured value. Editing one folder writes both.</p>
|
|
<h3 id="m-code-declarations--a-third-text-commit-wiring-and-an-add-that-submits-on-enter">M-Code Declarations — a third text-commit wiring, and an add that submits on Enter</h3>
|
|
<p>The note cell is the only text cell in the branch that commits through its field's native change
|
|
event rather than an explicit blur binding or the numeric widget. The timing matches; the wiring is a
|
|
third variant. This is also the only add-row footer whose input submits on Enter.</p>
|
|
<h3 id="r-parameters-and-retained-common-variables--the-two-panels-that-commit-a-null">R Parameters and Retained Common Variables — the two panels that commit a null</h3>
|
|
<p>Every other numeric handler returns early on a null and treats a cleared cell as no edit. These two
|
|
send the null, because an empty value is a real state in both tables — the vacant entry, which a
|
|
program reading it reports as an error rather than silently taking as zero.</p>
|
|
<h3 id="tool-offsets--a-read-only-column-that-still-writes-and-a-two-call-rollback">Tool Offsets — a read-only column that still writes, and a two-call rollback</h3>
|
|
<p>With the tool-house dependence on, the two ideal columns are made read-only rather than hidden. A
|
|
read-only field is still focusable and still takes keystrokes, and the widget's Enter binding is a
|
|
plain listener on the underlying element rather than the component event blur travels on — so
|
|
pressing Enter in one of those cells re-sends the whole row unchanged, while focusing it and leaving
|
|
does not, because a non-editable field raises no blur. The tool number column, by contrast, is
|
|
swapped for plain text and is genuinely inert. The tool-change position field takes a third route —
|
|
it is disabled rather than read-only while its axis stays put, and a disabled field takes no
|
|
keystrokes either.</p>
|
|
<p>Turning the dependence on also makes two server calls inside one try: the toggle write, then the
|
|
refresh from the tool house. If the second fails after the first succeeded — the refresh answers
|
|
unsuccessfully when the project carries no tool house — the catch reverts the local toggle while the
|
|
server has already committed it.</p>
|
|
<h3 id="work-coordinates--the-one-panel-that-writes-outside-the-branch">Work Coordinates — the one panel that writes outside the branch</h3>
|
|
<p>Clicking a row picks which coordinate the General Setup canvas marks, and that write goes to the
|
|
equipment-display surface rather than to this branch's own. It is also the branch's one call through
|
|
the plain-JSON helper instead of the envelope helper, so only a transport failure throws there. The
|
|
row click is bound on the whole row with no click-stopping on the cells or the P0 and M0 buttons, so
|
|
acting anywhere in a row marks it; a same-id short circuit is what keeps cell editing on the marked
|
|
row from writing again on every pass through.</p>
|
|
<h3 id="two-truth-sources-for-this-is-siemens">Two truth sources for “this is Siemens”</h3>
|
|
<p>The tree relabels the generic Tool Offsets leaf from the snapshot's <code>$TC_DP</code> flag, while the tool
|
|
offsets panel shows its ISO-G43-H caveat, and the controller parameters panel picks its macro-guard
|
|
labels, from the brand <em>string</em> instead. The brand marker is a free-form string that can be edited
|
|
independently of the dependency list, so the label and the caveat can disagree.</p>
|
|
<h3 id="the-error-handler-does-not-agree-with-itself">The error handler does not agree with itself</h3>
|
|
<p>Every panel that has a local handler composes the same toast through one signature carrying two
|
|
incompatible conventions. Nine pass a localization key and translate inside the handler; eight pass
|
|
an already-translated string. Both first parameters are typed as a plain string, so nothing separates
|
|
the two conventions at compile time. Nothing user-visible changes; the console line does — the
|
|
key-style panels log the raw key path, the string-style panels log the rendered sentence.</p>
|
|
<h3 id="the-add-row-footers-disagree-on-two-details">The add-row footers disagree on two details</h3>
|
|
<p>Whether Enter submits: only M-Code Declarations binds it. Whether the fields clear after a successful
|
|
add: M-Code Declarations clears its code, Tool Names clears both fields, and R Parameters, Retained
|
|
Common Variables and Parameters (Native) leave what was typed in place.</p>
|
|
<h3 id="a-source-comment-the-code-contradicts">A source comment the code contradicts</h3>
|
|
<p>The shared composable's header names the Execution page as the owner of the Controller root. The root
|
|
is built by the equipment-scoped host, which only the General Setup page creates, so the code is what
|
|
ships. The shared empty state's comment reads like a second case and is not one: the number in it
|
|
counts the byte-identical copies its extraction removed, not the call sites it has today, which are
|
|
one more.</p>
|
|
<h2 id="layout">Layout</h2>
|
|
<ul>
|
|
<li><strong>General Setup</strong> Control Tree — the left dock of <code>/general-setup</code>
|
|
<ul>
|
|
<li>Editor Row — the panel of whichever controller leaf is selected, one at a time
|
|
<ul>
|
|
<li>No-Runner Body — <em>"No NC runner — load a project first."</em>; shown first, from the shared
|
|
snapshot</li>
|
|
<li>Absent-Table Body — one line naming the table this leaf edits, from the panel's own read</li>
|
|
<li>Editor Body
|
|
<ul>
|
|
<li>Description Caption — the leaf's own one-line explanation, above the table</li>
|
|
<li>Toolbar — where the add button carries no fields: <strong>Add</strong> on Tool Offsets, <strong>Add Tool</strong> on
|
|
the Siemens <code>$TC_DP</code> table, beside that panel's own toggles</li>
|
|
<li>Table — dense, flat, bordered, no sort and no pagination
|
|
<ul>
|
|
<li>Header Row — the leaf's own columns, over the shared labels <strong>Axis</strong>, <strong>Id</strong>, <strong>Value</strong>,
|
|
<strong>Unit</strong> and <strong>Actions</strong></li>
|
|
<li>Data Row — a bold plain-text key cell, then one editable cell per column, then the row's
|
|
action buttons</li>
|
|
</ul>
|
|
</li>
|
|
<li>Add Row Footer — the new row's fields, then <strong>Add / Set</strong> or <strong>Declare</strong></li>
|
|
<li><strong>Show all</strong> Toggle — Work Coordinates and Frames only, revealing the all-zero extended tail</li>
|
|
<li>Draft Bar — <strong>Add Position</strong>, <strong>Revert</strong> and <strong>Save Table</strong> with an <em>unsaved</em> badge on
|
|
Indexing Position Tables; <strong>Revert</strong> with <strong>Apply brand</strong> on Controller Brand</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>Toast — negative, three seconds, the panel's context followed by the server's own message</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h2 id="source-code-path">Source Code Path</h2>
|
|
<p>See <a class="xref" href="../../index.html">HiNC App Anatomy</a> for git repository links.</p>
|
|
<h3 id="web-application">Web Application</h3>
|
|
<p>HiNC-2025-webservice (Quasar CLI SPA):</p>
|
|
<ul>
|
|
<li><code>wwwroot-src/src/composables/useSoftNcRunner.ts</code> — the shared snapshot every panel gates on: the
|
|
module-scope installed flag, the project-presence watch, the three events that re-read it, the
|
|
reload no panel calls, and the global notification the brand panel's failures take.</li>
|
|
<li><code>wwwroot-src/src/api/softNcRunner.ts</code> — the branch's typed REST wrappers: the snapshot parser, one
|
|
reader and one setter family per table, and the whole-row payloads the per-cell handlers send.</li>
|
|
<li><code>wwwroot-src/src/api/http.ts</code> — the two failure shapes a panel cannot tell apart, and the coded
|
|
error rendering that a message without a code falls through.</li>
|
|
<li><code>wwwroot-src/src/components/widgets/NumericInput.vue</code> — the numeric field: commit on blur or
|
|
Enter, no per-keystroke emit, no equality guard, and the Enter listener that keeps firing where a
|
|
read-only field's blur is suppressed.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcEmptyState.vue</code> — the shared no-runner line, and the
|
|
comment that counts the copies its extraction removed rather than its call sites.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/softNcItemTypes.ts</code> — the branch builder: the node ids the
|
|
two multi-leaf panels discriminate on, and the empty node key that reduces the remount key to the
|
|
id.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue</code> — the editor row: the remount key,
|
|
the one-panel-at-a-time mounting, and the events it wires to the host.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — the before-switch gate no panel in
|
|
this branch registers, and the rebuild that a reported structural change triggers.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcAxisTablePanel.vue</code> — the three per-axis leaves, and
|
|
the second empty layer keyed on the row count instead of the presence flag.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcBrandPanel.vue</code> — the staged select, the revert, the
|
|
confirmation and the structural change it reports.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcRunnerRootPanel.vue</code> — the panel with its own empty
|
|
block and its own toast shape.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcIndexingPositionsPanel.vue</code> — the draft table: the
|
|
unsaved badge, the client-side mirror of the endpoint's rules, the save that keeps a failed draft,
|
|
and the display-only assignment column.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcSubprogramPanel.vue</code> — the two text fields committed
|
|
as a pair against a saved snapshot.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcMCodesPanel.vue</code> — the change-event text cell, the
|
|
whole-declaration write, and the only add input that submits on Enter.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcToolOffsetsPanel.vue</code> — the read-only ideal columns
|
|
that still commit, the renameable key with its duplicate guard, and the two-call dependence toggle.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcWorkCoordinatesPanel.vue</code> — the row click that writes
|
|
to the display surface, and the row-scoped triad write.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcRParametersPanel.vue</code> and
|
|
<code>wwwroot-src/src/components/controlTree/SoftNcRetainedVariablesPanel.vue</code> — the two panels that
|
|
commit a null to vacate an entry.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcSiemensToolOffsetsPanel.vue</code> and
|
|
<code>wwwroot-src/src/components/controlTree/SoftNcNativeParamsPanel.vue</code> — the other two confirmed
|
|
deletions, and the two add flows that part company: one appends the minted row, the other re-reads
|
|
the whole table.</li>
|
|
<li><code>wwwroot-src/src/components/controlTree/SoftNcToolNamesPanel.vue</code>,
|
|
<code>wwwroot-src/src/components/controlTree/SoftNcToolChangePanel.vue</code>,
|
|
<code>wwwroot-src/src/components/controlTree/SoftNcDatumTablePanel.vue</code> and
|
|
<code>wwwroot-src/src/components/controlTree/SoftNcControllerParamsPanel.vue</code> — the conforming shape:
|
|
one read on mount, per-control commit, capture-assign-await-restore, one toast. The tool-change
|
|
<em>Stays put</em> box is the one handler among them that captures and restores a pair of fields.</li>
|
|
<li><code>wwwroot-src/src/api/equipmentSetup.ts</code> — the canvas marker id the work-coordinate row click
|
|
writes, outside this branch's own surface and through the plain-JSON helper.</li>
|
|
<li><code>wwwroot-src/src/stores/project.ts</code> — the has-a-project flag the shared snapshot watches, and the
|
|
direct path assignment that keeps it true across a project-to-project load.</li>
|
|
<li><code>wwwroot-src/src/layouts/MainLayout.vue</code> — the project epoch that rebuilds the page without
|
|
re-running the idempotent installer.</li>
|
|
<li><code>wwwroot-src/src/i18n/en/softNc.ts</code> — every empty line, column header, hint and error context this
|
|
branch renders, and the convention that an error key stores the bare context.</li>
|
|
<li><code>wwwroot-src/src/i18n/en/common.ts</code> — the shared column and action labels the tables reuse.</li>
|
|
<li><code>Mech/SoftNcRunnerController.cs</code> — the REST surface: the dependency lookup that answers a missing
|
|
table inside a success envelope, the reads that report presence independently of their rows, the
|
|
rapid rate defaulted to zero where its config is absent, the two runner-replacing writes that
|
|
answer real status codes instead, and the datum routes' defensive rejection of an unknown table
|
|
segment.</li>
|
|
<li><code>Common/ApiError.cs</code> — the coded payloads, and why only the no-project answer can be re-rendered in
|
|
the app locale.</li>
|
|
</ul>
|
|
<h2 id="see-also">See Also</h2>
|
|
<ul>
|
|
<li><a class="xref" href="index.html">Controller Branch</a> — the branch these rules hold across, its two planes and the runner behind them</li>
|
|
<li><a class="xref" href="machine/index.html">Machine and Controller Plane</a> — the plane whose seven leaf pages this contract lets stay short</li>
|
|
<li><a class="xref" href="program-data/index.html">Program Data Plane</a> — the other plane these rules hold across, whose six leaf pages inherit them the same way</li>
|
|
<li><a class="xref" href="brand-matrix.html">Brand Matrix</a> — which leaf exists on which brand, and the snapshot flags the first empty layer reads</li>
|
|
<li><a class="xref" href="../../widget/numeric-input.html">Numeric Input</a> — the numeric field's own contract: what parses, what the bounds do, and why Enter commits twice</li>
|
|
<li><a class="xref" href="machine/brand-switch.html">Controller Brand</a> — the staged, confirmed, whole-runner write that departs furthest from these rules</li>
|
|
<li><a class="xref" href="machine/per-axis-tables.html">Per-Axis Tables</a> — the three leaves whose empty layer keys on the row count, and the tool-change position beside them</li>
|
|
<li><a class="xref" href="machine/interface-parameters.html">Interface Parameters</a> — the interface parameter form and the canned-cycle field, both plain per-control commits</li>
|
|
<li><a class="xref" href="machine/m-code-declarations.html">M-Code Declarations</a> — the whole-declaration write and the change-event text cell</li>
|
|
<li><a class="xref" href="machine/program-reading.html">Program Reading</a> — the block-skip boxes and the paired folder inputs</li>
|
|
<li><a class="xref" href="machine/indexing-positions.html">Indexing Position Tables</a> — the draft-then-save table, the one panel that keeps a failed edit</li>
|
|
<li><a class="xref" href="machine/native-parameters.html">Native Parameters</a> — the confirmed deletions and the add-or-set footer that keeps what was typed</li>
|
|
</ul>
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
</div>
|
|
|
|
<div class="next-article d-print-none border-top" id="nextArticle"></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>
|