diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs index ec6c2ebe..9631ead5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/BridgeBase.cs @@ -96,40 +96,48 @@ namespace PepperDash.Essentials.Core.Bridges Eisc.SigChange += Eisc_SigChange; - AddPostActivationAction( () => + AddPostActivationAction(LinkDevices); + } + + private void LinkDevices() + { + Debug.Console(1, this, "Linking Devices..."); + + foreach (var d in PropertiesConfig.Devices) { - Debug.Console(1, this, "Linking Devices..."); + var device = DeviceManager.GetDeviceForKey(d.DeviceKey); - foreach (var d in PropertiesConfig.Devices) + if (device == null) { - var device = DeviceManager.GetDeviceForKey(d.DeviceKey); - - if (device == null) continue; - - Debug.Console(1, this, "Linking Device: '{0}'", device.Key); - - if (!typeof (IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType())) - { - Debug.Console(0, this, Debug.ErrorLogLevel.Notice, - "{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.", - device.Key); - continue; - } - - var bridge = device as IBridgeAdvanced; - if (bridge != null) bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this); + continue; } - var registerResult = Eisc.Register(); + Debug.Console(1, this, "Linking Device: '{0}'", device.Key); - if (registerResult != eDeviceRegistrationUnRegistrationResponse.Success) + if (!typeof (IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType())) { - Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Registration result: {0}", registerResult); - return; + Debug.Console(0, this, Debug.ErrorLogLevel.Notice, + "{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.", + device.Key); + continue; } - Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "EISC registration successful"); - }); + var bridge = device as IBridgeAdvanced; + if (bridge != null) + { + bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this); + } + } + + var registerResult = Eisc.Register(); + + if (registerResult != eDeviceRegistrationUnRegistrationResponse.Success) + { + Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Registration result: {0}", registerResult); + return; + } + + Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "EISC registration successful"); } /// diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/VirtualControlEiscApiAdvanced.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/VirtualControlEiscApiAdvanced.cs new file mode 100644 index 00000000..35de694d --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/VirtualControlEiscApiAdvanced.cs @@ -0,0 +1,7 @@ +namespace PepperDash.Essentials.Core.Bridges +{ + public class VirtualControlEiscApiAdvanced + { + + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs index b540b3d6..437c3bbb 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Global/Global.cs @@ -19,6 +19,8 @@ namespace PepperDash.Essentials.Core { public static CrestronControlSystem ControlSystem { get; set; } + public static eDevicePlatform Platform { get { return CrestronEnvironment.DevicePlatform; } } + public static LicenseManager LicenseManager { get; set; } /// diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index ae420105..ed70ab1d 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -98,12 +98,12 @@ False - ..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll + ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll False False - ..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll + ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll False @@ -113,7 +113,7 @@ False - ..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe + ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe False @@ -158,6 +158,7 @@ + diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index 9759cfdd..b2591475 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -2006,6 +2006,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.Console(1, "Factory Attempting to create new Cisco Codec Device"); + var comm = CommFactory.CreateCommForDevice(dc); return new VideoCodec.Cisco.CiscoSparkCodec(dc, comm); }