using System.Collections.Generic; namespace GeViSetEditor.Core.Models { /// /// Represents the complete GeViSet configuration from a .set file /// public class GeViSetConfiguration { public string Header { get; set; } = "GeViSoft Parameters"; public List
Sections { get; set; } = new(); /// /// File format version (inferred from structure) /// public int FormatVersion { get; set; } = 1; } /// /// Represents a configuration section (Alarms, Clients, GeViIO, etc.) /// public class Section { public string Name { get; set; } = ""; public List Items { get; set; } = new(); public List Rules { get; set; } = new(); } /// /// Represents a configuration item (key-value pair) /// public class ConfigItem { public string Name { get; set; } = ""; public object Value { get; set; } public ConfigValueType Type { get; set; } public override string ToString() => $"{Name} = {Value}"; } /// /// Represents an action rule (trigger -> actions mapping) /// public class ActionRule { public int RuleId { get; set; } public Dictionary TriggerProperties { get; set; } = new(); public string MainAction { get; set; } = ""; public List ActionVariations { get; set; } = new(); public override string ToString() { var triggers = string.Join(", ", TriggerProperties.Where(kv => kv.Value).Select(kv => kv.Key)); return $"Rule #{RuleId}: [{triggers}] -> {MainAction}"; } } /// /// Represents platform-specific action variations (GSC, GNG, GCore) /// public class ActionVariation { public int VariationId { get; set; } public string ActionString { get; set; } = ""; public string ActionType { get; set; } = ""; // GscAction, GCoreAction, etc. public string FullCommand { get; set; } = ""; public string ServerType { get; set; } = ""; // GscServer, GCoreServer public string ServerName { get; set; } = ""; public Dictionary Metadata { get; set; } = new(); public override string ToString() => $"{ActionType}: {ActionString}"; } public enum ConfigValueType { Boolean, Integer, String, Binary } }