-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMainWindow.DataSetSignalInventory.cs
More file actions
64 lines (56 loc) · 2.77 KB
/
Copy pathMainWindow.DataSetSignalInventory.cs
File metadata and controls
64 lines (56 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using ArIED61850Tester.Models;
using ArIED61850Tester.Services;
namespace ArIED61850Tester;
public partial class MainWindow
{
internal void RegisterRecoveredDataSetSignals(
Iec61850MonitorDevice device,
Iec61850DataSetSignalInventoryMergeResult merge)
{
ArgumentNullException.ThrowIfNull(device);
ArgumentNullException.ThrowIfNull(merge);
// A controllable static DataSet member is dual-role. Exact SCL/ARIEC CDC and
// DataObjectReference preserve the command companion independently from scalar
// feedback resolution; an exact ST/MX PrimaryValueReference may additionally become
// a normal report-backed runtime row. This separation keeps command discovery broad
// without weakening CanPublishToRuntime or admitting control service leaves.
var controlStatusProjection =
Iec61850StaticControlStatusProjectionService.EnsureProjections(device);
foreach (var signal in merge.AddedSignals.Concat(controlStatusProjection.AddedSignals))
{
// The wizard can recover a row after the normal discovery collection has
// already been registered with MainWindow. Bring that row under the same
// application lifecycle without changing its user-selection state.
signal.PropertyChanged -= Signal_PropertyChanged;
signal.PropertyChanged += Signal_PropertyChanged;
_signalOwners[signal] = device;
}
if (merge.AddedCount == 0 &&
merge.EnrichedExistingCount == 0 &&
controlStatusProjection.AddedCount == 0 &&
controlStatusProjection.LinkedControlCount == 0)
{
return;
}
device.RecountSelectedSignals();
device.RefreshComputed();
RaiseWorkspaceCounts();
if (merge.AddedCount > 0)
{
AddLog(
"INFO",
device.Name,
$"ARIEC DataSet authority restored {merge.AddedCount} mandatory primary signal(s) to the selection inventory; user selection was not changed.");
}
if (controlStatusProjection.AddedCount > 0 || controlStatusProjection.LinkedControlCount > 0)
{
AddLog(
"INFO",
device.Name,
$"Static DataSet control projection: materialized {controlStatusProjection.AddedControlCount} exact control companion(s), " +
$"{controlStatusProjection.AddedRuntimeFeedbackCount} exact runtime feedback row(s), and linked " +
$"{controlStatusProjection.LinkedControlCount} controllable DataSet member(s). Commands remain gated by live ctlModel; " +
"Oper/SBO/SBOw/Cancel/ctlVal/ctlModel service leaves remain excluded from Live Signal Values.");
}
}
}