Adds USB routing to DmChassisController and DmChassisControllerBridge.

Major update to remove eRoutingSignalType.AudioVideo in favor of bitmasked values and adding UsbOutput and UsbInput types.  Updated all affected routing ports and ExecuteSwitch method calls.
Need to review and test routing to ensure bitwise operators are all correct.
This commit is contained in:
Neil Dorin
2019-08-15 14:07:10 -06:00
parent 47e47ec272
commit 1ae6069ac2
50 changed files with 267 additions and 219 deletions

View File

@@ -60,7 +60,7 @@ namespace PepperDash.Essentials.Core
{
var routeDescr = new RouteDescriptor(source, destination, signalType);
// if it's a single signal type, find the route
if (signalType != eRoutingSignalType.AudioVideo)
if ((signalType & (eRoutingSignalType.Audio & eRoutingSignalType.Video)) == (eRoutingSignalType.Audio & eRoutingSignalType.Video))
{
Debug.Console(1, destination, "Attempting to build source route from {0}", source.Key);
if (!destination.GetRouteToSource(source, null, null, signalType, 0, routeDescr))
@@ -106,7 +106,7 @@ namespace PepperDash.Essentials.Core
RoutingInputPort goodInputPort = null;
var destDevInputTies = TieLineCollection.Default.Where(t =>
t.DestinationPort.ParentDevice == destination && (t.Type == signalType || t.Type == eRoutingSignalType.AudioVideo));
t.DestinationPort.ParentDevice == destination && (t.Type == signalType || (t.Type & (eRoutingSignalType.Audio | eRoutingSignalType.Video)) == (eRoutingSignalType.Audio | eRoutingSignalType.Video)));
// find a direct tie
var directTie = destDevInputTies.FirstOrDefault(