Merge branch 'development' into release/v1.5.0

This commit is contained in:
Andrew Welker
2020-05-06 12:11:18 -06:00
committed by GitHub
12 changed files with 890 additions and 671 deletions

View File

@@ -38,8 +38,12 @@ namespace PepperDash.Essentials.Bridges
/// Reports the EDID serial number value /// Reports the EDID serial number value
/// </summary> /// </summary>
public uint EdidSerialNumber { get; set; } public uint EdidSerialNumber { get; set; }
#endregion #endregion
#region Analogs
public uint AudioVideoSource { get; set; }
#endregion
public DmRmcControllerJoinMap() public DmRmcControllerJoinMap()
{ {
// Digital // Digital
@@ -51,6 +55,9 @@ namespace PepperDash.Essentials.Bridges
EdidName = 3; EdidName = 3;
EdidPrefferedTiming = 4; EdidPrefferedTiming = 4;
EdidSerialNumber = 5; EdidSerialNumber = 5;
//Analog
AudioVideoSource = 1;
} }
public override void OffsetJoinNumbers(uint joinStart) public override void OffsetJoinNumbers(uint joinStart)
@@ -62,7 +69,8 @@ namespace PepperDash.Essentials.Bridges
EdidManufacturer = EdidManufacturer + joinOffset; EdidManufacturer = EdidManufacturer + joinOffset;
EdidName = EdidName + joinOffset; EdidName = EdidName + joinOffset;
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset; EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
EdidSerialNumber = EdidSerialNumber + joinOffset; EdidSerialNumber = EdidSerialNumber + joinOffset;
AudioVideoSource = AudioVideoSource + joinOffset;
} }
} }
} }

View File

@@ -1,117 +1,77 @@
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 PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class DisplayControllerJoinMap : JoinMapBase public class DisplayControllerJoinMap : JoinMapBaseAdvanced
{ {
#region Digitals [JoinName("Name")]
/// <summary> public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
/// Turns the display off and reports power off feedback new JoinMetadata() { Label = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// </summary>
public uint PowerOff { get; set; } [JoinName("PowerOff")]
/// <summary> public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
/// Turns the display on and repots power on feedback new JoinMetadata() { Label = "Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// </summary>
public uint PowerOn { get; set; } [JoinName("PowerOn")]
/// <summary> public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
/// Indicates that the display device supports two way communication when high new JoinMetadata() { Label = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// </summary>
public uint IsTwoWayDisplay { get; set; } [JoinName("IsTwoWayDisplay")]
/// <summary> public JoinDataComplete IsTwoWayDisplay = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
/// Increments the volume while high new JoinMetadata() { Label = "Is Two Way Display", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// </summary>
public uint VolumeUp { get; set; } [JoinName("VolumeUp")]
/// <summary> public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
/// Decrements teh volume while high new JoinMetadata() { Label = "Volume Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// </summary>
public uint VolumeDown { get; set; } [JoinName("VolumeLevel")]
/// <summary> public JoinDataComplete VolumeLevel = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
/// Toggles the mute state. Feedback is high when volume is muted new JoinMetadata() { Label = "Volume Level", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// </summary>
public uint VolumeMute { get; set; } [JoinName("VolumeDown")]
/// <summary> public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
/// Range of digital joins to select inputs and report current input as feedback new JoinMetadata() { Label = "Volume Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// </summary>
public uint InputSelectOffset { get; set; } [JoinName("VolumeMute")]
/// <summary> public JoinDataComplete VolumeMute = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
/// Range of digital joins to report visibility for input buttons new JoinMetadata() { Label = "Volume Mute", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// </summary>
public uint ButtonVisibilityOffset { get; set; } [JoinName("VolumeMuteOn")]
/// <summary> public JoinDataComplete VolumeMuteOn = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
/// High if the device is online new JoinMetadata() { Label = "Volume Mute On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// </summary>
public uint IsOnline { get; set; } [JoinName("VolumeMuteOff")]
#endregion public JoinDataComplete VolumeMuteOff = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 },
new JoinMetadata() { Label = "Volume Mute Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
#region Analogs
/// <summary> [JoinName("InputSelectOffset")]
/// Analog join to set the input and report current input as feedback public JoinDataComplete InputSelectOffset = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 10 },
/// </summary> new JoinMetadata() { Label = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
public uint InputSelect { get; set; }
/// <summary> [JoinName("InputNamesOffset")]
/// Sets the volume level and reports the current level as feedback public JoinDataComplete InputNamesOffset = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 10 },
/// </summary> new JoinMetadata() { Label = "Input Names Offset", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
public uint VolumeLevel { get; set; }
#endregion [JoinName("InputSelect")]
public JoinDataComplete InputSelect = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
#region Serials new JoinMetadata() { Label = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Reports the name of the display as defined in config as feedback [JoinName("ButtonVisibilityOffset")]
/// </summary> public JoinDataComplete ButtonVisibilityOffset = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 10 },
public uint Name { get; set; } new JoinMetadata() { Label = "Button Visibility Offset", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial });
/// <summary>
/// Range of serial joins that reports the names of the inputs as feedback [JoinName("IsOnline")]
/// </summary> public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 },
public uint InputNamesOffset { get; set; } new JoinMetadata() { Label = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
#endregion
public DisplayControllerJoinMap(uint joinStart)
public DisplayControllerJoinMap() : base(joinStart, typeof(CameraControllerJoinMap))
{ {
// Digital }
IsOnline = 50; }
PowerOff = 1;
PowerOn = 2;
IsTwoWayDisplay = 3;
VolumeUp = 5;
VolumeDown = 6;
VolumeMute = 7;
ButtonVisibilityOffset = 40;
InputSelectOffset = 10;
// Analog
InputSelect = 11;
VolumeLevel = 5;
// Serial
Name = 1;
InputNamesOffset = 10;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
PowerOff = PowerOff + joinOffset;
PowerOn = PowerOn + joinOffset;
IsTwoWayDisplay = IsTwoWayDisplay + joinOffset;
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
Name = Name + joinOffset;
InputNamesOffset = InputNamesOffset + joinOffset;
InputSelectOffset = InputSelectOffset + joinOffset;
InputSelect = InputSelect + joinOffset;
VolumeUp = VolumeUp + joinOffset;
VolumeDown = VolumeDown + joinOffset;
VolumeMute = VolumeMute + joinOffset;
VolumeLevel = VolumeLevel + joinOffset;
}
}
} }

