Compare commits

...

15 Commits

Author SHA1 Message Date
Jason T Alborough
4396f06db6 Changes the PepperDash Core Version. 2019-11-12 17:33:41 -05:00
Jason T Alborough
d2a40df70e Chagnes pepperdash core refrence 2019-11-08 16:23:23 -05:00
Neil Dorin
a1de8e2edd Merged in maintenance/pdcore-submodule-creds (pull request #36)
Maintenance/pdcore submodule creds

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-11-08 19:55:34 +00:00
Neil Dorin
841cc1a5e4 Readds PDCore submodule without user creds 2019-11-08 12:54:07 -07:00
Neil Dorin
130bac79f3 Removes PDCore submodule with user creds 2019-11-08 12:53:04 -07:00
Neil Dorin
2fe1ac0e75 Merged in maintenance/pd-core-submodule (pull request #35)
Maintenance/pd core submodule

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-10-17 15:53:13 +00:00
Neil Dorin
fcfec55b20 Removes PepperDash_Core.dll static reference and replaces it with submodule for pepperdashcore-builds 2019-10-16 15:58:14 -06:00
Neil Dorin
ae87498c0b Adds HDCP support for DM 8G+ input card types 2019-10-11 17:13:56 -06:00
Neil Dorin
96d48c9d56 Adds HDCP support for DMInput on 8G+ input cards (requires addtional config info on DmChassisController device config to tell if input cards support HDCP2 or not). 2019-10-09 15:55:59 -06:00
Neil Dorin
d21f6798fd Better handling for HdBaseT style TX units on non CPU3 DM Chassis 2019-10-09 12:32:58 -06:00
Neil Dorin
ac93081278 Merge remote-tracking branch 'origin/development' into bugfix/ecs-1168 2019-10-09 10:23:30 -06:00
Neil Dorin
690ba92773 Adds condition to DmChassisControllerBridge to use the endpoint online feedback from the input card when a basic HDBaseT transmitter is found. 2019-10-09 10:22:59 -06:00
Heath Volmer
115745467a Merged in feature/ecs-1162 (pull request #34)
ecs-1162: Messaging changes for Weil
2019-10-04 15:31:40 +00:00
Heath Volmer
0bb107f5ef ecs-1162: Messaging changes for Weil 2019-10-04 09:30:53 -06:00
Neil Dorin
3887a07d55 Fixed duplicate assignment statements 2019-09-26 11:31:03 -06:00
18 changed files with 428 additions and 150 deletions

3
.gitmodules vendored
View File

@@ -0,0 +1,3 @@
[submodule "essentials-framework/pepperdashcore-builds"]
path = essentials-framework/pepperdashcore-builds
url = https://bitbucket.org/Pepperdash_Products/pepperdashcore-builds.git

View File

@@ -132,6 +132,14 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// 842
/// </summary>
const uint BCameraLayout = 842;
/// <summary>
/// 843
/// </summary>
const uint BCameraSupportsAutoMode = 843;
/// <summary>
/// 844
/// </summary>
const uint BCameraSupportsOffMode = 844;
/********* Ushorts *********/
@@ -294,6 +302,21 @@ namespace PepperDash.Essentials.AppServer.Messengers
PostCallsList();
});
EISC.SetBoolSigAction(BCameraSupportsAutoMode, b =>
{
PostStatusMessage(new
{
cameraSupportsAutoMode = b
});
});
EISC.SetBoolSigAction(BCameraSupportsOffMode, b =>
{
PostStatusMessage(new
{
cameraSupportsOffMode = b
});
});
// Directory insanity
EISC.SetUShortSigAction(UDirectoryRowCount, u =>
{
@@ -455,6 +478,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
calls = GetCurrentCallList(),
cameraMode = GetCameraMode(),
cameraSelfView = EISC.GetBool(BCameraSelfView),
cameraSupportsAutoMode = EISC.GetBool(BCameraSupportsAutoMode),
cameraSupportsOffMode = EISC.GetBool(BCameraSupportsOffMode),
currentCallString = EISC.GetString(SCurrentCallNumber),
currentDialString = EISC.GetString(SCurrentDialString),
directoryContactSelected = new

View File

@@ -81,6 +81,7 @@ namespace PepperDash.Essentials.Room.Cotija
/// 72
/// </summary>
public const uint SourceHasChanged = 71;
/// <summary>
/// 261 - The start of the range of speed dial visibles
/// </summary>
@@ -98,9 +99,17 @@ namespace PepperDash.Essentials.Room.Cotija
/// </summary>
public const uint ShowCameraWhenNotInCall = 503;
/// <summary>
/// 504
/// </summary>
public const uint UseSourceEnabled = 504;
/// <summary>
/// 601
/// </summary>
public const uint SourceShareDisableStartJoin = 601;
public const uint SourceShareDisableJoinStart = 601;
/// <summary>
/// 621
/// </summary>
public const uint SourceIsEnabledJoinStart = 621;
}
@@ -121,7 +130,7 @@ namespace PepperDash.Essentials.Room.Cotija
/// <summary>
/// 101
/// </summary>
public const uint VolumeSliderCount = 101;
public const uint NumberOfAuxFaders = 101;
}
public class StringJoin
@@ -344,6 +353,10 @@ namespace PepperDash.Essentials.Room.Cotija
EISC.PulseBool(BoolJoin.MasterVolumeIsMuted)));
Parent.AddAction(@"/room/room1/volumes/master/privacyMuteToggle", new Action(() =>
EISC.PulseBool(BoolJoin.PrivacyMute)));
// /xyzxyz/volumes/master/muteToggle ---> BoolInput[1]
for (uint i = 2; i <= 7; i++)
{
var index = i;
@@ -410,6 +423,10 @@ namespace PepperDash.Essentials.Room.Cotija
}
}
}));
// map MasterVolumeIsMuted join -> status/volumes/master/muted
//
EISC.SetBoolSigAction(BoolJoin.MasterVolumeIsMuted, b =>
PostStatusMessage(new
{
@@ -464,6 +481,12 @@ namespace PepperDash.Essentials.Room.Cotija
});
}
EISC.SetUShortSigAction(UshortJoin.NumberOfAuxFaders, u =>
PostStatusMessage(new {
volumes = new {
numberOfAuxFaders = u,
}
}));
// shutdown things
EISC.SetSigTrueAction(BoolJoin.ShutdownCancel, new Action(() =>
@@ -558,7 +581,7 @@ namespace PepperDash.Essentials.Room.Cotija
rmProps.VideoCodecKey = "videoCodec";
// volume control names
var volCount = EISC.UShortOutput[UshortJoin.VolumeSliderCount].UShortValue;
var volCount = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue;
//// use Volumes object or?
//rmProps.VolumeSliderNames = new List<string>();
@@ -604,12 +627,17 @@ namespace PepperDash.Essentials.Room.Cotija
for (uint i = 0; i <= 19; i++)
{
var name = EISC.StringOutput[StringJoin.SourceNameJoinStart + i].StringValue;
if(string.IsNullOrEmpty(name))
if (EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue
&& !EISC.BooleanOutput[BoolJoin.SourceIsEnabledJoinStart + i].BoolValue)
{
continue;
}
else if(!EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue && string.IsNullOrEmpty(name))
break;
var icon = EISC.StringOutput[StringJoin.SourceIconJoinStart + i].StringValue;
var key = EISC.StringOutput[StringJoin.SourceKeyJoinStart + i].StringValue;
var type = EISC.StringOutput[StringJoin.SourceTypeJoinStart + i].StringValue;
var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableStartJoin + i].BoolValue;
var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableJoinStart + i].BoolValue;
Debug.Console(0, this, "Adding source {0} '{1}'", key, name);
var newSLI = new SourceListItem{
@@ -745,7 +773,7 @@ namespace PepperDash.Essentials.Room.Cotija
{
if (ConfigIsLoaded)
{
var count = EISC.UShortOutput[101].UShortValue;
var count = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue;
Debug.Console(1, this, "The Fader Count is : {0}", count);
@@ -776,6 +804,7 @@ namespace PepperDash.Essentials.Room.Cotija
volumes.Master.PrivacyMuted = EISC.BooleanOutput[BoolJoin.PrivacyMute].BoolValue;
volumes.AuxFaders = auxFaderDict;
volumes.NumberOfAuxFaders = EISC.UShortInput[UshortJoin.NumberOfAuxFaders].UShortValue;
PostStatusMessage(new
{
@@ -862,6 +891,7 @@ namespace PepperDash.Essentials.Room.Cotija
var d = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{ "laptop", "pc" },
{ "pc", "pc" },
{ "wireless", "genericsource" },
{ "iptv", "settopbox" }

View File

@@ -16,6 +16,9 @@ namespace PepperDash.Essentials.Room.Cotija
[JsonProperty("auxFaders")]
public Dictionary<string, Volume> AuxFaders { get; set; }
[JsonProperty("numberOfAuxFaders")]
public int NumberOfAuxFaders { get; set; }
public Volumes()
{
AuxFaders = new Dictionary<string, Volume>();

View File

@@ -57,7 +57,7 @@ namespace PepperDash.Essentials.Bridges
var txKey = dmChassis.TxDictionary[ioSlot];
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
var txDevice = basicTxDevice as DmTxControllerBase;
var advancedTxDevice = basicTxDevice as DmTxControllerBase;
if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps
|| dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps
@@ -67,43 +67,83 @@ namespace PepperDash.Essentials.Bridges
}
else
{
if (txDevice != null)
if (advancedTxDevice != null)
{
txDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
}
else if (dmChassis.InputEndpointOnlineFeedbacks[ioSlot] != null)
{
Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
}
}
if (basicTxDevice != null && txDevice == null)
if (basicTxDevice != null && advancedTxDevice == null)
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
if (txDevice != null)
if (advancedTxDevice != null)
{
txDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
}
else
else if(advancedTxDevice == null || basicTxDevice != null)
{
Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
if (inputPort != null)
{
var hdmiInPort = inputPort.Port;
Debug.Console(1, "Port value for input card {0} is set", ioSlot);
var port = inputPort.Port;
if (hdmiInPort != null)
if (port != null)
{
if (hdmiInPort is HdmiInputWithCEC)
if (port is HdmiInputWithCEC)
{
var hdmiInPortWCec = hdmiInPort as HdmiInputWithCEC;
Debug.Console(1, "Port is HdmiInputWithCec");
var hdmiInPortWCec = port as HdmiInputWithCEC;
if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown)
{
SetHdcpCapabilityAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
}
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot];
if(dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot];
else
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
}
}
}
else
{
inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)];
if(inputPort != null)
{
var port = inputPort.Port;
if (port is DMInputPortWithCec)
{
Debug.Console(1, "Port is DMInputPortWithCec");
var dmInPortWCec = port as DMInputPortWithCec;
if (dmInPortWCec != null)
{
SetHdcpStateAction(dmChassis.PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
}
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
if (dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot];
else
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
}
}
}
@@ -120,7 +160,7 @@ namespace PepperDash.Essentials.Bridges
if (hdmiPort != null)
{
SetHdcpCapabilityAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
}
}
@@ -128,18 +168,19 @@ namespace PepperDash.Essentials.Bridges
if (dmChassis.RxDictionary.ContainsKey(ioSlot))
{
Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
var RxKey = dmChassis.RxDictionary[ioSlot];
var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase;
var rxKey = dmChassis.RxDictionary[ioSlot];
var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps
|| dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps
|| dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps)
|| dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null)
{
dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
else if (RxDevice != null)
else if (rxDevice != null)
{
RxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
}
// Feedback
@@ -156,7 +197,7 @@ namespace PepperDash.Essentials.Bridges
}
}
static void SetHdcpCapabilityAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist)
static void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist)
{
if (hdcpTypeSimple)
{
@@ -176,14 +217,14 @@ namespace PepperDash.Essentials.Bridges
else
{
trilist.SetUShortSigAction(join,
new Action<ushort>(s =>
new Action<ushort>(u =>
{
port.HdcpReceiveCapability = (eHdcpCapabilityType)s;
port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
}));
}
}
static void SetHdcpCapabilityAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist)
static void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist)
{
if (hdcpTypeSimple)
{
@@ -203,9 +244,36 @@ namespace PepperDash.Essentials.Bridges
else
{
trilist.SetUShortSigAction(join,
new Action<ushort>(s =>
new Action<ushort>(u =>
{
port.HdcpCapability = (eHdcpCapabilityType)s;
port.HdcpCapability = (eHdcpCapabilityType)u;
}));
}
}
static void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist)
{
if (!supportsHdcp2)
{
trilist.SetUShortSigAction(join,
new Action<ushort>(s =>
{
if (s == 0)
{
port.HdcpSupportOff();
}
else if (s > 0)
{
port.HdcpSupportOn();
}
}));
}
else
{
trilist.SetUShortSigAction(join,
new Action<ushort>(u =>
{
port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
}));
}
}

View File

@@ -107,7 +107,6 @@ namespace PepperDash.Essentials.Bridges
OutputAudio = 300; //301-499
OutputUsb = 500; //501-699
InputUsb = 700; //701-899
VideoSyncStatus = 100; //101-299
HdcpSupportState = 1000; //1001-1199
HdcpSupportCapability = 1200; //1201-1399
@@ -118,8 +117,6 @@ namespace PepperDash.Essentials.Bridges
OutputCurrentVideoInputNames = 2000; //2001-2199
OutputCurrentAudioInputNames = 2200; //2201-2399
InputCurrentResolution = 2400; // 2401-2599
InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899
}
public override void OffsetJoinNumbers(uint joinStart)

