mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-31 13:25:00 +00:00
Starts on interfaces for room combination
This commit is contained in:
@@ -4,13 +4,24 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes the functionality of a device that senses and provides partition state
|
||||
/// </summary>
|
||||
public interface IPartitionStateProvider
|
||||
public interface IPartitionStateProvider : IKeyName
|
||||
{
|
||||
BoolFeedback PartitionSensedFeedback { get; }
|
||||
}
|
||||
|
||||
public interface IManualPartitionSensor : IPartitionStateProvider
|
||||
{
|
||||
void SetPartitionStatePresent();
|
||||
|
||||
void SetPartitionStateNotPresent();
|
||||
|
||||
void ToggglePartitionState();
|
||||
}
|
||||
}
|
||||
@@ -289,6 +289,8 @@
|
||||
<Compile Include="Remotes\Hrxx0WirelessRemoteController.cs" />
|
||||
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.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\Config\EssentialsRoomScheduledEventsConfig.cs" />
|
||||
<Compile Include="Room\IEssentialsRoom.cs" />
|
||||
|
||||
@@ -8,21 +8,30 @@ using PepperDash.Core;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Room
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Config properties for an EssentialsRoomCombiner device
|
||||
/// </summary>
|
||||
public class EssentialsRoomCombinerPropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// The list of partitions that device the rooms
|
||||
/// </summary>
|
||||
[JsonProperty("partitions")]
|
||||
public List<PartitionConfig> Partitions {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// The list of combinations scenarios for the rooms
|
||||
/// </summary>
|
||||
[JsonProperty("scenarios")]
|
||||
public List<RoomCombinationScenario> Scenarios { get; set; }
|
||||
public List<RoomCombinationScenarioConfig> Scenarios { get; set; }
|
||||
|
||||
[JsonProperty("rooms")]
|
||||
public List<IKeyed> Rooms {get; set;}
|
||||
/// <summary>
|
||||
/// The list of rooms that can be combined
|
||||
/// </summary>
|
||||
[JsonProperty("roomMap")]
|
||||
public Dictionary<string, string> RoomMap {get; set;}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -46,7 +55,7 @@ namespace PepperDash.Essentials.Core.Room
|
||||
/// <summary>
|
||||
/// Config propeties for a room combination scenario
|
||||
/// </summary>
|
||||
public class RoomCombinationScenario : IKeyName
|
||||
public class RoomCombinationScenarioConfig : IKeyName
|
||||
{
|
||||
[JsonProperty("partitionStates")]
|
||||
public List<PartitionState> PartitionStates { get; set; }
|
||||
@@ -67,6 +76,6 @@ namespace PepperDash.Essentials.Core.Room
|
||||
public string PartitionKey { get; set; }
|
||||
|
||||
[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