View File

@@ -37,31 +37,39 @@ namespace PepperDash.Essentials.Core.Bridges
/// Reports the EDID serial number value /// Reports the EDID serial number value
/// </summary> /// </summary>
public uint EdidSerialNumber { get; set; } public uint EdidSerialNumber { get; set; }
#endregion #endregion
public DmRmcControllerJoinMap() #region Analogs
{ public uint AudioVideoSource { get; set; }
// Digital #endregion
IsOnline = 1;
public DmRmcControllerJoinMap()
// Serial {
CurrentOutputResolution = 1; // Digital
EdidManufacturer = 2; IsOnline = 1;
EdidName = 3;
EdidPrefferedTiming = 4; // Serial
EdidSerialNumber = 5; CurrentOutputResolution = 1;
} EdidManufacturer = 2;
EdidName = 3;
public override void OffsetJoinNumbers(uint joinStart) EdidPrefferedTiming = 4;
{ EdidSerialNumber = 5;
var joinOffset = joinStart - 1;
//Analog
IsOnline = IsOnline + joinOffset; AudioVideoSource = 1;
CurrentOutputResolution = CurrentOutputResolution + joinOffset; }
EdidManufacturer = EdidManufacturer + joinOffset;
EdidName = EdidName + joinOffset; public override void OffsetJoinNumbers(uint joinStart)
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset; {
EdidSerialNumber = EdidSerialNumber + joinOffset; var joinOffset = joinStart - 1;
}
IsOnline = IsOnline + joinOffset;
CurrentOutputResolution = CurrentOutputResolution + joinOffset;
EdidManufacturer = EdidManufacturer + joinOffset;
EdidName = EdidName + joinOffset;
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
EdidSerialNumber = EdidSerialNumber + joinOffset;
AudioVideoSource = AudioVideoSource + joinOffset;
}
} }
} }

View File

@@ -1,67 +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 PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class IBasicCommunicationJoinMap : JoinMapBase public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced
{ {
#region Digitals [JoinName("TextReceived")]
/// <summary> public JoinDataComplete TextReceived = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
/// Set High to connect, Low to disconnect new JoinMetadata() { Label = "Text Received From Remote Device", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// </summary>
public uint Connect { get; set; } [JoinName("SendText")]
/// <summary> public JoinDataComplete SendText = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
/// Reports Connected State (High = Connected) new JoinMetadata() { Label = "Text Sent To Remote Device", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
/// </summary>
public uint Connected { get; set; } [JoinName("SetPortConfig")]
#endregion public JoinDataComplete SetPortConfig = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata() { Label = "Set Port Config", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
#region Analogs
/// <summary> [JoinName("Connect")]
/// Reports the connections status value public JoinDataComplete Connect = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
/// </summary> new JoinMetadata() { Label = "Connect", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public uint Status { get; set; }
#endregion [JoinName("Connected")]
public JoinDataComplete Connected = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
#region Serials new JoinMetadata() { Label = "Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Data back from port [JoinName("Status")]
/// </summary> public JoinDataComplete Status = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
public uint TextReceived { get; set; } new JoinMetadata() { Label = "Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Sends data to the port
/// </summary> public IBasicCommunicationJoinMap(uint joinStart)
public uint SendText { get; set; } : base(joinStart, typeof(IBasicCommunicationJoinMap))
/// <summary> {
/// Takes a JSON serialized string that sets a COM port's parameters }
/// </summary> }
public uint SetPortConfig { get; set; }
#endregion
public IBasicCommunicationJoinMap()
{
TextReceived = 1;
SendText = 1;
SetPortConfig = 2;
Connect = 1;
Connected = 1;
Status = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
TextReceived = TextReceived + joinOffset;
SendText = SendText + joinOffset;
SetPortConfig = SetPortConfig + joinOffset;
Connect = Connect + joinOffset;
Connected = Connected + joinOffset;
Status = Status + joinOffset;
}
}
} }

View File

