Interfaces added and some base classes built

This commit is contained in:
Neil Dorin
2020-11-27 18:05:14 -07:00
parent de3f2004de
commit cb49b1f8c8
9 changed files with 305 additions and 38 deletions

View File

@@ -16,6 +16,7 @@ using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.DM;
using PepperDash.Essentials.Fusion;
using PepperDash.Essentials.Room.Config;
using PepperDash.Essentials.Core.Room;
using Newtonsoft.Json;
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
@@ -428,8 +429,18 @@ namespace PepperDash.Essentials
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
{
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
if (room != null)
Device room = null;
if (roomConfig.Type != "componentRoom")
{
room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
}
else
{
}
if (room != null && room is EssentialsRoomBase)
{
if (room is EssentialsHuddleSpaceRoom)
{
@@ -441,7 +452,7 @@ namespace PepperDash.Essentials
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
CreateMobileControlBridge(room);
CreateMobileControlBridge(room as EssentialsRoomBase);
}
else if (room is EssentialsHuddleVtc1Room)
{
@@ -452,7 +463,7 @@ namespace PepperDash.Essentials
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
CreateMobileControlBridge(room);
CreateMobileControlBridge(room as EssentialsRoomBase);
}
else
{
@@ -460,6 +471,10 @@ namespace PepperDash.Essentials
DeviceManager.AddDevice(room);
}
}
else if (room is ComponentRoom)
{
}
else
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
@@ -558,7 +573,7 @@ namespace PepperDash.Essentials
}
catch (Exception e)
{
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Unable to find logo information in any room config");
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Unable to find logo information in any room config: {0}", e);
return false;
}
}