From 9d7f5af26e90361556416dd1c61e1a7b5fa99e9f Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Fri, 3 Apr 2020 18:21:17 -0600 Subject: [PATCH] Adds IBridgeAdvanced and updates to 1.0.35 of PepperDash.Core --- PepperDashEssentials/Bridges/BridgeBase.cs | 20 ++++++++++++------- PepperDashEssentials/Bridges/IBridge.cs | 10 ++++++++++ PepperDashEssentials/ControlSystem.cs | 2 +- .../Plugins/PluginLoader.cs | 1 - essentials-framework/pepperdashcore-builds | 2 +- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/PepperDashEssentials/Bridges/BridgeBase.cs b/PepperDashEssentials/Bridges/BridgeBase.cs index de283e4e..c6b1e17a 100644 --- a/PepperDashEssentials/Bridges/BridgeBase.cs +++ b/PepperDashEssentials/Bridges/BridgeBase.cs @@ -124,6 +124,10 @@ namespace PepperDash.Essentials.Bridges (device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; } + else if (device is IBridgeAdvanced) + { + (device as IBridgeAdvanced).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this); + } else if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController) { (device as PepperDash.Essentials.Core.Monitoring.SystemMonitorController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); @@ -139,16 +143,18 @@ namespace PepperDash.Essentials.Bridges (device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this); continue; } - else if (device is PepperDash.Essentials.Core.DisplayBase) - { - (device as DisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); - continue; - } - else if (device is DmChassisController) { + else if (device is PepperDash.Essentials.Core.DisplayBase) + { + (device as DisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; + } + else if (device is DmChassisController) + { (device as DmChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; } - else if (device is DmBladeChassisController) { + else if (device is DmBladeChassisController) + { (device as DmBladeChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; } diff --git a/PepperDashEssentials/Bridges/IBridge.cs b/PepperDashEssentials/Bridges/IBridge.cs index f95189a0..f2b959ed 100644 --- a/PepperDashEssentials/Bridges/IBridge.cs +++ b/PepperDashEssentials/Bridges/IBridge.cs @@ -7,10 +7,20 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Bridges { + /// + /// Defines a device that uses the legacy JoinMapBase for its join map + /// + [Obsolete("IBridgeAdvanced should be used going forward with JoinMapBaseAdvanced")] public interface IBridge { void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey); + } + /// + /// Defines a device that uses JoinMapBaseAdvanced for its join map + /// + public interface IBridgeAdvanced + { void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge); } } \ No newline at end of file diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index d1ca9b0d..ac33c7e7 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -51,7 +51,7 @@ namespace PepperDash.Essentials CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Bridges.BridgeHelper.PrintJoinMap, "getjoinmap", "gets map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Bridges.BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(s => { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs index ca9c7b2f..c0d84714 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs @@ -8,7 +8,6 @@ using Crestron.SimplSharp.Reflection; using PepperDash.Core; using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Plugins; namespace PepperDash.Essentials { diff --git a/essentials-framework/pepperdashcore-builds b/essentials-framework/pepperdashcore-builds index acebe6b4..15206840 160000 --- a/essentials-framework/pepperdashcore-builds +++ b/essentials-framework/pepperdashcore-builds @@ -1 +1 @@ -Subproject commit acebe6b43b28cc3a93f899e9714292a0cc1ab2cc +Subproject commit 15206840b3e6338f695e4ffba634a72e51ea1be5