@@ -1,125 +1,124 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Crestron.SimplSharp.CrestronSockets; using Crestron.SimplSharp.CrestronSockets;
using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DeviceSupport;
using Newtonsoft.Json; using Newtonsoft.Json;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.Devices;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core namespace PepperDash.Essentials.Core
{ {
/// <summary> /// <summary>
/// Serves as a generic wrapper class for all styles of IBasicCommuncation ports /// Serves as a generic wrapper class for all styles of IBasicCommuncation ports
/// </summary> /// </summary>
[Description("Generic communication wrapper class for any IBasicCommunication type")] [Description("Generic communication wrapper class for any IBasicCommunication type")]
public class GenericComm : ReconfigurableBridgableDevice public class GenericComm : ReconfigurableBridgableDevice
{ {
EssentialsControlPropertiesConfig PropertiesConfig; EssentialsControlPropertiesConfig PropertiesConfig;
public IBasicCommunication CommPort { get; private set; } public IBasicCommunication CommPort { get; private set; }
public GenericComm(DeviceConfig config) public GenericComm(DeviceConfig config)
: base(config) : base(config)
{ {
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config); PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
CommPort = CommFactory.CreateCommForDevice(config); CommPort = CommFactory.CreateCommForDevice(config);
} }
public static IKeyed BuildDevice(DeviceConfig dc) public static IKeyed BuildDevice(DeviceConfig dc)
{ {
Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
return new GenericComm(dc); return new GenericComm(dc);
} }
public void SetPortConfig(string portConfig) public void SetPortConfig(string portConfig)
{ {
// TODO: Deserialize new EssentialsControlPropertiesConfig and handle as necessary // TODO: Deserialize new EssentialsControlPropertiesConfig and handle as necessary
try try
{ {
PropertiesConfig = JsonConvert.DeserializeObject<EssentialsControlPropertiesConfig> PropertiesConfig = JsonConvert.DeserializeObject<EssentialsControlPropertiesConfig>
(portConfig); (portConfig);
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Console(2, this, "Error deserializing port config: {0}", e); Debug.Console(2, this, "Error deserializing port config: {0}", e);
} }
} }
protected override void CustomSetConfig(DeviceConfig config) protected override void CustomSetConfig(DeviceConfig config)
{ {
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config); PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
ConfigWriter.UpdateDeviceConfig(config); ConfigWriter.UpdateDeviceConfig(config);
} }
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 = new IBasicCommunicationJoinMap(); var joinMap = new IBasicCommunicationJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized)) if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<IBasicCommunicationJoinMap>(joinMapSerialized); joinMap = JsonConvert.DeserializeObject<IBasicCommunicationJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
if (CommPort == null)
if (CommPort == null) {
{ Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key);
Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key); return;
return; }
}
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
// this is a permanent event handler. This cannot be -= from event
// this is a permanent event handler. This cannot be -= from event CommPort.TextReceived += (s, a) =>
CommPort.TextReceived += (s, a) => {
{ Debug.Console(2, this, "RX: {0}", a.Text);
Debug.Console(2, this, "RX: {0}", a.Text); trilist.SetString(joinMap.TextReceived.JoinNumber, a.Text);
trilist.SetString(joinMap.TextReceived, a.Text); };
}; trilist.SetStringSigAction(joinMap.SendText.JoinNumber, s => CommPort.SendText(s));
trilist.SetStringSigAction(joinMap.SendText, s => CommPort.SendText(s)); trilist.SetStringSigAction(joinMap.SetPortConfig.JoinNumber, SetPortConfig);
trilist.SetStringSigAction(joinMap.SetPortConfig, SetPortConfig);
var sComm = this as ISocketStatus;
var sComm = this as ISocketStatus; if (sComm == null) return;
if (sComm == null) return; sComm.ConnectionChange += (s, a) =>
sComm.ConnectionChange += (s, a) => {
{ trilist.SetUshort(joinMap.Status.JoinNumber, (ushort)(a.Client.ClientStatus));
trilist.SetUshort(joinMap.Status, (ushort)(a.Client.ClientStatus)); trilist.SetBool(joinMap.Connected.JoinNumber, a.Client.ClientStatus ==
trilist.SetBool(joinMap.Connected, a.Client.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED);
SocketStatus.SOCKET_STATUS_CONNECTED); };
};
trilist.SetBoolSigAction(joinMap.Connect.JoinNumber, b =>
trilist.SetBoolSigAction(joinMap.Connect, b => {
{ if (b)
if (b) {
{ sComm.Connect();
sComm.Connect(); }
} else
else {
{ sComm.Disconnect();
sComm.Disconnect(); }
} });
}); }
} }
}
public class GenericCommFactory : EssentialsDeviceFactory<GenericComm>
public class GenericCommFactory : EssentialsDeviceFactory<GenericComm> {
{ public GenericCommFactory()
public GenericCommFactory() {
{ TypeNames = new List<string>() { "genericComm" };
TypeNames = new List<string>() { "genericComm" }; }
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
public override EssentialsDevice BuildDevice(DeviceConfig dc) {
{ Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); return new GenericComm(dc);
return new GenericComm(dc); }
} }
}
} }

View File

