Group all 69 projects into category subfolders under src/ and tests/ so the Rider Solution Explorer mirrors the module structure. Folders: Core, Server, Drivers (with a nested Driver CLIs subfolder), Client, Tooling. - Move every project folder on disk with git mv (history preserved as renames). - Recompute relative paths in 57 .csproj files: cross-category ProjectReferences, the lib/ HintPath+None refs in Driver.Historian.Wonderware, and the external mxaccessgw refs in Driver.Galaxy and its test project. - Rebuild ZB.MOM.WW.OtOpcUa.slnx with nested solution folders. - Re-prefix project paths in functional scripts (e2e, compliance, smoke SQL, integration, install). Build green (0 errors); unit tests pass. Docs left for a separate pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
1.8 KiB
C#
45 lines
1.8 KiB
C#
namespace ZB.MOM.WW.OtOpcUa.Server.Alarms;
|
|
|
|
/// <summary>
|
|
/// Lifecycle transition for an alarm condition. Mirrors OPC UA Part 9 alarm states
|
|
/// simplified to the active / acknowledged / inactive triplet that every driver in
|
|
/// the repo exposes today.
|
|
/// </summary>
|
|
public enum AlarmStateTransition
|
|
{
|
|
/// <summary>InAlarm flipped false → true. Default to unacknowledged.</summary>
|
|
Active,
|
|
|
|
/// <summary>Acked flipped false → true while the alarm is still active.</summary>
|
|
Acknowledged,
|
|
|
|
/// <summary>InAlarm flipped true → false.</summary>
|
|
Inactive,
|
|
}
|
|
|
|
/// <summary>
|
|
/// One alarm-state transition raised by <see cref="AlarmConditionService.TransitionRaised"/>.
|
|
/// </summary>
|
|
/// <param name="ConditionId">Stable identifier the caller registered the condition under (typically the driver's alarm full reference).</param>
|
|
/// <param name="Transition">Which state the alarm transitioned to.</param>
|
|
/// <param name="Priority">Latest known priority. 0 when no priority sub-attribute was registered or no value has been observed yet.</param>
|
|
/// <param name="Description">Latest known description text; null when not registered or not yet observed.</param>
|
|
/// <param name="AtUtc">Server-clock UTC of the value change that produced this transition.</param>
|
|
public sealed record AlarmConditionTransition(
|
|
string ConditionId,
|
|
AlarmStateTransition Transition,
|
|
int Priority,
|
|
string? Description,
|
|
DateTime AtUtc);
|
|
|
|
/// <summary>
|
|
/// Read-only snapshot of an alarm condition's current state. Used for diagnostics
|
|
/// and dashboards; not part of the live transition stream.
|
|
/// </summary>
|
|
public sealed record AlarmConditionSnapshot(
|
|
string ConditionId,
|
|
bool InAlarm,
|
|
bool Acked,
|
|
int Priority,
|
|
string? Description);
|