Revert "Merge branch 'development' into release/v1.5.0"

This reverts commit 98c8a42d97, reversing
changes made to dc760caf71.
This commit is contained in:
Andrew Welker
2020-05-06 12:30:13 -06:00
parent 98c8a42d97
commit 4cd01aa428
12 changed files with 671 additions and 890 deletions

View File

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

View File

@@ -1,42 +1,67 @@
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 : JoinMapBaseAdvanced public class IBasicCommunicationJoinMap : JoinMapBase
{ {
[JoinName("TextReceived")] #region Digitals
public JoinDataComplete TextReceived = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, /// <summary>
new JoinMetadata() { Label = "Text Received From Remote Device", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); /// Set High to connect, Low to disconnect
/// </summary>
[JoinName("SendText")] public uint Connect { get; set; }
public JoinDataComplete SendText = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, /// <summary>
new JoinMetadata() { Label = "Text Sent To Remote Device", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial }); /// Reports Connected State (High = Connected)
/// </summary>
[JoinName("SetPortConfig")] public uint Connected { get; set; }
public JoinDataComplete SetPortConfig = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, #endregion
new JoinMetadata() { Label = "Set Port Config", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
#region Analogs
[JoinName("Connect")] /// <summary>
public JoinDataComplete Connect = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, /// Reports the connections status value
new JoinMetadata() { Label = "Connect", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital }); /// </summary>
public uint Status { get; set; }
[JoinName("Connected")] #endregion
public JoinDataComplete Connected = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata() { Label = "Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); #region Serials
/// <summary>
[JoinName("Status")] /// Data back from port
public JoinDataComplete Status = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, /// </summary>
new JoinMetadata() { Label = "Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); public uint TextReceived { get; set; }
/// <summary>
/// Sends data to the port
public IBasicCommunicationJoinMap(uint joinStart) /// </summary>
: base(joinStart, typeof(IBasicCommunicationJoinMap)) public uint SendText { get; set; }
{ /// <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,124 +1,125 @@
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(joinStart); var joinMap = new IBasicCommunicationJoinMap();
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); {
return; Debug.Console(1, this, "Unable to link device '{0}'. CommPort is null", Key);
} 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
CommPort.TextReceived += (s, a) => // this is a permanent event handler. This cannot be -= from event
{ CommPort.TextReceived += (s, a) =>
Debug.Console(2, this, "RX: {0}", a.Text); {
trilist.SetString(joinMap.TextReceived.JoinNumber, a.Text); Debug.Console(2, this, "RX: {0}", a.Text);
}; trilist.SetString(joinMap.TextReceived, a.Text);
trilist.SetStringSigAction(joinMap.SendText.JoinNumber, s => CommPort.SendText(s)); };
trilist.SetStringSigAction(joinMap.SetPortConfig.JoinNumber, SetPortConfig); trilist.SetStringSigAction(joinMap.SendText, s => CommPort.SendText(s));
trilist.SetStringSigAction(joinMap.SetPortConfig, SetPortConfig);
var sComm = this as ISocketStatus;
if (sComm == null) return; var sComm = this as ISocketStatus;
sComm.ConnectionChange += (s, a) => if (sComm == null) return;
{ sComm.ConnectionChange += (s, a) =>
trilist.SetUshort(joinMap.Status.JoinNumber, (ushort)(a.Client.ClientStatus)); {
trilist.SetBool(joinMap.Connected.JoinNumber, a.Client.ClientStatus == trilist.SetUshort(joinMap.Status, (ushort)(a.Client.ClientStatus));
SocketStatus.SOCKET_STATUS_CONNECTED); trilist.SetBool(joinMap.Connected, a.Client.ClientStatus ==
}; 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"); {
return new GenericComm(dc); Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
} return new GenericComm(dc);
} }
}
} }

View File