@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.Core
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public abstract class DisplayBase : EssentialsDevice, IHasFeedback, IRoutingSinkWithSwitching, IPower, IWarmingCooling, IUsageTracking public abstract class DisplayBase : EssentialsBridgeableDevice, IHasFeedback, IRoutingSinkWithSwitching, IPower, IWarmingCooling, IUsageTracking
{ {
public event SourceInfoChangeHandler CurrentSourceChange; public event SourceInfoChangeHandler CurrentSourceChange;
@@ -121,24 +121,22 @@ namespace PepperDash.Essentials.Core
var inputNumber = 0; var inputNumber = 0;
var inputKeys = new List<string>(); var inputKeys = new List<string>();
var joinMap = new DisplayControllerJoinMap(); var joinMap = new DisplayControllerJoinMap(joinStart);
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized)) if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DisplayControllerJoinMap>(joinMapSerialized); joinMap = JsonConvert.DeserializeObject<DisplayControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name); Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
trilist.StringInput[joinMap.Name].StringValue = displayDevice.Name; trilist.StringInput[joinMap.Name.JoinNumber].StringValue = displayDevice.Name;
var commMonitor = displayDevice as ICommunicationMonitor; var commMonitor = displayDevice as ICommunicationMonitor;
if (commMonitor != null) if (commMonitor != null)
{ {
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
} }
var inputNumberFeedback = new IntFeedback(() => inputNumber); var inputNumberFeedback = new IntFeedback(() => inputNumber);
@@ -148,16 +146,16 @@ namespace PepperDash.Essentials.Core
if (twoWayDisplay != null) if (twoWayDisplay != null)
{ {
trilist.SetBool(joinMap.IsTwoWayDisplay, true); trilist.SetBool(joinMap.IsTwoWayDisplay.JoinNumber, true);
twoWayDisplay.CurrentInputFeedback.OutputChange += (o, a) => Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", a.StringValue); twoWayDisplay.CurrentInputFeedback.OutputChange += (o, a) => Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", a.StringValue);
inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect]); inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect.JoinNumber]);
} }
// Power Off // Power Off
trilist.SetSigTrueAction(joinMap.PowerOff, () => trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () =>
{ {
inputNumber = 102; inputNumber = 102;
inputNumberFeedback.FireUpdate(); inputNumberFeedback.FireUpdate();
@@ -179,10 +177,10 @@ namespace PepperDash.Essentials.Core
} }
}; };
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]); displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
// PowerOn // PowerOn
trilist.SetSigTrueAction(joinMap.PowerOn, () => trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () =>
{ {
inputNumber = 0; inputNumber = 0;
inputNumberFeedback.FireUpdate(); inputNumberFeedback.FireUpdate();
@@ -190,21 +188,27 @@ namespace PepperDash.Essentials.Core
}); });
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]); displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
var count = 1; for (int i = 0; i < displayDevice.InputPorts.Count; i++)
foreach (var input in displayDevice.InputPorts)
{ {
inputKeys.Add(input.Key); if (i < joinMap.InputNamesOffset.JoinSpan)
var tempKey = inputKeys.ElementAt(count - 1); {
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset + count), () => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector)); inputKeys.Add(displayDevice.InputPorts[i].Key);
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString()); var tempKey = inputKeys.ElementAt(i);
trilist.StringInput[(ushort)(joinMap.InputNamesOffset + count)].StringValue = input.Key.ToString(); trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + i),
count++; () => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector));
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}",
joinMap.InputSelectOffset.JoinNumber + i, displayDevice.InputPorts[tempKey].Key.ToString());
trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + i)].StringValue = displayDevice.InputPorts[i].Key.ToString();
}
else
Debug.Console(0, displayDevice, Debug.ErrorLogLevel.Warning, "Device has {0} inputs. The Join Map allows up to {1} inputs. Discarding inputs {2} - {3} from bridge.",
displayDevice.InputPorts.Count, joinMap.InputNamesOffset.JoinSpan, i + 1, displayDevice.InputPorts.Count);
} }
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect); Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
trilist.SetUShortSigAction(joinMap.InputSelect, (a) => trilist.SetUShortSigAction(joinMap.InputSelect.JoinNumber, (a) =>
{ {
if (a == 0) if (a == 0)
{ {
@@ -229,17 +233,22 @@ namespace PepperDash.Essentials.Core
var volumeDisplay = displayDevice as IBasicVolumeControls; var volumeDisplay = displayDevice as IBasicVolumeControls;
if (volumeDisplay == null) return; if (volumeDisplay == null) return;
trilist.SetBoolSigAction(joinMap.VolumeUp, volumeDisplay.VolumeUp); trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, volumeDisplay.VolumeUp);
trilist.SetBoolSigAction(joinMap.VolumeDown, volumeDisplay.VolumeDown); trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, volumeDisplay.VolumeDown);
trilist.SetSigTrueAction(joinMap.VolumeMute, volumeDisplay.MuteToggle); trilist.SetSigTrueAction(joinMap.VolumeMute.JoinNumber, volumeDisplay.MuteToggle);
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback; var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
if (volumeDisplayWithFeedback == null) return; if (volumeDisplayWithFeedback == null) return;
trilist.SetSigTrueAction(joinMap.VolumeMuteOn.JoinNumber, volumeDisplayWithFeedback.MuteOn);
trilist.SetSigTrueAction(joinMap.VolumeMuteOff.JoinNumber, volumeDisplayWithFeedback.MuteOff);
trilist.SetUShortSigAction(joinMap.VolumeLevel, volumeDisplayWithFeedback.SetVolume);
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel]); trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, volumeDisplayWithFeedback.SetVolume);
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]); volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]);
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute.JoinNumber]);
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]);
volumeDisplayWithFeedback.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]);
} }
} }

View File

@@ -89,6 +89,15 @@ namespace PepperDash.Essentials.Core
IntFeedback VideoSourceNumericFeedback { get; } IntFeedback VideoSourceNumericFeedback { get; }
IntFeedback AudioSourceNumericFeedback { get; } IntFeedback AudioSourceNumericFeedback { get; }
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type); void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
}
/// <summary>
/// Defines a receiver that has internal routing (DM-RMC-4K-Z-SCALER-C)
/// </summary>
public interface IRmcRouting : IRouting
{
IntFeedback AudioVideoSourceNumericFeedback { get; }
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
} }
/// <summary> /// <summary>

View File

