merge: MTConnect family code review — sample-pump hot-loop backoff, probe deviceName path, stale-premise docs; 9 findings (High browse-commit String coercion recorded cross-module)
This commit is contained in:
@@ -167,9 +167,11 @@ universal browser commits and the key the driver resolves reads/subscribes
|
||||
against. `MTConnectTagConfigModel.FromJson` (the AdminUI typed editor) tries
|
||||
three spellings in order — `fullName` → `dataItemId` → `address` — and takes
|
||||
the first non-blank one, normalising onto `fullName` on save. `address` is
|
||||
accepted because that's the field name `RawBrowseCommitMapper` writes for a
|
||||
driver with no typed editor path, so a browse-committed tag stays readable
|
||||
even before the editor round-trips it.
|
||||
accepted because that is the field name `RawBrowseCommitMapper` writes for a
|
||||
driver with no typed-editor branch of its own — MTConnect has had such a
|
||||
branch since Gitea #536 and now commits under `fullName`, but blobs committed
|
||||
before it, and hand-authored/CSV/API blobs, still carry `address` and must
|
||||
stay readable.
|
||||
|
||||
### Coercion-type precedence
|
||||
|
||||
@@ -192,6 +194,16 @@ into) is resolved in this order, first non-null wins:
|
||||
(category/type/units/representation → `DriverDataType`).
|
||||
4. `DriverDataType.String` — the coercion that cannot fail.
|
||||
|
||||
> ⚠️ **Step 3 does not currently rescue a browse-committed tag.** `RawBrowseCommitMapper`'s
|
||||
> MTConnect branch emits a whole `MTConnectTagConfigModel`, whose `ToJson()` always writes
|
||||
> `dataType` from a field defaulting to `String` — a non-blank authored type, so step 1 wins
|
||||
> and step 3 is never consulted. The raw tag's OPC UA `DataType` meanwhile *is* taken from the
|
||||
> browsed leaf's inferred type (`RawBrowseCommitMapper.MapLeaf` → `MapDataType`), so a browsed
|
||||
> `SAMPLE` lands as a `Double` node whose driver coerces the observation to text. Fix belongs in
|
||||
> the commit mapper (forward the leaf's `DriverDataType` into the model, as the AbCip / TwinCAT /
|
||||
> FOCAS branches already do). Recorded as `Driver.MTConnect-003` in
|
||||
> [`code-reviews/Driver.MTConnect/findings.md`](../../code-reviews/Driver.MTConnect/findings.md).
|
||||
|
||||
### Quality mapping
|
||||
|
||||
`UNAVAILABLE` — MTConnect's one explicit "I have no value" sentinel — maps to
|
||||
|
||||
Reference in New Issue
Block a user