View File

@@ -71,9 +71,9 @@
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.3.27452, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\essentials-framework\references\PepperDash_Core.dll</HintPath>
<HintPath>..\essentials-framework\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="PepperDash_Essentials_DM, Version=1.0.0.19343, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -183,6 +183,7 @@
<Compile Include="HttpApiHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
<Compile Include="Room\Config\DDVC01RoomPropertiesConfig.cs" />
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
@@ -206,6 +207,7 @@
<Compile Include="AppServer\Volumes.cs" />
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
<Compile Include="Room\Types\EssentialsPresentationRoom.cs" />
<Compile Include="Room\Types\EssentialsRoomBase.cs" />
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Room.Config
{
/// <summary>
///
/// </summary>
public class EssentialsNDisplayRoomPropertiesConfig : EssentialsRoomPropertiesConfig
{
public string DefaultAudioBehavior { get; set; }
public string DefaultAudioKey { get; set; }
public string DefaultVideoBehavior { get; set; }
public Dictionary<string, string> Displays { get; set; }
public string SourceListKey { get; set; }
public EssentialsNDisplayRoomPropertiesConfig()
{
Displays = new Dictionary<string, string>();
}
}
}

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Devices;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Room.Config;
namespace PepperDash.Essentials.Room.Types
{
/// <summary>
/// Base class for rooms with more than a single display
/// </summary>
public abstract class EssentialsNDisplayRoomBase : EssentialsRoomBase
{
public event SourceInfoChangeHandler CurrentSingleSourceChange;
public Dictionary<string, IRoutingSinkWithSwitching> Displays { get; protected set; }
protected override Func<bool> IsWarmingFeedbackFunc { get { return () => false; ; } }
protected override Func<bool> IsCoolingFeedbackFunc { get { return () => false; } }
public EssentialsNDisplayRoomBase(DeviceConfig config)
: base (config)
{
Displays = new Dictionary<string, IRoutingSinkWithSwitching>();
var propertiesConfig = JsonConvert.DeserializeObject<EssentialsNDisplayRoomPropertiesConfig>(config.Properties.ToString());
foreach (var display in propertiesConfig.Displays)
{
var displayDevice = DeviceManager.GetDeviceForKey(display.Value) as IRoutingSinkWithSwitching;
if (displayDevice != null)
Displays.Add(display.Key, displayDevice);
}
}
}
}

