feat(commons): native alarm source entities + ResolvedNativeAlarmSource
This commit is contained in:
@@ -23,6 +23,8 @@ public sealed record FlattenedConfiguration
|
||||
public IReadOnlyList<ResolvedAlarm> Alarms { get; init; } = [];
|
||||
/// <summary>Gets the resolved scripts.</summary>
|
||||
public IReadOnlyList<ResolvedScript> Scripts { get; init; } = [];
|
||||
/// <summary>Gets the resolved native alarm source bindings.</summary>
|
||||
public IReadOnlyList<ResolvedNativeAlarmSource> NativeAlarmSources { get; init; } = [];
|
||||
/// <summary>Gets the UTC timestamp when this configuration was generated.</summary>
|
||||
public DateTimeOffset GeneratedAtUtc { get; init; } = DateTimeOffset.UtcNow;
|
||||
|
||||
@@ -125,6 +127,25 @@ public sealed record ResolvedAlarm
|
||||
public string Source { get; init; } = "Template";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A fully resolved native alarm source binding (data connection + source
|
||||
/// reference). Conditions under the source are discovered at runtime; this
|
||||
/// record only carries the binding, not individual alarms.
|
||||
/// </summary>
|
||||
public sealed record ResolvedNativeAlarmSource
|
||||
{
|
||||
/// <summary>Gets the path-qualified canonical name.</summary>
|
||||
public string CanonicalName { get; init; } = string.Empty;
|
||||
/// <summary>Gets the data connection name that owns the alarm feed.</summary>
|
||||
public string ConnectionName { get; init; } = string.Empty;
|
||||
/// <summary>Gets the source reference (OPC UA SourceNode/notifier nodeId, or MxAccess object/area).</summary>
|
||||
public string SourceReference { get; init; } = string.Empty;
|
||||
/// <summary>Gets the optional condition filter; null = mirror all conditions under the source.</summary>
|
||||
public string? ConditionFilter { get; init; }
|
||||
/// <summary>Gets the source of this binding: "Template", "Inherited", "Composed", or "Override".</summary>
|
||||
public string Source { get; init; } = "Template";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A fully resolved script with code, trigger config, parameters, and return definition.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user