Adds sub interfaces to capture EssentialsRoomBase

This commit is contained in:
Neil Dorin
2021-02-03 14:08:00 -07:00
parent 7a426ebc3a
commit 46ec92cb13
6 changed files with 115 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ namespace PepperDash.Essentials.Core.Interfaces.Components
/// Describes a group of room behaviour component. Is able to contain a collection of components that aggregate
/// together to behave as one
/// </summary>
public interface IRoomBehaviourGroupComponent
public interface IRoomBehaviourGroupComponent : IRoomComponent
{
/// <summary>
/// A collection of components that work together to achieve a common behaviour

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
namespace PepperDash.Essentials.Core.Interfaces.Room
{
public interface IHasMobileControl
{
/// <summary>
/// Indicates if this room is Mobile Control Enabled
/// </summary>
bool IsMobileControlEnabled { get; }
/// <summary>
/// The bridge for this room if Mobile Control is enabled
/// </summary>
IMobileControlRoomBridge MobileControlRoomBridge { get; }
}
}

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core.Interfaces.Room
{
public interface IHasRoomOccupancyStatusProvider
{
event EventHandler<EventArgs> RoomOccupancyIsSet;
IOccupancyStatusProvider RoomOccupancy { get; }
bool OccupancyStatusProviderIsRemote { get; }
int ShutdownVacancySeconds { get; }
eVacancyMode VacancyMode { get; }
void StartRoomVacancyTimer(eVacancyMode mode);
/// <summary>
/// Sets the object to be used as the IOccupancyStatusProvider for the room. Can be an Occupancy Aggregator or a specific device
/// </summary>
/// <param name="statusProvider"></param>
/// <param name="timoutMinutes"></param>
void SetRoomOccupancy(IOccupancyStatusProvider statusProvider, int timeoutMinutes);
/// <summary>
/// Executes when RoomVacancyShutdownTimer expires. Used to trigger specific room actions as needed. Must nullify the timer object when executed
/// </summary>
/// <param name="o"></param>
void RoomVacatedForTimeoutPeriod(object o);
}
}

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Interfaces.Room
{
/// <summary>
/// Describes the necessary functions for a room that can be powered on and shutdown
/// </summary>
public interface IHasRoomOn
{
BoolFeedback OnFeedback { get; }
BoolFeedback IsWarmingUpFeedback { get; }
BoolFeedback IsCoolingDownFeedback { get; }
/// <summary>
/// Timer used for informing the UIs of a shutdown
/// </summary>
SecondsCountdownTimer ShutdownPromptTimer { get; private set; }
/// <summary>
///
/// </summary>
int ShutdownPromptSeconds { get; set; }
int ShutdownVacancySeconds { get; set; }
eShutdownType ShutdownType { get; private set; }
/// <summary>
/// Starts the Shutdown process based on the type
/// </summary>
/// <param name="type"></param>
void StartShutdown(eShutdownType type);
/// <summary>
/// Resets the vacancy mode and shuts down the room
/// </summary>
void Shutdown();
}
}

View File

@@ -228,6 +228,9 @@
<Compile Include="Interfaces\Components\RoomComponents.cs" />
<Compile Include="Interfaces\ILogStrings.cs" />
<Compile Include="Interfaces\ILogStringsWithLevel.cs" />
<Compile Include="Interfaces\Room\IHasMobileControl.cs" />
<Compile Include="Interfaces\Room\IHasRoomOccupancyStatusProvider.cs" />
<Compile Include="Interfaces\Room\IHasRoomOn.cs" />
<Compile Include="Queues\ComsMessage.cs" />
<Compile Include="Queues\ProcessStringMessage.cs" />
<Compile Include="Queues\GenericQueue.cs" />

View File

@@ -203,7 +203,7 @@ namespace PepperDash.Essentials.Core
}
/// <summary>
///
/// Starts the Shutdown process based on the type
/// </summary>
/// <param name="type"></param>
public void StartShutdown(eShutdownType type)