@@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints;
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.DM
{
public class DmRmc4kZ100CController : DmRmcX100CController
{
private readonly DmRmc4kz100C _rmc;
public DmRmc4kZ100CController(string key, string name, DmRmc4kz100C rmc)
: base(key, name, rmc)
{
_rmc = rmc;
/* removed this logic because it's done in the base constructor and doesn't need to be duplicated here
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this) {Port = _rmc};
*/
// Set Ports for CEC
//TODO: We need to look at this class inheritance design...not so sure these properties need to be virtual and/or abstract.
EdidManufacturerFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
EdidNameFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
EdidPreferredTimingFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
EdidSerialNumberFeedback = new StringFeedback(() => _rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
_rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
_rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
}
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
{
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
{
VideoOutputResolutionFeedback.FireUpdate();
}
}
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
{
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
{
EdidManufacturerFeedback.FireUpdate();
}
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
{
EdidNameFeedback.FireUpdate();
}
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
{
EdidPreferredTimingFeedback.FireUpdate();
}
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
{
EdidSerialNumberFeedback.FireUpdate();
}
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
}
}
}

View File

@@ -0,0 +1,151 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints;
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Core;
namespace PepperDash.Essentials.DM
{
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRouting,
IIROutputPorts, IComPorts, ICec
{
public DmRmc4kzScalerC Rmc { get; private set; }
public RoutingInputPort DmIn { get; private set; }
public RoutingInputPort HdmiIn { get; private set; }
public RoutingOutputPort HdmiOut { get; private set; }
/// <summary>
/// The value of the current video source for the HDMI output on the receiver
/// </summary>
public IntFeedback AudioVideoSourceNumericFeedback { get; private set; }
public RoutingPortCollection<RoutingInputPort> InputPorts
{
get { return new RoutingPortCollection<RoutingInputPort> { DmIn, HdmiIn }; }
}
public RoutingPortCollection<RoutingOutputPort> OutputPorts
{
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
}
public DmRmc4kZScalerCController(string key, string name, DmRmc4kzScalerC rmc)
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiIn = new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);
EdidNameFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Name.StringValue);
EdidPreferredTimingFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.PreferredTiming.StringValue);
EdidSerialNumberFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.SerialNumber.StringValue);
VideoOutputResolutionFeedback = new StringFeedback(() => Rmc.HdmiOutput.GetVideoResolutionString());
Rmc.HdmiOutput.OutputStreamChange += HdmiOutput_OutputStreamChange;
Rmc.HdmiOutput.ConnectedDevice.DeviceInformationChange += ConnectedDevice_DeviceInformationChange;
// Set Ports for CEC
HdmiOut.Port = Rmc.HdmiOutput;
AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(Rmc.SelectedSourceFeedback));
}
void HdmiOutput_OutputStreamChange(EndpointOutputStream outputStream, EndpointOutputStreamEventArgs args)
{
if (args.EventId == EndpointOutputStreamEventIds.HorizontalResolutionFeedbackEventId || args.EventId == EndpointOutputStreamEventIds.VerticalResolutionFeedbackEventId ||
args.EventId == EndpointOutputStreamEventIds.FramesPerSecondFeedbackEventId)
{
VideoOutputResolutionFeedback.FireUpdate();
}
if (args.EventId == EndpointOutputStreamEventIds.SelectedSourceFeedbackEventId)
{
AudioVideoSourceNumericFeedback.FireUpdate();
}
}
void ConnectedDevice_DeviceInformationChange(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
{
if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
{
EdidManufacturerFeedback.FireUpdate();
}
else if (args.EventId == ConnectedDeviceEventIds.NameEventId)
{
EdidNameFeedback.FireUpdate();
}
else if (args.EventId == ConnectedDeviceEventIds.PreferredTimingEventId)
{
EdidPreferredTimingFeedback.FireUpdate();
}
else if (args.EventId == ConnectedDeviceEventIds.SerialNumberEventId)
{
EdidSerialNumberFeedback.FireUpdate();
}
}
public override bool CustomActivate()
{
// Base does register and sets up comm monitoring.
return base.CustomActivate();
}
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
LinkDmRmcToApi(this, trilist, joinStart, joinMapKey, bridge);
}
#region IIROutputPorts Members
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
#endregion
#region IComPorts Members
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
#endregion
#region ICec Members
/// <summary>
/// Gets the CEC stream directly from the HDMI port.
/// </summary>
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
#endregion
#region IRmcRouting Members
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
{
Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector);
var number = Convert.ToUInt16(inputSelector);
Rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)number;
}
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
{
Debug.Console(2, this, "Attempting a route from input {0} to HDMI Output", inputSelector);
Rmc.AudioVideoSource = (DmRmc4kzScalerC.eAudioVideoSource)inputSelector;
}
#endregion
}
}

View File

