diff --git a/PepperDashEssentials/Bridges/BridgeBase.cs b/PepperDashEssentials/Bridges/BridgeBase.cs index a57353d7..1131c1b0 100644 --- a/PepperDashEssentials/Bridges/BridgeBase.cs +++ b/PepperDashEssentials/Bridges/BridgeBase.cs @@ -77,14 +77,22 @@ namespace PepperDash.Essentials.Bridges if (device is GenericComm) { (device as GenericComm).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; } - if (device is DmChassisController) + else if (device is DmChassisController) { (device as DmChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; } - if (device is DmTxControllerBase) + else if (device is DmTxControllerBase) { (device as DmTxControllerBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; + } + else if (device is DmRmcControllerBase) + { + (device as DmRmcControllerBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; } } } diff --git a/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs b/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs new file mode 100644 index 00000000..318a3d0b --- /dev/null +++ b/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.DM; + +namespace PepperDash.Essentials.Bridges +{ + public static class DmRmcControllerApiExtensions + { + public static void LinkToApi(this DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey) + { + var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmRmcControllerJoinMap; + + if (joinMap == null) + joinMap = new DmRmcControllerJoinMap(); + + joinMap.OffsetJoinNumbers(joinStart); + + Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); + if(rmc.VideoOutputResolutionFeedback != null) + rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution]); + if(rmc.EdidManufacturerFeedback != null) + rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer]); + if(rmc.EdidNameFeedback != null) + rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName]); + if(rmc.EdidPreferredTimingFeedback != null) + rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming]); + if(rmc.EdidSerialNumberFeedback != null) + rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]); + } + + public class DmRmcControllerJoinMap : JoinMapBase + { + public uint IsOnline { get; set; } + public uint CurrentOutputResolution { get; set; } + public uint EdidManufacturer { get; set; } + public uint EdidName { get; set; } + public uint EdidPrefferedTiming { get; set; } + public uint EdidSerialNumber { get; set; } + + public DmRmcControllerJoinMap() + { + // Digital + IsOnline = 1; + + // Serial + CurrentOutputResolution = 1; + EdidManufacturer = 2; + EdidName = 3; + EdidPrefferedTiming = 4; + EdidSerialNumber = 5; + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + IsOnline = IsOnline + joinOffset; + CurrentOutputResolution = CurrentOutputResolution + joinOffset; + EdidManufacturer = EdidManufacturer + joinOffset; + EdidName = EdidName + joinOffset; + EdidPrefferedTiming = EdidPrefferedTiming + joinOffset; + EdidSerialNumber = EdidSerialNumber + joinOffset; + } + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs b/PepperDashEssentials/Bridges/DmTxControllerBridge.cs index 3fef1404..6dc08114 100644 --- a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmTxControllerBridge.cs @@ -27,12 +27,12 @@ namespace PepperDash.Essentials.Bridges tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus]); tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution]); - tx.HdcpSupportAllFeedback.LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState]); - trilist.SetBoolSigAction(joinMap.HdcpSupportOn, - new Action(b => tx.SetHdcpSupportAll(ePdtHdcpSupport.Auto))); - tx.HdcpSupportAllFeedback.LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportOn]); - trilist.SetBoolSigAction(joinMap.HdcpSupportOff, - new Action(b => tx.SetHdcpSupportAll(ePdtHdcpSupport.HdcpOff))); + tx.HdcpSupportAllFeedback.LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportCapability]); + //trilist.SetUShortSigAction(joinMap.Port1HdcpState, + // new Action(u => tx.SetPortHdcpSupport((ePdtHdcpSupport)u))); + + //trilist.SetUShortSigAction(joinMap.Port2HdcpState, + // new Action(u => tx.SetHdcpSupportAll((ePdtHdcpSupport)u))); if (tx is ITxRouting) { trilist.SetUShortSigAction(joinMap.VideoInput, @@ -41,7 +41,7 @@ namespace PepperDash.Essentials.Bridges new Action(i => (tx as ITxRouting).ExecuteNumericSwitch(i, 0, eRoutingSignalType.Audio))); (tx as ITxRouting).VideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoInput]); - (tx as ITxRouting).AudioSourceNumericFeedabck.LinkInputSig(trilist.UShortInput[joinMap.AudioInput]); + (tx as ITxRouting).AudioSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioInput]); } } @@ -50,25 +50,27 @@ namespace PepperDash.Essentials.Bridges public uint IsOnline { get; set; } public uint VideoSyncStatus { get; set; } public uint CurrentInputResolution { get; set; } - public uint HdcpSupportOn { get; set; } - public uint HdcpSupportOff { get; set; } - public uint HdcpSupportState { get; set; } + public uint HdcpSupportCapability { get; set; } public uint VideoInput { get; set; } public uint AudioInput { get; set; } + public uint Port1HdcpState { get; set; } + public uint Port2HdcpState { get; set; } + public DmTxControllerJoinMap() { // Digital IsOnline = 1; VideoSyncStatus = 2; - HdcpSupportOn = 3; - HdcpSupportOff = 4; // Serial CurrentInputResolution = 1; // Analog VideoInput = 1; AudioInput = 2; - HdcpSupportState = 3; + HdcpSupportCapability = 3; + Port1HdcpState = 4; + Port2HdcpState = 5; + } public override void OffsetJoinNumbers(uint joinStart) @@ -77,12 +79,12 @@ namespace PepperDash.Essentials.Bridges IsOnline = IsOnline + joinOffset; VideoSyncStatus = VideoSyncStatus + joinOffset; - HdcpSupportOn = HdcpSupportOn + joinOffset; - HdcpSupportOff = HdcpSupportOff + joinOffset; CurrentInputResolution = CurrentInputResolution + joinOffset; VideoInput = VideoInput + joinOffset; AudioInput = AudioInput + joinOffset; - HdcpSupportState = HdcpSupportState + joinOffset; + HdcpSupportCapability = HdcpSupportCapability + joinOffset; + Port1HdcpState = Port1HdcpState + joinOffset; + Port2HdcpState = Port2HdcpState + joinOffset; } } } diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj index d2b5ce32..b4932ded 100644 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ b/PepperDashEssentials/PepperDashEssentials.csproj @@ -115,6 +115,7 @@ + diff --git a/PepperDashEssentials/Properties/AssemblyInfo.cs b/PepperDashEssentials/Properties/AssemblyInfo.cs index 12d80072..1f037bfb 100644 --- a/PepperDashEssentials/Properties/AssemblyInfo.cs +++ b/PepperDashEssentials/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ [assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")] -[assembly: AssemblyVersion("1.3.0.*")] +[assembly: AssemblyVersion("1.3.1.*")] diff --git a/essentials-framework b/essentials-framework index 624eea7c..cd56bd5e 160000 --- a/essentials-framework +++ b/essentials-framework @@ -1 +1 @@ -Subproject commit 624eea7c6c41d115058abd80692bfca366958449 +Subproject commit cd56bd5e6e067d19876426ab9065c63204a51233