mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Compare commits
4 Commits
feature/Rm
...
1.13.3-hot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2460290dc1 | ||
|
|
0b01661196 | ||
|
|
dfa55ab9f8 | ||
|
|
55ad92e2f6 |
@@ -93,27 +93,28 @@ namespace PepperDash.Essentials
|
|||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
foreach (var tl in TieLineCollection.Default)
|
foreach (var tl in TieLineCollection.Default)
|
||||||
CrestronConsole.ConsoleCommandResponse(" {0}\r\n", tl);
|
CrestronConsole.ConsoleCommandResponse(" {0}{1}", tl, CrestronEnvironment.NewLine);
|
||||||
},
|
},
|
||||||
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse
|
CrestronConsole.ConsoleCommandResponse
|
||||||
("Current running configuration. This is the merged system and template configuration");
|
("Current running configuration. This is the merged system and template configuration" + CrestronEnvironment.NewLine);
|
||||||
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
||||||
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
||||||
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
CrestronConsole.ConsoleCommandResponse(
|
CrestronConsole.ConsoleCommandResponse(
|
||||||
"This system can be found at the following URLs:\r\n" +
|
"This system can be found at the following URLs:{2}" +
|
||||||
"System URL: {0}\r\n" +
|
"System URL: {0}{2}" +
|
||||||
"Template URL: {1}",
|
"Template URL: {1}{2}",
|
||||||
ConfigReader.ConfigObject.SystemUrl,
|
ConfigReader.ConfigObject.SystemUrl,
|
||||||
ConfigReader.ConfigObject.TemplateUrl),
|
ConfigReader.ConfigObject.TemplateUrl,
|
||||||
"portalinfo",
|
CrestronEnvironment.NewLine),
|
||||||
"Shows portal URLS from configuration",
|
"portalinfo",
|
||||||
|
"Shows portal URLS from configuration",
|
||||||
ConsoleAccessLevelEnum.AccessOperator);
|
ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
|
|
||||||
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
|
Debug.Console(1, this, "Linking Device: '{0}'", device.Key);
|
||||||
|
|
||||||
if (!typeof (IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
|
if (!typeof(IBridgeAdvanced).IsAssignableFrom(device.GetType().GetCType()))
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice,
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice,
|
||||||
"{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.",
|
"{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.",
|
||||||
@@ -409,7 +409,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public List<ApiDevicePropertiesConfig> Devices { get; set; }
|
public List<ApiDevicePropertiesConfig> Devices { get; set; }
|
||||||
|
|
||||||
[JsonProperty("rooms")]
|
[JsonProperty("rooms")]
|
||||||
public List<ApiRoomPropertiesConfig> Rooms { get; set; }
|
public List<ApiRoomPropertiesConfig> Rooms { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public class ApiDevicePropertiesConfig
|
public class ApiDevicePropertiesConfig
|
||||||
@@ -442,7 +442,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
{
|
{
|
||||||
public EiscApiAdvancedFactory()
|
public EiscApiAdvancedFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" };
|
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
@@ -457,34 +457,34 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
{
|
{
|
||||||
case "eiscapiadv":
|
case "eiscapiadv":
|
||||||
case "eiscapiadvanced":
|
case "eiscapiadvanced":
|
||||||
{
|
|
||||||
eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt,
|
|
||||||
controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "eiscapiadvancedserver":
|
|
||||||
{
|
|
||||||
eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "eiscapiadvancedclient":
|
|
||||||
{
|
|
||||||
eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "vceiscapiadv":
|
|
||||||
case "vceiscapiadvanced":
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(controlProperties.RoomId))
|
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
|
eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt,
|
||||||
eisc = null;
|
controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "eiscapiadvancedserver":
|
||||||
|
{
|
||||||
|
eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "eiscapiadvancedclient":
|
||||||
|
{
|
||||||
|
eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "vceiscapiadv":
|
||||||
|
case "vceiscapiadvanced":
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(controlProperties.RoomId))
|
||||||
|
{
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
|
||||||
|
eisc = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, controlProperties.RoomId,
|
||||||
|
Global.ControlSystem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, controlProperties.RoomId,
|
|
||||||
Global.ControlSystem);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
eisc = null;
|
eisc = null;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||||
@@ -72,7 +72,8 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="joinStart">Join this join map will start at</param>
|
/// <param name="joinStart">Join this join map will start at</param>
|
||||||
/// <param name="type">Type of the child join map</param>
|
/// <param name="type">Type of the child join map</param>
|
||||||
protected DmRmcControllerJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
protected DmRmcControllerJoinMap(uint joinStart, Type type)
|
||||||
|
: base(joinStart, type)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,8 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="joinStart">Join this join map will start at</param>
|
/// <param name="joinStart">Join this join map will start at</param>
|
||||||
/// <param name="type">Type of the child join map</param>
|
/// <param name="type">Type of the child join map</param>
|
||||||
protected DmTxControllerJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
protected DmTxControllerJoinMap(uint joinStart, Type type)
|
||||||
|
: base(joinStart, type)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,28 +379,28 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// Prints a list of routing inputs and outputs by device key.
|
/// Prints a list of routing inputs and outputs by device key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="s">Device key from which to report data</param>
|
/// <param name="s">Device key from which to report data</param>
|
||||||
public static void GetRoutingPorts(string s)
|
public static void GetRoutingPorts(string s)
|
||||||
{
|
{
|
||||||
var device = GetDeviceForKey(s);
|
var device = GetDeviceForKey(s);
|
||||||
|
|
||||||
if (device == null) return;
|
if (device == null) return;
|
||||||
var inputPorts = ((device as IRoutingInputs) != null) ? (device as IRoutingInputs).InputPorts : null;
|
var inputPorts = ((device as IRoutingInputs) != null) ? (device as IRoutingInputs).InputPorts : null;
|
||||||
var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null;
|
var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null;
|
||||||
if (inputPorts != null)
|
if (inputPorts != null)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Input Ports:", s, inputPorts.Count);
|
CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Input Ports:{2}", s, inputPorts.Count, CrestronEnvironment.NewLine);
|
||||||
foreach (var routingInputPort in inputPorts)
|
foreach (var routingInputPort in inputPorts)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("{0}", routingInputPort.Key);
|
CrestronConsole.ConsoleCommandResponse("{0}{1}", routingInputPort.Key, CrestronEnvironment.NewLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (outputPorts == null) return;
|
if (outputPorts == null) return;
|
||||||
CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Output Ports:", s, outputPorts.Count);
|
CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Output Ports:{2}", s, outputPorts.Count, CrestronEnvironment.NewLine);
|
||||||
foreach (var routingOutputPort in outputPorts)
|
foreach (var routingOutputPort in outputPorts)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("{0}", routingOutputPort.Key);
|
CrestronConsole.ConsoleCommandResponse("{0}{1}", routingOutputPort.Key, CrestronEnvironment.NewLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to set the debug level of a device
|
/// Attempts to set the debug level of a device
|
||||||
|
|||||||
@@ -175,8 +175,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <param name="filter"></param>
|
/// <param name="filter"></param>
|
||||||
public static void GetDeviceFactoryTypes(string filter)
|
public static void GetDeviceFactoryTypes(string filter)
|
||||||
{
|
{
|
||||||
var types = !string.IsNullOrEmpty(filter)
|
var types = !string.IsNullOrEmpty(filter)
|
||||||
? FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value)
|
? FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value)
|
||||||
: FactoryMethods;
|
: FactoryMethods;
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse("Device Types:");
|
CrestronConsole.ConsoleCommandResponse("Device Types:");
|
||||||
@@ -186,12 +186,12 @@ namespace PepperDash.Essentials.Core
|
|||||||
var description = type.Value.Description;
|
var description = type.Value.Description;
|
||||||
var cType = "Not Specified by Plugin";
|
var cType = "Not Specified by Plugin";
|
||||||
|
|
||||||
if(type.Value.CType != null)
|
if (type.Value.CType != null)
|
||||||
{
|
{
|
||||||
cType = type.Value.CType.FullName;
|
cType = type.Value.CType.FullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse(
|
CrestronConsole.ConsoleCommandResponse(
|
||||||
@"Type: '{0}'
|
@"Type: '{0}'
|
||||||
CType: '{1}'
|
CType: '{1}'
|
||||||
Description: {2}", type.Key, cType, description);
|
Description: {2}", type.Key, cType, description);
|
||||||
|
|||||||
@@ -21,37 +21,35 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fileName"></param>
|
/// <param name="fileName"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static FileInfo[] GetFiles(string fileName)
|
public static FileInfo[] GetFiles(string fileName)
|
||||||
{
|
{
|
||||||
string fullFilePath = Global.FilePathPrefix + fileName;
|
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fileName));
|
||||||
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fullFilePath));
|
var files = dirInfo.GetFiles(Path.GetFileName(fileName));
|
||||||
var files = dirInfo.GetFiles(Path.GetFileName(fullFilePath));
|
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fileName);
|
||||||
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fullFilePath);
|
if (files.Count() > 0)
|
||||||
if (files.Count() > 0)
|
{
|
||||||
{
|
return files;
|
||||||
return files;
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static FileInfo GetFile(string fileName)
|
public static FileInfo GetFile(string fileName)
|
||||||
{
|
{
|
||||||
string fullFilePath = Global.FilePathPrefix + fileName;
|
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fileName));
|
||||||
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fullFilePath));
|
var files = dirInfo.GetFiles(Path.GetFileName(fileName));
|
||||||
var files = dirInfo.GetFiles(Path.GetFileName(fullFilePath));
|
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fileName);
|
||||||
Debug.Console(0, "FileIO found: {0}, {1}", files.Count(), fullFilePath);
|
if (files.Count() > 0)
|
||||||
if (files.Count() > 0)
|
{
|
||||||
{
|
return files.FirstOrDefault();
|
||||||
return files.FirstOrDefault();
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -83,7 +81,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
if (fileLock.TryEnter())
|
if (fileLock.TryEnter())
|
||||||
{
|
{
|
||||||
DirectoryInfo dirInfo = new DirectoryInfo(file.DirectoryName);
|
DirectoryInfo dirInfo = new DirectoryInfo(file.Name);
|
||||||
Debug.Console(2, "FileIO Getting Data {0}", file.FullName);
|
Debug.Console(2, "FileIO Getting Data {0}", file.FullName);
|
||||||
|
|
||||||
if (File.Exists(file.FullName))
|
if (File.Exists(file.FullName))
|
||||||
@@ -204,7 +202,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
public static void WriteDataToFile(string data, string filePath)
|
public static void WriteDataToFile(string data, string filePath)
|
||||||
{
|
{
|
||||||
Thread _WriteFileThread;
|
Thread _WriteFileThread;
|
||||||
_WriteFileThread = new Thread((O) => _WriteFileMethod(data, Global.FilePathPrefix + "/" + filePath), null, Thread.eThreadStartOptions.CreateSuspended);
|
_WriteFileThread = new Thread((O) => _WriteFileMethod(data, filePath), null, Thread.eThreadStartOptions.CreateSuspended);
|
||||||
_WriteFileThread.Priority = Thread.eThreadPriority.LowestPriority;
|
_WriteFileThread.Priority = Thread.eThreadPriority.LowestPriority;
|
||||||
_WriteFileThread.Start();
|
_WriteFileThread.Start();
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "New WriteFile Thread");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "New WriteFile Thread");
|
||||||
@@ -219,8 +217,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
if (fileLock.TryEnter())
|
if (fileLock.TryEnter())
|
||||||
{
|
{
|
||||||
|
using (StreamWriter sw = new StreamWriter(filePath))
|
||||||
using (StreamWriter sw = new StreamWriter(filePath))
|
|
||||||
{
|
{
|
||||||
sw.Write(data);
|
sw.Write(data);
|
||||||
sw.Flush();
|
sw.Flush();
|
||||||
|
|||||||
@@ -195,13 +195,12 @@ namespace PepperDash.Essentials
|
|||||||
public static void ReportAssemblyVersions(string command)
|
public static void ReportAssemblyVersions(string command)
|
||||||
{
|
{
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse("Loaded Assemblies:");
|
CrestronConsole.ConsoleCommandResponse("Loaded Assemblies:" + CrestronEnvironment.NewLine);
|
||||||
foreach (var assembly in LoadedAssemblies)
|
foreach (var assembly in LoadedAssemblies)
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("{0} Version: {1}", assembly.Name, assembly.Version);
|
CrestronConsole.ConsoleCommandResponse("{0} Version: {1}" + CrestronEnvironment.NewLine, assembly.Name, assembly.Version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
|
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
//*******************************************************************************************
|
//*******************************************************************************************
|
||||||
// Interfaces
|
// Interfaces
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For rooms with a single presentation source, change event
|
/// For rooms with a single presentation source, change event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -692,14 +692,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
var cecPort = hdmiInputCard.HdmiInputPort;
|
var cecPort = hdmiInputCard.HdmiInputPort;
|
||||||
|
|
||||||
AddInputPortWithDebug(number, string.Format("HdmiIn1{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||||
}
|
}
|
||||||
else if (inputCard is Card.Dmps3HdmiInput)
|
else if (inputCard is Card.Dmps3HdmiInput)
|
||||||
{
|
{
|
||||||
var hdmiInputCard = inputCard as Card.Dmps3HdmiInput;
|
var hdmiInputCard = inputCard as Card.Dmps3HdmiInput;
|
||||||
var cecPort = hdmiInputCard.HdmiInputPort;
|
var cecPort = hdmiInputCard.HdmiInputPort;
|
||||||
|
|
||||||
AddInputPortWithDebug(number, string.Format("HdmiIn1{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||||
AddInputPortWithDebug(number, string.Format("HudioIn{1}", number), eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
AddInputPortWithDebug(number, string.Format("HudioIn{1}", number), eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
}
|
}
|
||||||
else if (inputCard is Card.Dmps3HdmiVgaInput)
|
else if (inputCard is Card.Dmps3HdmiVgaInput)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
public const string DmOut2 = "DmOut2";
|
public const string DmOut2 = "DmOut2";
|
||||||
public const string FromTx = "FromTx";
|
public const string FromTx = "FromTx";
|
||||||
public const string Hdmi = "Hdmi";
|
public const string Hdmi = "Hdmi";
|
||||||
public const string HdmiIn = "HdmiIn1";
|
public const string HdmiIn = "HdmiIn";
|
||||||
public const string HdmiIn1 = "HdmiIn1";
|
public const string HdmiIn1 = "HdmiIn1";
|
||||||
public const string HdmiIn2 = "HdmiIn2";
|
public const string HdmiIn2 = "HdmiIn2";
|
||||||
public const string HdmiOut1 = "HdmiOut1";
|
public const string HdmiOut1 = "HdmiOut1";
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ namespace PepperDash_Essentials_DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasHdmiInHdcpSet
|
public interface IHasHdmiInHdcpSet
|
||||||
{
|
{
|
||||||
void SetHdmiInHdcpState(eHdcpCapabilityType hdcpState);
|
void SetHdmiInHdcpState(eHdcpCapabilityType hdcpState);
|
||||||
@@ -43,8 +41,6 @@ namespace PepperDash_Essentials_DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasHdmiIn1HdcpSet
|
public interface IHasHdmiIn1HdcpSet
|
||||||
{
|
{
|
||||||
void SetHdmiIn1HdcpState(eHdcpCapabilityType hdcpState);
|
void SetHdmiIn1HdcpState(eHdcpCapabilityType hdcpState);
|
||||||
@@ -61,8 +57,6 @@ namespace PepperDash_Essentials_DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasHdmiIn2HdcpSet
|
public interface IHasHdmiIn2HdcpSet
|
||||||
{
|
{
|
||||||
void SetHdmiIn2HdcpState(eHdcpCapabilityType hdcpState);
|
void SetHdmiIn2HdcpState(eHdcpCapabilityType hdcpState);
|
||||||
@@ -80,10 +74,6 @@ namespace PepperDash_Essentials_DM
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IHasDisplayPortInHdcpGet
|
public interface IHasDisplayPortInHdcpGet
|
||||||
{
|
{
|
||||||
IntFeedback DisplayPortInHdcpStateFeedback { get; }
|
IntFeedback DisplayPortInHdcpStateFeedback { get; }
|
||||||
@@ -98,8 +88,4 @@ namespace PepperDash_Essentials_DM
|
|||||||
{
|
{
|
||||||
eHdcpCapabilityType DisplayPortInHdcpCapability { get; }
|
eHdcpCapabilityType DisplayPortInHdcpCapability { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,209 +1,209 @@
|
|||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash_Essentials_DM;
|
using PepperDash_Essentials_DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C")]
|
[Description("Wrapper Class for DM-RMC-4K-SCALER-C")]
|
||||||
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp
|
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp
|
||||||
{
|
{
|
||||||
private readonly DmRmc4kScalerC _rmc;
|
private readonly DmRmc4kScalerC _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
public RoutingOutputPort BalancedAudioOut { get; private set; }
|
public RoutingOutputPort BalancedAudioOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
public EndpointDmInputStreamWithCec DmInput { get; private set; }
|
public EndpointDmInputStreamWithCec DmInput { get; private set; }
|
||||||
|
|
||||||
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DmRmc4kScalerCController(string key, string name, DmRmc4kScalerC rmc)
|
public DmRmc4kScalerCController(string key, string name, DmRmc4kScalerC rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
_rmc = rmc;
|
_rmc = rmc;
|
||||||
|
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
|
||||||
eRoutingPortConnectionType.LineAudio, null, this);
|
eRoutingPortConnectionType.LineAudio, null, this);
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(() => false);
|
MuteFeedback = new BoolFeedback(() => false);
|
||||||
|
|
||||||
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
VolumeLevelFeedback = new IntFeedback("MainVolumeLevelFeedback", () =>
|
||||||
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
rmc.AudioOutput.VolumeFeedback.UShortValue);
|
||||||
|
|
||||||
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
|
||||||
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
|
||||||
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
InputPorts = new RoutingPortCollection<RoutingInputPort> { DmIn };
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, BalancedAudioOut };
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
||||||
() => (int)_rmc.DmInput.HdcpCapabilityFeedback);
|
() => (int)_rmc.DmInput.HdcpCapabilityFeedback);
|
||||||
|
|
||||||
AddToFeedbackList(DmInHdcpStateFeedback);
|
AddToFeedbackList(DmInHdcpStateFeedback);
|
||||||
|
|
||||||
|
|
||||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
|
|
||||||
// Set Ports for CEC
|
// Set Ports for CEC
|
||||||
HdmiOut.Port = _rmc.HdmiOutput;
|
HdmiOut.Port = _rmc.HdmiOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
|
||||||
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
|
||||||
{
|
{
|
||||||
VideoOutputResolutionFeedback.FireUpdate();
|
VideoOutputResolutionFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
|
||||||
{
|
{
|
||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case ConnectedDeviceEventIds.ManufacturerEventId:
|
case ConnectedDeviceEventIds.ManufacturerEventId:
|
||||||
EdidManufacturerFeedback.FireUpdate();
|
EdidManufacturerFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case ConnectedDeviceEventIds.NameEventId:
|
case ConnectedDeviceEventIds.NameEventId:
|
||||||
EdidNameFeedback.FireUpdate();
|
EdidNameFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
case ConnectedDeviceEventIds.PreferredTimingEventId:
|
||||||
EdidPreferredTimingFeedback.FireUpdate();
|
EdidPreferredTimingFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case ConnectedDeviceEventIds.SerialNumberEventId:
|
case ConnectedDeviceEventIds.SerialNumberEventId:
|
||||||
EdidSerialNumberFeedback.FireUpdate();
|
EdidSerialNumberFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CEC stream directly from the HDMI port.
|
/// Gets the CEC stream directly from the HDMI port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRelayPorts Members
|
#region IRelayPorts Members
|
||||||
|
|
||||||
public int NumberOfRelayPorts
|
public int NumberOfRelayPorts
|
||||||
{
|
{
|
||||||
get { return _rmc.NumberOfRelayPorts; }
|
get { return _rmc.NumberOfRelayPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public CrestronCollection<Relay> RelayPorts
|
public CrestronCollection<Relay> RelayPorts
|
||||||
{
|
{
|
||||||
get { return _rmc.RelayPorts; }
|
get { return _rmc.RelayPorts; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IBasicVolumeWithFeedback Members
|
#region IBasicVolumeWithFeedback Members
|
||||||
|
|
||||||
public BoolFeedback MuteFeedback
|
public BoolFeedback MuteFeedback
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOff()
|
public void MuteOff()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteOn()
|
public void MuteOn()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetVolume(ushort level)
|
public void SetVolume(ushort level)
|
||||||
{
|
{
|
||||||
_rmc.AudioOutput.Volume.UShortValue = level;
|
_rmc.AudioOutput.Volume.UShortValue = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntFeedback VolumeLevelFeedback
|
public IntFeedback VolumeLevelFeedback
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IBasicVolumeControls Members
|
#region IBasicVolumeControls Members
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Not implemented
|
/// Not implemented
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void MuteToggle()
|
public void MuteToggle()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
Debug.Console(2, this, "DM Endpoint {0} does not have a mute function", Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeDown(bool pressRelease)
|
public void VolumeDown(bool pressRelease)
|
||||||
{
|
{
|
||||||
if (pressRelease)
|
if (pressRelease)
|
||||||
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 0, 4000);
|
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 0, 4000);
|
||||||
else
|
else
|
||||||
_rmc.AudioOutput.Volume.StopRamp();
|
_rmc.AudioOutput.Volume.StopRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeUp(bool pressRelease)
|
public void VolumeUp(bool pressRelease)
|
||||||
{
|
{
|
||||||
if (pressRelease)
|
if (pressRelease)
|
||||||
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 65535, 4000);
|
SigHelper.RampTimeScaled(_rmc.AudioOutput.Volume, 65535, 4000);
|
||||||
else
|
else
|
||||||
_rmc.AudioOutput.Volume.StopRamp();
|
_rmc.AudioOutput.Volume.StopRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public eHdcpCapabilityType DmInHdcpCapability
|
public eHdcpCapabilityType DmInHdcpCapability
|
||||||
{
|
{
|
||||||
@@ -215,6 +215,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (_rmc == null) return;
|
if (_rmc == null) return;
|
||||||
_rmc.DmInput.HdcpCapability = hdcpState;
|
_rmc.DmInput.HdcpCapability = hdcpState;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,8 +5,9 @@ using Crestron.SimplSharpPro.DM.Endpoints;
|
|||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
|
using PepperDash_Essentials_DM;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -15,7 +16,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C-DSP")]
|
[Description("Wrapper Class for DM-RMC-4K-SCALER-C-DSP")]
|
||||||
public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp
|
||||||
{
|
{
|
||||||
private readonly DmRmc4kScalerCDsp _rmc;
|
private readonly DmRmc4kScalerCDsp _rmc;
|
||||||
|
|
||||||
@@ -25,7 +26,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
|
public EndpointDmInputStreamWithCec DmInput { get; private set; }
|
||||||
|
|
||||||
|
public IntFeedback DmInHdcpStateFeedback { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -51,7 +57,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
|
||||||
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
|
||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
|
DmInHdcpStateFeedback = new IntFeedback("DmInHdcpCapability",
|
||||||
|
() => (int) _rmc.DmInput.HdcpCapabilityFeedback);
|
||||||
|
|
||||||
|
AddToFeedbackList(DmInHdcpStateFeedback);
|
||||||
|
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut, BalancedAudioOut};
|
||||||
@@ -190,6 +202,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
_rmc.AudioOutput.Volume.StopRamp();
|
_rmc.AudioOutput.Volume.StopRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public eHdcpCapabilityType DmInHdcpCapability
|
||||||
|
{
|
||||||
|
get { return eHdcpCapabilityType.Hdcp2_2Support; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetDmInHdcpState(eHdcpCapabilityType hdcpState)
|
||||||
|
{
|
||||||
|
if (_rmc == null) return;
|
||||||
|
_rmc.DmInput.HdcpCapability = hdcpState;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,8 +87,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
VideoOutputResolutionFeedback = new StringFeedback(() => _rmc.HdmiOutput.GetVideoResolutionString());
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn, HdmiIn};
|
InputPorts = new RoutingPortCollection<RoutingInputPort> { DmIn, HdmiIn };
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut };
|
||||||
|
|
||||||
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
|
||||||
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
|
||||||
@@ -103,17 +103,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback));
|
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
||||||
if (inputStream == _rmc.HdmiIn) HdmiInHdcpStateFeedback.FireUpdate();
|
if (inputStream == _rmc.HdmiIn) HdmiInHdcpStateFeedback.FireUpdate();
|
||||||
if (inputStream == _rmc.DmInput) DmInHdcpStateFeedback.FireUpdate();
|
if (inputStream == _rmc.DmInput) DmInHdcpStateFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
if (inputStream == _rmc.HdmiIn) HdmiVideoSyncFeedback.FireUpdate();
|
if (inputStream == _rmc.HdmiIn) HdmiVideoSyncFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using PepperDash_Essentials_DM;
|
|||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for all DM-RMC variants")]
|
[Description("Wrapper class for all DM-RMC variants")]
|
||||||
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice, IDeviceInfoProvider
|
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice, IDeviceInfoProvider
|
||||||
{
|
{
|
||||||
private const int CtpPort = 41795;
|
private const int CtpPort = 41795;
|
||||||
private readonly EndpointReceiverBase _rmc; //kept here just in case. Only property or method on this class that's not device-specific is the DMOutput that it's attached to.
|
private readonly EndpointReceiverBase _rmc; //kept here just in case. Only property or method on this class that's not device-specific is the DMOutput that it's attached to.
|
||||||
@@ -29,15 +29,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
public StringFeedback EdidSerialNumberFeedback { get; protected set; }
|
public StringFeedback EdidSerialNumberFeedback { get; protected set; }
|
||||||
|
|
||||||
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
|
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
|
||||||
: base(key, name, device)
|
: base(key, name, device)
|
||||||
{
|
{
|
||||||
_rmc = device;
|
_rmc = device;
|
||||||
|
|
||||||
// if wired to a chassis, skip registration step in base class
|
// if wired to a chassis, skip registration step in base class
|
||||||
PreventRegistration = _rmc.DMOutput != null;
|
PreventRegistration = _rmc.DMOutput != null;
|
||||||
|
|
||||||
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
||||||
|
|
||||||
DeviceInfo = new DeviceInfo();
|
DeviceInfo = new DeviceInfo();
|
||||||
|
|
||||||
IsOnline.OutputChange += (currentDevice, args) => { if (args.BoolValue) UpdateDeviceInfo(); };
|
IsOnline.OutputChange += (currentDevice, args) => { if (args.BoolValue) UpdateDeviceInfo(); };
|
||||||
@@ -76,7 +76,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (rmc.EdidSerialNumberFeedback != null)
|
if (rmc.EdidSerialNumberFeedback != null)
|
||||||
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber.JoinNumber]);
|
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber.JoinNumber]);
|
||||||
|
|
||||||
|
|
||||||
//If the device is an DM-RMC-4K-Z-SCALER-C
|
//If the device is an DM-RMC-4K-Z-SCALER-C
|
||||||
var routing = rmc as IRoutingInputsOutputs;
|
var routing = rmc as IRoutingInputsOutputs;
|
||||||
|
|
||||||
@@ -135,9 +135,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort) hdcpCapability;
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber].UShortValue = (ushort)hdcpCapability;
|
||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpInputPortCount.JoinNumber].UShortValue = (ushort) routing.InputPorts.Count;
|
trilist.UShortInput[joinMap.HdcpInputPortCount.JoinNumber].UShortValue = (ushort)routing.InputPorts.Count;
|
||||||
|
|
||||||
var routingWithFeedback = routing as IRmcRouting;
|
var routingWithFeedback = routing as IRmcRouting;
|
||||||
if (routingWithFeedback == null) return;
|
if (routingWithFeedback == null) return;
|
||||||
@@ -206,13 +206,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (args.Text.ToLower().Contains("host"))
|
if (args.Text.ToLower().Contains("host"))
|
||||||
{
|
{
|
||||||
DeviceInfo.HostName = args.Text.Split(':')[1].Trim();
|
DeviceInfo.HostName = args.Text.Split(':')[1].Trim();
|
||||||
|
|
||||||
tcpClient.SendText("maca\r\n");
|
tcpClient.SendText("maca\r\n");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,17 +265,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DmRmcHelper
|
public class DmRmcHelper
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>> ProcessorFactoryDict;
|
private static readonly Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>> ProcessorFactoryDict;
|
||||||
private static readonly Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>> ChassisCpu3Dict;
|
private static readonly Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>> ChassisCpu3Dict;
|
||||||
|
|
||||||
private static readonly Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
private static readonly Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
||||||
ChassisDict;
|
ChassisDict;
|
||||||
|
|
||||||
static DmRmcHelper()
|
static DmRmcHelper()
|
||||||
{
|
{
|
||||||
ProcessorFactoryDict = new Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>>
|
ProcessorFactoryDict = new Dictionary<string, Func<string, string, uint, CrestronGenericBaseDevice>>
|
||||||
{
|
{
|
||||||
{"dmrmc100c", (k, n, i) => new DmRmcX100CController(k, n, new DmRmc100C(i, Global.ControlSystem))},
|
{"dmrmc100c", (k, n, i) => new DmRmcX100CController(k, n, new DmRmc100C(i, Global.ControlSystem))},
|
||||||
{"dmrmc100s", (k, n, i) => new DmRmc100SController(k, n, new DmRmc100S(i, Global.ControlSystem))},
|
{"dmrmc100s", (k, n, i) => new DmRmc100SController(k, n, new DmRmc100S(i, Global.ControlSystem))},
|
||||||
@@ -369,34 +369,34 @@ namespace PepperDash.Essentials.DM
|
|||||||
{"dmrmc4k100c1g", (k,n,i,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(i, d))}
|
{"dmrmc4k100c1g", (k,n,i,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(i, d))}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A factory method for various DmRmcControllers
|
/// A factory method for various DmRmcControllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">device key. Used to uniquely identify device</param>
|
/// <param name="key">device key. Used to uniquely identify device</param>
|
||||||
/// <param name="name">device name</param>
|
/// <param name="name">device name</param>
|
||||||
/// <param name="typeName">device type name. Used to retrived the correct device</param>
|
/// <param name="typeName">device type name. Used to retrived the correct device</param>
|
||||||
/// <param name="props">Config from config file</param>
|
/// <param name="props">Config from config file</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
|
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
|
||||||
{
|
{
|
||||||
typeName = typeName.ToLower();
|
typeName = typeName.ToLower();
|
||||||
var ipid = props.Control.IpIdInt;
|
var ipid = props.Control.IpIdInt;
|
||||||
|
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
var pKey = props.ParentDeviceKey.ToLower();
|
||||||
|
|
||||||
// Non-DM-chassis endpoints
|
// Non-DM-chassis endpoints
|
||||||
return pKey == "processor" ? GetDmRmcControllerForProcessor(key, name, typeName, ipid) : GetDmRmcControllerForChassis(key, name, typeName, props, pKey, ipid);
|
return pKey == "processor" ? GetDmRmcControllerForProcessor(key, name, typeName, ipid) : GetDmRmcControllerForChassis(key, name, typeName, props, pKey, ipid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForChassis(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForChassis(string key, string name, string typeName,
|
||||||
DmRmcPropertiesConfig props, string pKey, uint ipid)
|
DmRmcPropertiesConfig props, string pKey, uint ipid)
|
||||||
{
|
{
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||||
CrestronGenericBaseDevice rx;
|
CrestronGenericBaseDevice rx;
|
||||||
bool useChassisForOfflineFeedback = false;
|
bool useChassisForOfflineFeedback = false;
|
||||||
|
|
||||||
if (parentDev is DmpsRoutingController)
|
if (parentDev is DmpsRoutingController)
|
||||||
{
|
{
|
||||||
var dmps = parentDev as DmpsRoutingController;
|
var dmps = parentDev as DmpsRoutingController;
|
||||||
//Check that the input is within range of this chassis' possible inputs
|
//Check that the input is within range of this chassis' possible inputs
|
||||||
var num = props.ParentOutputNumber;
|
var num = props.ParentOutputNumber;
|
||||||
@@ -411,9 +411,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (Global.ControlSystemIsDmps4kType)
|
if (Global.ControlSystemIsDmps4kType)
|
||||||
{
|
{
|
||||||
rx = GetDmRmcControllerForDmps4k(key, name, typeName, dmps, props.ParentOutputNumber);
|
rx = GetDmRmcControllerForDmps4k(key, name, typeName, dmps, props.ParentOutputNumber);
|
||||||
useChassisForOfflineFeedback = true;
|
useChassisForOfflineFeedback = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rx = GetDmRmcControllerForDmps(key, name, typeName, ipid, dmps, props.ParentOutputNumber);
|
rx = GetDmRmcControllerForDmps(key, name, typeName, ipid, dmps, props.ParentOutputNumber);
|
||||||
if (typeName == "hdbasetrx" || typeName == "dmrmc4k100c1g")
|
if (typeName == "hdbasetrx" || typeName == "dmrmc4k100c1g")
|
||||||
@@ -435,7 +435,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
return rx;
|
return rx;
|
||||||
}
|
}
|
||||||
else if (parentDev is DmChassisController)
|
else if (parentDev is DmChassisController)
|
||||||
{
|
{
|
||||||
var controller = parentDev as DmChassisController;
|
var controller = parentDev as DmChassisController;
|
||||||
@@ -448,7 +448,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range",
|
Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range",
|
||||||
key, num);
|
key, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
controller.RxDictionary.Add(num, key);
|
controller.RxDictionary.Add(num, key);
|
||||||
// Catch constructor failures, mainly dues to IPID
|
// Catch constructor failures, mainly dues to IPID
|
||||||
try
|
try
|
||||||
@@ -497,31 +497,31 @@ namespace PepperDash.Essentials.DM
|
|||||||
key, pKey);
|
key, pKey);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu2Chassis(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu2Chassis(string key, string name, string typeName,
|
||||||
uint ipid, Switch chassis, uint num, IKeyed parentDev)
|
uint ipid, Switch chassis, uint num, IKeyed parentDev)
|
||||||
{
|
{
|
||||||
Func<string, string, uint, DMOutput, CrestronGenericBaseDevice> handler;
|
Func<string, string, uint, DMOutput, CrestronGenericBaseDevice> handler;
|
||||||
if (ChassisDict.TryGetValue(typeName.ToLower(), out handler))
|
if (ChassisDict.TryGetValue(typeName.ToLower(), out handler))
|
||||||
{
|
{
|
||||||
return handler(key, name, ipid, chassis.Outputs[num]);
|
return handler(key, name, ipid, chassis.Outputs[num]);
|
||||||
}
|
}
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu3Chassis(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForCpu3Chassis(string key, string name, string typeName,
|
||||||
Switch chassis, uint num, IKeyed parentDev)
|
Switch chassis, uint num, IKeyed parentDev)
|
||||||
{
|
{
|
||||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> cpu3Handler;
|
Func<string, string, DMOutput, CrestronGenericBaseDevice> cpu3Handler;
|
||||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out cpu3Handler))
|
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out cpu3Handler))
|
||||||
{
|
{
|
||||||
return cpu3Handler(key, name, chassis.Outputs[num]);
|
return cpu3Handler(key, name, chassis.Outputs[num]);
|
||||||
}
|
}
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
Debug.Console(0, "Cannot create DM-RMC of type '{0}' with parent device {1}", typeName, parentDev.Key);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
||||||
uint ipid, DmpsRoutingController controller, uint num)
|
uint ipid, DmpsRoutingController controller, uint num)
|
||||||
@@ -545,49 +545,49 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps4k(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps4k(string key, string name, string typeName,
|
||||||
DmpsRoutingController controller, uint num)
|
DmpsRoutingController controller, uint num)
|
||||||
{
|
{
|
||||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmps4kHandler;
|
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmps4kHandler;
|
||||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmps4kHandler))
|
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmps4kHandler))
|
||||||
{
|
{
|
||||||
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
||||||
|
|
||||||
if (output != null)
|
if (output != null)
|
||||||
{
|
{
|
||||||
return dmps4kHandler(key, name, output);
|
return dmps4kHandler(key, name, output);
|
||||||
}
|
}
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||||
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS-4K chassis. Output is not a DM Output.",
|
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS-4K chassis. Output is not a DM Output.",
|
||||||
typeName, num);
|
typeName, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS-4K chassis", typeName, num);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS-4K chassis", typeName, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForProcessor(string key, string name, string typeName, uint ipid)
|
private static CrestronGenericBaseDevice GetDmRmcControllerForProcessor(string key, string name, string typeName, uint ipid)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Func<string, string, uint, CrestronGenericBaseDevice> handler;
|
Func<string, string, uint, CrestronGenericBaseDevice> handler;
|
||||||
|
|
||||||
if (ProcessorFactoryDict.TryGetValue(typeName.ToLower(), out handler))
|
if (ProcessorFactoryDict.TryGetValue(typeName.ToLower(), out handler))
|
||||||
{
|
{
|
||||||
return handler(key, name, ipid);
|
return handler(key, name, ipid);
|
||||||
}
|
}
|
||||||
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
|
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
catch (Exception e)
|
||||||
}
|
{
|
||||||
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
|
public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
|
||||||
{
|
{
|
||||||
@@ -607,7 +607,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<DmRmcPropertiesConfig>(dc.Properties.ToString());
|
<DmRmcPropertiesConfig>(dc.Properties.ToString());
|
||||||
return DmRmcHelper.GetDmRmcController(dc.Key, dc.Name, type, props);
|
return DmRmcHelper.GetDmRmcController(dc.Key, dc.Name, type, props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,42 +1,42 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
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.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.DM.Config;
|
using PepperDash.Essentials.DM.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||||
|
|
||||||
[Description("Wrapper class for DM-TX-4K-202-C")]
|
[Description("Wrapper class for DM-TX-4K-202-C")]
|
||||||
public class DmTx4k202CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback,
|
public class DmTx4k202CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback,
|
||||||
IIROutputPorts, IComPorts
|
IIROutputPorts, IComPorts
|
||||||
{
|
{
|
||||||
public DmTx4k202C Tx { get; private set; }
|
public DmTx4k202C Tx { get; private set; }
|
||||||
|
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
||||||
public RoutingOutputPort DmOut { get; private set; }
|
public RoutingOutputPort DmOut { get; private set; }
|
||||||
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
||||||
|
|
||||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; }
|
||||||
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; }
|
||||||
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; }
|
||||||
|
|
||||||
//IroutingNumericEvent
|
//IroutingNumericEvent
|
||||||
@@ -50,50 +50,50 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
var newEvent = NumericSwitchChange;
|
var newEvent = NumericSwitchChange;
|
||||||
if (newEvent != null) newEvent(this, e);
|
if (newEvent != null) newEvent(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
||||||
//public override ushort HdcpSupportCapability { get; protected set; }
|
//public override ushort HdcpSupportCapability { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helps get the "real" inputs, including when in Auto
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||||
return Tx.VideoSourceFeedback;
|
return Tx.VideoSourceFeedback;
|
||||||
else // auto
|
else // auto
|
||||||
{
|
{
|
||||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Hdmi1;
|
return eVst.Hdmi1;
|
||||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Hdmi2;
|
return eVst.Hdmi2;
|
||||||
else
|
else
|
||||||
return eVst.AllDisabled;
|
return eVst.AllDisabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingInputPort>
|
return new RoutingPortCollection<RoutingInputPort>
|
||||||
{
|
{
|
||||||
HdmiIn1,
|
HdmiIn1,
|
||||||
HdmiIn2,
|
HdmiIn2,
|
||||||
AnyVideoInput
|
AnyVideoInput
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public DmTx4k202CController(string key, string name, DmTx4k202C tx, bool preventRegistration)
|
public DmTx4k202CController(string key, string name, DmTx4k202C tx, bool preventRegistration)
|
||||||
@@ -127,23 +127,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
Tx.OnlineStatusChange += Tx_OnlineStatusChange;
|
||||||
|
|
||||||
VideoSourceNumericFeedback = new IntFeedback(() => (int) Tx.VideoSourceFeedback);
|
VideoSourceNumericFeedback = new IntFeedback(() => (int)Tx.VideoSourceFeedback);
|
||||||
|
|
||||||
AudioSourceNumericFeedback = new IntFeedback(() => (int) Tx.AudioSourceFeedback);
|
AudioSourceNumericFeedback = new IntFeedback(() => (int)Tx.AudioSourceFeedback);
|
||||||
|
|
||||||
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability",
|
HdmiIn1HdcpCapabilityFeedback = new IntFeedback("HdmiIn1HdcpCapability",
|
||||||
() => (int) tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
() => (int)tx.HdmiInputs[1].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability",
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability",
|
||||||
() => (int) tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
() => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
HdcpStateFeedback = new IntFeedback(() => (int) HdcpSupportCapability);
|
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
||||||
|
|
||||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
|
||||||
|
|
||||||
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool) tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
Hdmi2VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
{
|
{
|
||||||
@@ -205,120 +205,120 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
||||||
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
||||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
||||||
|
|
||||||
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||||
|
|
||||||
// Base does register and sets up comm monitoring.
|
// Base does register and sets up comm monitoring.
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
var joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
|
||||||
|
|
||||||
if (Hdmi1VideoSyncFeedback != null)
|
if (Hdmi1VideoSyncFeedback != null)
|
||||||
{
|
{
|
||||||
Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
|
||||||
}
|
}
|
||||||
if (Hdmi2VideoSyncFeedback != null)
|
if (Hdmi2VideoSyncFeedback != null)
|
||||||
{
|
{
|
||||||
Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
LinkDmTxToApi(this, trilist, joinMap, bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case eRoutingSignalType.Video:
|
case eRoutingSignalType.Video:
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.Auto, null, type);
|
ExecuteSwitch(eVst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eRoutingSignalType.Audio:
|
case eRoutingSignalType.Audio:
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Auto, null, type);
|
ExecuteSwitch(eAst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
Tx.VideoSource = (eVst)inputSelector;
|
Tx.VideoSource = (eVst)inputSelector;
|
||||||
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
Tx.AudioSource = (eAst)inputSelector;
|
Tx.AudioSource = (eAst)inputSelector;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
|
||||||
|
|
||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
|
||||||
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
|
||||||
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
case EndpointInputStreamEventIds.HdcpCapabilityFeedbackEventId:
|
||||||
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[1]) HdmiIn1HdcpCapabilityFeedback.FireUpdate();
|
||||||
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[2]) HdmiIn2HdcpCapabilityFeedback.FireUpdate();
|
||||||
HdcpStateFeedback.FireUpdate();
|
HdcpStateFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
|
||||||
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[1]) Hdmi1VideoSyncFeedback.FireUpdate();
|
||||||
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
if (inputStream == Tx.HdmiInputs[2]) Hdmi2VideoSyncFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
||||||
@@ -356,62 +356,62 @@ namespace PepperDash.Essentials.DM
|
|||||||
OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio));
|
OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||||
switch (eventId)
|
switch (eventId)
|
||||||
{
|
{
|
||||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,22 +17,22 @@ using PepperDash.Essentials.DM.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||||
|
|
||||||
[Description("Wrapper class for DM-TX-4K-302-C")]
|
[Description("Wrapper class for DM-TX-4K-302-C")]
|
||||||
public class DmTx4k302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback,
|
public class DmTx4k302CController : DmTxControllerBase, ITxRoutingWithFeedback, IHasFeedback,
|
||||||
IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
||||||
{
|
{
|
||||||
public DmTx4k302C Tx { get; private set; }
|
public DmTx4k302C Tx { get; private set; }
|
||||||
|
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
public RoutingInputPortWithVideoStatuses HdmiIn1 { get; private set; }
|
||||||
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
public RoutingInputPortWithVideoStatuses HdmiIn2 { get; private set; }
|
||||||
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }
|
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }
|
||||||
public RoutingOutputPort DmOut { get; private set; }
|
public RoutingOutputPort DmOut { get; private set; }
|
||||||
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
public RoutingOutputPort HdmiLoopOut { get; private set; }
|
||||||
|
|
||||||
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||||
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; }
|
||||||
@@ -60,78 +60,78 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helps get the "real" inputs, including when in Auto
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
public Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType ActualActiveVideoInput
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Tx.VideoSourceFeedback != eVst.Auto)
|
if (Tx.VideoSourceFeedback != eVst.Auto)
|
||||||
return Tx.VideoSourceFeedback;
|
return Tx.VideoSourceFeedback;
|
||||||
else // auto
|
else // auto
|
||||||
{
|
{
|
||||||
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
if (Tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Hdmi1;
|
return eVst.Hdmi1;
|
||||||
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
else if (Tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Hdmi2;
|
return eVst.Hdmi2;
|
||||||
else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
||||||
return eVst.Vga;
|
return eVst.Vga;
|
||||||
else
|
else
|
||||||
return eVst.AllDisabled;
|
return eVst.AllDisabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingInputPort>
|
return new RoutingPortCollection<RoutingInputPort>
|
||||||
{
|
{
|
||||||
HdmiIn1,
|
HdmiIn1,
|
||||||
HdmiIn2,
|
HdmiIn2,
|
||||||
VgaIn,
|
VgaIn,
|
||||||
AnyVideoInput
|
AnyVideoInput
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
return new RoutingPortCollection<RoutingOutputPort> { DmOut, HdmiLoopOut };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public DmTx4k302CController(string key, string name, DmTx4k302C tx, bool preventRegistration)
|
public DmTx4k302CController(string key, string name, DmTx4k302C tx, bool preventRegistration)
|
||||||
: base(key, name, tx)
|
: base(key, name, tx)
|
||||||
{
|
{
|
||||||
Tx = tx;
|
Tx = tx;
|
||||||
PreventRegistration = preventRegistration;
|
PreventRegistration = preventRegistration;
|
||||||
|
|
||||||
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]))
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]))
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = eVst.Hdmi1
|
FeedbackMatchObject = eVst.Hdmi1
|
||||||
};
|
};
|
||||||
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
|
||||||
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]))
|
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]))
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = eVst.Hdmi2
|
FeedbackMatchObject = eVst.Hdmi2
|
||||||
};
|
};
|
||||||
|
|
||||||
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
|
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
|
||||||
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.Vga, this,
|
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.Vga, this,
|
||||||
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput))
|
VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput))
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = eVst.Vga
|
FeedbackMatchObject = eVst.Vga
|
||||||
};
|
};
|
||||||
|
|
||||||
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
|
||||||
() => ActualActiveVideoInput.ToString());
|
() => ActualActiveVideoInput.ToString());
|
||||||
|
|
||||||
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[1].InputStreamChange += InputStreamChangeEvent;
|
||||||
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
Tx.HdmiInputs[2].InputStreamChange += InputStreamChangeEvent;
|
||||||
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
Tx.VgaInput.InputStreamChange += VgaInputOnInputStreamChange;
|
||||||
Tx.BaseEvent += Tx_BaseEvent;
|
Tx.BaseEvent += Tx_BaseEvent;
|
||||||
@@ -163,46 +163,46 @@ namespace PepperDash.Essentials.DM
|
|||||||
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
|
||||||
|
|
||||||
|
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
{
|
{
|
||||||
HdcpActiveFeedbackFunc = () =>
|
HdcpActiveFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
&& tx.HdmiInputs[1].VideoAttributes.HdcpActiveFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
&& tx.HdmiInputs[2].VideoAttributes.HdcpActiveFeedback.BoolValue),
|
||||||
|
|
||||||
HdcpStateFeedbackFunc = () =>
|
HdcpStateFeedbackFunc = () =>
|
||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
return tx.HdmiInputs[1].VideoAttributes.HdcpStateFeedback.ToString();
|
||||||
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
return ActualActiveVideoInput == eVst.Hdmi2 ? tx.HdmiInputs[2].VideoAttributes.HdcpStateFeedback.ToString() : "";
|
||||||
},
|
},
|
||||||
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
VideoResolutionFeedbackFunc = () =>
|
||||||
{
|
{
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi1)
|
if (ActualActiveVideoInput == eVst.Hdmi1)
|
||||||
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInputs[1].VideoAttributes.GetVideoResolutionString();
|
||||||
if (ActualActiveVideoInput == eVst.Hdmi2)
|
if (ActualActiveVideoInput == eVst.Hdmi2)
|
||||||
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
return tx.HdmiInputs[2].VideoAttributes.GetVideoResolutionString();
|
||||||
return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
return ActualActiveVideoInput == eVst.Vga ? tx.VgaInput.VideoAttributes.GetVideoResolutionString() : "";
|
||||||
},
|
},
|
||||||
VideoSyncFeedbackFunc = () =>
|
VideoSyncFeedbackFunc = () =>
|
||||||
(ActualActiveVideoInput == eVst.Hdmi1
|
(ActualActiveVideoInput == eVst.Hdmi1
|
||||||
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
&& tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Hdmi2
|
|| (ActualActiveVideoInput == eVst.Hdmi2
|
||||||
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
&& tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue)
|
||||||
|| (ActualActiveVideoInput == eVst.Vga
|
|| (ActualActiveVideoInput == eVst.Vga
|
||||||
&& tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
&& tx.VgaInput.SyncDetectedFeedback.BoolValue)
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
};
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
|
||||||
|
|
||||||
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
|
||||||
eRoutingPortConnectionType.DmCat, null, this);
|
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
|
||||||
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
|
eRoutingPortConnectionType.DmCat, null, this);
|
||||||
|
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
|
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
|
||||||
@@ -216,7 +216,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
HdmiIn2.Port = Tx.HdmiInputs[2];
|
HdmiIn2.Port = Tx.HdmiInputs[2];
|
||||||
HdmiLoopOut.Port = Tx.HdmiOutput;
|
HdmiLoopOut.Port = Tx.HdmiOutput;
|
||||||
DmOut.Port = Tx.DmOutput;
|
DmOut.Port = Tx.DmOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
@@ -249,21 +249,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
// Link up all of these damned events to the various RoutingPorts via a helper handler
|
||||||
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
Tx.HdmiInputs[1].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn1, a.EventId);
|
||||||
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
Tx.HdmiInputs[1].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn1, a.EventId);
|
||||||
|
|
||||||
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
Tx.HdmiInputs[2].InputStreamChange += (o, a) => FowardInputStreamChange(HdmiIn2, a.EventId);
|
||||||
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
Tx.HdmiInputs[2].VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn2, a.EventId);
|
||||||
|
|
||||||
Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaIn, a.EventId);
|
Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaIn, a.EventId);
|
||||||
Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId);
|
Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId);
|
||||||
|
|
||||||
// Base does register and sets up comm monitoring.
|
// Base does register and sets up comm monitoring.
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
@@ -324,60 +324,60 @@ namespace PepperDash.Essentials.DM
|
|||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.Auto, null, type);
|
ExecuteSwitch(eVst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(VgaIn.Selector, null, type);
|
ExecuteSwitch(VgaIn.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eRoutingSignalType.Audio:
|
case eRoutingSignalType.Audio:
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Auto, null, type);
|
ExecuteSwitch(eAst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Hdmi1, null, type);
|
ExecuteSwitch(eAst.Hdmi1, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.Hdmi2, null, type);
|
ExecuteSwitch(eAst.Hdmi2, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.AudioIn, null, type);
|
ExecuteSwitch(eAst.AudioIn, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eAst.AllDisabled, null, type);
|
ExecuteSwitch(eAst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -448,54 +448,54 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the input stream change to the appropriate RoutingInputPort.
|
/// Relays the input stream change to the appropriate RoutingInputPort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
if (eventId != EndpointInputStreamEventIds.SyncDetectedFeedbackEventId) return;
|
||||||
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relays the VideoAttributes change to a RoutingInputPort
|
/// Relays the VideoAttributes change to a RoutingInputPort
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
|
||||||
{
|
{
|
||||||
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
//// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
|
||||||
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
//Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
|
||||||
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
// args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
|
||||||
switch (eventId)
|
switch (eventId)
|
||||||
{
|
{
|
||||||
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
|
||||||
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
|
||||||
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
|
||||||
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return Tx.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return Tx.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return Tx.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,9 +124,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
HdcpStateFeedback =
|
||||||
|
new IntFeedback(
|
||||||
|
() =>
|
||||||
|
tx.HdmiInputs[1].HdcpCapabilityFeedback > tx.HdmiInputs[2].HdcpCapabilityFeedback
|
||||||
|
? (int)tx.HdmiInputs[1].HdcpCapabilityFeedback
|
||||||
|
: (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
HdcpStateFeedback = new IntFeedback(() => (int)HdcpSupportCapability);
|
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
Hdmi1VideoSyncFeedback = new BoolFeedback(() => (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue);
|
||||||
|
|
||||||
|
|||||||
@@ -133,9 +133,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
HdmiIn2HdcpCapabilityFeedback = new IntFeedback("HdmiIn2HdcpCapability", () => (int)tx.HdmiInputs[2].HdcpCapabilityFeedback);
|
||||||
|
|
||||||
DisplayPortInHdcpCapabilityFeedback = new IntFeedback("DisplayPortHdcpCapability",
|
DisplayPortInHdcpCapabilityFeedback = new IntFeedback("DisplayPortHdcpCapability",
|
||||||
() => (int) tx.DisplayPortInput.HdcpCapabilityFeedback);
|
() => (int)tx.DisplayPortInput.HdcpCapabilityFeedback);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
HdcpStateFeedback =
|
HdcpStateFeedback =
|
||||||
new IntFeedback(
|
new IntFeedback(
|
||||||
@@ -274,41 +274,41 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
|
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.Auto, null, type);
|
ExecuteSwitch(eVst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(DisplayPortIn.Selector, null, type);
|
ExecuteSwitch(DisplayPortIn.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, type);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input);
|
Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return Tx.IROutputPorts; } }
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ using PepperDash.Essentials.Core.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
public class DmTxHelper
|
public class DmTxHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
public static BasicDmTxControllerBase GetDmTxForChassisWithoutIpId(string key, string name, string typeName, DMInput dmInput)
|
public static BasicDmTxControllerBase GetDmTxForChassisWithoutIpId(string key, string name, string typeName, DMInput dmInput)
|
||||||
{
|
{
|
||||||
@@ -77,31 +77,31 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A factory method for various DmTxControllers
|
/// A factory method for various DmTxControllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="props"></param>
|
/// <param name="props"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static BasicDmTxControllerBase GetDmTxController(string key, string name, string typeName, DmTxPropertiesConfig props)
|
public static BasicDmTxControllerBase GetDmTxController(string key, string name, string typeName, DmTxPropertiesConfig props)
|
||||||
{
|
{
|
||||||
// switch on type name... later...
|
// switch on type name... later...
|
||||||
|
|
||||||
typeName = typeName.ToLower();
|
typeName = typeName.ToLower();
|
||||||
//uint ipid = Convert.ToUInt16(props.Id, 16);
|
//uint ipid = Convert.ToUInt16(props.Id, 16);
|
||||||
var ipid = props.Control.IpIdInt;
|
var ipid = props.Control.IpIdInt;
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
var pKey = props.ParentDeviceKey.ToLower();
|
||||||
|
|
||||||
if (pKey == "processor")
|
if (pKey == "processor")
|
||||||
{
|
{
|
||||||
// Catch constructor failures, mainly dues to IPID
|
// Catch constructor failures, mainly dues to IPID
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(typeName.StartsWith("dmtx200"))
|
if (typeName.StartsWith("dmtx200"))
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem), false);
|
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
if (typeName.StartsWith("dmtx201c"))
|
||||||
return new DmTx201CController(key, name, new DmTx201C(ipid, Global.ControlSystem), false);
|
return new DmTx201CController(key, name, new DmTx201C(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
if (typeName.StartsWith("dmtx201s"))
|
||||||
return new DmTx201SController(key, name, new DmTx201S(ipid, Global.ControlSystem), false);
|
return new DmTx201SController(key, name, new DmTx201S(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
if (typeName.StartsWith("dmtx4k202"))
|
||||||
@@ -112,36 +112,36 @@ namespace PepperDash.Essentials.DM
|
|||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem), false);
|
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
if (typeName.StartsWith("dmtx4kz302"))
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, Global.ControlSystem), false);
|
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, Global.ControlSystem), false);
|
||||||
if (typeName.StartsWith("dmtx401"))
|
if (typeName.StartsWith("dmtx401"))
|
||||||
return new DmTx401CController(key, name, new DmTx401C(ipid, Global.ControlSystem), false);
|
return new DmTx401CController(key, name, new DmTx401C(ipid, Global.ControlSystem), false);
|
||||||
Debug.Console(0, "{1} WARNING: Cannot create DM-TX of type: '{0}'", typeName, key);
|
Debug.Console(0, "{1} WARNING: Cannot create DM-TX of type: '{0}'", typeName, key);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||||
DMInput dmInput;
|
DMInput dmInput;
|
||||||
BasicDmTxControllerBase tx;
|
BasicDmTxControllerBase tx;
|
||||||
bool useChassisForOfflineFeedback = false;
|
bool useChassisForOfflineFeedback = false;
|
||||||
|
|
||||||
if (parentDev is DmChassisController)
|
if (parentDev is DmChassisController)
|
||||||
{
|
{
|
||||||
// Get the Crestron chassis and link stuff up
|
// Get the Crestron chassis and link stuff up
|
||||||
var switchDev = (parentDev as DmChassisController);
|
var switchDev = (parentDev as DmChassisController);
|
||||||
var chassis = switchDev.Chassis;
|
var chassis = switchDev.Chassis;
|
||||||
|
|
||||||
//Check that the input is within range of this chassis' possible inputs
|
//Check that the input is within range of this chassis' possible inputs
|
||||||
var num = props.ParentInputNumber;
|
var num = props.ParentInputNumber;
|
||||||
if (num <= 0 || num > chassis.NumberOfInputs)
|
if (num <= 0 || num > chassis.NumberOfInputs)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. Input number '{1}' is out of range",
|
Debug.Console(0, "Cannot create DM device '{0}'. Input number '{1}' is out of range",
|
||||||
key, num);
|
key, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
switchDev.TxDictionary.Add(num, key);
|
switchDev.TxDictionary.Add(num, key);
|
||||||
dmInput = chassis.Inputs[num];
|
dmInput = chassis.Inputs[num];
|
||||||
@@ -164,7 +164,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (typeName == "hdbasettx" || typeName == "dmtx4k100c1g")
|
if (typeName == "hdbasettx" || typeName == "dmtx4k100c1g")
|
||||||
{
|
{
|
||||||
useChassisForOfflineFeedback = true;
|
useChassisForOfflineFeedback = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (useChassisForOfflineFeedback)
|
if (useChassisForOfflineFeedback)
|
||||||
{
|
{
|
||||||
@@ -180,7 +180,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(parentDev is DmpsRoutingController)
|
else if (parentDev is DmpsRoutingController)
|
||||||
{
|
{
|
||||||
// Get the DMPS chassis and link stuff up
|
// Get the DMPS chassis and link stuff up
|
||||||
var dmpsDev = (parentDev as DmpsRoutingController);
|
var dmpsDev = (parentDev as DmpsRoutingController);
|
||||||
@@ -209,7 +209,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(Global.ControlSystemIsDmps4kType)
|
if (Global.ControlSystemIsDmps4kType)
|
||||||
{
|
{
|
||||||
tx = GetDmTxForChassisWithoutIpId(key, name, typeName, dmInput);
|
tx = GetDmTxForChassisWithoutIpId(key, name, typeName, dmInput);
|
||||||
useChassisForOfflineFeedback = true;
|
useChassisForOfflineFeedback = true;
|
||||||
@@ -220,7 +220,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (typeName == "hdbasettx" || typeName == "dmtx4k100c1g")
|
if (typeName == "hdbasettx" || typeName == "dmtx4k100c1g")
|
||||||
{
|
{
|
||||||
useChassisForOfflineFeedback = true;
|
useChassisForOfflineFeedback = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (useChassisForOfflineFeedback)
|
if (useChassisForOfflineFeedback)
|
||||||
{
|
{
|
||||||
@@ -234,16 +234,16 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device for dmps: {1}", key, e);
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device for dmps: {1}", key, e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a processor, DM Chassis or DMPS.", key, pKey);
|
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a processor, DM Chassis or DMPS.", key, pKey);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class BasicDmTxControllerBase : CrestronGenericBridgeableBaseDevice
|
public abstract class BasicDmTxControllerBase : CrestronGenericBridgeableBaseDevice
|
||||||
{
|
{
|
||||||
@@ -254,21 +254,21 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper class for all DM-TX variants")]
|
[Description("Wrapper class for all DM-TX variants")]
|
||||||
public abstract class DmTxControllerBase : BasicDmTxControllerBase
|
public abstract class DmTxControllerBase : BasicDmTxControllerBase
|
||||||
{
|
{
|
||||||
public virtual void SetPortHdcpCapability(eHdcpCapabilityType hdcpMode, uint port) { }
|
public virtual void SetPortHdcpCapability(eHdcpCapabilityType hdcpMode, uint port) { }
|
||||||
public virtual eHdcpCapabilityType HdcpSupportCapability { get; protected set; }
|
public virtual eHdcpCapabilityType HdcpSupportCapability { get; protected set; }
|
||||||
public abstract StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
public abstract StringFeedback ActiveVideoInputFeedback { get; protected set; }
|
||||||
public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; }
|
public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; }
|
||||||
public IntFeedback HdcpStateFeedback { get; protected set; }
|
public IntFeedback HdcpStateFeedback { get; protected set; }
|
||||||
|
|
||||||
protected DmTxControllerBase(string key, string name, EndpointTransmitterBase hardware)
|
protected DmTxControllerBase(string key, string name, EndpointTransmitterBase hardware)
|
||||||
: base(key, name, hardware)
|
: base(key, name, hardware)
|
||||||
{
|
{
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback);
|
AddToFeedbackList(ActiveVideoInputFeedback);
|
||||||
|
|
||||||
IsOnline.OutputChange += (currentDevice, args) =>
|
IsOnline.OutputChange += (currentDevice, args) =>
|
||||||
@@ -279,11 +279,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
feedback.FireUpdate();
|
feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DmTxControllerBase(string key, string name, DmHDBasedTEndPoint hardware) : base(key, name, hardware)
|
protected DmTxControllerBase(string key, string name, DmHDBasedTEndPoint hardware)
|
||||||
{
|
: base(key, name, hardware)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected DmTxControllerJoinMap GetDmTxJoinMap(uint joinStart, string joinMapKey)
|
protected DmTxControllerJoinMap GetDmTxJoinMap(uint joinStart, string joinMapKey)
|
||||||
{
|
{
|
||||||
@@ -297,8 +298,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
return joinMap;
|
return joinMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge)
|
protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
if (bridge != null)
|
if (bridge != null)
|
||||||
{
|
{
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
@@ -308,7 +309,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, tx, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
|
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber]);
|
||||||
@@ -475,20 +476,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetHdcpCapabilityAction(bool hdcpTypeSimple, EndpointDisplayPortInput port, uint join,
|
private void SetHdcpCapabilityAction(bool hdcpTypeSimple, EndpointDisplayPortInput port, uint join,
|
||||||
BasicTriList trilist)
|
BasicTriList trilist)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(join,
|
trilist.SetUShortSigAction(join,
|
||||||
s =>
|
s =>
|
||||||
{
|
{
|
||||||
port.HdcpCapability = (eHdcpCapabilityType) s;
|
port.HdcpCapability = (eHdcpCapabilityType)s;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DmTxControllerFactory : EssentialsDeviceFactory<DmTxControllerBase>
|
public class DmTxControllerFactory : EssentialsDeviceFactory<DmTxControllerBase>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -105,9 +105,9 @@
|
|||||||
<Compile Include="Chassis\HdMdNxM4kEBridgeableController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEBridgeableController.cs" />
|
||||||
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||||
|
<Compile Include="Endpoints\EndpointInterfaces.cs" />
|
||||||
<Compile Include="Endpoints\DGEs\DgeJoinMap.cs" />
|
<Compile Include="Endpoints\DGEs\DgeJoinMap.cs" />
|
||||||
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
||||||
<Compile Include="Endpoints\EndpointInterfaces.cs" />
|
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
||||||
<Compile Include="Endpoints\Transmitters\DmTx4kz202CController.cs" />
|
<Compile Include="Endpoints\Transmitters\DmTx4kz202CController.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user