diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs
index 86e59be2..74122905 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs
@@ -27,7 +27,16 @@ namespace PepperDash.Essentials.Core
{
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
- CommPort = CommFactory.CreateCommForDevice(config);
+ var commPort = CommFactory.CreateCommForDevice(config);
+
+ //Fixing decision to require '-comPorts' in delcaration for DGE in order to get a device with comports included
+ if (commPort == null)
+ {
+ config.Key = config.Key + "-comPorts";
+ commPort = CommFactory.CreateCommForDevice(config);
+ }
+
+ CommPort = commPort;
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DgeController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs
similarity index 60%
rename from essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DgeController.cs
rename to essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs
index 6b586ac3..4a335c39 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DgeController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs
@@ -4,33 +4,39 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
-using Crestron.SimplSharpPro.UI;
+using Crestron.SimplSharpPro.UI;
+
+using Crestron.SimplSharpPro.DM;
+
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
+using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.DM.Endpoints.DGEs
{
///
/// Wrapper class for DGE-100 and DM-DGE-200-C
///
- public class DgeController : CrestronGenericBaseDevice, IComPorts, IIROutputPorts
- {
- public Dge100 DigitalGraphicsEngine { get; private set; }
-
- public DeviceConfig DeviceConfig { get; private set; }
+ public class Dge100Controller : CrestronGenericBaseDevice, IComPorts, IIROutputPorts, IHasBasicTriListWithSmartObject, ICec
+ {
+ private readonly Dge100 _dge;
+
+ public BasicTriListWithSmartObject Panel { get { return _dge; } }
+
+ private DeviceConfig _dc;
CrestronTouchpanelPropertiesConfig PropertiesConfig;
- public DgeController(string key, string name, Dge100 device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
+ public Dge100Controller(string key, string name, Dge100 device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
:base(key, name, device)
{
- DigitalGraphicsEngine = device;
+ _dge = device;
- DeviceConfig = dc;
+ _dc = dc;
PropertiesConfig = props;
}
@@ -39,12 +45,12 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
public CrestronCollection ComPorts
{
- get { return DigitalGraphicsEngine.ComPorts; }
+ get { return _dge.ComPorts; }
}
public int NumberOfComPorts
{
- get { return DigitalGraphicsEngine.NumberOfComPorts; }
+ get { return _dge.NumberOfComPorts; }
}
#endregion
@@ -53,22 +59,27 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
public CrestronCollection IROutputPorts
{
- get { return DigitalGraphicsEngine.IROutputPorts; }
+ get { return _dge.IROutputPorts; }
}
public int NumberOfIROutputPorts
{
- get { return DigitalGraphicsEngine.NumberOfIROutputPorts; }
+ get { return _dge.NumberOfIROutputPorts; }
}
+ #endregion
+
+ #region ICec Members
+ public Cec StreamCec { get { return _dge.HdmiOut.StreamCec; } }
#endregion
+
}
- public class DgeControllerFactory : EssentialsDeviceFactory
+ public class Dge100ControllerFactory : EssentialsDeviceFactory
{
- public DgeControllerFactory()
+ public Dge100ControllerFactory()
{
- TypeNames = new List() { "dge100", "dmdge200c" };
+ TypeNames = new List() { "dge100" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
@@ -77,13 +88,11 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
var comm = CommFactory.GetControlPropertiesConfig(dc);
var props = JsonConvert.DeserializeObject(dc.Properties.ToString());
- Debug.Console(1, "Factory Attempting to create new DgeControllerm Device");
+ Debug.Console(1, "Factory Attempting to create new DgeController Device");
Dge100 dgeDevice = null;
if (typeName == "dge100")
dgeDevice = new Dge100(comm.IpIdInt, Global.ControlSystem);
- else if (typeName == "dmdge200c")
- dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
if (dgeDevice == null)
{
@@ -91,7 +100,7 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
return null;
}
- var dgeController = new DgeController(dc.Key + "-comPorts", dc.Name, dgeDevice, dc, props);
+ var dgeController = new Dge100Controller(dc.Key, dc.Name, dgeDevice, dc, props);
return dgeController;
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DmDge200CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DmDge200CController.cs
new file mode 100644
index 00000000..d4539e53
--- /dev/null
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/DmDge200CController.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Crestron.SimplSharpPro;
+using Crestron.SimplSharpPro.UI;
+
+using Newtonsoft.Json;
+
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Config;
+using Crestron.SimplSharpPro.DeviceSupport;
+
+using Crestron.SimplSharpPro.DM;
+
+namespace PepperDash.Essentials.DM.Endpoints.DGEs
+{
+ ///
+ /// Wrapper class for DGE-100 and DM-DGE-200-C
+ ///
+ public class DmDge200CController : Dge100Controller, IRoutingInputsOutputs
+ {
+ private readonly DmDge200C _dge;
+
+ public RoutingInputPort DmIn { get; private set; }
+ public RoutingOutputPort HdmiOut { get; private set; }
+
+ public RoutingPortCollection InputPorts
+ {
+ get;
+ private set;
+ }
+
+ public RoutingPortCollection OutputPorts
+ {
+ get;
+ private set;
+ }
+
+ public DmDge200CController(string key, string name, DmDge200C device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
+ : base(key, name, device, dc, props)
+ {
+ _dge = device;
+
+ DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
+ eRoutingPortConnectionType.DmCat, 0, this);
+ HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
+ eRoutingPortConnectionType.Hdmi, null, this);
+
+
+ InputPorts = new RoutingPortCollection { DmIn };
+ OutputPorts = new RoutingPortCollection { HdmiOut };
+
+ // Set Ports for CEC
+ HdmiOut.Port = _dge.HdmiOut; ;
+
+ }
+
+ public class DmDge200CControllerFactory : EssentialsDeviceFactory
+ {
+ public DmDge200CControllerFactory()
+ {
+ TypeNames = new List() { "dmdge200c" };
+ }
+
+ public override EssentialsDevice BuildDevice(DeviceConfig dc)
+ {
+ var typeName = dc.Type.ToLower();
+ var comm = CommFactory.GetControlPropertiesConfig(dc);
+ var props = JsonConvert.DeserializeObject(dc.Properties.ToString());
+
+ Debug.Console(1, "Factory Attempting to create new DgeController Device");
+
+ DmDge200C dgeDevice = null;
+
+ if (typeName == "dmdge200c")
+ dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
+
+ if (dgeDevice == null)
+ {
+ Debug.Console(1, "Unable to create DGE device");
+ return null;
+ }
+
+ var dgeController = new DmDge200CController(dc.Key , dc.Name, dgeDevice, dc, props);
+
+ return dgeController;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200CController.cs
index 9beaaf42..27187bcd 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200CController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc200CController.cs
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.DM
private readonly DmRmc200C _rmc;
public RoutingInputPort DmIn { get; private set; }
- public RoutingOutputPort HdmiOut { get; private set; }
+ public RoutingOutputPort HdmiOut { get; private set; }
public RoutingPortCollection InputPorts
{
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs
index 54be5720..ed614829 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs
@@ -21,9 +21,9 @@ namespace PepperDash.Essentials.DM
///
/// Controller class for all DM-TX-201C/S/F transmitters
///
- public class DmTx201XController : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
+ public class DmTx201CController : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
{
- public DmTx201S Tx { get; private set; } // uses the 201S class as it is the base class for the 201C
+ public DmTx201C Tx { get; private set; } // uses the 201S class as it is the base class for the 201C
public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; }
public RoutingInputPortWithVideoStatuses VgaInput { get; private set; }
@@ -92,7 +92,7 @@ namespace PepperDash.Essentials.DM
///
///
///
- public DmTx201XController(string key, string name, DmTx201S tx)
+ public DmTx201CController(string key, string name, DmTx201C tx)
: base(key, name, tx)
{
Tx = tx;
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201SController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201SController.cs
new file mode 100644
index 00000000..23e93b5d
--- /dev/null
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201SController.cs
@@ -0,0 +1,411 @@
+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.Transmitters;
+
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Bridges;
+using PepperDash.Essentials.DM.Config;
+
+namespace PepperDash.Essentials.DM
+{
+ // using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
+
+ ///
+ /// Controller class for all DM-TX-201C/S/F transmitters
+ ///
+ public class DmTx201SController : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun, IVgaBrightnessContrastControls
+ {
+ public DmTx201S Tx { get; private set; } // uses the 201S class as it is the base class for the 201C
+
+ public RoutingInputPortWithVideoStatuses HdmiInput { get; private set; }
+ public RoutingInputPortWithVideoStatuses VgaInput { get; private set; }
+ public RoutingOutputPort DmOutput { get; private set; }
+ public RoutingOutputPort HdmiLoopOut { get; private set; }
+
+ public override StringFeedback ActiveVideoInputFeedback { get; protected set; }
+ public IntFeedback VideoSourceNumericFeedback { get; protected set; }
+ public IntFeedback AudioSourceNumericFeedback { get; protected set; }
+ public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
+ public BoolFeedback HdmiVideoSyncFeedback { get; protected set; }
+ public BoolFeedback VgaVideoSyncFeedback { get; protected set; }
+
+ public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
+
+ public IntFeedback VgaBrightnessFeedback { get; protected set; }
+ public IntFeedback VgaContrastFeedback { get; protected set; }
+
+ ///
+ /// Helps get the "real" inputs, including when in Auto
+ ///
+ public DmTx200Base.eSourceSelection ActualActiveVideoInput
+ {
+ get
+ {
+ if (Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Digital ||
+ Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Analog ||
+ Tx.VideoSourceFeedback == DmTx200Base.eSourceSelection.Disable)
+ return Tx.VideoSourceFeedback;
+ else // auto
+ {
+ if (Tx.HdmiInput.SyncDetectedFeedback.BoolValue)
+ return DmTx200Base.eSourceSelection.Digital;
+ else if (Tx.VgaInput.SyncDetectedFeedback.BoolValue)
+ return DmTx200Base.eSourceSelection.Analog;
+ else
+ return DmTx200Base.eSourceSelection.Disable;
+ }
+ }
+ }
+
+ public RoutingPortCollection InputPorts
+ {
+ get
+ {
+ return new RoutingPortCollection
+ {
+ HdmiInput,
+ VgaInput,
+ AnyVideoInput
+ };
+ }
+ }
+
+ public RoutingPortCollection OutputPorts
+ {
+ get
+ {
+ return new RoutingPortCollection { DmOutput, HdmiLoopOut };
+ }
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public DmTx201SController(string key, string name, DmTx201S tx)
+ : base(key, name, tx)
+ {
+ Tx = tx;
+
+ HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn,
+ eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, DmTx200Base.eSourceSelection.Digital, this,
+ VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput));
+ VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
+ eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this,
+ VideoStatusHelper.GetVgaInputStatusFuncs(tx.VgaInput));
+
+ ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
+ () => ActualActiveVideoInput.ToString());
+
+ Tx.HdmiInput.InputStreamChange += new EndpointInputStreamChangeEventHandler(InputStreamChangeEvent);
+ Tx.BaseEvent += Tx_BaseEvent;
+ Tx.OnlineStatusChange += new OnlineStatusChangeEventHandler(Tx_OnlineStatusChange);
+
+ VideoSourceNumericFeedback = new IntFeedback(() =>
+ {
+ return (int)Tx.VideoSourceFeedback;
+ });
+ AudioSourceNumericFeedback = new IntFeedback(() =>
+ {
+ return (int)Tx.AudioSourceFeedback;
+ });
+
+ HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
+ {
+ if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ else
+ return 0;
+ });
+
+ HdmiVideoSyncFeedback = new BoolFeedback(() =>
+ {
+ return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue;
+ });
+
+ VgaVideoSyncFeedback = new BoolFeedback(() =>
+ {
+ return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue;
+ });
+
+ FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
+
+ VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue);
+ VgaContrastFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.ContrastFeedback.UShortValue);
+
+ tx.VgaInput.VideoControls.ControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(VideoControls_ControlChange);
+
+ HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
+
+ var combinedFuncs = new VideoStatusFuncsWrapper
+ {
+ HdcpActiveFeedbackFunc = () =>
+ (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
+ && tx.HdmiInput.VideoAttributes.HdcpActiveFeedback.BoolValue),
+
+ HdcpStateFeedbackFunc = () =>
+ {
+ if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
+ return tx.HdmiInput.VideoAttributes.HdcpStateFeedback.ToString();
+ return "";
+ },
+
+ VideoResolutionFeedbackFunc = () =>
+ {
+ if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital)
+ return tx.HdmiInput.VideoAttributes.GetVideoResolutionString();
+ if (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog)
+ return tx.VgaInput.VideoAttributes.GetVideoResolutionString();
+ return "";
+ },
+ VideoSyncFeedbackFunc = () =>
+ (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Digital
+ && tx.HdmiInput.SyncDetectedFeedback.BoolValue)
+ || (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Analog
+ && tx.VgaInput.SyncDetectedFeedback.BoolValue)
+ || (ActualActiveVideoInput == DmTx200Base.eSourceSelection.Auto
+ && (tx.VgaInput.SyncDetectedFeedback.BoolValue || tx.HdmiInput.SyncDetectedFeedback.BoolValue))
+
+ };
+
+ AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
+ eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
+
+ DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, null, this);
+ HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, null, this);
+
+ AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
+ AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
+ AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
+ AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback,
+ VgaVideoSyncFeedback);
+
+ // Set Ports for CEC
+ HdmiInput.Port = Tx.HdmiInput;
+ VgaInput.Port = Tx.VgaInput;
+ HdmiLoopOut.Port = Tx.HdmiOutput;
+ DmOutput.Port = Tx.DmOutput;
+ }
+
+ void VideoControls_ControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
+ {
+ var id = args.EventId;
+ Debug.Console(2, this, "EventId {0}", args.EventId);
+
+ if (id == VideoControlsEventIds.BrightnessFeedbackEventId)
+ {
+ VgaBrightnessFeedback.FireUpdate();
+ }
+ else if (id == VideoControlsEventIds.ContrastFeedbackEventId)
+ {
+ VgaContrastFeedback.FireUpdate();
+ }
+ }
+
+ void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
+ {
+ ActiveVideoInputFeedback.FireUpdate();
+ VideoSourceNumericFeedback.FireUpdate();
+ AudioSourceNumericFeedback.FireUpdate();
+
+ }
+
+ public override bool CustomActivate()
+ {
+ Tx.HdmiInput.InputStreamChange += (o, a) => FowardInputStreamChange(HdmiInput, a.EventId);
+ Tx.HdmiInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(HdmiInput, a.EventId);
+
+ Tx.VgaInput.InputStreamChange += (o, a) => FowardInputStreamChange(VgaInput, a.EventId);
+ Tx.VgaInput.VideoAttributes.AttributeChange += (o, a) => FireVideoAttributeChange(VgaInput, a.EventId);
+
+ // Base does register and sets up comm monitoring.
+ return base.CustomActivate();
+ }
+
+ public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
+ {
+ DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey);
+
+ if (HdmiVideoSyncFeedback != null)
+ {
+ HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]);
+ }
+ if (VgaVideoSyncFeedback != null)
+ {
+ VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]);
+ }
+
+ LinkDmTxToApi(this, trilist, joinMap, bridge);
+ }
+
+ ///
+ /// Enables or disables free run
+ ///
+ ///
+ public void SetFreeRunEnabled(bool enable)
+ {
+ if (enable)
+ {
+ Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
+ }
+ else
+ {
+ Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
+ }
+ }
+
+ ///
+ /// Sets the VGA brightness level
+ ///
+ ///
+ public void SetVgaBrightness(ushort level)
+ {
+ Tx.VgaInput.VideoControls.Brightness.UShortValue = level;
+ }
+
+ ///
+ /// Sets the VGA contrast level
+ ///
+ ///
+ public void SetVgaContrast(ushort level)
+ {
+ Tx.VgaInput.VideoControls.Contrast.UShortValue = level;
+ }
+
+ ///
+ /// Switches the audio/video source based on the integer value (0-Auto, 1-HDMI, 2-VGA, 3-Disable)
+ ///
+ ///
+ ///
+ ///
+ public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
+ {
+ Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
+
+ switch (input)
+ {
+ case 0:
+ {
+ ExecuteSwitch(DmTx200Base.eSourceSelection.Auto, null, type);
+ break;
+ }
+ case 1:
+ {
+ ExecuteSwitch(HdmiInput.Selector, null, type);
+ break;
+ }
+ case 2:
+ {
+ ExecuteSwitch(VgaInput.Selector, null, type);
+ break;
+ }
+ case 3:
+ {
+ ExecuteSwitch(DmTx200Base.eSourceSelection.Disable, null, type);
+ break;
+ }
+ }
+ }
+
+ public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
+ {
+ if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
+ Tx.VideoSource = (DmTx200Base.eSourceSelection)inputSelector;
+ if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
+ Tx.AudioSource = (DmTx200Base.eSourceSelection)inputSelector;
+ }
+
+ void Tx_BaseEvent(GenericBase device, BaseEventArgs args)
+ {
+ var id = args.EventId;
+ Debug.Console(2, this, "EventId {0}", args.EventId);
+
+ if (id == EndpointTransmitterBase.VideoSourceFeedbackEventId)
+ {
+ Debug.Console(2, this, " Video Source: {0}", Tx.VideoSourceFeedback);
+ VideoSourceNumericFeedback.FireUpdate();
+ ActiveVideoInputFeedback.FireUpdate();
+ }
+
+ // ------------------------------ incomplete -----------------------------------------
+ else if (id == EndpointTransmitterBase.AudioSourceFeedbackEventId)
+ {
+ Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
+ AudioSourceNumericFeedback.FireUpdate();
+ }
+
+ }
+
+ void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
+ {
+ Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());
+
+ if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
+ {
+ HdmiInHdcpCapabilityFeedback.FireUpdate();
+ }
+ else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
+ {
+ HdmiInHdcpCapabilityFeedback.FireUpdate();
+ }
+ else if (args.EventId == EndpointInputStreamEventIds.FreeRunFeedbackEventId)
+ {
+ FreeRunEnabledFeedback.FireUpdate();
+ }
+ }
+
+ ///
+ /// Relays the input stream change to the appropriate RoutingInputPort.
+ ///
+ void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
+ {
+ if (eventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
+ {
+ inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
+ AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
+ }
+ }
+
+ ///
+ /// Relays the VideoAttributes change to a RoutingInputPort
+ ///
+ void FireVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
+ {
+ //// LOCATION: Crestron.SimplSharpPro.DM.VideoAttributeEventIds
+ //Debug.Console(2, this, "VideoAttributes_AttributeChange event id={0} from {1}",
+ // args.EventId, (sender as VideoAttributesEnhanced).Owner.GetType());
+ switch (eventId)
+ {
+ case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
+ inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
+ AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
+ break;
+ case VideoAttributeEventIds.HdcpStateFeedbackEventId:
+ inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
+ AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
+ break;
+ case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
+ case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
+ inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
+ AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
+ break;
+ case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
+ inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
+ AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
+ break;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs
index 4fcc4742..9fe81c92 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs
@@ -45,8 +45,10 @@ namespace PepperDash.Essentials.DM
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmtx4kz100"))
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, Global.ControlSystem));
- if (typeName.StartsWith("dmtx201"))
- return new DmTx201XController(key, name, new DmTx201S(ipid, Global.ControlSystem));
+ if (typeName.StartsWith("dmtx201c"))
+ return new DmTx201CController(key, name, new DmTx201C(ipid, Global.ControlSystem));
+ if (typeName.StartsWith("dmtx201s"))
+ return new DmTx201SController(key, name, new DmTx201S(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmtx4k202"))
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmtx4kz202"))
@@ -102,8 +104,10 @@ namespace PepperDash.Essentials.DM
{
if (typeName.StartsWith("dmtx200"))
return new DmTx200Controller(key, name, new DmTx200C2G(chassis.Inputs[num]));
- if (typeName.StartsWith("dmtx201"))
- return new DmTx201XController(key, name, new DmTx201C(chassis.Inputs[num]));
+ if (typeName.StartsWith("dmtx201c"))
+ return new DmTx201CController(key, name, new DmTx201C(chassis.Inputs[num]));
+ if (typeName.StartsWith("dmtx201s"))
+ return new DmTx201SController(key, name, new DmTx201S(chassis.Inputs[num]));
if (typeName.StartsWith("dmtx4k100"))
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(chassis.Inputs[num]));
if (typeName.StartsWith("dmtx4kz100"))
@@ -123,8 +127,10 @@ namespace PepperDash.Essentials.DM
{
if (typeName.StartsWith("dmtx200"))
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, chassis.Inputs[num]));
- if (typeName.StartsWith("dmtx201"))
- return new DmTx201XController(key, name, new DmTx201C(ipid, chassis.Inputs[num]));
+ if (typeName.StartsWith("dmtx201c"))
+ return new DmTx201CController(key, name, new DmTx201C(ipid, chassis.Inputs[num]));
+ if (typeName.StartsWith("dmtx201s"))
+ return new DmTx201SController(key, name, new DmTx201S(ipid, chassis.Inputs[num]));
if (typeName.StartsWith("dmtx4k100"))
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(ipid, chassis.Inputs[num]));
if (typeName.StartsWith("dmtx4kz100"))
diff --git a/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj b/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
index 2c245384..7fc4f24d 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
+++ b/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
@@ -100,8 +100,10 @@
+
+
@@ -112,7 +114,7 @@
-
+