Forge
csharpdeeb25a2
1using System.Text.Json.Serialization;
2
3namespace CascadeIDE.Cockpit.Cds;
4
5/// <summary>
6/// CDS (контракт кабины), слой ADR 0036 п.2: семантический снимок без дерева контролов и без полезной нагрузки каналов
7/// (см. <c>docs/design/cds-contract-v0.md</c>, ADR 0036).
8/// </summary>
9public sealed record CockpitSurfaceState(
10 [property: JsonPropertyName("schema_version")] string SchemaVersion,
11 [property: JsonPropertyName("ui_mode")] string UiMode,
12 [property: JsonPropertyName("presentation_effective_line")] string PresentationEffectiveLine,
13 [property: JsonPropertyName("presentation_parse_success")] bool PresentationParseSuccess,
14 [property: JsonPropertyName("topology")] CockpitSurfaceTopology Topology,
15 [property: JsonPropertyName("mfd_shell")] CockpitSurfaceMfdShell MfdShell,
16 [property: JsonPropertyName("zones")] CockpitSurfaceZones Zones,
17 [property: JsonPropertyName("instruments")] IReadOnlyList<CockpitSurfaceInstrument> Instruments);
18
19public sealed record CockpitSurfaceTopology(
20 [property: JsonPropertyName("surface_kind")] string SurfaceKind,
21 [property: JsonPropertyName("mfd_host_window_open")] bool MfdHostWindowOpen,
22 [property: JsonPropertyName("pfd_host_window_open")] bool PfdHostWindowOpen,
23 [property: JsonPropertyName("mfd_column_visible_in_main")] bool MfdColumnVisibleInMain);
24
25public sealed record CockpitSurfaceMfdShell(
26 [property: JsonPropertyName("current_page")] string CurrentPage);
27
28public sealed record CockpitSurfaceZones(
29 [property: JsonPropertyName("pfd_visible")] bool PfdVisible,
30 [property: JsonPropertyName("forward_visible")] bool ForwardVisible,
31 [property: JsonPropertyName("mfd_visible")] bool MfdVisible,
32 [property: JsonPropertyName("pfd_required_by_presentation")] bool PfdRequiredByPresentation,
33 [property: JsonPropertyName("forward_required_by_presentation")] bool ForwardRequiredByPresentation,
34 [property: JsonPropertyName("mfd_required_by_presentation")] bool MfdRequiredByPresentation);
35
36public sealed record CockpitSurfaceInstrument(
37 [property: JsonPropertyName("instrument_id")] string InstrumentId,
38 [property: JsonPropertyName("slot_id")] string SlotId,
39 [property: JsonPropertyName("schema_version")] string SchemaVersion);
40
View only · write via MCP/CIDE