@@ -1,307 +1,326 @@
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.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 Newtonsoft.Json; using Newtonsoft.Json;
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;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
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 public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice
{ {
public virtual StringFeedback VideoOutputResolutionFeedback { get; protected set; } public virtual StringFeedback VideoOutputResolutionFeedback { get; protected set; }
public virtual StringFeedback EdidManufacturerFeedback { get; protected set; } public virtual StringFeedback EdidManufacturerFeedback { get; protected set; }
public virtual StringFeedback EdidNameFeedback { get; protected set; } public virtual StringFeedback EdidNameFeedback { get; protected set; }
public virtual StringFeedback EdidPreferredTimingFeedback { get; protected set; } public virtual StringFeedback EdidPreferredTimingFeedback { get; protected set; }
public virtual StringFeedback EdidSerialNumberFeedback { get; protected set; } public virtual StringFeedback EdidSerialNumberFeedback { get; protected set; }
public DmRmcControllerBase(string key, string name, EndpointReceiverBase device) protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
: base(key, name, device) : base(key, name, device)
{ {
// if wired to a chassis, skip registration step in base class // if wired to a chassis, skip registration step in base class
if (device.DMOutput != null) if (device.DMOutput != null)
{ {
this.PreventRegistration = true; this.PreventRegistration = true;
} }
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback); AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
} }
protected void LinkDmRmcToApi(DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) protected void LinkDmRmcToApi(DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{ {
var joinMap = new DmRmcControllerJoinMap(); var joinMap = new DmRmcControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized)) if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmRmcControllerJoinMap>(joinMapSerialized); joinMap = JsonConvert.DeserializeObject<DmRmcControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart); joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); Debug.Console(1, rmc, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); rmc.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
if (rmc.VideoOutputResolutionFeedback != null) if (rmc.VideoOutputResolutionFeedback != null)
rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution]); rmc.VideoOutputResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentOutputResolution]);
if (rmc.EdidManufacturerFeedback != null) if (rmc.EdidManufacturerFeedback != null)
rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer]); rmc.EdidManufacturerFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidManufacturer]);
if (rmc.EdidNameFeedback != null) if (rmc.EdidNameFeedback != null)
rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName]); rmc.EdidNameFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidName]);
if (rmc.EdidPreferredTimingFeedback != null) if (rmc.EdidPreferredTimingFeedback != null)
rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming]); rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming]);
if (rmc.EdidSerialNumberFeedback != null) if (rmc.EdidSerialNumberFeedback != null)
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]); rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]);
}
} //If the device is an DM-RMC-4K-Z-SCALER-C
var routing = rmc as IRmcRouting;
public abstract class DmHdBaseTControllerBase : CrestronGenericBaseDevice
{ if (routing != null)
public HDBaseTBase Rmc { get; protected set; } {
if (routing.AudioVideoSourceNumericFeedback != null)
/// <summary> routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource]);
/// Make a Crestron RMC and put it in here
/// </summary> trilist.SetUShortSigAction(joinMap.AudioVideoSource, (a) => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
public DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc) }
: base(key, name, rmc) }
{ }
} public abstract class DmHdBaseTControllerBase : CrestronGenericBaseDevice
} {
public HDBaseTBase Rmc { get; protected set; }
public class DmRmcHelper
{ /// <summary>
/// <summary> /// Make a Crestron RMC and put it in here
/// A factory method for various DmTxControllers /// </summary>
/// </summary> public DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc)
/// <param name="key"></param> : base(key, name, rmc)
/// <param name="name"></param> {
/// <param name="props"></param>
/// <returns></returns> }
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props) }
{
// switch on type name... later... public class DmRmcHelper
{
typeName = typeName.ToLower(); /// <summary>
uint ipid = props.Control.IpIdInt; // Convert.ToUInt16(props.Id, 16); /// A factory method for various DmTxControllers
/// </summary>
/// <param name="key"></param>
/// <param name="name"></param>
// right here, we need to grab the tie line that associates this /// <param name="props"></param>
// RMC with a chassis or processor. If the RMC input's tie line is not /// <returns></returns>
// connected to a chassis, then it's parent is the processor. public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
// If the RMC is connected to a chassis, then we need to grab the {
// output number from the tie line and use that to plug it in. // switch on type name... later...
// Example of chassis-connected:
//{ typeName = typeName.ToLower();
// "sourceKey": "dmMd8x8-1", uint ipid = props.Control.IpIdInt; // Convert.ToUInt16(props.Id, 16);
// "sourcePort": "anyOut2",
// "destinationKey": "dmRmc100C-2",
// "destinationPort": "DmIn"
//} // right here, we need to grab the tie line that associates this
// RMC with a chassis or processor. If the RMC input's tie line is not
// Tx -> RMC link: // connected to a chassis, then it's parent is the processor.
//{ // If the RMC is connected to a chassis, then we need to grab the
// "sourceKey": "dmTx201C-1", // output number from the tie line and use that to plug it in.
// "sourcePort": "DmOut", // Example of chassis-connected:
// "destinationKey": "dmRmc100C-2", //{
// "destinationPort": "DmIn" // "sourceKey": "dmMd8x8-1",
//} // "sourcePort": "anyOut2",
// "destinationKey": "dmRmc100C-2",
var tlc = TieLineCollection.Default; // "destinationPort": "DmIn"
// grab the tie line that has this key as //}
// THIS DOESN'T WORK BECAUSE THE RMC THAT WE NEED (THIS) HASN'T BEEN MADE
// YET AND THUS WILL NOT HAVE A TIE LINE... // Tx -> RMC link:
var inputTieLine = tlc.FirstOrDefault(t => //{
{ // "sourceKey": "dmTx201C-1",
var d = t.DestinationPort.ParentDevice; // "sourcePort": "DmOut",
return d.Key.Equals(key, StringComparison.OrdinalIgnoreCase) // "destinationKey": "dmRmc100C-2",
&& d is DmChassisController; // "destinationPort": "DmIn"
}); //}
var pKey = props.ParentDeviceKey.ToLower(); var tlc = TieLineCollection.Default;
// grab the tie line that has this key as
// THIS DOESN'T WORK BECAUSE THE RMC THAT WE NEED (THIS) HASN'T BEEN MADE
// YET AND THUS WILL NOT HAVE A TIE LINE...
var inputTieLine = tlc.FirstOrDefault(t =>
// Non-DM-chassis endpoints {
if (pKey == "processor") var d = t.DestinationPort.ParentDevice;
{ return d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)
// Catch constructor failures, mainly dues to IPID && d is DmChassisController;
try });
{
if (typeName.StartsWith("dmrmc100c")) var pKey = props.ParentDeviceKey.ToLower();
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmc100s"))
return new DmRmc100SController(key, name, new DmRmc100S(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmc4k100c"))
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, Global.ControlSystem)); // Non-DM-chassis endpoints
if (typeName.StartsWith("dmrmc4kz100c")) if (pKey == "processor")
return new DmRmcX100CController(key, name, new DmRmc4kz100C(ipid, Global.ControlSystem)); {
if (typeName.StartsWith("dmrmc150s")) // Catch constructor failures, mainly dues to IPID
return new DmRmc150SController(key, name, new DmRmc150S(ipid, Global.ControlSystem)); try
if (typeName.StartsWith("dmrmc200c")) {
return new DmRmc200CController(key, name, new DmRmc200C(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc100c"))
if (typeName.StartsWith("dmrmc200s")) return new DmRmcX100CController(key, name, new DmRmc100C(ipid, Global.ControlSystem));
return new DmRmc200SController(key, name, new DmRmc200S(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc100s"))
if (typeName.StartsWith("dmrmc200s2")) return new DmRmc100SController(key, name, new DmRmc100S(ipid, Global.ControlSystem));
return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc4k100c"))
if (typeName.StartsWith("dmrmcscalerc")) return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, Global.ControlSystem));
return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc4kz100c"))
if (typeName.StartsWith("dmrmcscalers")) return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(ipid, Global.ControlSystem));
return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc150s"))
if (typeName.StartsWith("dmrmcscalers2")) return new DmRmc150SController(key, name, new DmRmc150S(ipid, Global.ControlSystem));
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc200c"))
if (typeName.StartsWith("dmrmc4kscalerc")) return new DmRmc200CController(key, name, new DmRmc200C(ipid, Global.ControlSystem));
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc200s"))
if (typeName.StartsWith("dmrmc4kscalercdsp")) return new DmRmc200SController(key, name, new DmRmc200S(ipid, Global.ControlSystem));
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc200s2"))
} return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, Global.ControlSystem));
catch (Exception e) if (typeName.StartsWith("dmrmcscalerc"))
{ return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, Global.ControlSystem));
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message); if (typeName.StartsWith("dmrmcscalers"))
} return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmcscalers2"))
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, Global.ControlSystem));
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName); if (typeName.StartsWith("dmrmc4kscalerc"))
} return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, Global.ControlSystem));
// Endpoints attached to DM Chassis if (typeName.StartsWith("dmrmc4kscalercdsp"))
else return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, Global.ControlSystem));
{ if (typeName.StartsWith("dmrmc4kzscalerc"))
var parentDev = DeviceManager.GetDeviceForKey(pKey); return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(ipid, Global.ControlSystem));
if (!(parentDev is IDmSwitch)) }
{ catch (Exception e)
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.", {
key, pKey); Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
return null; }
}
var chassis = (parentDev as IDmSwitch).Chassis; Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
var num = props.ParentOutputNumber; }
if (num <= 0 || num > chassis.NumberOfOutputs) // Endpoints attached to DM Chassis
{ else
Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range", {
key, num); var parentDev = DeviceManager.GetDeviceForKey(pKey);
return null; if (!(parentDev is IDmSwitch))
} {
else Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
{ key, pKey);
var controller = (parentDev as IDmSwitch); return null;
controller.RxDictionary.Add(num, key); }
}
// Catch constructor failures, mainly dues to IPID var chassis = (parentDev as IDmSwitch).Chassis;
try var num = props.ParentOutputNumber;
{ if (num <= 0 || num > chassis.NumberOfOutputs)
{
// Must use different constructor for CPU3 chassis types. No IPID Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range",
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 || key, num);
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps || return null;
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps || }
chassis is DmMd128x128 || chassis is DmMd64x64) else
{ {
if (typeName.StartsWith("hdbasetrx")) var controller = (parentDev as IDmSwitch);
return new HDBaseTRxController(key, name, new HDRx3CB(chassis.Outputs[num])); controller.RxDictionary.Add(num, key);
if (typeName.StartsWith("dmrmc4k100c1g")) }
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(chassis.Outputs[num])); // Catch constructor failures, mainly dues to IPID
if (typeName.StartsWith("dmrmc100c")) try
return new DmRmcX100CController(key, name, new DmRmc100C(chassis.Outputs[num])); {
if (typeName.StartsWith("dmrmc100s"))
return new DmRmc100SController(key, name, new DmRmc100S(chassis.Outputs[num])); // Must use different constructor for CPU3 chassis types. No IPID
if (typeName.StartsWith("dmrmc4k100c")) if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
return new DmRmcX100CController(key, name, new DmRmc4k100C(chassis.Outputs[num])); chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
if (typeName.StartsWith("dmrmc4kz100c")) chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
return new DmRmcX100CController(key, name, new DmRmc4kz100C(chassis.Outputs[num])); chassis is DmMd128x128 || chassis is DmMd64x64)
if (typeName.StartsWith("dmrmc150s")) {
return new DmRmc150SController(key, name, new DmRmc150S(chassis.Outputs[num])); if (typeName.StartsWith("hdbasetrx"))
if (typeName.StartsWith("dmrmc200c")) return new HDBaseTRxController(key, name, new HDRx3CB(chassis.Outputs[num]));
return new DmRmc200CController(key, name, new DmRmc200C(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4k100c1g"))
if (typeName.StartsWith("dmrmc200s")) return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(chassis.Outputs[num]));
return new DmRmc200SController(key, name, new DmRmc200S(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc100c"))
if (typeName.StartsWith("dmrmc200s2")) return new DmRmcX100CController(key, name, new DmRmc100C(chassis.Outputs[num]));
return new DmRmc200S2Controller(key, name, new DmRmc200S2(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc100s"))
if (typeName.StartsWith("dmrmcscalerc")) return new DmRmc100SController(key, name, new DmRmc100S(chassis.Outputs[num]));
return new DmRmcScalerCController(key, name, new DmRmcScalerC(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4k100c"))
if (typeName.StartsWith("dmrmcscalers")) return new DmRmcX100CController(key, name, new DmRmc4k100C(chassis.Outputs[num]));
return new DmRmcScalerSController(key, name, new DmRmcScalerS(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4kz100c"))
if (typeName.StartsWith("dmrmcscalers2")) return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(chassis.Outputs[num]));
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc150s"))
if (typeName.StartsWith("dmrmc4kscalerc")) return new DmRmc150SController(key, name, new DmRmc150S(chassis.Outputs[num]));
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200c"))
if (typeName.StartsWith("dmrmc4kscalercdsp")) return new DmRmc200CController(key, name, new DmRmc200C(chassis.Outputs[num]));
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200s"))
} return new DmRmc200SController(key, name, new DmRmc200S(chassis.Outputs[num]));
else if (typeName.StartsWith("dmrmc200s2"))
{ return new DmRmc200S2Controller(key, name, new DmRmc200S2(chassis.Outputs[num]));
if (typeName.StartsWith("hdbasetrx")) if (typeName.StartsWith("dmrmcscalerc"))
return new HDBaseTRxController(key, name, new HDRx3CB(ipid, chassis.Outputs[num])); return new DmRmcScalerCController(key, name, new DmRmcScalerC(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4k100c1g")) if (typeName.StartsWith("dmrmcscalers"))
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(ipid, chassis.Outputs[num])); return new DmRmcScalerSController(key, name, new DmRmcScalerS(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc100c")) if (typeName.StartsWith("dmrmcscalers2"))
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, chassis.Outputs[num])); return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc100s")) if (typeName.StartsWith("dmrmc4kscalerc"))
return new DmRmc100SController(key, name, new DmRmc100S(ipid, chassis.Outputs[num])); return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4k100c")) if (typeName.StartsWith("dmrmc4kscalercdsp"))
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, chassis.Outputs[num])); return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kz100c")) if (typeName.StartsWith("dmrmc4kzscalerc"))
return new DmRmcX100CController(key, name, new DmRmc4kz100C(ipid, chassis.Outputs[num])); return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc150s")) }
return new DmRmc150SController(key, name, new DmRmc150S(ipid, chassis.Outputs[num])); else
if (typeName.StartsWith("dmrmc200c")) {
return new DmRmc200CController(key, name, new DmRmc200C(ipid, chassis.Outputs[num])); if (typeName.StartsWith("hdbasetrx"))
if (typeName.StartsWith("dmrmc200s")) return new HDBaseTRxController(key, name, new HDRx3CB(ipid, chassis.Outputs[num]));
return new DmRmc200SController(key, name, new DmRmc200S(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4k100c1g"))
if (typeName.StartsWith("dmrmc200s2")) return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(ipid, chassis.Outputs[num]));
return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc100c"))
if (typeName.StartsWith("dmrmcscalerc")) return new DmRmcX100CController(key, name, new DmRmc100C(ipid, chassis.Outputs[num]));
return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc100s"))
if (typeName.StartsWith("dmrmcscalers")) return new DmRmc100SController(key, name, new DmRmc100S(ipid, chassis.Outputs[num]));
return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4k100c"))
if (typeName.StartsWith("dmrmcscalers2")) return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, chassis.Outputs[num]));
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4kz100c"))
if (typeName.StartsWith("dmrmc4kscalerc")) return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(ipid, chassis.Outputs[num]));
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc150s"))
if (typeName.StartsWith("dmrmc4kscalercdsp")) return new DmRmc150SController(key, name, new DmRmc150S(ipid, chassis.Outputs[num]));
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200c"))
} return new DmRmc200CController(key, name, new DmRmc200C(ipid, chassis.Outputs[num]));
} if (typeName.StartsWith("dmrmc200s"))
catch (Exception e) return new DmRmc200SController(key, name, new DmRmc200S(ipid, chassis.Outputs[num]));
{ if (typeName.StartsWith("dmrmc200s2"))
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message); return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, chassis.Outputs[num]));
} if (typeName.StartsWith("dmrmcscalerc"))
} return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmcscalers"))
return null; return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, chassis.Outputs[num]));
} if (typeName.StartsWith("dmrmcscalers2"))
} return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kscalerc"))
public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase> return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, chassis.Outputs[num]));
{ if (typeName.StartsWith("dmrmc4kscalercdsp"))
public DmRmcControllerFactory() return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, chassis.Outputs[num]));
{ if (typeName.StartsWith("dmrmc4kzscalerc"))
TypeNames = new List<string>() { "hdbasetrx", "dmrmc4k100c1g", "dmrmc100c", "dmrmc100s", "dmrmc4k100c", "dmrmc150s", return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num]));
"dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp" };
} }
}
public override EssentialsDevice BuildDevice(DeviceConfig dc) catch (Exception e)
{ {
var type = dc.Type.ToLower(); Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
}
Debug.Console(1, "Factory Attempting to create new DM-RMC Device"); }
var props = JsonConvert.DeserializeObject return null;
<PepperDash.Essentials.DM.Config.DmRmcPropertiesConfig>(dc.Properties.ToString()); }
return PepperDash.Essentials.DM.DmRmcHelper.GetDmRmcController(dc.Key, dc.Name, type, props); }
} public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
} {
public DmRmcControllerFactory()
{
TypeNames = new List<string>() { "hdbasetrx", "dmrmc4k100c1g", "dmrmc100c", "dmrmc100s", "dmrmc4k100c", "dmrmc150s",
"dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp",
"dmrmc4kz100c", "dmrmckzscalerc" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
var type = dc.Type.ToLower();
Debug.Console(1, "Factory Attempting to create new DM-RMC Device");
var props = JsonConvert.DeserializeObject
<PepperDash.Essentials.DM.Config.DmRmcPropertiesConfig>(dc.Properties.ToString());
return PepperDash.Essentials.DM.DmRmcHelper.GetDmRmcController(dc.Key, dc.Name, type, props);
}
}
} }