View File

@@ -33,7 +33,7 @@
// public Dictionary<uint, IRoutingSinkNoSwitching> Displays { get; private set; }
// public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
// public IBasicVolumeControls DefaultVolumeControls { get; private set; }
// public IBasicVolumeControls DefaultVolumeControls { get; private set; }C:\Working Directories\PD\essentials\PepperDashEssentials\Room\Types\EssentialsPresentationRoom.cs
// /// <summary>
// /// The config name of the source list

View File

@@ -71,9 +71,9 @@
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.1.26313, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\references\PepperDash_Core.dll</HintPath>
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

View File

@@ -23,6 +23,8 @@ namespace PepperDash.Essentials.DM
/// </summary>
public class DmChassisController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting, IHasFeedback
{
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
public DmMDMnxn Chassis { get; private set; }
// Feedbacks for EssentialDM
@@ -91,10 +93,10 @@ namespace PepperDash.Essentials.DM
else if (type == "dmmd32x32cpu3") { chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem); }
else if (type == "dmmd32x32cpu3rps") { chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem); }
if (chassis == null)
{
return null;
}
if (chassis == null)
{
return null;
}
var controller = new DmChassisController(key, name, chassis);
// add the cards and port names
@@ -126,6 +128,7 @@ namespace PepperDash.Essentials.DM
controller.InputNames = properties.InputNames;
controller.OutputNames = properties.OutputNames;
controller.PropertiesConfig = properties;
return controller;
}
catch (System.Exception e)
@@ -177,104 +180,154 @@ namespace PepperDash.Essentials.DM
{
var tempX = x;
VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;}
else { return 0; };
});
AudioOutputFeedbacks[tempX] = new IntFeedback(() => {
if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; }
else { return 0; };
});
UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => {
if(Chassis.Outputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; }
else {return 0; };
});
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => {
if(Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
else {return 0; };
});
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
});
InputNameFeedbacks[tempX] = new StringFeedback(() => {
if (Chassis.Inputs[tempX].NameFeedback != null)
{
return Chassis.Inputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputNameFeedbacks[tempX] = new StringFeedback(() => {
if (Chassis.Outputs[tempX].NameFeedback != null)
{
return Chassis.Outputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].VideoOutFeedback != null)
{
return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
if (Chassis.Outputs[tempX] != null)
{
VideoOutputFeedbacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null)
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; }
else { return 0; };
});
AudioOutputFeedbacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; }
else { return 0; };
});
UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; }
else { return 0; };
});
OutputNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].NameFeedback != null)
{
return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
return Chassis.Outputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].VideoOutFeedback != null)
{
return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null)
{
return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
return Chassis.Outputs[tempX].EndpointOnlineFeedback;
});
}
if (Chassis.Inputs[tempX] != null)
{
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
else { return 0; };
});
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() =>
{
if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
else
return false;
});
InputNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Inputs[tempX].NameFeedback != null)
{
return Chassis.Inputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; });
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Outputs[tempX].EndpointOnlineFeedback; });
InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() =>
{
var inputCard = Chassis.Inputs[tempX];
if (inputCard.Card is DmcHd)
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
return Chassis.Inputs[tempX].EndpointOnlineFeedback;
});
if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue)
return 1;
InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() =>
{
var inputCard = Chassis.Inputs[tempX];
if (inputCard.Card is DmcHd)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else if (inputCard.Card is DmcHdDsp)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else if (inputCard.Card is Dmc4kHdBase)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
}
else if (inputCard.Card is Dmc4kCBase)
{
if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability;
}
else if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else if (inputCard.Card is Dmc4kCDspBase)
{
if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability;
}
else if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else
return 0;
}
else if (inputCard.Card is DmcHdDsp)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else if (inputCard.Card is Dmc4kHdBase)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
}
else
return 0;
});
});
}
}
}
@@ -327,33 +380,39 @@ namespace PepperDash.Essentials.DM
}
else if (type == "dmcc")
{
new DmcC(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new DmcC(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmccdsp")
{
new DmcCDsp(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new DmcCDsp(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kc")
{
new Dmc4kC(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kC(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kcdsp")
{
new Dmc4kCDsp(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kCDsp(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kzc")
{
new Dmc4kzC(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kzC(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kzcdsp")
{
new Dmc4kzCDsp(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kzCDsp(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmccat")
{
@@ -453,6 +512,11 @@ namespace PepperDash.Essentials.DM
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
AddInCardHdmiAndAudioLoopPorts(number);
}
void AddDmInCardPorts(uint number, ICec cecPort)
{
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
AddInCardHdmiAndAudioLoopPorts(number);
}
void AddHdmiInCardPorts(uint number, ICec cecPort)
{
@@ -536,7 +600,7 @@ namespace PepperDash.Essentials.DM
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
}
else if (type == "dmcStro")
else if (type == "dmcstro")
{
var outputCard = new DmcStroSingle(number, Chassis);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
@@ -583,10 +647,15 @@ namespace PepperDash.Essentials.DM
Debug.Console(2, this, "Adding input port '{0}'", portKey);
var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
if (cecPort != null)
inputPort.Port = cecPort;
if (inputPort != null)
{
if (cecPort != null)
inputPort.Port = cecPort;
InputPorts.Add(inputPort);
InputPorts.Add(inputPort);
}
else
Debug.Console(2, this, "inputPort is null");
}
/// <summary>

View File

@@ -31,7 +31,15 @@ namespace PepperDash.Essentials.DM.Config
[JsonProperty("outputNames")]
public Dictionary<uint, string> OutputNames { get; set; }
}
[JsonProperty("inputSlotSupportsHdcp2")]
public Dictionary<uint, bool> InputSlotSupportsHdcp2 { get; set; }
public DMChassisPropertiesConfig()
{
InputSlotSupportsHdcp2 = new Dictionary<uint, bool>();
}
}
/// <summary>
///

View File

@@ -21,6 +21,8 @@ namespace PepperDash.Essentials.DM
{
public DmTx401C Tx { get; private set; }
public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }

View File

@@ -59,9 +59,9 @@
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.4.20530, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\references\PepperDash_Core.dll</HintPath>
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

View File

@@ -63,9 +63,9 @@
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Lighting.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.4.20530, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\references\PepperDash_Core.dll</HintPath>
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>