feat: expose mapped raw and uns data through grpc adapters
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
using ZB.MOM.WW.OtOpcUa.Core.Abstractions.DataConnections;
|
||||
using ZB.MOM.WW.OtOpcUa.Core.Authorization;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Runtime.DataConnections;
|
||||
|
||||
/// <summary>Internal deployment-scoped authority; never accepted from an SDK caller.</summary>
|
||||
internal sealed class ConfiguredProjectionCapability(string mappingId, long revision, DataRealm realm, DataOperations operations,
|
||||
IDataMappedCatalogAuthority sourceAuthority, Func<bool> current)
|
||||
{
|
||||
internal string Nonce { get; } = Guid.NewGuid().ToString("N");
|
||||
internal bool Matches(string mapping, DataView view, IDataMappedCatalogAuthority? authority)
|
||||
{
|
||||
try
|
||||
{
|
||||
return current() && sourceAuthority.IsActive && (operations & (DataOperations.Browse | DataOperations.Subscribe)) == (DataOperations.Browse | DataOperations.Subscribe) &&
|
||||
string.Equals(mapping, mappingId, StringComparison.OrdinalIgnoreCase) &&
|
||||
string.Equals(view.MappingId, mapping, StringComparison.OrdinalIgnoreCase) && view.MappingRevision == revision &&
|
||||
view.Realm == realm && (authority is null || ReferenceEquals(authority, sourceAuthority));
|
||||
}
|
||||
catch (Exception) { return false; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user