@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.Core
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public abstract class DisplayBase : EssentialsBridgeableDevice, IHasFeedback, IRoutingSinkWithSwitching, IPower, IWarmingCooling, IUsageTracking public abstract class DisplayBase : EssentialsDevice, IHasFeedback, IRoutingSinkWithSwitching, IPower, IWarmingCooling, IUsageTracking
{ {
public event SourceInfoChangeHandler CurrentSourceChange; public event SourceInfoChangeHandler CurrentSourceChange;
@@ -121,22 +121,24 @@ namespace PepperDash.Essentials.Core
var inputNumber = 0; var inputNumber = 0;
var inputKeys = new List<string>(); var inputKeys = new List<string>();
var joinMap = new DisplayControllerJoinMap(joinStart); var joinMap = new DisplayControllerJoinMap();
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.JoinNumber].StringValue = displayDevice.Name; trilist.StringInput[joinMap.Name].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.JoinNumber]); commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
} }
var inputNumberFeedback = new IntFeedback(() => inputNumber); var inputNumberFeedback = new IntFeedback(() => inputNumber);
@@ -146,16 +148,16 @@ namespace PepperDash.Essentials.Core
if (twoWayDisplay != null) if (twoWayDisplay != null)
{ {
trilist.SetBool(joinMap.IsTwoWayDisplay.JoinNumber, true); trilist.SetBool(joinMap.IsTwoWayDisplay, 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.JoinNumber]); inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect]);
} }
// Power Off // Power Off
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => trilist.SetSigTrueAction(joinMap.PowerOff, () =>
{ {
inputNumber = 102; inputNumber = 102;
inputNumberFeedback.FireUpdate(); inputNumberFeedback.FireUpdate();
@@ -177,10 +179,10 @@ namespace PepperDash.Essentials.Core
} }
}; };
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]); displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
// PowerOn // PowerOn
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => trilist.SetSigTrueAction(joinMap.PowerOn, () =>
{ {
inputNumber = 0; inputNumber = 0;
inputNumberFeedback.FireUpdate(); inputNumberFeedback.FireUpdate();
@@ -188,27 +190,21 @@ namespace PepperDash.Essentials.Core
}); });
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]); displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
for (int i = 0; i < displayDevice.InputPorts.Count; i++) var count = 1;
foreach (var input in displayDevice.InputPorts)
{ {
if (i < joinMap.InputNamesOffset.JoinSpan) inputKeys.Add(input.Key);
{ var tempKey = inputKeys.ElementAt(count - 1);
inputKeys.Add(displayDevice.InputPorts[i].Key); trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset + count), () => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector));
var tempKey = inputKeys.ElementAt(i); Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString());
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + i), trilist.StringInput[(ushort)(joinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
() => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector)); count++;
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.JoinNumber, (a) => trilist.SetUShortSigAction(joinMap.InputSelect, (a) =>
{ {
if (a == 0) if (a == 0)
{ {
@@ -233,22 +229,17 @@ 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.JoinNumber, volumeDisplay.VolumeUp); trilist.SetBoolSigAction(joinMap.VolumeUp, volumeDisplay.VolumeUp);
trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, volumeDisplay.VolumeDown); trilist.SetBoolSigAction(joinMap.VolumeDown, volumeDisplay.VolumeDown);
trilist.SetSigTrueAction(joinMap.VolumeMute.JoinNumber, volumeDisplay.MuteToggle); trilist.SetSigTrueAction(joinMap.VolumeMute, 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);
trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, volumeDisplayWithFeedback.SetVolume); volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel]);
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]); volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]);
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,15 +89,6 @@ 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

@@ -1,79 +0,0 @@
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

