feat(commons): add IDriverBrowser/IBrowseSession/BrowseNode abstractions
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
namespace ZB.MOM.WW.OtOpcUa.Commons.Browsing;
|
||||
|
||||
/// <summary>One node in a driver-agnostic browse tree.</summary>
|
||||
/// <param name="NodeId">Stable identifier passed back to the picker on commit. For OPC UA
|
||||
/// this is the <c>nsu=...;...</c> form; for Galaxy this is the <c>tag_name</c>.</param>
|
||||
/// <param name="DisplayName">Label shown in the tree.</param>
|
||||
/// <param name="Kind">Whether this node terminates the address (Leaf) or has children
|
||||
/// (Folder). Galaxy never returns Leaves; only the attribute side-panel terminates.</param>
|
||||
/// <param name="HasChildrenHint">When true, the UI renders an expand affordance before
|
||||
/// the children have been fetched.</param>
|
||||
public sealed record BrowseNode(
|
||||
string NodeId,
|
||||
string DisplayName,
|
||||
BrowseNodeKind Kind,
|
||||
bool HasChildrenHint);
|
||||
|
||||
/// <summary>Discriminates terminal vs. expandable nodes for UI rendering.</summary>
|
||||
public enum BrowseNodeKind
|
||||
{
|
||||
/// <summary>Expandable — has (or may have) children. UI shows expand affordance.</summary>
|
||||
Folder,
|
||||
/// <summary>Terminal — commit on select.</summary>
|
||||
Leaf,
|
||||
}
|
||||
|
||||
/// <summary>Metadata for an attribute of a Galaxy object (or the equivalent
|
||||
/// per-driver concept). Surfaced in the picker's attribute side-panel.</summary>
|
||||
public sealed record AttributeInfo(
|
||||
string Name,
|
||||
string DriverDataType,
|
||||
bool IsArray,
|
||||
string SecurityClass);
|
||||
Reference in New Issue
Block a user