Better handling for HdBaseT style TX units on non CPU3 DM Chassis

This commit is contained in:
Neil Dorin
2019-10-09 12:32:58 -06:00
parent ac93081278
commit d21f6798fd
3 changed files with 137 additions and 101 deletions

View File

@@ -57,7 +57,7 @@ namespace PepperDash.Essentials.Bridges
var txKey = dmChassis.TxDictionary[ioSlot]; var txKey = dmChassis.TxDictionary[ioSlot];
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase; var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
var txDevice = basicTxDevice as DmTxControllerBase; var advancedTxDevice = basicTxDevice as DmTxControllerBase;
if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps
|| dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps
@@ -67,24 +67,27 @@ namespace PepperDash.Essentials.Bridges
} }
else else
{ {
if (txDevice != null) if (advancedTxDevice != null)
{ {
if(!(txDevice is BasicDmTxControllerBase)) advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
txDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
else }
else if (dmChassis.InputEndpointOnlineFeedbacks[ioSlot] != null)
{
Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
} }
} }
if (basicTxDevice != null && txDevice == null) if (basicTxDevice != null && advancedTxDevice == null)
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true; trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
if (advancedTxDevice != null)
if (txDevice != null)
{ {
txDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
} }
else else if(advancedTxDevice == null || basicTxDevice != null)
{ {
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
@@ -131,17 +134,18 @@ 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);
var RxKey = dmChassis.RxDictionary[ioSlot]; var rxKey = dmChassis.RxDictionary[ioSlot];
var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase; var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps
|| dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps || dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps
|| dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps) || dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null)
{ {
dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
} }
else if (RxDevice != null) else if (rxDevice != null)
{ {
RxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]); rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
} }
} }

View File

@@ -177,36 +177,26 @@ namespace PepperDash.Essentials.DM
{ {
var tempX = x; var tempX = x;
VideoOutputFeedbacks[tempX] = new IntFeedback(() => { if (Chassis.Outputs[tempX] != null)
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;} {
VideoOutputFeedbacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; }
else { return 0; }; else { return 0; };
}); });
AudioOutputFeedbacks[tempX] = new IntFeedback(() => { AudioOutputFeedbacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; } if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; }
else { return 0; }; else { return 0; };
}); });
UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => { UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() =>
if(Chassis.Outputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; }
else {return 0; };
});
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => {
if(Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
else {return 0; };
});
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
});
InputNameFeedbacks[tempX] = new StringFeedback(() => {
if (Chassis.Inputs[tempX].NameFeedback != null)
{ {
return Chassis.Inputs[tempX].NameFeedback.StringValue; if (Chassis.Outputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; }
} else { return 0; };
else
{
return "";
}
}); });
OutputNameFeedbacks[tempX] = new StringFeedback(() => {
OutputNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].NameFeedback != null) if (Chassis.Outputs[tempX].NameFeedback != null)
{ {
return Chassis.Outputs[tempX].NameFeedback.StringValue; return Chassis.Outputs[tempX].NameFeedback.StringValue;
@@ -240,9 +230,48 @@ namespace PepperDash.Essentials.DM
} }
}); });
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; }); OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
if (Chassis.Outputs[tempX].EndpointOnlineFeedback != null)
return Chassis.Outputs[tempX].EndpointOnlineFeedback;
else
return false;
});
}
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Outputs[tempX].EndpointOnlineFeedback; }); if (Chassis.Inputs[tempX] != null)
{
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
else { return 0; };
});
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() =>
{
if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
else
return false;
});
InputNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Inputs[tempX].NameFeedback != null)
{
return Chassis.Inputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
if (Chassis.Inputs[tempX].EndpointOnlineFeedback != null)
return Chassis.Inputs[tempX].EndpointOnlineFeedback;
else
return false;
});
InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() =>
{ {
@@ -277,6 +306,7 @@ namespace PepperDash.Essentials.DM
}); });
} }
} }
}
/// <summary> /// <summary>
/// ///

View File

@@ -21,6 +21,8 @@ namespace PepperDash.Essentials.DM
{ {
public DmTx401C Tx { get; private set; } public DmTx401C Tx { get; private set; }
public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; } public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; } public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; } public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }