diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
index 7e1534bf..3d7cec8d 100644
--- a/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
+++ b/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
@@ -38,8 +38,12 @@ namespace PepperDash.Essentials.Bridges
/// Reports the EDID serial number value
///
public uint EdidSerialNumber { get; set; }
- #endregion
-
+ #endregion
+
+ #region Analogs
+ public uint AudioVideoSource { get; set; }
+ #endregion
+
public DmRmcControllerJoinMap()
{
// Digital
@@ -51,6 +55,9 @@ namespace PepperDash.Essentials.Bridges
EdidName = 3;
EdidPrefferedTiming = 4;
EdidSerialNumber = 5;
+
+ //Analog
+ AudioVideoSource = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
@@ -62,7 +69,8 @@ namespace PepperDash.Essentials.Bridges
EdidManufacturer = EdidManufacturer + joinOffset;
EdidName = EdidName + joinOffset;
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
- EdidSerialNumber = EdidSerialNumber + joinOffset;
+ EdidSerialNumber = EdidSerialNumber + joinOffset;
+ AudioVideoSource = AudioVideoSource + joinOffset;
}
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
index 0bdedbbf..94b9396b 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs
@@ -37,31 +37,39 @@ namespace PepperDash.Essentials.Core.Bridges
/// Reports the EDID serial number value
///
public uint EdidSerialNumber { get; set; }
- #endregion
-
- public DmRmcControllerJoinMap()
- {
- // Digital
- IsOnline = 1;
-
- // Serial
- CurrentOutputResolution = 1;
- EdidManufacturer = 2;
- EdidName = 3;
- EdidPrefferedTiming = 4;
- EdidSerialNumber = 5;
- }
-
- public override void OffsetJoinNumbers(uint joinStart)
- {
- var joinOffset = joinStart - 1;
-
- IsOnline = IsOnline + joinOffset;
- CurrentOutputResolution = CurrentOutputResolution + joinOffset;
- EdidManufacturer = EdidManufacturer + joinOffset;
- EdidName = EdidName + joinOffset;
- EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
- EdidSerialNumber = EdidSerialNumber + joinOffset;
- }
+ #endregion
+
+ #region Analogs
+ public uint AudioVideoSource { get; set; }
+ #endregion
+
+ public DmRmcControllerJoinMap()
+ {
+ // Digital
+ IsOnline = 1;
+
+ // Serial
+ CurrentOutputResolution = 1;
+ EdidManufacturer = 2;
+ EdidName = 3;
+ EdidPrefferedTiming = 4;
+ EdidSerialNumber = 5;
+
+ //Analog
+ AudioVideoSource = 1;
+ }
+
+ public override void OffsetJoinNumbers(uint joinStart)
+ {
+ 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;
+ }
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs
index 0c642d5c..3b288290 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs
@@ -89,6 +89,15 @@ namespace PepperDash.Essentials.Core
IntFeedback VideoSourceNumericFeedback { get; }
IntFeedback AudioSourceNumericFeedback { get; }
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
+ }
+
+ ///
+ /// Defines a receiver that has internal routing (DM-RMC-4K-Z-SCALER-C)
+ ///
+ public interface IRmcRouting : IRouting
+ {
+ IntFeedback AudioVideoSourceNumericFeedback { get; }
+ void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
}
///
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs
new file mode 100644
index 00000000..a42b6771
--- /dev/null
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs
@@ -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; }
+
+ ///
+ /// The value of the current video source for the HDMI output on the receiver
+ ///
+ public IntFeedback AudioVideoSourceNumericFeedback { get; private set; }
+
+ public RoutingPortCollection InputPorts
+ {
+ get { return new RoutingPortCollection { DmIn, HdmiIn }; }
+ }
+
+ public RoutingPortCollection OutputPorts
+ {
+ get { return new RoutingPortCollection { 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 IROutputPorts { get { return Rmc.IROutputPorts; } }
+ public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
+ #endregion
+
+ #region IComPorts Members
+ public CrestronCollection ComPorts { get { return Rmc.ComPorts; } }
+ public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
+ #endregion
+
+ #region ICec Members
+ ///
+ /// Gets the CEC stream directly from the HDMI port.
+ ///
+ 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
+
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs
index da3e587a..ad65b285 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs
@@ -37,8 +37,8 @@ namespace PepperDash.Essentials.DM
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 joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
@@ -61,7 +61,18 @@ namespace PepperDash.Essentials.DM
rmc.EdidPreferredTimingFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidPrefferedTiming]);
if (rmc.EdidSerialNumberFeedback != null)
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]);
- }
+
+ //If the device is an DM-RMC-4K-Z-SCALER-C
+ var routing = rmc as IRmcRouting;
+
+ if (routing != null)
+ {
+ if (routing.AudioVideoSourceNumericFeedback != null)
+ routing.AudioVideoSourceNumericFeedback.LinkInputSig(trilist.UShortInput[joinMap.AudioVideoSource]);
+
+ trilist.SetUShortSigAction(joinMap.AudioVideoSource, (a) => routing.ExecuteNumericSwitch(a, 1, eRoutingSignalType.AudioVideo));
+ }
+ }
}
public abstract class DmHdBaseTControllerBase : CrestronGenericBaseDevice
@@ -165,6 +176,8 @@ namespace PepperDash.Essentials.DM
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmc4kscalercdsp"))
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, Global.ControlSystem));
+ if (typeName.StartsWith("dmrmc4kzscalerc"))
+ return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(ipid, Global.ControlSystem));
}
catch (Exception e)
{
@@ -238,6 +251,8 @@ namespace PepperDash.Essentials.DM
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kscalercdsp"))
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(chassis.Outputs[num]));
+ if (typeName.StartsWith("dmrmc4kzscalerc"))
+ return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num]));
}
else
{
@@ -271,6 +286,9 @@ namespace PepperDash.Essentials.DM
return new DmRmc4kScalerCController(key, name, new DmRmc4kScalerC(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kscalercdsp"))
return new DmRmc4kScalerCDspController(key, name, new DmRmc4kScalerCDsp(ipid, chassis.Outputs[num]));
+ if (typeName.StartsWith("dmrmc4kzscalerc"))
+ return new DmRmc4kZScalerCController(key, name, new DmRmc4kzScalerC(chassis.Outputs[num]));
+
}
}
catch (Exception e)
@@ -288,7 +306,8 @@ namespace PepperDash.Essentials.DM
public DmRmcControllerFactory()
{
TypeNames = new List() { "hdbasetrx", "dmrmc4k100c1g", "dmrmc100c", "dmrmc100s", "dmrmc4k100c", "dmrmc150s",
- "dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp" };
+ "dmrmc200c", "dmrmc200s", "dmrmc200s2", "dmrmcscalerc", "dmrmcscalers", "dmrmcscalers2", "dmrmc4kscalerc", "dmrmc4kscalercdsp",
+ "dmrmc4kzscalerc" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
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 f8ea57a9..c32d3597 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
+++ b/essentials-framework/Essentials DM/Essentials_DM/PepperDash_Essentials_DM.csproj
@@ -1,159 +1,160 @@
-
-
- Release
- AnyCPU
- 9.0.30729
- 2.0
- {9199CE8A-0C9F-4952-8672-3EED798B284F}
- Library
- Properties
- PepperDash_Essentials_DM
- PepperDash_Essentials_DM
- {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- WindowsCE
- E2BECB1F-8C8C-41ba-B736-9BE7D946A398
- 5.0
- SmartDeviceProject1
- v3.5
- Windows CE
-
-
-
-
- .allowedReferenceRelatedFileExtensions
- true
- full
- false
- bin\
- DEBUG;TRACE;
- prompt
- 4
- 512
- true
- true
- off
-
-
- .allowedReferenceRelatedFileExtensions
- none
- true
- bin\
- prompt
- 4
- 512
- true
- true
- off
-
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll
-
-
-
- False
- ..\..\pepperdashcore-builds\PepperDash_Core.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll
- False
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll
- False
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll
-
-
- False
- ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe
- False
-
-
- False
- ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
- PepperDash_Essentials_Core
-
-
-
-
-
-
-
-
- rem S# Pro preparation will execute after these operations
-
+
+
+ Release
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {9199CE8A-0C9F-4952-8672-3EED798B284F}
+ Library
+ Properties
+ PepperDash_Essentials_DM
+ PepperDash_Essentials_DM
+ {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ WindowsCE
+ E2BECB1F-8C8C-41ba-B736-9BE7D946A398
+ 5.0
+ SmartDeviceProject1
+ v3.5
+ Windows CE
+
+
+
+
+ .allowedReferenceRelatedFileExtensions
+ true
+ full
+ false
+ bin\
+ DEBUG;TRACE;
+ prompt
+ 4
+ 512
+ true
+ true
+ off
+
+
+ .allowedReferenceRelatedFileExtensions
+ none
+ true
+ bin\
+ prompt
+ 4
+ 512
+ true
+ true
+ off
+
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll
+
+
+
+ False
+ ..\..\pepperdashcore-builds\PepperDash_Core.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll
+ False
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll
+ False
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe
+ False
+
+
+ False
+ ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
+ PepperDash_Essentials_Core
+
+
+
+
+
+
+
+
+ rem S# Pro preparation will execute after these operations
+
\ No newline at end of file