Compare commits

...

3 Commits

Author SHA1 Message Date
Andrew Welker
d370564900 makes IDpad explicitly inherit from IKeyed 2020-04-08 11:35:09 -06:00
Andrew Welker
23b3ed2416 adds LinkSystemMonitorToAppServer method...
...to IMobileControl
2020-04-08 11:29:42 -06:00
Andrew Welker
47d1eb9105 Adds IMobileControl interface
adds CreateMobileControlRoomBridge Method
2020-04-08 11:25:17 -06:00
4 changed files with 37 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ using PepperDash.Essentials.Room.Config;
//using PepperDash.Essentials.Room.MobileControl;
using Newtonsoft.Json;
using PepperDash_Essentials_Core.DeviceTypeInterfaces;
namespace PepperDash.Essentials
{
@@ -263,8 +264,13 @@ namespace PepperDash.Essentials
DeviceManager.ActivateAll();
//LinkSystemMonitorToAppServer();
}
var mobileControl = DeviceManager.GetDeviceForKey("appServer") as IMobileControl;
if (mobileControl == null) return;
mobileControl.LinkSystemMonitorToAppServer();
//LinkSystemMonitorToAppServer();
}
//void LinkSystemMonitorToAppServer()
//{
@@ -455,7 +461,7 @@ namespace PepperDash.Essentials
//AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
//DeviceManager.AddDevice(bridge);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
CreateMobileControlBridge(room);
}
else if (room is EssentialsHuddleVtc1Room)
{
@@ -469,6 +475,8 @@ namespace PepperDash.Essentials
//var bridge = new MobileConrolEssentialsHuddleSpaceRoomBridge(room);
//AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
//DeviceManager.AddDevice(bridge);
CreateMobileControlBridge(room);
}
else
{
@@ -485,6 +493,17 @@ namespace PepperDash.Essentials
}
private static void CreateMobileControlBridge(EssentialsRoomBase room)
{
var mobileControl = DeviceManager.GetDeviceForKey("appServer") as IMobileControl;
if (mobileControl == null) return;
mobileControl.CreateMobileControlRoomBridge(room);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
}
/// <summary>
/// Helps add the post activation steps that link bridges to main controller
/// </summary>

View File

@@ -1,6 +1,6 @@
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.SmartObjects;
@@ -9,7 +9,7 @@ namespace PepperDash.Essentials.Core
/// <summary>
///
/// </summary>
public interface IDPad
public interface IDPad : IKeyed
{
void Up(bool pressRelease);
void Down(bool pressRelease);

View File

@@ -0,0 +1,12 @@
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
{
public interface IMobileControl:IKeyed
{
void CreateMobileControlRoomBridge(EssentialsRoomBase room);
void LinkSystemMonitorToAppServer();
}
}

View File

@@ -137,6 +137,7 @@
<Compile Include="Devices\PC\Laptop.cs" />
<Compile Include="Devices\ReconfigurableDevice.cs" />
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
<Compile Include="DeviceTypeInterfaces\IMobileControl.cs" />
<Compile Include="Factory\DeviceFactory.cs" />
<Compile Include="Factory\IDeviceFactory.cs" />
<Compile Include="Feedbacks\BoolFeedback.cs" />