View File

@@ -21,10 +21,10 @@ namespace PepperDash.Essentials.DM
public class DmRmcX100CController : DmRmcControllerBase, IRoutingInputsOutputs, public class DmRmcX100CController : DmRmcControllerBase, IRoutingInputsOutputs,
IIROutputPorts, IComPorts, ICec IIROutputPorts, IComPorts, ICec
{ {
public DmRmc100C Rmc { get; private set; } public DmRmc100C Rmc { get; protected set; }
public RoutingInputPort DmIn { get; private set; } public RoutingInputPort DmIn { get; protected set; }
public RoutingOutputPort HdmiOut { get; private set; } public RoutingOutputPort HdmiOut { get; protected set; }
public RoutingPortCollection<RoutingInputPort> InputPorts public RoutingPortCollection<RoutingInputPort> InputPorts
{ {

View File

@@ -100,6 +100,8 @@
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" /> <Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
<Compile Include="Chassis\DmpsRoutingController.cs" /> <Compile Include="Chassis\DmpsRoutingController.cs" />
<Compile Include="Chassis\HdMdNxM4kEController.cs" /> <Compile Include="Chassis\HdMdNxM4kEController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
<Compile Include="Endpoints\Transmitters\TxInterfaces.cs" /> <Compile Include="Endpoints\Transmitters\TxInterfaces.cs" />
<Compile Include="IDmSwitch.cs" /> <Compile Include="IDmSwitch.cs" />
<Compile Include="Config\DmpsRoutingConfig.cs" /> <Compile Include="Config\DmpsRoutingConfig.cs" />