mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
Starts on interfaces for room combination
This commit is contained in:
@@ -4,13 +4,24 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes the functionality of a device that senses and provides partition state
|
/// Describes the functionality of a device that senses and provides partition state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPartitionStateProvider
|
public interface IPartitionStateProvider : IKeyName
|
||||||
{
|
{
|
||||||
BoolFeedback PartitionSensedFeedback { get; }
|
BoolFeedback PartitionSensedFeedback { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface IManualPartitionSensor : IPartitionStateProvider
|
||||||
|
{
|
||||||
|
void SetPartitionStatePresent();
|
||||||
|
|
||||||
|
void SetPartitionStateNotPresent();
|
||||||
|
|
||||||
|
void ToggglePartitionState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -289,6 +289,8 @@
|
|||||||
<Compile Include="Remotes\Hrxx0WirelessRemoteController.cs" />
|
<Compile Include="Remotes\Hrxx0WirelessRemoteController.cs" />
|
||||||
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
||||||
<Compile Include="Room\Combining\EssentialsRoomCombinerPropertiesConfig.cs" />
|
<Compile Include="Room\Combining\EssentialsRoomCombinerPropertiesConfig.cs" />
|
||||||
|
<Compile Include="Room\Combining\IEssentialsRoomCombiner.cs" />
|
||||||
|
<Compile Include="Room\Combining\RoomCombinationScenario.cs" />
|
||||||
<Compile Include="Room\EssentialsRoomBase.cs" />
|
<Compile Include="Room\EssentialsRoomBase.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomScheduledEventsConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomScheduledEventsConfig.cs" />
|
||||||
<Compile Include="Room\IEssentialsRoom.cs" />
|
<Compile Include="Room\IEssentialsRoom.cs" />
|
||||||
|
|||||||
@@ -8,21 +8,30 @@ using PepperDash.Core;
|
|||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Room
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Config properties for an EssentialsRoomCombiner device
|
/// Config properties for an EssentialsRoomCombiner device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomCombinerPropertiesConfig
|
public class EssentialsRoomCombinerPropertiesConfig
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The list of partitions that device the rooms
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("partitions")]
|
[JsonProperty("partitions")]
|
||||||
public List<PartitionConfig> Partitions {get; set;}
|
public List<PartitionConfig> Partitions {get; set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The list of combinations scenarios for the rooms
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("scenarios")]
|
[JsonProperty("scenarios")]
|
||||||
public List<RoomCombinationScenario> Scenarios { get; set; }
|
public List<RoomCombinationScenarioConfig> Scenarios { get; set; }
|
||||||
|
|
||||||
[JsonProperty("rooms")]
|
/// <summary>
|
||||||
public List<IKeyed> Rooms {get; set;}
|
/// The list of rooms that can be combined
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("roomMap")]
|
||||||
|
public Dictionary<string, string> RoomMap {get; set;}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -46,7 +55,7 @@ namespace PepperDash.Essentials.Core.Room
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Config propeties for a room combination scenario
|
/// Config propeties for a room combination scenario
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class RoomCombinationScenario : IKeyName
|
public class RoomCombinationScenarioConfig : IKeyName
|
||||||
{
|
{
|
||||||
[JsonProperty("partitionStates")]
|
[JsonProperty("partitionStates")]
|
||||||
public List<PartitionState> PartitionStates { get; set; }
|
public List<PartitionState> PartitionStates { get; set; }
|
||||||
@@ -67,6 +76,6 @@ namespace PepperDash.Essentials.Core.Room
|
|||||||
public string PartitionKey { get; set; }
|
public string PartitionKey { get; set; }
|
||||||
|
|
||||||
[JsonProperty("partitionSensedState")]
|
[JsonProperty("partitionSensedState")]
|
||||||
public bool PartitionSensedState { get; set; }
|
public bool PartitionPresent { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes the functionality for an EssentailsRoomCombiner device
|
||||||
|
/// </summary>
|
||||||
|
public interface IEssentialsRoomCombiner
|
||||||
|
{
|
||||||
|
// TODO: Update the EventArgs class as needed to specify scenario change
|
||||||
|
event EventHandler<EventArgs> RoomCombinationScenarioChanged;
|
||||||
|
|
||||||
|
BoolFeedback IsInAutoModeFeedback {get;}
|
||||||
|
|
||||||
|
void SetAutoMode();
|
||||||
|
|
||||||
|
void SetManualMode();
|
||||||
|
|
||||||
|
void ToggleMode();
|
||||||
|
|
||||||
|
List<IRoomCombinationScenario> Scenarios { get; }
|
||||||
|
|
||||||
|
List<IPartitionStateProvider> Partitions { get; }
|
||||||
|
|
||||||
|
void TogglePartitionState(string partitionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IRoomCombinationScenario : IKeyName
|
||||||
|
{
|
||||||
|
BoolFeedback IsActive { get; }
|
||||||
|
|
||||||
|
void Activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a room combination scenario
|
||||||
|
/// </summary>
|
||||||
|
public class RoomCombinationScenario: IRoomCombinationScenario
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user