21 lines
735 B
C#
21 lines
735 B
C#
using ZB.MOM.WW.OtOpcUa.Commons.Types;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Commons.Interfaces;
|
|
|
|
/// <summary>
|
|
/// Live view of the local node's identity and the cluster's role topology. Implemented by
|
|
/// <c>ClusterRoleInfo</c> in <c>OtOpcUa.Cluster</c>; consumed by everything that needs to
|
|
/// distinguish admin-role vs driver-role members or react to role-leader changes (e.g. OPC UA
|
|
/// ServiceLevel computation).
|
|
/// </summary>
|
|
public interface IClusterRoleInfo
|
|
{
|
|
NodeId LocalNode { get; }
|
|
IReadOnlySet<string> LocalRoles { get; }
|
|
bool HasRole(string role);
|
|
IReadOnlyList<NodeId> MembersWithRole(string role);
|
|
NodeId? RoleLeader(string role);
|
|
|
|
event EventHandler<RoleLeaderChangedEventArgs>? RoleLeaderChanged;
|
|
}
|