You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WotCon.Server: no way to map WoT properties onto OPC UA companion specification types #4107
Opc.Ua.WotCon.Server maps Thing Description properties onto OPC UA variables using only JSON-schema
primitive types. There is no way to map a WoT property onto a type from an OPC UA companion
specification (e.g. an ObjectType from a Companion Spec, or a field within a StructureType).
The main value of the WoT-Connectivity approach is normalising proprietary asset data into a
standardised OPC UA information model, not just exposing it as loose primitives. Without
companion-spec mapping, the resulting address space is a flat set of Double/String variables.
UA Edge Translator implements this today with
three JSON-LD annotations on a TD property form:
Annotation
Purpose
uav:mapToNodeId
The target OPC UA NodeId the property value should be surfaced on
uav:mapToType
The companion-spec type (ObjectType / VariableType / DataType) to instantiate
uav:mapByFieldPath
The dot-notation field path inside a structured DataType
These are produced interactively by the UA-WoTMapper drag-and-drop tool.
Suggested direction
Extend the TD model so property forms can carry an optional target type / node id / field path.
In WotPropertyMapper, when a target type is present, resolve it from the server's NamespaceUris/type tree and instantiate the corresponding ObjectType children instead of
creating a primitive variable.
Surface the resolved target on WotPropertyTag so providers can address the correct field.
Happy to contribute the mapping logic from UA Edge Translator if that is useful.
Context
Found while evaluating whether UA Edge Translator can replace its hand-written WoT-Connectivity
node manager with this library. This is currently the single largest blocker.
Thanks — this is already implemented in #4093, and standardised rather than vendor-specific.
Where to look. The files you cite (ThingDescriptions/WotPropertyMapper.cs, Providers/WotPropertyTag.cs) are the OPC 10100-1 v1.02 asset surface. #4093 keeps that for compatibility but adds a registry-first materialization runtime plus Opc.Ua.WotCon.Bindings, and target mapping lives there.
What ships.uav:mapToNodeId, uav:mapToType and uav:mapByFieldPath are implemented per OPC 10101 §6.5.4, with the protocol-neutral example in §8.2 — i.e. the standardised form of exactly what UA Edge Translator does today:
WotProtocolBinderRegistry.Prepare — validates once for every protocol and attaches the mapping to every compiled form, so individual planners never re-parse it
IWotTargetVariableResolver, WotStructuredFieldBinding, WotStructuredGroupState — resolution and structured-field write-back
Covered by WotTargetMappingTests, WotTargetVariableResolverTests and WotMappingValidationTests, with a worked example in tests/Opc.Ua.WotCon.Tests/Resources/WotAggregation/StructuredPumpMappingExample.td.json. Documented in docs/WotBindings.md and docs/WoTConnectivity.md.
One deliberate difference worth knowing before you port anything. The terms are authored on the property affordance, never on a form — you proposed a form annotation. That is what the spec requires, and it is validated: mapByFieldPath requires mapToType, values must be non-empty, and authoring any of them on a form is rejected with a diagnostic carrying an RFC 6901 JSON Pointer. Portable nsu= NodeIds resolve against the runtime generation's namespace table.
Prerequisite-wise you were right that this needs the target type to exist first — see #4109 (now has a hook for programmatically generated DataTypes) and #4108.
Labelled enhancement; the mapping itself needs no further work.
Activity
marcschier commentedon Jul 29, 2026
Thanks — this is already implemented in #4093, and standardised rather than vendor-specific.
Where to look. The files you cite (
ThingDescriptions/WotPropertyMapper.cs,Providers/WotPropertyTag.cs) are the OPC 10100-1 v1.02 asset surface. #4093 keeps that for compatibility but adds a registry-first materialization runtime plusOpc.Ua.WotCon.Bindings, and target mapping lives there.What ships.
uav:mapToNodeId,uav:mapToTypeanduav:mapByFieldPathare implemented per OPC 10101 §6.5.4, with the protocol-neutral example in §8.2 — i.e. the standardised form of exactly what UA Edge Translator does today:WotTargetMappingDescriptor/WotAffordanceForm.TargetMapping— parsingWotProtocolBinderRegistry.Prepare— validates once for every protocol and attaches the mapping to every compiled form, so individual planners never re-parse itIWotTargetVariableResolver,WotStructuredFieldBinding,WotStructuredGroupState— resolution and structured-field write-backCovered by
WotTargetMappingTests,WotTargetVariableResolverTestsandWotMappingValidationTests, with a worked example intests/Opc.Ua.WotCon.Tests/Resources/WotAggregation/StructuredPumpMappingExample.td.json. Documented in docs/WotBindings.md and docs/WoTConnectivity.md.One deliberate difference worth knowing before you port anything. The terms are authored on the property affordance, never on a form — you proposed a form annotation. That is what the spec requires, and it is validated:
mapByFieldPathrequiresmapToType, values must be non-empty, and authoring any of them on a form is rejected with a diagnostic carrying an RFC 6901 JSON Pointer. Portablensu=NodeIds resolve against the runtime generation's namespace table.Prerequisite-wise you were right that this needs the target type to exist first — see #4109 (now has a hook for programmatically generated DataTypes) and #4108.
Labelled
enhancement; the mapping itself needs no further work.