Added TxAdvancedIsPresent to OffsetJoinNumbers and implemented OutputDisabledByHdcp feedback

This commit is contained in:
bitm0de
2020-02-16 14:21:19 -07:00
parent f33f42a40e
commit 8ecf7ff0db
3 changed files with 1304 additions and 1251 deletions

View File

@@ -167,6 +167,7 @@ namespace PepperDash.Essentials.Bridges
} }
} }
} }
if (dmChassis.RxDictionary.ContainsKey(ioSlot)) if (dmChassis.RxDictionary.ContainsKey(ioSlot))
{ {
Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot); Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
@@ -191,11 +192,12 @@ namespace PepperDash.Essentials.Bridges
dmChassis.UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb + ioSlot]); dmChassis.UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb + ioSlot]);
dmChassis.UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb + ioSlot]); dmChassis.UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb + ioSlot]);
dmChassis.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]); dmChassis.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
dmChassis.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]); dmChassis.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
dmChassis.OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]); dmChassis.OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
dmChassis.OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]); dmChassis.OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]);
dmChassis.OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputDisabledByHdcp + ioSlot]);
} }
} }

View File

@@ -38,6 +38,10 @@ namespace PepperDash.Essentials.Bridges
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc. /// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
/// </summary> /// </summary>
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
/// <summary>
/// Range reports high if corresponding output is disabled by HDCP.
/// </summary>
public uint OutputDisabledByHdcp { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
#endregion #endregion
#region Analogs #region Analogs
@@ -101,6 +105,7 @@ namespace PepperDash.Essentials.Bridges
InputEndpointOnline = 500; //501-699 InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899 OutputEndpointOnline = 700; //701-899
TxAdvancedIsPresent = 1000; //1001-1199 TxAdvancedIsPresent = 1000; //1001-1199
OutputDisabledByHdcp = 1200; //1201-1399
//Analog //Analog
OutputVideo = 100; //101-299 OutputVideo = 100; //101-299
@@ -139,6 +144,8 @@ namespace PepperDash.Essentials.Bridges
OutputEndpointOnline = OutputEndpointOnline + joinOffset; OutputEndpointOnline = OutputEndpointOnline + joinOffset;
HdcpSupportState = HdcpSupportState + joinOffset; HdcpSupportState = HdcpSupportState + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset; HdcpSupportCapability = HdcpSupportCapability + joinOffset;
OutputDisabledByHdcp = OutputDisabledByHdcp + joinOffset;
TxAdvancedIsPresent = TxAdvancedIsPresent + joinOffset;
} }
} }
} }

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using Crestron.SimplSharpPro; using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM; using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Cards; using Crestron.SimplSharpPro.DM.Cards;
using Crestron.SimplSharpPro.DM.Endpoints; using Crestron.SimplSharpPro.DM.Endpoints;
@@ -39,6 +40,7 @@ namespace PepperDash.Essentials.DM
public Dictionary<uint, StringFeedback> OutputAudioRouteNameFeedbacks { get; private set; } public Dictionary<uint, StringFeedback> OutputAudioRouteNameFeedbacks { get; private set; }
public Dictionary<uint, IntFeedback> UsbOutputRoutedToFeebacks { get; private set; } public Dictionary<uint, IntFeedback> UsbOutputRoutedToFeebacks { get; private set; }
public Dictionary<uint, IntFeedback> UsbInputRoutedToFeebacks { get; private set; } public Dictionary<uint, IntFeedback> UsbInputRoutedToFeebacks { get; private set; }
public Dictionary<uint, BoolFeedback> OutputDisabledByHdcpFeedbacks { get; private set; }
public IntFeedback SystemIdFeebdack { get; private set; } public IntFeedback SystemIdFeebdack { get; private set; }
public BoolFeedback SystemIdBusyFeedback { get; private set; } public BoolFeedback SystemIdBusyFeedback { get; private set; }
@@ -176,6 +178,7 @@ namespace PepperDash.Essentials.DM
AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>(); AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>();
UsbOutputRoutedToFeebacks = new Dictionary<uint, IntFeedback>(); UsbOutputRoutedToFeebacks = new Dictionary<uint, IntFeedback>();
UsbInputRoutedToFeebacks = new Dictionary<uint, IntFeedback>(); UsbInputRoutedToFeebacks = new Dictionary<uint, IntFeedback>();
OutputDisabledByHdcpFeedbacks = new Dictionary<uint, BoolFeedback>();
VideoInputSyncFeedbacks = new Dictionary<uint, BoolFeedback>(); VideoInputSyncFeedbacks = new Dictionary<uint, BoolFeedback>();
InputNameFeedbacks = new Dictionary<uint, StringFeedback>(); InputNameFeedbacks = new Dictionary<uint, StringFeedback>();
OutputNameFeedbacks = new Dictionary<uint, StringFeedback>(); OutputNameFeedbacks = new Dictionary<uint, StringFeedback>();
@@ -235,22 +238,58 @@ namespace PepperDash.Essentials.DM
} }
}); });
OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null)
{ {
if (Chassis.Outputs[tempX].AudioOutFeedback != null) return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
{ }
return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue; else
} {
else return NoRouteText;
{
return NoRouteText;
}
});
}
});
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{ {
return Chassis.Outputs[tempX].EndpointOnlineFeedback; return Chassis.Outputs[tempX].EndpointOnlineFeedback;
}); });
OutputDisabledByHdcpFeedbacks[tempX] = new BoolFeedback(() => {
var output = Chassis.Outputs[tempX];
var hdmiTxOutput = output as Card.HdmiTx;
if (hdmiTxOutput != null)
return hdmiTxOutput.HdmiOutput.DisabledByHdcp.BoolValue;
var dmHdmiOutput = output as Card.DmHdmiOutput;
if (dmHdmiOutput != null)
return dmHdmiOutput.DisabledByHdcpFeedback.BoolValue;
var dmsDmOutAdvanced = output as Card.DmsDmOutAdvanced;
if (dmsDmOutAdvanced != null)
return dmsDmOutAdvanced.DisabledByHdcpFeedback.BoolValue;
var dmps3HdmiAudioOutput = output as Card.Dmps3HdmiAudioOutput;
if (dmps3HdmiAudioOutput != null)
return dmps3HdmiAudioOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
var dmps3HdmiOutput = output as Card.Dmps3HdmiOutput;
if (dmps3HdmiOutput != null)
return dmps3HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
var dmps3HdmiOutputBackend = output as Card.Dmps3HdmiOutputBackend;
if (dmps3HdmiOutputBackend != null)
return dmps3HdmiOutputBackend.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
// var hdRx4kX10HdmiOutput = output as HdRx4kX10HdmiOutput;
// if (hdRx4kX10HdmiOutput != null)
// return hdRx4kX10HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
//
// var hdMdNxMHdmiOutput = output as HdMdNxMHdmiOutput;
// if (hdMdNxMHdmiOutput != null)
// return hdMdNxMHdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
return false;
});
} }
if (Chassis.Inputs[tempX] != null) if (Chassis.Inputs[tempX] != null)
@@ -732,7 +771,6 @@ namespace PepperDash.Essentials.DM
void Chassis_DMInputChange(Switch device, DMInputEventArgs args) void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
{ {
switch (args.EventId) { switch (args.EventId) {
case DMInputEventIds.EndpointOnlineEventId: case DMInputEventIds.EndpointOnlineEventId:
{ {
@@ -856,6 +894,12 @@ namespace PepperDash.Essentials.DM
UsbOutputRoutedToFeebacks[args.Number].FireUpdate(); UsbOutputRoutedToFeebacks[args.Number].FireUpdate();
break; break;
} }
case DMOutputEventIds.DisabledByHdcpEventId:
{
Debug.Console(2, this, "DM Output {0} DisabledByHdcpEventId", args.Number);
OutputDisabledByHdcpFeedbacks[args.Number].FireUpdate();
break;
}
default: default:
{ {
Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId); Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId);