Files
Marc Schier 55bd944609 WoT: Types-side TD/TM-NodeSet conversion with consolidated corpus and minimal consumer compat (#4758)
# Description

Adds the pure Types-side WoT Thing Description / Thing Model to NodeSet
conversion: resolution, context, declarations, types, values,
localization, URI/format handling, bounded hashing, plus supporting
native XML codec, NodeSet alias/value helpers, RelativePathFormatter and
a JsonElement equality polyfill.

- Carrier-witness fix: a missing native event is accepted only when the
owning preserved type declares it through a `GeneratesEvent` reference
(directly or via its type/supertype chain) AND a bounded, validated
selected EventType carrier identity equals the normalized authored
native target. Native-present events get a full compare; an ambiguous
native key and a missing map stay strict; a readable document is never
archive authority.
- Support-only dependencies: additive per-instance, non-serialized
`WotDocument.IsSupportOnly(kind, name)` (ArgumentNullException guard).
The resolver marks support-only after closure; explicit selection wins;
the View builder excludes only true support-only members, so unit/actsOn
dependencies stay in the JSON. Nested controls cover inner value-only
projection under an outer value-only selection (unit kept, support-only)
versus an outer explicit SelectAll (explicit, not support-only).
- Documentation/XML comments and member-order only in commit 5c368d3a;
no logic change.
- Timeout repair on current head 6957dd46: invocation-scoped
`ArchiveDerivations` reuse removes repeated document-set derivation work
without a global cache (functional files
`WotNodeSetConverter.{Archive,ArchiveDerivations,Partitions,WoT}.cs`,
plus `WotArchiveDerivationsTests` and
`WotDocumentSetSharedValidationTests`). The original local full29
reproduction changed from 27 passed / 2 Refresh timeouts to 29 passed
with unchanged limits; official CI on this head FAILED at three
per-project time ceilings (see the evidence ledger). Temporary RF1
diagnostics were fully removed; the final tree differs from 0f7b9a09
only in the six functional files.
- Test-only net48 compile repair in commit b838907 (earlier head):
official CI on 5c368d3a was RED on the net48 build with CS1061 (see
ledger); the fix adds `using System.Threading;` and an unqualified
`CancellationTokenSource` in one test file. No production change.

Defaults: DI default document budget 256 versus the sample's explicit
1024. Corpus: canonical 540-JSON inventory; the actual manifest is 535
entries = 394 TD + 141 TM (the roles of the other 5 are not claimed).
Native Pumps assertions (9624 nodes / 339 partitions) are unchanged.
2026-10-17 20:43:25 +02:00

365 lines
10 KiB
JSON

{
"@context": [
"https://www.w3.org/2022/wot/td/v1.1",
{
"ns1": "urn:opcfoundation.org:UA:WotAggregation:PumpInstance",
"ns2": "http://opcfoundation.org/UA/Pumps/",
"ns3": "http://opcfoundation.org/UA/Machinery/",
"ns4": "http://opcfoundation.org/UA/DI/",
"ua": "http://opcfoundation.org/UA/",
"uav": "http://opcfoundation.org/UA/WoT-Binding/"
},
"http://opcfoundation.org/UA/WoT-Binding/v1.1/opc-ua-wot-binding.context.jsonld",
{
"title": {
"@id": "https://www.w3.org/2019/wot/td#title",
"@language": null
}
}
],
"@type": "uav:object",
"links": [
{
"href": "nsu=http://opcfoundation.org/UA/Pumps/;i=1005",
"rel": "ua:HasTypeDefinition"
},
{
"href": "sample-pump",
"rel": "uav:componentOf",
"type": "application/td+json"
}
],
"properties": {
"Manufacturer": {
"@context": {
"title": {
"@id": "https://www.w3.org/2019/wot/td#title",
"@language": null
}
},
"@type": "uav:variable",
"forms": [
{
"href": "${SOURCE_A_ENDPOINT}",
"op": [
"readproperty"
],
"uav:id": "nsu=urn:opcfoundation.org:UA:WotAggregation:SourceA;s=Pump1.Identification.Manufacturer"
}
],
"links": [
{
"href": "i=68",
"rel": "ua:HasTypeDefinition"
},
{
"href": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification",
"rel": "ua:PropertyOf",
"uav:refId": "i=46"
}
],
"observable": true,
"readOnly": true,
"title": "Manufacturer",
"uav:browseName": "ns4:Manufacturer",
"uav:id": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification.Manufacturer",
"uav:mapToNodeId": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification.Manufacturer",
"uav:mapToType": "i=21"
},
"ProductInstanceUri": {
"@context": {
"title": {
"@id": "https://www.w3.org/2019/wot/td#title",
"@language": null
}
},
"@type": "uav:variable",
"const": "urn:simdevice:SimPump:PumpX-2000:SN-001",
"forms": [
{
"href": "${SOURCE_A_ENDPOINT}",
"op": [
"readproperty"
],
"uav:id": "nsu=urn:opcfoundation.org:UA:WotAggregation:SourceA;s=Pump1.Identification.ProductInstanceUri"
}
],
"links": [
{
"href": "i=68",
"rel": "ua:HasTypeDefinition"
},
{
"href": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification",
"rel": "ua:PropertyOf",
"uav:refId": "i=46"
}
],
"observable": true,
"readOnly": true,
"title": "ProductInstanceUri",
"type": "string",
"uav:browseName": "ns4:ProductInstanceUri",
"uav:id": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification.ProductInstanceUri",
"uav:mapToNodeId": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification.ProductInstanceUri",
"uav:mapToType": "i=12"
},
"SerialNumber": {
"@context": {
"title": {
"@id": "https://www.w3.org/2019/wot/td#title",
"@language": null
}
},
"@type": "uav:variable",
"const": "SN-001",
"forms": [
{
"href": "${SOURCE_A_ENDPOINT}",
"op": [
"readproperty"
],
"uav:id": "nsu=urn:opcfoundation.org:UA:WotAggregation:SourceA;s=Pump1.Identification.SerialNumber"
}
],
"links": [
{
"href": "i=68",
"rel": "ua:HasTypeDefinition"
},
{
"href": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification",
"rel": "ua:PropertyOf",
"uav:refId": "i=46"
}
],
"observable": true,
"readOnly": true,
"title": "SerialNumber",
"type": "string",
"uav:browseName": "ns4:SerialNumber",
"uav:id": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification.SerialNumber",
"uav:mapToNodeId": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification.SerialNumber",
"uav:mapToType": "i=12"
}
},
"security": "nosec_sc",
"securityDefinitions": {
"nosec_sc": {
"scheme": "nosec"
}
},
"title": "Identification",
"uav:bindingVersion": "1.1",
"uav:browseName": "ns4:Identification",
"uav:componentOf": [
"nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1"
],
"uav:id": "nsu=urn:opcfoundation.org:UA:WotAggregation:PumpInstance;s=Pump1.Identification",
"uav:nodes": {
"@type": "uav:NodeModel",
"aliases": [
{
"alias": "Boolean",
"value": "i=1"
},
{
"alias": "UInt32",
"value": "i=7"
},
{
"alias": "Double",
"value": "i=11"
},
{
"alias": "String",
"value": "i=12"
},
{
"alias": "LocalizedText",
"value": "i=21"
},
{
"alias": "HasTypeDefinition",
"value": "i=40"
},
{
"alias": "HasProperty",
"value": "i=46"
},
{
"alias": "HasComponent",
"value": "i=47"
},
{
"alias": "Range",
"value": "i=884"
},
{
"alias": "EUInformation",
"value": "i=887"
},
{
"alias": "HasSubtype",
"value": "i=45"
},
{
"alias": "GeneratesEvent",
"value": "i=41"
},
{
"alias": "Argument",
"value": "i=296"
}
],
"models": [
{
"modelUri": "urn:opcfoundation.org:UA:WotAggregation:PumpInstance",
"publicationDate": "2026-07-24T00:00:00Z",
"requiredModels": [
{
"modelUri": "http://opcfoundation.org/UA/",
"publicationDate": "2022-02-24T00:00:00Z",
"version": "1.05.01"
},
{
"modelUri": "http://opcfoundation.org/UA/DI/",
"publicationDate": "2022-11-03T00:00:00Z",
"version": "1.04.0"
},
{
"modelUri": "http://opcfoundation.org/UA/Machinery/",
"publicationDate": "2021-02-25T00:00:00Z",
"version": "1.01.0"
},
{
"modelUri": "http://opcfoundation.org/UA/Pumps/",
"publicationDate": "2021-04-19T00:00:00Z",
"version": "1.0.0"
}
],
"version": "1.0.0"
}
],
"namespaceUris": [
"urn:opcfoundation.org:UA:WotAggregation:PumpInstance",
"http://opcfoundation.org/UA/Pumps/",
"http://opcfoundation.org/UA/Machinery/",
"http://opcfoundation.org/UA/DI/"
],
"nodes": [
{
"browseName": "4:Identification",
"displayName": [
{
"value": "Identification"
}
],
"nodeClass": "Object",
"nodeId": "ns=1;s=Pump1.Identification",
"parentNodeId": "ns=1;s=Pump1",
"references": [
{
"isForward": false,
"referenceType": "HasComponent",
"target": "ns=1;s=Pump1"
},
{
"referenceType": "HasProperty",
"target": "ns=1;s=Pump1.Identification.Manufacturer"
},
{
"referenceType": "HasProperty",
"target": "ns=1;s=Pump1.Identification.SerialNumber"
},
{
"referenceType": "HasProperty",
"target": "ns=1;s=Pump1.Identification.ProductInstanceUri"
},
{
"referenceType": "HasTypeDefinition",
"target": "ns=2;i=1005"
}
],
"typeDefinition": "ns=2;i=1005"
},
{
"browseName": "4:Manufacturer",
"dataType": "LocalizedText",
"displayName": [
{
"value": "Manufacturer"
}
],
"nodeClass": "Variable",
"nodeId": "ns=1;s=Pump1.Identification.Manufacturer",
"parentNodeId": "ns=1;s=Pump1.Identification",
"references": [
{
"isForward": false,
"referenceType": "HasProperty",
"target": "ns=1;s=Pump1.Identification"
},
{
"referenceType": "HasTypeDefinition",
"target": "i=68"
}
],
"typeDefinition": "i=68",
"valueXml": "<uax:LocalizedText xmlns:uax=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">\n <uax:Text>SimPump Corp</uax:Text>\n </uax:LocalizedText>"
},
{
"browseName": "4:SerialNumber",
"dataType": "String",
"displayName": [
{
"value": "SerialNumber"
}
],
"nodeClass": "Variable",
"nodeId": "ns=1;s=Pump1.Identification.SerialNumber",
"parentNodeId": "ns=1;s=Pump1.Identification",
"references": [
{
"isForward": false,
"referenceType": "HasProperty",
"target": "ns=1;s=Pump1.Identification"
},
{
"referenceType": "HasTypeDefinition",
"target": "i=68"
}
],
"typeDefinition": "i=68",
"valueXml": "<uax:String xmlns:uax=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">SN-001</uax:String>"
},
{
"browseName": "4:ProductInstanceUri",
"dataType": "String",
"displayName": [
{
"value": "ProductInstanceUri"
}
],
"nodeClass": "Variable",
"nodeId": "ns=1;s=Pump1.Identification.ProductInstanceUri",
"parentNodeId": "ns=1;s=Pump1.Identification",
"references": [
{
"isForward": false,
"referenceType": "HasProperty",
"target": "ns=1;s=Pump1.Identification"
},
{
"referenceType": "HasTypeDefinition",
"target": "i=68"
}
],
"typeDefinition": "i=68",
"valueXml": "<uax:String xmlns:uax=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">urn:simdevice:SimPump:PumpX-2000:SN-001</uax:String>"
}
],
"profileVersion": "1.0"
}
}