using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using PepperDash.Core; using Newtonsoft.Json; namespace PepperDash.Essentials.Core { /// /// Config properties for an EssentialsRoomCombiner device /// public class EssentialsRoomCombinerPropertiesConfig { /// /// The list of partitions that device the rooms /// [JsonProperty("partitions")] public List Partitions {get; set;} /// /// The list of combinations scenarios for the rooms /// [JsonProperty("scenarios")] public List Scenarios { get; set; } /// /// The list of rooms keys that can be combined /// [JsonProperty("roomKeys")] public List RoomKeys {get; set;} /// /// Set to true to default to manual mode /// [JsonProperty("defaultToManualMode")] public bool defaultToManualMode { get; set; } /// /// The key of the scenario to default to at system startup if in manual mode /// [JsonProperty("defaultScenarioKey")] public string defaultScenarioKey { get; set; } [JsonProperty("scenarioChangeDebounceTimeSeconds")] public int ScenarioChangeDebounceTimeSeconds { get; set; } } /// /// Config properties for a partition that separates rooms /// public class PartitionConfig : IKeyName { [JsonProperty("key")] public string Key { get; set; } [JsonProperty("name")] public string Name { get; set; } /// /// Key of the device that implements IPartitionStateProvider to provide the state of the partition /// [JsonProperty("deviceKey")] public string DeviceKey { get; set; } /// /// Keys of the rooms that this partion would be located between /// [JsonProperty("adjacentRoomKeys")] public List AdjacentRoomKeys { get; set; } } /// /// Config propeties for a room combination scenario /// public class RoomCombinationScenarioConfig : IKeyName { [JsonProperty("key")] public string Key { get; set; } [JsonProperty("name")] public string Name { get; set; } [JsonProperty("partitionStates")] public List PartitionStates { get; set; } /// /// Determines which UI devices get mapped to which room in this scenario. The Key should be the key of the UI device and the Value should be the key of the room to map to /// [JsonProperty("uiMap")] public Dictionary UiMap { get; set; } [JsonProperty("activationActions")] public List ActivationActions { get; set; } [JsonProperty("deactivationActions")] public List DeactivationActions { get; set; } } /// /// Config properties to represent the state of a partition sensor in a RoomCombinationScenario /// public class PartitionState { [JsonProperty("partitionKey")] public string PartitionKey { get; set; } [JsonProperty("partitionSensedState")] public bool PartitionPresent { get; set; } } }