mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Added Crestron HDMD4x14kE switcher. Awaiting testing
This commit is contained in:
@@ -3,10 +3,119 @@ 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.DM;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.DM.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Chassis
|
namespace PepperDash.Essentials.DM.Chassis
|
||||||
{
|
{
|
||||||
public class HdMdMxNController
|
public class HdMdNxM4kEController : Device, IRoutingInputsOutputs, IRouting
|
||||||
{
|
{
|
||||||
|
public HdMdNxM Chassis { get; private set; }
|
||||||
|
|
||||||
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <param name="chassis"></param>
|
||||||
|
public HdMdNxM4kEController(string key, string name, HdMdNxM chassis,
|
||||||
|
HdMdNxM4kEPropertiesConfig props)
|
||||||
|
: base(key, name)
|
||||||
|
{
|
||||||
|
Chassis = chassis;
|
||||||
|
|
||||||
|
// logical ports
|
||||||
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
|
for (int i = 1; i <= 4; i++)
|
||||||
|
{
|
||||||
|
InputPorts.Add(new RoutingInputPort("hdmiIn" + i, eRoutingSignalType.AudioVideo,
|
||||||
|
eRoutingPortConnectionType.Hdmi, 1, this, false));
|
||||||
|
}
|
||||||
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||||
|
OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
|
eRoutingPortConnectionType.Hdmi, null, this));
|
||||||
|
|
||||||
|
// physical settings
|
||||||
|
if (props != null && props.Inputs != null)
|
||||||
|
{
|
||||||
|
foreach (var kvp in props.Inputs)
|
||||||
|
{
|
||||||
|
var inputNum = Convert.ToUInt32(kvp.Key);
|
||||||
|
|
||||||
|
var port = chassis.HdmiInputs[inputNum].HdmiInputPort;
|
||||||
|
// set hdcp disables
|
||||||
|
if (kvp.Value.DisableHdcp)
|
||||||
|
port.HdcpSupportOff();
|
||||||
|
else
|
||||||
|
port.HdcpSupportOn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CustomActivate()
|
||||||
|
{
|
||||||
|
var result = Chassis.Register();
|
||||||
|
if (result != Crestron.SimplSharpPro.eDeviceRegistrationUnRegistrationResponse.Success)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Device registration failed: {0}", result);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.CustomActivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region IRouting Members
|
||||||
|
|
||||||
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
|
{
|
||||||
|
Chassis.HdmiOutputs[1].VideoOut = Chassis.HdmiInputs[(uint)inputSelector];
|
||||||
|
Chassis.VideoEnter.Pulse();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <param name="properties"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static HdMdNxM4kEController GetController(string key, string name,
|
||||||
|
string type, HdMdNxM4kEPropertiesConfig properties)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var ipid = properties.Control.IpIdInt;
|
||||||
|
var address = properties.Control.TcpSshProperties.Address;
|
||||||
|
|
||||||
|
type = type.ToLower();
|
||||||
|
if (type == "hdmd4x14ke")
|
||||||
|
{
|
||||||
|
var chassis = new HdMd4x14kE(ipid, address, Global.ControlSystem);
|
||||||
|
return new HdMdNxM4kEController(key, name, chassis, properties);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "ERROR Creating device key {0}: \r{1}", key, e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,6 +47,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
return PepperDash.Essentials.DM.DmRmcHelper.GetDmRmcController(key, name, type, props);
|
return PepperDash.Essentials.DM.DmRmcHelper.GetDmRmcController(key, name, type, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (typeName.Equals("hdmd4x14ke"))
|
||||||
|
{
|
||||||
|
var props = JsonConvert.DeserializeObject
|
||||||
|
<PepperDash.Essentials.DM.Config.HdMdNxM4kEPropertiesConfig>(properties.ToString());
|
||||||
|
return PepperDash.Essentials.DM.Chassis.HdMdNxM4kEController.GetController(key, name, type, props);
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,9 +91,12 @@
|
|||||||
<Compile Include="Cards REMOVE\DmInputCardBase.cs" />
|
<Compile Include="Cards REMOVE\DmInputCardBase.cs" />
|
||||||
<Compile Include="Chassis\DmCardAudioOutput.cs" />
|
<Compile Include="Chassis\DmCardAudioOutput.cs" />
|
||||||
<Compile Include="Chassis\DmChassisController.cs" />
|
<Compile Include="Chassis\DmChassisController.cs" />
|
||||||
|
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||||
<Compile Include="Config\DmRmcConfig.cs" />
|
<Compile Include="Config\DmRmcConfig.cs" />
|
||||||
<Compile Include="Config\DmTxConfig.cs" />
|
<Compile Include="Config\DmTxConfig.cs" />
|
||||||
<Compile Include="Config\DMChassisConfig.cs" />
|
<Compile Include="Config\DMChassisConfig.cs" />
|
||||||
|
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
|
||||||
|
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||||
<Compile Include="DmPortName.cs" />
|
<Compile Include="DmPortName.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmc4KScalerCController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmc4KScalerCController.cs" />
|
||||||
<Compile Include="Endpoints\Receivers\DmRmcScalerCController.cs" />
|
<Compile Include="Endpoints\Receivers\DmRmcScalerCController.cs" />
|
||||||
|
|||||||
@@ -245,8 +245,9 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(1, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
Debug.Console(1, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
||||||
DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemControllerBase((EssentialsHuddleSpaceRoom)room, 0xf1));
|
DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemControllerBase((EssentialsHuddleSpaceRoom)room, 0xf1));
|
||||||
|
|
||||||
var bridge = new CotijaEssentialsHuddleSpaceRoomBridge(room as EssentialsHuddleSpaceRoom);
|
Debug.Console(0, "******* RE-ENABLE COTIJA PROPERLY *******");
|
||||||
AddBridgePostActivationHelper(bridge);
|
//var bridge = new CotijaEssentialsHuddleSpaceRoomBridge(room as EssentialsHuddleSpaceRoom);
|
||||||
|
//AddBridgePostActivationHelper(bridge);
|
||||||
}
|
}
|
||||||
else if (room is EssentialsHuddleVtc1Room)
|
else if (room is EssentialsHuddleVtc1Room)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user