mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
#736 Adds IEssentialsRoom and IEssentialsHuddleSpaceRoom interfaces
Refactors all references to EssentialsRoomBase and EssentialsHuddleSpaceRoom to use the new interfaces instead
This commit is contained in:
@@ -452,7 +452,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
||||||
{
|
{
|
||||||
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom;
|
||||||
if (room != null)
|
if (room != null)
|
||||||
{
|
{
|
||||||
// default IPID
|
// default IPID
|
||||||
@@ -474,7 +474,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
if (room is IEssentialsHuddleSpaceRoom)
|
||||||
{
|
{
|
||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
|
|
||||||
@@ -524,7 +524,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void CreateMobileControlBridge(EssentialsRoomBase room)
|
private static void CreateMobileControlBridge(IEssentialsRoom room)
|
||||||
{
|
{
|
||||||
var mobileControl = GetMobileControlDevice();
|
var mobileControl = GetMobileControlDevice();
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,7 @@
|
|||||||
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
||||||
|
<Compile Include="Room\Types\IEssentialsHuddleSpaceRoom.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
||||||
/// Returns null if there is no emergency defined
|
/// Returns null if there is no emergency defined
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, EssentialsRoomBase room)
|
public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room)
|
||||||
{
|
{
|
||||||
// This emergency
|
// This emergency
|
||||||
var emergency = props.Emergency;
|
var emergency = props.Emergency;
|
||||||
@@ -96,7 +96,7 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
if (behaviour == "trackroomstate")
|
if (behaviour == "trackroomstate")
|
||||||
{
|
{
|
||||||
// Tie LED enable to room power state
|
// Tie LED enable to room power state
|
||||||
var essRoom = room as EssentialsRoomBase;
|
var essRoom = room as IEssentialsRoom;
|
||||||
essRoom.OnFeedback.OutputChange += (o, a) =>
|
essRoom.OnFeedback.OutputChange += (o, a) =>
|
||||||
{
|
{
|
||||||
if (essRoom.OnFeedback.BoolValue)
|
if (essRoom.OnFeedback.BoolValue)
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ namespace PepperDash.Essentials.Room
|
|||||||
|
|
||||||
public class EssentialsRoomEmergencyContactClosure : EssentialsRoomEmergencyBase
|
public class EssentialsRoomEmergencyContactClosure : EssentialsRoomEmergencyBase
|
||||||
{
|
{
|
||||||
EssentialsRoomBase Room;
|
IEssentialsRoom Room;
|
||||||
string Behavior;
|
string Behavior;
|
||||||
bool TriggerOnClose;
|
bool TriggerOnClose;
|
||||||
|
|
||||||
public EssentialsRoomEmergencyContactClosure(string key, EssentialsRoomEmergencyConfig config, EssentialsRoomBase room) :
|
public EssentialsRoomEmergencyContactClosure(string key, EssentialsRoomEmergencyConfig config, IEssentialsRoom room) :
|
||||||
base(key)
|
base(key)
|
||||||
{
|
{
|
||||||
Room = room;
|
Room = room;
|
||||||
|
|||||||
@@ -645,9 +645,9 @@ namespace PepperDash.Essentials
|
|||||||
public static void AllRoomsOff()
|
public static void AllRoomsOff()
|
||||||
{
|
{
|
||||||
var allRooms = DeviceManager.AllDevices.Where(d =>
|
var allRooms = DeviceManager.AllDevices.Where(d =>
|
||||||
d is EssentialsHuddleSpaceRoom && !(d as EssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions);
|
d is IEssentialsHuddleSpaceRoom && !(d as IEssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions);
|
||||||
foreach (var room in allRooms)
|
foreach (var room in allRooms)
|
||||||
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff", (room as EssentialsHuddleSpaceRoom).SourceListKey);
|
(room as IEssentialsHuddleSpaceRoom).RunRouteAction("roomOff", (room as IEssentialsHuddleSpaceRoom).SourceListKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IPrivacy Members
|
#region IPrivacy Members
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using PepperDash.Essentials.Room.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasCurrentVolumeControls, IHasDefaultDisplay
|
public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IEssentialsHuddleSpaceRoom
|
||||||
{
|
{
|
||||||
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
public event SourceInfoChangeHandler CurrentSourceChange;
|
public event SourceInfoChangeHandler CurrentSourceChange;
|
||||||
|
|||||||
@@ -734,9 +734,9 @@ namespace PepperDash.Essentials
|
|||||||
public static void AllRoomsOff()
|
public static void AllRoomsOff()
|
||||||
{
|
{
|
||||||
var allRooms = DeviceManager.AllDevices.Where(d =>
|
var allRooms = DeviceManager.AllDevices.Where(d =>
|
||||||
d is EssentialsHuddleSpaceRoom && !(d as EssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions);
|
d is IEssentialsRoom && !(d as IEssentialsHuddleSpaceRoom).ExcludeFromGlobalFunctions);
|
||||||
foreach (var room in allRooms)
|
foreach (var room in allRooms)
|
||||||
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
|
(room as IEssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||||
|
using PepperDash.Essentials.Room.Config;
|
||||||
|
using PepperDash.Essentials.Core.Devices;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay
|
||||||
|
{
|
||||||
|
bool ExcludeFromGlobalFunctions { get; }
|
||||||
|
|
||||||
|
void RunRouteAction(string routeKey);
|
||||||
|
|
||||||
|
EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
|
IBasicVolumeControls CurrentVolumeControls { get; }
|
||||||
|
|
||||||
|
event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -222,7 +222,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
// spin up different room drivers depending on room type
|
// spin up different room drivers depending on room type
|
||||||
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
|
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
if (room is IEssentialsHuddleSpaceRoom)
|
||||||
{
|
{
|
||||||
// Screen Saver Driver
|
// Screen Saver Driver
|
||||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
|
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
|
||||||
@@ -236,7 +236,7 @@ namespace PepperDash.Essentials
|
|||||||
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props);
|
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props);
|
||||||
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
||||||
mainDriver.AvDriver = avDriver;
|
mainDriver.AvDriver = avDriver;
|
||||||
avDriver.CurrentRoom = room as EssentialsHuddleSpaceRoom;
|
avDriver.CurrentRoom = room as IEssentialsHuddleSpaceRoom;
|
||||||
|
|
||||||
// Environment Driver
|
// Environment Driver
|
||||||
if (avDriver.CurrentRoom.PropertiesConfig.Environment != null && avDriver.CurrentRoom.PropertiesConfig.Environment.DeviceKeys.Count > 0)
|
if (avDriver.CurrentRoom.PropertiesConfig.Environment != null && avDriver.CurrentRoom.PropertiesConfig.Environment.DeviceKeys.Count > 0)
|
||||||
|
|||||||
@@ -146,18 +146,18 @@
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// void CurrentRoom_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
// void CurrentRoom_CurrentSourceInfoChange(IEssentialsRoom room, SourceListItem info, ChangeType type)
|
||||||
// {
|
// {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// void CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
// void CurrentRoom_CurrentDisplay1SourceChange(IEssentialsRoom room, SourceListItem info, ChangeType type)
|
||||||
// {
|
// {
|
||||||
// TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue = PendingSource.PreferredName;
|
// TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue = PendingSource.PreferredName;
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// void CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
// void CurrentRoom_CurrentDisplay2SourceChange(IEssentialsRoom room, SourceListItem info, ChangeType type)
|
||||||
// {
|
// {
|
||||||
// TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue = PendingSource.PreferredName;
|
// TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue = PendingSource.PreferredName;
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace PepperDash.Essentials
|
|||||||
CaretInterlock = new JoinedSigInterlock(TriList);
|
CaretInterlock = new JoinedSigInterlock(TriList);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetUpGear(IAVDriver avDriver, EssentialsRoomBase currentRoom)
|
void SetUpGear(IAVDriver avDriver, IEssentialsRoom currentRoom)
|
||||||
{
|
{
|
||||||
// Gear
|
// Gear
|
||||||
TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear");
|
TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear");
|
||||||
@@ -105,7 +105,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
string message = null;
|
string message = null;
|
||||||
var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
|
var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
|
||||||
as EssentialsHuddleSpaceRoom;
|
as IEssentialsHuddleSpaceRoom;
|
||||||
if (room != null)
|
if (room != null)
|
||||||
message = room.PropertiesConfig.HelpMessage;
|
message = room.PropertiesConfig.HelpMessage;
|
||||||
else
|
else
|
||||||
@@ -283,7 +283,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets up Header Buttons for the EssentialsHuddleSpaceRoom type
|
/// Sets up Header Buttons for the EssentialsHuddleSpaceRoom type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetupHeaderButtons(EssentialsHuddlePanelAvFunctionsDriver avDriver, EssentialsHuddleSpaceRoom currentRoom)
|
public void SetupHeaderButtons(EssentialsHuddlePanelAvFunctionsDriver avDriver, IEssentialsHuddleSpaceRoom currentRoom)
|
||||||
{
|
{
|
||||||
HeaderButtonsAreSetUp = false;
|
HeaderButtonsAreSetUp = false;
|
||||||
|
|
||||||
|
|||||||
@@ -983,7 +983,7 @@
|
|||||||
// /// <summary>
|
// /// <summary>
|
||||||
// /// Handles source change
|
// /// Handles source change
|
||||||
// /// </summary>
|
// /// </summary>
|
||||||
// void _CurrentRoom_SourceInfoChange(EssentialsRoomBase room,
|
// void _CurrentRoom_SourceInfoChange(IEssentialsRoom room,
|
||||||
// SourceListItem info, ChangeType change)
|
// SourceListItem info, ChangeType change)
|
||||||
// {
|
// {
|
||||||
// if (change == ChangeType.WillChange)
|
// if (change == ChangeType.WillChange)
|
||||||
@@ -995,7 +995,7 @@
|
|||||||
// /// <summary>
|
// /// <summary>
|
||||||
// ///
|
// ///
|
||||||
// /// </summary>
|
// /// </summary>
|
||||||
// void _CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
// void _CurrentRoom_CurrentDisplay1SourceChange(IEssentialsRoom room, SourceListItem info, ChangeType type)
|
||||||
// {
|
// {
|
||||||
// if (type == ChangeType.DidChange)
|
// if (type == ChangeType.DidChange)
|
||||||
// {
|
// {
|
||||||
@@ -1021,7 +1021,7 @@
|
|||||||
// /// <summary>
|
// /// <summary>
|
||||||
// ///
|
// ///
|
||||||
// /// </summary>
|
// /// </summary>
|
||||||
// void _CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
// void _CurrentRoom_CurrentDisplay2SourceChange(IEssentialsRoom room, SourceListItem info, ChangeType type)
|
||||||
// {
|
// {
|
||||||
// if (type == ChangeType.DidChange)
|
// if (type == ChangeType.DidChange)
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EssentialsHuddleSpaceRoom CurrentRoom
|
public IEssentialsHuddleSpaceRoom CurrentRoom
|
||||||
{
|
{
|
||||||
get { return _CurrentRoom; }
|
get { return _CurrentRoom; }
|
||||||
set
|
set
|
||||||
@@ -86,7 +86,7 @@ namespace PepperDash.Essentials
|
|||||||
SetCurrentRoom(value);
|
SetCurrentRoom(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EssentialsHuddleSpaceRoom _CurrentRoom;
|
IEssentialsHuddleSpaceRoom _CurrentRoom;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
@@ -498,7 +498,7 @@ namespace PepperDash.Essentials
|
|||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true;
|
||||||
// Run default source when room is off and share is pressed
|
// Run default source when room is off and share is pressed
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
CurrentRoom.RunDefaultPresentRoute();
|
(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -583,7 +583,7 @@ namespace PepperDash.Essentials
|
|||||||
void UiSelectSource(string key)
|
void UiSelectSource(string key)
|
||||||
{
|
{
|
||||||
// Run the route and when it calls back, show the source
|
// Run the route and when it calls back, show the source
|
||||||
CurrentRoom.RunRouteAction(key, new Action(() => { }));
|
CurrentRoom.RunRouteAction(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -745,7 +745,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void RefreshCurrentRoom(EssentialsHuddleSpaceRoom room)
|
public void RefreshCurrentRoom(IEssentialsHuddleSpaceRoom room)
|
||||||
{
|
{
|
||||||
if (_CurrentRoom != null)
|
if (_CurrentRoom != null)
|
||||||
{
|
{
|
||||||
@@ -836,7 +836,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentRoom(EssentialsHuddleSpaceRoom room)
|
void SetCurrentRoom(IEssentialsHuddleSpaceRoom room)
|
||||||
{
|
{
|
||||||
if (_CurrentRoom == room) return;
|
if (_CurrentRoom == room) return;
|
||||||
// Disconnect current (probably never called)
|
// Disconnect current (probably never called)
|
||||||
@@ -871,7 +871,7 @@ namespace PepperDash.Essentials
|
|||||||
UpdateMCJoins(_CurrentRoom);
|
UpdateMCJoins(_CurrentRoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateMCJoins(EssentialsHuddleSpaceRoom room)
|
void UpdateMCJoins(IEssentialsHuddleSpaceRoom room)
|
||||||
{
|
{
|
||||||
TriList.SetString(UIStringJoin.RoomMcUrl, room.MobileControlRoomBridge.McServerUrl);
|
TriList.SetString(UIStringJoin.RoomMcUrl, room.MobileControlRoomBridge.McServerUrl);
|
||||||
TriList.SetString(UIStringJoin.RoomMcQrCodeUrl, room.MobileControlRoomBridge.QrCodeUrl);
|
TriList.SetString(UIStringJoin.RoomMcQrCodeUrl, room.MobileControlRoomBridge.QrCodeUrl);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets feedback for the given room
|
/// Sets feedback for the given room
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetFeedbackForRoom(EssentialsHuddleSpaceRoom room)
|
public void SetFeedbackForRoom(IEssentialsHuddleSpaceRoom room)
|
||||||
{
|
{
|
||||||
var itemToSet = Items.FirstOrDefault(i => i.Room == room);
|
var itemToSet = Items.FirstOrDefault(i => i.Room == room);
|
||||||
if (itemToSet != null)
|
if (itemToSet != null)
|
||||||
@@ -48,11 +48,11 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
public class SmartObjectRoomsListItem
|
public class SmartObjectRoomsListItem
|
||||||
{
|
{
|
||||||
public EssentialsHuddleSpaceRoom Room { get; private set; }
|
public IEssentialsHuddleSpaceRoom Room { get; private set; }
|
||||||
SmartObjectRoomsList Parent;
|
SmartObjectRoomsList Parent;
|
||||||
public uint Index { get; private set; }
|
public uint Index { get; private set; }
|
||||||
|
|
||||||
public SmartObjectRoomsListItem(EssentialsHuddleSpaceRoom room, uint index, SmartObjectRoomsList parent,
|
public SmartObjectRoomsListItem(IEssentialsHuddleSpaceRoom room, uint index, SmartObjectRoomsList parent,
|
||||||
Action<bool> buttonAction)
|
Action<bool> buttonAction)
|
||||||
{
|
{
|
||||||
Room = room;
|
Room = room;
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ namespace PepperDash.Essentials
|
|||||||
///// <summary>
|
///// <summary>
|
||||||
///// The handler type for a Room's SourceInfoChange
|
///// The handler type for a Room's SourceInfoChange
|
||||||
///// </summary>
|
///// </summary>
|
||||||
//public delegate void SourceInfoChangeHandler(EssentialsRoomBase room, SourceListItem info, ChangeType type);
|
//public delegate void SourceInfoChangeHandler(IEssentialsRoom room, SourceListItem info, ChangeType type);
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMobileControl : IKeyed
|
public interface IMobileControl : IKeyed
|
||||||
{
|
{
|
||||||
void CreateMobileControlRoomBridge(EssentialsRoomBase room, IMobileControl parent);
|
void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
|
||||||
|
|
||||||
void LinkSystemMonitorToAppServer();
|
void LinkSystemMonitorToAppServer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core.Devices
|
||||||
|
{
|
||||||
|
public interface IReconfigurableDevice
|
||||||
|
{
|
||||||
|
event EventHandler<EventArgs> ConfigChanged;
|
||||||
|
|
||||||
|
DeviceConfig Config { get; }
|
||||||
|
|
||||||
|
void SetConfig(DeviceConfig config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class ReconfigurableDevice : EssentialsDevice
|
public abstract class ReconfigurableDevice : EssentialsDevice, IReconfigurableDevice
|
||||||
{
|
{
|
||||||
public event EventHandler<EventArgs> ConfigChanged;
|
public event EventHandler<EventArgs> ConfigChanged;
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
protected FusionRoom FusionRoom;
|
protected FusionRoom FusionRoom;
|
||||||
protected Dictionary<int, FusionAsset> FusionStaticAssets;
|
protected Dictionary<int, FusionAsset> FusionStaticAssets;
|
||||||
public long PushNotificationTimeout = 5000;
|
public long PushNotificationTimeout = 5000;
|
||||||
protected EssentialsRoomBase Room;
|
protected IEssentialsRoom Room;
|
||||||
public long SchedulePollInterval = 300000;
|
public long SchedulePollInterval = 300000;
|
||||||
|
|
||||||
private Event _currentMeeting;
|
private Event _currentMeeting;
|
||||||
@@ -86,7 +86,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public EssentialsHuddleSpaceFusionSystemControllerBase(EssentialsRoomBase room, uint ipId, string joinMapKey)
|
public EssentialsHuddleSpaceFusionSystemControllerBase(IEssentialsRoom room, uint ipId, string joinMapKey)
|
||||||
: base(room.Key + "-fusion")
|
: base(room.Key + "-fusion")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
deviceConfig.Properties = JToken.FromObject(devProps);
|
deviceConfig.Properties = JToken.FromObject(devProps);
|
||||||
}
|
}
|
||||||
else if (device is EssentialsRoomBase)
|
else if (device is IEssentialsRoom)
|
||||||
{
|
{
|
||||||
// Set the room name
|
// Set the room name
|
||||||
if (!string.IsNullOrEmpty(roomInfo.Name))
|
if (!string.IsNullOrEmpty(roomInfo.Name))
|
||||||
|
|||||||
@@ -197,6 +197,7 @@
|
|||||||
<Compile Include="Devices\GenericIRController.cs" />
|
<Compile Include="Devices\GenericIRController.cs" />
|
||||||
<Compile Include="Devices\IDspPreset.cs" />
|
<Compile Include="Devices\IDspPreset.cs" />
|
||||||
<Compile Include="Devices\IProjectorInterfaces.cs" />
|
<Compile Include="Devices\IProjectorInterfaces.cs" />
|
||||||
|
<Compile Include="Devices\IReconfigurableDevice.cs" />
|
||||||
<Compile Include="Devices\PC\InRoomPc.cs" />
|
<Compile Include="Devices\PC\InRoomPc.cs" />
|
||||||
<Compile Include="Devices\PC\Laptop.cs" />
|
<Compile Include="Devices\PC\Laptop.cs" />
|
||||||
<Compile Include="Devices\ReconfigurableDevice.cs" />
|
<Compile Include="Devices\ReconfigurableDevice.cs" />
|
||||||
@@ -288,6 +289,7 @@
|
|||||||
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.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\Interfaces.cs" />
|
<Compile Include="Room\Interfaces.cs" />
|
||||||
<Compile Include="Room\iOccupancyStatusProvider.cs" />
|
<Compile Include="Room\iOccupancyStatusProvider.cs" />
|
||||||
<Compile Include="Routing\DummyRoutingInputsDevice.cs" />
|
<Compile Include="Routing\DummyRoutingInputsDevice.cs" />
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
ScheduledEventGroup FeatureEventGroup;
|
ScheduledEventGroup FeatureEventGroup;
|
||||||
|
|
||||||
public EssentialsRoomBase Room { get; private set; }
|
public IEssentialsRoom Room { get; private set; }
|
||||||
|
|
||||||
private Fusion.EssentialsHuddleSpaceFusionSystemControllerBase FusionRoom;
|
private Fusion.EssentialsHuddleSpaceFusionSystemControllerBase FusionRoom;
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetUpDevice()
|
void SetUpDevice()
|
||||||
{
|
{
|
||||||
Room = DeviceManager.GetDeviceForKey(PropertiesConfig.RoomKey) as EssentialsRoomBase;
|
Room = DeviceManager.GetDeviceForKey(PropertiesConfig.RoomKey) as IEssentialsRoom;
|
||||||
|
|
||||||
if (Room != null)
|
if (Room != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class EssentialsRoomBase : ReconfigurableDevice
|
public abstract class EssentialsRoomBase : ReconfigurableDevice, IEssentialsRoom
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||||
|
using PepperDash.Essentials.Room.Config;
|
||||||
|
using PepperDash.Essentials.Core.Devices;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes the basic functionality of an EssentialsRoom
|
||||||
|
/// </summary>
|
||||||
|
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice
|
||||||
|
{
|
||||||
|
BoolFeedback OnFeedback { get; }
|
||||||
|
|
||||||
|
event EventHandler<EventArgs> RoomOccupancyIsSet;
|
||||||
|
|
||||||
|
BoolFeedback IsWarmingUpFeedback { get; }
|
||||||
|
BoolFeedback IsCoolingDownFeedback { get; }
|
||||||
|
|
||||||
|
IOccupancyStatusProvider RoomOccupancy { get; }
|
||||||
|
bool OccupancyStatusProviderIsRemote { get; }
|
||||||
|
|
||||||
|
bool IsMobileControlEnabled { get; }
|
||||||
|
IMobileControlRoomBridge MobileControlRoomBridge { get; }
|
||||||
|
|
||||||
|
string SourceListKey { get; }
|
||||||
|
|
||||||
|
SecondsCountdownTimer ShutdownPromptTimer { get; }
|
||||||
|
int ShutdownPromptSeconds { get; }
|
||||||
|
int ShutdownVacancySeconds { get; }
|
||||||
|
eShutdownType ShutdownType { get; }
|
||||||
|
|
||||||
|
EssentialsRoomEmergencyBase Emergency { get; }
|
||||||
|
|
||||||
|
Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; }
|
||||||
|
|
||||||
|
string LogoUrlLightBkgnd { get; }
|
||||||
|
string LogoUrlDarkBkgnd { get; }
|
||||||
|
|
||||||
|
eVacancyMode VacancyMode { get; }
|
||||||
|
|
||||||
|
bool ZeroVolumeWhenSwtichingVolumeDevices { get; }
|
||||||
|
|
||||||
|
void StartShutdown(eShutdownType type);
|
||||||
|
void StartRoomVacancyTimer(eVacancyMode mode);
|
||||||
|
|
||||||
|
void Shutdown();
|
||||||
|
|
||||||
|
void SetRoomOccupancy(IOccupancyStatusProvider statusProvider, int timeoutMinutes);
|
||||||
|
|
||||||
|
void PowerOnToDefaultOrLastSource();
|
||||||
|
bool RunDefaultPresentRoute();
|
||||||
|
|
||||||
|
void SetDefaultLevels();
|
||||||
|
|
||||||
|
void RoomVacatedForTimeoutPeriod(object o);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -65,4 +66,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
bool RunDefaultCallRoute();
|
bool RunDefaultCallRoute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user