feat: expose mapped raw and uns data through grpc adapters
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Opc.Ua;
|
||||
using ZB.MOM.WW.OtOpcUa.Commons.OpcUa;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
|
||||
|
||||
/// <summary>Resolves projected node capabilities from the currently bound SDK sink.</summary>
|
||||
public sealed class DeferredProjectedNodeAccess(DeferredAddressSpaceSink deferred) : IProjectedNodeLookup, IProjectedAnchorSink
|
||||
{
|
||||
public bool TryResolve(NodeId nodeId, out ProjectedVariableDefinition? definition)
|
||||
{
|
||||
definition = null;
|
||||
return deferred.GetCapability<IProjectedNodeLookup>()?.TryResolve(nodeId, out definition) == true;
|
||||
}
|
||||
public bool TryGetNodeId(string namespaceUri, string identifier, out NodeId? nodeId)
|
||||
{
|
||||
nodeId = null;
|
||||
return deferred.GetCapability<IProjectedNodeLookup>()?.TryGetNodeId(namespaceUri, identifier, out nodeId) == true;
|
||||
}
|
||||
public bool TryEnsureProjectedAnchor(ProjectedAnchorDefinition definition, out NodeId? nodeId)
|
||||
{
|
||||
nodeId = null;
|
||||
return deferred.GetCapability<IProjectedAnchorSink>()?.TryEnsureProjectedAnchor(definition, out nodeId) == true;
|
||||
}
|
||||
public bool TryRemoveProjectedAnchor(NodeId nodeId, ProjectedAnchorDefinition expected) =>
|
||||
deferred.GetCapability<IProjectedAnchorSink>()?.TryRemoveProjectedAnchor(nodeId, expected) == true;
|
||||
}
|
||||
Reference in New Issue
Block a user