review(Core.Scripting.Abstractions): refresh stale Phase7 labels + document {{equip}}

First review at 7286d320. Five Low doc fixes (BadNodeIdUnknown comment parity, three stale
Phase7 labels -> design-doc cites, {{equip}} token doc on GetTag/SetVirtualTag). Deadband
NaN/negative-tolerance (004) + a stale docs path (007) left Open.
This commit is contained in:
Joseph Doherty
2026-06-19 11:06:56 -04:00
parent 38c48a009c
commit 145b06bec9
4 changed files with 227 additions and 10 deletions
@@ -6,9 +6,10 @@ namespace ZB.MOM.WW.OtOpcUa.Core.Scripting;
/// <summary>
/// The API user scripts see as the global <c>ctx</c>. Abstract — concrete subclasses
/// (e.g. <c>VirtualTagScriptContext</c>, <c>AlarmScriptContext</c>) plug in the
/// actual tag-backend + logger + virtual-tag writer for each evaluation. Phase 7 plan
/// decision #6: scripts can read any tag, write only to virtual tags, and have no
/// other .NET reach — no HttpClient, no File, no Process, no reflection.
/// actual tag-backend + logger + virtual-tag writer for each evaluation. Plan decision
/// #6 (see <c>docs/v2/plan.md</c>): scripts can read any tag, write only to virtual
/// tags, and have no other .NET reach — no HttpClient, no File, no Process, no
/// reflection.
/// </summary>
/// <remarks>
/// <para>
@@ -39,6 +40,11 @@ public abstract class ScriptContext
/// publish by <c>DependencyExtractor</c>. This is intentional: the static
/// dependency set is required for the change-driven scheduler to subscribe to the
/// right upstream tags at load time.
/// <para>
/// The reserved <c>{{equip}}</c> token may appear in the path literal; it is
/// substituted with the owning equipment's tag-base prefix at deployment time.
/// See <c>docs/ScriptEditor.md</c> — Equipment-relative tag paths.
/// </para>
/// </remarks>
/// <param name="path">The literal tag path to read.</param>
public abstract DataValueSnapshot GetTag(string path);
@@ -52,7 +58,8 @@ public abstract class ScriptContext
/// <remarks>
/// Path rules identical to <see cref="GetTag"/> — literal only, dependency
/// extractor tracks the write targets so the engine knows what downstream
/// subscribers to notify.
/// subscribers to notify. The <c>{{equip}}</c> token is supported in the same way
/// as for <see cref="GetTag"/>.
/// </remarks>
/// <param name="path">The literal tag path to write to.</param>
/// <param name="value">The value to write to the virtual tag.</param>