From 6c41b8e19de5a4b0a6af374afa6c83598d1dff1e Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Tue, 24 Oct 2023 15:24:44 -0500 Subject: [PATCH 1/2] fix: updates executeSwitch, add helper method 1. Updated executeSwitch object casting to resolve routing issues. 2. Added ListRoutingPorts method. --- .../Chassis/HdPsXxxController.cs | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs index bf9f72cc..216f3d19 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs @@ -208,6 +208,38 @@ namespace PepperDash_Essentials_DM.Chassis } + public void ListRoutingPorts() + { + try + { + foreach (var port in InputPorts) + { + Debug.Console(0, this, @"Input Port Key: {0} +Port: {1} +Type: {2} +ConnectionType: {3} +Selector: {4} +", port.Key, port.Port, port.Type, port.ConnectionType, port.Selector); + } + + foreach (var port in OutputPorts) + { + Debug.Console(0, this, @"Output Port Key: {0} +Port: {1} +Type: {2} +ConnectionType: {3} +Selector: {4} +", port.Key, port.Port, port.Type, port.ConnectionType, port.Selector); + } + } + catch (Exception ex) + { + Debug.Console(0, this, "ListRoutingPorts Exception Message: {0}", ex.Message); + Debug.Console(0, this, "ListRoutingPorts Exception StackTrace: {0}", ex.StackTrace); + if (ex.InnerException != null) Debug.Console(0, this, "ListRoutingPorts InnerException: {0}", ex.InnerException); + } + } + #region BridgeLinking /// @@ -299,9 +331,12 @@ namespace PepperDash_Essentials_DM.Chassis /// public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) { - var input = inputSelector as HdPsXxxHdmiInput; - var output = outputSelector as HdPsXxxHdmiOutput; + //var input = inputSelector as HdPsXxxHdmiInput; + //var output = outputSelector as HdPsXxxHdmiOutput; + var input = inputSelector as HdPsXxxInput; + var output = outputSelector as HdPsXxxOutput; + Debug.Console(2, this, "ExecuteSwitch: input={0}, output={1}", input, output); if (output == null) From 53b96d54e69e2108ac9c8aa67c6f35437a3b514c Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Tue, 24 Oct 2023 15:36:04 -0500 Subject: [PATCH 2/2] fix: removes old selector casting statements --- .../Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs index 216f3d19..36e99bc6 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/HdPsXxxController.cs @@ -331,9 +331,6 @@ Selector: {4} /// public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) { - //var input = inputSelector as HdPsXxxHdmiInput; - //var output = outputSelector as HdPsXxxHdmiOutput; - var input = inputSelector as HdPsXxxInput; var output = outputSelector as HdPsXxxOutput;