@@ -1,151 +0,0 @@
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,326 +1,307 @@
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; }
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device) public 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)
routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource]); /// <summary>
/// Make a Crestron RMC and put it in here
trilist.SetUShortSigAction(joinMap.AudioVideoSource, (a) => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo)); /// </summary>
} 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> {
/// Make a Crestron RMC and put it in here /// <summary>
/// </summary> /// A factory method for various DmTxControllers
public DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc) /// </summary>
: base(key, name, rmc) /// <param name="key"></param>
{ /// <param name="name"></param>
/// <param name="props"></param>
} /// <returns></returns>
} public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props)
{
public class DmRmcHelper // switch on type name... later...
{
/// <summary> typeName = typeName.ToLower();
/// A factory method for various DmTxControllers uint ipid = props.Control.IpIdInt; // Convert.ToUInt16(props.Id, 16);
/// </summary>
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="props"></param> // right here, we need to grab the tie line that associates this
/// <returns></returns> // RMC with a chassis or processor. If the RMC input's tie line is not
public static CrestronGenericBaseDevice GetDmRmcController(string key, string name, string typeName, DmRmcPropertiesConfig props) // 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
// switch on type name... later... // output number from the tie line and use that to plug it in.
// Example of chassis-connected:
typeName = typeName.ToLower(); //{
uint ipid = props.Control.IpIdInt; // Convert.ToUInt16(props.Id, 16); // "sourceKey": "dmMd8x8-1",
// "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
// connected to a chassis, then it's parent is the processor. // Tx -> RMC link:
// 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. // "sourceKey": "dmTx201C-1",
// Example of chassis-connected: // "sourcePort": "DmOut",
//{ // "destinationKey": "dmRmc100C-2",
// "sourceKey": "dmMd8x8-1", // "destinationPort": "DmIn"
// "sourcePort": "anyOut2", //}
// "destinationKey": "dmRmc100C-2",
// "destinationPort": "DmIn" 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
// Tx -> RMC link: // YET AND THUS WILL NOT HAVE A TIE LINE...
//{ var inputTieLine = tlc.FirstOrDefault(t =>
// "sourceKey": "dmTx201C-1", {
// "sourcePort": "DmOut", var d = t.DestinationPort.ParentDevice;
// "destinationKey": "dmRmc100C-2", return d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)
// "destinationPort": "DmIn" && d is DmChassisController;
//} });
var tlc = TieLineCollection.Default; var pKey = props.ParentDeviceKey.ToLower();
// 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
var d = t.DestinationPort.ParentDevice; if (pKey == "processor")
return d.Key.Equals(key, StringComparison.OrdinalIgnoreCase) {
&& d is DmChassisController; // Catch constructor failures, mainly dues to IPID
}); try
{
var pKey = props.ParentDeviceKey.ToLower(); if (typeName.StartsWith("dmrmc100c"))
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"))
// Non-DM-chassis endpoints return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, Global.ControlSystem));
if (pKey == "processor") if (typeName.StartsWith("dmrmc4kz100c"))
{ return new DmRmcX100CController(key, name, new DmRmc4kz100C(ipid, Global.ControlSystem));
// Catch constructor failures, mainly dues to IPID if (typeName.StartsWith("dmrmc150s"))
try return new DmRmc150SController(key, name, new DmRmc150S(ipid, Global.ControlSystem));
{ if (typeName.StartsWith("dmrmc200c"))
if (typeName.StartsWith("dmrmc100c")) return new DmRmc200CController(key, name, new DmRmc200C(ipid, Global.ControlSystem));
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc200s"))
if (typeName.StartsWith("dmrmc100s")) return new DmRmc200SController(key, name, new DmRmc200S(ipid, Global.ControlSystem));
return new DmRmc100SController(key, name, new DmRmc100S(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc200s2"))
if (typeName.StartsWith("dmrmc4k100c")) return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, Global.ControlSystem));
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmcscalerc"))
if (typeName.StartsWith("dmrmc4kz100c")) return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, Global.ControlSystem));
return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmcscalers"))
if (typeName.StartsWith("dmrmc150s")) return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, Global.ControlSystem));
return new DmRmc150SController(key, name, new DmRmc150S(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmcscalers2"))
if (typeName.StartsWith("dmrmc200c")) return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, Global.ControlSystem));
return new DmRmc200CController(key, name, new DmRmc200C(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc4kscalerc"))
if (typeName.StartsWith("dmrmc200s")) return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, Global.ControlSystem));
return new DmRmc200SController(key, name, new DmRmc200S(ipid, Global.ControlSystem)); if (typeName.StartsWith("dmrmc4kscalercdsp"))
if (typeName.StartsWith("dmrmc200s2")) return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, Global.ControlSystem));
return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, Global.ControlSystem)); }
if (typeName.StartsWith("dmrmcscalerc")) catch (Exception e)
return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, Global.ControlSystem)); {
if (typeName.StartsWith("dmrmcscalers")) Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, Global.ControlSystem)); }
if (typeName.StartsWith("dmrmcscalers2"))
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmc4kscalerc")) Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName);
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, Global.ControlSystem)); }
if (typeName.StartsWith("dmrmc4kscalercdsp")) // Endpoints attached to DM Chassis
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, Global.ControlSystem)); else
if (typeName.StartsWith("dmrmc4kzscalerc")) {
return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(ipid, Global.ControlSystem)); var parentDev = DeviceManager.GetDeviceForKey(pKey);
} if (!(parentDev is IDmSwitch))
catch (Exception e) {
{ Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message); key, pKey);
} return null;
}
Debug.Console(0, "Cannot create DM-RMC of type: '{0}'", typeName); var chassis = (parentDev as IDmSwitch).Chassis;
} var num = props.ParentOutputNumber;
// Endpoints attached to DM Chassis if (num <= 0 || num > chassis.NumberOfOutputs)
else {
{ Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range",
var parentDev = DeviceManager.GetDeviceForKey(pKey); key, num);
if (!(parentDev is IDmSwitch)) return null;
{ }
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.", else
key, pKey); {
return null; var controller = (parentDev as IDmSwitch);
} controller.RxDictionary.Add(num, key);
}
var chassis = (parentDev as IDmSwitch).Chassis; // Catch constructor failures, mainly dues to IPID
var num = props.ParentOutputNumber; try
if (num <= 0 || num > chassis.NumberOfOutputs) {
{
Debug.Console(0, "Cannot create DM device '{0}'. Output number '{1}' is out of range", // Must use different constructor for CPU3 chassis types. No IPID
key, num); if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
return null; chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
} chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
else chassis is DmMd128x128 || chassis is DmMd64x64)
{ {
var controller = (parentDev as IDmSwitch); if (typeName.StartsWith("hdbasetrx"))
controller.RxDictionary.Add(num, key); return new HDBaseTRxController(key, name, new HDRx3CB(chassis.Outputs[num]));
} if (typeName.StartsWith("dmrmc4k100c1g"))
// Catch constructor failures, mainly dues to IPID return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(chassis.Outputs[num]));
try if (typeName.StartsWith("dmrmc100c"))
{ return new DmRmcX100CController(key, name, new DmRmc100C(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc100s"))
// Must use different constructor for CPU3 chassis types. No IPID return new DmRmc100SController(key, name, new DmRmc100S(chassis.Outputs[num]));
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 || if (typeName.StartsWith("dmrmc4k100c"))
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps || return new DmRmcX100CController(key, name, new DmRmc4k100C(chassis.Outputs[num]));
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps || if (typeName.StartsWith("dmrmc4kz100c"))
chassis is DmMd128x128 || chassis is DmMd64x64) return new DmRmcX100CController(key, name, new DmRmc4kz100C(chassis.Outputs[num]));
{ if (typeName.StartsWith("dmrmc150s"))
if (typeName.StartsWith("hdbasetrx")) return new DmRmc150SController(key, name, new DmRmc150S(chassis.Outputs[num]));
return new HDBaseTRxController(key, name, new HDRx3CB(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200c"))
if (typeName.StartsWith("dmrmc4k100c1g")) return new DmRmc200CController(key, name, new DmRmc200C(chassis.Outputs[num]));
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200s"))
if (typeName.StartsWith("dmrmc100c")) return new DmRmc200SController(key, name, new DmRmc200S(chassis.Outputs[num]));
return new DmRmcX100CController(key, name, new DmRmc100C(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200s2"))
if (typeName.StartsWith("dmrmc100s")) return new DmRmc200S2Controller(key, name, new DmRmc200S2(chassis.Outputs[num]));
return new DmRmc100SController(key, name, new DmRmc100S(chassis.Outputs[num])); if (typeName.StartsWith("dmrmcscalerc"))
if (typeName.StartsWith("dmrmc4k100c")) return new DmRmcScalerCController(key, name, new DmRmcScalerC(chassis.Outputs[num]));
return new DmRmcX100CController(key, name, new DmRmc4k100C(chassis.Outputs[num])); if (typeName.StartsWith("dmrmcscalers"))
if (typeName.StartsWith("dmrmc4kz100c")) return new DmRmcScalerSController(key, name, new DmRmcScalerS(chassis.Outputs[num]));
return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(chassis.Outputs[num])); if (typeName.StartsWith("dmrmcscalers2"))
if (typeName.StartsWith("dmrmc150s")) return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(chassis.Outputs[num]));
return new DmRmc150SController(key, name, new DmRmc150S(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4kscalerc"))
if (typeName.StartsWith("dmrmc200c")) return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(chassis.Outputs[num]));
return new DmRmc200CController(key, name, new DmRmc200C(chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4kscalercdsp"))
if (typeName.StartsWith("dmrmc200s")) return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(chassis.Outputs[num]));
return new DmRmc200SController(key, name, new DmRmc200S(chassis.Outputs[num])); }
if (typeName.StartsWith("dmrmc200s2")) else
return new DmRmc200S2Controller(key, name, new DmRmc200S2(chassis.Outputs[num])); {
if (typeName.StartsWith("dmrmcscalerc")) if (typeName.StartsWith("hdbasetrx"))
return new DmRmcScalerCController(key, name, new DmRmcScalerC(chassis.Outputs[num])); return new HDBaseTRxController(key, name, new HDRx3CB(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmcscalers")) if (typeName.StartsWith("dmrmc4k100c1g"))
return new DmRmcScalerSController(key, name, new DmRmcScalerS(chassis.Outputs[num])); return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmcscalers2")) if (typeName.StartsWith("dmrmc100c"))
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(chassis.Outputs[num])); return new DmRmcX100CController(key, name, new DmRmc100C(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kscalerc")) if (typeName.StartsWith("dmrmc100s"))
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(chassis.Outputs[num])); return new DmRmc100SController(key, name, new DmRmc100S(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kscalercdsp")) if (typeName.StartsWith("dmrmc4k100c"))
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(chassis.Outputs[num])); return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kzscalerc")) if (typeName.StartsWith("dmrmc4kz100c"))
return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num])); return new DmRmcX100CController(key, name, new DmRmc4kz100C(ipid, chassis.Outputs[num]));
} if (typeName.StartsWith("dmrmc150s"))
else return new DmRmc150SController(key, name, new DmRmc150S(ipid, chassis.Outputs[num]));
{ if (typeName.StartsWith("dmrmc200c"))
if (typeName.StartsWith("hdbasetrx")) return new DmRmc200CController(key, name, new DmRmc200C(ipid, chassis.Outputs[num]));
return new HDBaseTRxController(key, name, new HDRx3CB(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200s"))
if (typeName.StartsWith("dmrmc4k100c1g")) return new DmRmc200SController(key, name, new DmRmc200S(ipid, chassis.Outputs[num]));
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc200s2"))
if (typeName.StartsWith("dmrmc100c")) return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, chassis.Outputs[num]));
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmcscalerc"))
if (typeName.StartsWith("dmrmc100s")) return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, chassis.Outputs[num]));
return new DmRmc100SController(key, name, new DmRmc100S(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmcscalers"))
if (typeName.StartsWith("dmrmc4k100c")) return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, chassis.Outputs[num]));
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmcscalers2"))
if (typeName.StartsWith("dmrmc4kz100c")) return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, chassis.Outputs[num]));
return new DmRmc4kZ100CController(key, name, new DmRmc4kz100C(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4kscalerc"))
if (typeName.StartsWith("dmrmc150s")) return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, chassis.Outputs[num]));
return new DmRmc150SController(key, name, new DmRmc150S(ipid, chassis.Outputs[num])); if (typeName.StartsWith("dmrmc4kscalercdsp"))
if (typeName.StartsWith("dmrmc200c")) return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, chassis.Outputs[num]));
return new DmRmc200CController(key, name, new DmRmc200C(ipid, chassis.Outputs[num])); }
if (typeName.StartsWith("dmrmc200s")) }
return new DmRmc200SController(key, name, new DmRmc200S(ipid, chassis.Outputs[num])); catch (Exception e)
if (typeName.StartsWith("dmrmc200s2")) {
return new DmRmc200S2Controller(key, name, new DmRmc200S2(ipid, chassis.Outputs[num])); Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message);
if (typeName.StartsWith("dmrmcscalerc")) }
return new DmRmcScalerCController(key, name, new DmRmcScalerC(ipid, chassis.Outputs[num])); }
if (typeName.StartsWith("dmrmcscalers"))
return new DmRmcScalerSController(key, name, new DmRmcScalerS(ipid, chassis.Outputs[num])); return null;
if (typeName.StartsWith("dmrmcscalers2")) }
return new DmRmcScalerS2Controller(key, name, new DmRmcScalerS2(ipid, chassis.Outputs[num])); }
if (typeName.StartsWith("dmrmc4kscalerc"))
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, chassis.Outputs[num])); public class DmRmcControllerFactory : EssentialsDeviceFactory<DmRmcControllerBase>
if (typeName.StartsWith("dmrmc4kscalercdsp")) {
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, chassis.Outputs[num])); public DmRmcControllerFactory()
if (typeName.StartsWith("dmrmc4kzscalerc")) {
return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num])); TypeNames = new List<string>() { "hdbasetrx", "dmrmc4k100c1g", "dmrmc100c", "dmrmc100s", "dmrmc4k100c", "dmrmc150s",
"dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp" };
} }
}
catch (Exception e) public override EssentialsDevice BuildDevice(DeviceConfig dc)
{ {
Debug.Console(0, "[{0}] WARNING: Cannot create DM-RMC device: {1}", key, e.Message); var type = dc.Type.ToLower();
}
} Debug.Console(1, "Factory Attempting to create new DM-RMC Device");
return null; var props = JsonConvert.DeserializeObject
} <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; protected set; } public DmRmc100C Rmc { get; private set; }
public RoutingInputPort DmIn { get; protected set; } public RoutingInputPort DmIn { get; private set; }
public RoutingOutputPort HdmiOut { get; protected set; } public RoutingOutputPort HdmiOut { get; private set; }
public RoutingPortCollection<RoutingInputPort> InputPorts public RoutingPortCollection<RoutingInputPort> InputPorts
{ {

View File

@@ -100,8 +100,6 @@
<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" />