mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Merge branch 'development' into feature/dmps-audio-fixes
This commit is contained in:
@@ -28,6 +28,7 @@ namespace PepperDash.Essentials
|
|||||||
HttpLogoServer LogoServer;
|
HttpLogoServer LogoServer;
|
||||||
|
|
||||||
private CTimer _startTimer;
|
private CTimer _startTimer;
|
||||||
|
private CEvent _initializeEvent;
|
||||||
private const long StartupTime = 500;
|
private const long StartupTime = 500;
|
||||||
|
|
||||||
public ControlSystem()
|
public ControlSystem()
|
||||||
@@ -46,6 +47,21 @@ namespace PepperDash.Essentials
|
|||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
{
|
{
|
||||||
_startTimer = new CTimer(StartSystem,StartupTime);
|
_startTimer = new CTimer(StartSystem,StartupTime);
|
||||||
|
|
||||||
|
|
||||||
|
// If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate
|
||||||
|
// to allow any HD-BaseT DM endpoints to register first.
|
||||||
|
if (Global.ControlSystemIsDmpsType)
|
||||||
|
{
|
||||||
|
_initializeEvent = new CEvent();
|
||||||
|
|
||||||
|
DeviceManager.AllDevicesActivated += (o, a) =>
|
||||||
|
{
|
||||||
|
_initializeEvent.Set();
|
||||||
|
};
|
||||||
|
|
||||||
|
_initializeEvent.Wait(30000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartSystem(object obj)
|
private void StartSystem(object obj)
|
||||||
@@ -343,7 +359,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
var prompt = Global.ControlSystem.ControllerPrompt;
|
var prompt = Global.ControlSystem.ControllerPrompt;
|
||||||
|
|
||||||
var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) &&
|
var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) ||
|
||||||
String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase);
|
String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
if (!typeMatch)
|
if (!typeMatch)
|
||||||
@@ -361,9 +377,7 @@ namespace PepperDash.Essentials
|
|||||||
if(propertiesConfig == null)
|
if(propertiesConfig == null)
|
||||||
propertiesConfig = new DM.Config.DmpsRoutingPropertiesConfig();
|
propertiesConfig = new DM.Config.DmpsRoutingPropertiesConfig();
|
||||||
|
|
||||||
var dmpsRoutingController = DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, propertiesConfig);
|
DeviceManager.AddDevice(DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, propertiesConfig));
|
||||||
|
|
||||||
DeviceManager.AddDevice(dmpsRoutingController);
|
|
||||||
}
|
}
|
||||||
else if (this.ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1)
|
else if (this.ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
new JoinMetadata
|
new JoinMetadata
|
||||||
{
|
{
|
||||||
Description = "DM Chassis enable audio breakaway routing",
|
Description = "DM Chassis enable audio breakaway routing",
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||||
JoinType = eJoinType.Digital
|
JoinType = eJoinType.Digital
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
new JoinMetadata
|
new JoinMetadata
|
||||||
{
|
{
|
||||||
Description = "DM Chassis enable USB breakaway routing",
|
Description = "DM Chassis enable USB breakaway routing",
|
||||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||||
JoinType = eJoinType.Digital
|
JoinType = eJoinType.Digital
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
{
|
{
|
||||||
public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
|
public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
|
||||||
{
|
{
|
||||||
|
[JoinName("SystemPowerOn")]
|
||||||
|
public JoinDataComplete SystemPowerOn = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "DMPS System Power On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("SystemPowerOff")]
|
||||||
|
public JoinDataComplete SystemPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "DMPS System Power Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
[JoinName("VideoSyncStatus")]
|
[JoinName("VideoSyncStatus")]
|
||||||
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
|
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
|
||||||
new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|||||||
@@ -32,6 +32,16 @@ namespace PepperDash.Essentials.Core
|
|||||||
// TODO: consider making this configurable later
|
// TODO: consider making this configurable later
|
||||||
public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US");
|
public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// True when the processor type is a DMPS variant
|
||||||
|
/// </summary>
|
||||||
|
public static bool ControlSystemIsDmpsType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ControlSystem.ControllerPrompt.ToLower().IndexOf("dmps") > -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The file path prefix to the folder containing configuration files
|
/// The file path prefix to the folder containing configuration files
|
||||||
|
|||||||
@@ -26,9 +26,16 @@ namespace PepperDash.Essentials.DM
|
|||||||
public CrestronControlSystem Dmps { get; set; }
|
public CrestronControlSystem Dmps { get; set; }
|
||||||
public ISystemControl SystemControl { get; private set; }
|
public ISystemControl SystemControl { get; private set; }
|
||||||
|
|
||||||
|
//Check if DMPS is a DMPS3-4K type for endpoint creation
|
||||||
|
public bool Dmps4kType { get; private set; }
|
||||||
|
|
||||||
//IroutingNumericEvent
|
//IroutingNumericEvent
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
||||||
|
|
||||||
|
//Feedback for DMPS System Power
|
||||||
|
public BoolFeedback SystemPowerOnFeedback { get; private set; }
|
||||||
|
public BoolFeedback SystemPowerOffFeedback { get; private set; }
|
||||||
|
|
||||||
// Feedbacks for EssentialDM
|
// Feedbacks for EssentialDM
|
||||||
public Dictionary<uint, IntFeedback> VideoOutputFeedbacks { get; private set; }
|
public Dictionary<uint, IntFeedback> VideoOutputFeedbacks { get; private set; }
|
||||||
public Dictionary<uint, IntFeedback> AudioOutputFeedbacks { get; private set; }
|
public Dictionary<uint, IntFeedback> AudioOutputFeedbacks { get; private set; }
|
||||||
@@ -113,9 +120,28 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmpsRoutingController(string key, string name, ISystemControl systemControl)
|
public DmpsRoutingController(string key, string name, ISystemControl systemControl)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
|
|
||||||
Dmps = Global.ControlSystem;
|
Dmps = Global.ControlSystem;
|
||||||
SystemControl = systemControl;
|
|
||||||
|
switch (name.Replace("-", "").Replace("c", "").Replace("C", ""))
|
||||||
|
{
|
||||||
|
case "dmps34k50":
|
||||||
|
case "dmps34k100":
|
||||||
|
case "dmps34k150":
|
||||||
|
SystemControl = systemControl as Dmps34K150CSystemControl;
|
||||||
|
Dmps4kType = true;
|
||||||
|
break;
|
||||||
|
case "dmps34k200":
|
||||||
|
case "dmps34k250":
|
||||||
|
case "dmps34k300":
|
||||||
|
case "dmps34k350":
|
||||||
|
SystemControl = systemControl as Dmps34K300CSystemControl;
|
||||||
|
Dmps4kType = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
SystemControl = systemControl as Dmps3SystemControl;
|
||||||
|
Dmps4kType = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||||
@@ -123,6 +149,29 @@ namespace PepperDash.Essentials.DM
|
|||||||
TxDictionary = new Dictionary<uint, string>();
|
TxDictionary = new Dictionary<uint, string>();
|
||||||
RxDictionary = new Dictionary<uint, string>();
|
RxDictionary = new Dictionary<uint, string>();
|
||||||
|
|
||||||
|
SystemPowerOnFeedback = new BoolFeedback(() =>
|
||||||
|
{
|
||||||
|
if (SystemControl is Dmps3SystemControl)
|
||||||
|
{
|
||||||
|
return ((Dmps3SystemControl)SystemControl).SystemPowerOnFeedBack.BoolValue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
SystemPowerOffFeedback = new BoolFeedback(() =>
|
||||||
|
{
|
||||||
|
if (SystemControl is Dmps3SystemControl)
|
||||||
|
{
|
||||||
|
return ((Dmps3SystemControl)SystemControl).SystemPowerOffFeedBack.BoolValue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
|
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
|
||||||
AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>();
|
AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>();
|
||||||
VideoInputSyncFeedbacks = new Dictionary<uint, BoolFeedback>();
|
VideoInputSyncFeedbacks = new Dictionary<uint, BoolFeedback>();
|
||||||
@@ -154,6 +203,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
// Subscribe to events
|
// Subscribe to events
|
||||||
Dmps.DMInputChange += Dmps_DMInputChange;
|
Dmps.DMInputChange += Dmps_DMInputChange;
|
||||||
Dmps.DMOutputChange += Dmps_DMOutputChange;
|
Dmps.DMOutputChange += Dmps_DMOutputChange;
|
||||||
|
Dmps.DMSystemChange += Dmps_DMSystemChange;
|
||||||
|
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
@@ -191,6 +241,22 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetPowerOn(bool a)
|
||||||
|
{
|
||||||
|
if (SystemControl is Dmps3SystemControl)
|
||||||
|
{
|
||||||
|
((Dmps3SystemControl)SystemControl).SystemPowerOn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPowerOff(bool a)
|
||||||
|
{
|
||||||
|
if (SystemControl is Dmps3SystemControl)
|
||||||
|
{
|
||||||
|
((Dmps3SystemControl)SystemControl).SystemPowerOff();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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 DmpsRoutingControllerJoinMap(joinStart);
|
var joinMap = new DmpsRoutingControllerJoinMap(joinStart);
|
||||||
@@ -211,9 +277,22 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
|
//Link up system
|
||||||
|
trilist.SetBoolSigAction(joinMap.SystemPowerOn.JoinNumber, SetPowerOn);
|
||||||
|
trilist.SetBoolSigAction(joinMap.SystemPowerOff.JoinNumber, SetPowerOff);
|
||||||
|
if (SystemPowerOnFeedback != null)
|
||||||
|
{
|
||||||
|
SystemPowerOnFeedback.LinkInputSig(
|
||||||
|
trilist.BooleanInput[joinMap.SystemPowerOn.JoinNumber]);
|
||||||
|
}
|
||||||
|
if (SystemPowerOffFeedback != null)
|
||||||
|
{
|
||||||
|
SystemPowerOffFeedback.LinkInputSig(
|
||||||
|
trilist.BooleanInput[joinMap.SystemPowerOff.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
// Link up outputs
|
// Link up outputs
|
||||||
LinkInputsToApi(trilist, joinMap);
|
LinkInputsToApi(trilist, joinMap);
|
||||||
|
|
||||||
LinkOutputsToApi(trilist, joinMap);
|
LinkOutputsToApi(trilist, joinMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -719,28 +798,36 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void Dmps_DMInputChange(Switch device, DMInputEventArgs args)
|
void Dmps_DMInputChange(Switch device, DMInputEventArgs args)
|
||||||
{
|
{
|
||||||
//Debug.Console(2, this, "DMSwitch:{0} Input:{1} Event:{2}'", this.Name, args.Number, args.EventId.ToString());
|
try
|
||||||
|
|
||||||
switch (args.EventId)
|
|
||||||
{
|
{
|
||||||
case (DMInputEventIds.OnlineFeedbackEventId):
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
case (DMInputEventIds.OnlineFeedbackEventId):
|
||||||
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
{
|
||||||
break;
|
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
||||||
}
|
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
||||||
case (DMInputEventIds.VideoDetectedEventId):
|
break;
|
||||||
{
|
}
|
||||||
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
|
case (DMInputEventIds.VideoDetectedEventId):
|
||||||
VideoInputSyncFeedbacks[args.Number].FireUpdate();
|
{
|
||||||
break;
|
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
|
||||||
}
|
VideoInputSyncFeedbacks[args.Number].FireUpdate();
|
||||||
case (DMInputEventIds.InputNameEventId):
|
break;
|
||||||
{
|
}
|
||||||
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
|
case (DMInputEventIds.InputNameEventId):
|
||||||
InputNameFeedbacks[args.Number].FireUpdate();
|
{
|
||||||
break;
|
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
|
||||||
}
|
if(InputNameFeedbacks.ContainsKey(args.Number))
|
||||||
|
{
|
||||||
|
InputNameFeedbacks[args.Number].FireUpdate();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "DMSwitch Input Change:{0} Input:{1} Event:{2}\rException: {3}", this.Name, args.Number, args.EventId.ToString(), e.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Dmps_DMOutputChange(Switch device, DMOutputEventArgs args)
|
void Dmps_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
@@ -812,6 +899,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Dmps_DMSystemChange(Switch device, DMSystemEventArgs args)
|
||||||
|
{
|
||||||
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case DMSystemEventIds.SystemPowerOnEventId:
|
||||||
|
{
|
||||||
|
SystemPowerOnFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DMSystemEventIds.SystemPowerOffEventId:
|
||||||
|
{
|
||||||
|
SystemPowerOffFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -879,7 +983,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
||||||
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
{
|
{
|
||||||
|
|
||||||
output.VideoOut = input;
|
output.VideoOut = input;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,7 +1006,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||||
{
|
{
|
||||||
|
|
||||||
output.USBRoutedTo = input;
|
output.USBRoutedTo = input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -329,7 +329,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||||
if (parentDev is DmpsRoutingController)
|
if (parentDev is DmpsRoutingController)
|
||||||
{
|
{
|
||||||
return GetDmRmcControllerForDmps(key, name, typeName, parentDev as DmpsRoutingController, props.ParentOutputNumber);
|
if ((parentDev as DmpsRoutingController).Dmps4kType)
|
||||||
|
{
|
||||||
|
return GetDmRmcControllerForDmps4k(key, name, typeName, parentDev as DmpsRoutingController, props.ParentOutputNumber);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetDmRmcControllerForDmps(key, name, typeName, ipid, parentDev as DmpsRoutingController, props.ParentOutputNumber);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!(parentDev is IDmSwitch))
|
if (!(parentDev is IDmSwitch))
|
||||||
{
|
{
|
||||||
@@ -395,25 +402,47 @@ namespace PepperDash.Essentials.DM
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps(string key, string name, string typeName,
|
||||||
|
uint ipid, DmpsRoutingController controller, uint num)
|
||||||
|
{
|
||||||
|
Func<string, string, uint, DMOutput, CrestronGenericBaseDevice> dmpsHandler;
|
||||||
|
if (ChassisDict.TryGetValue(typeName.ToLower(), out dmpsHandler))
|
||||||
|
{
|
||||||
|
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
||||||
|
|
||||||
|
if (output != null)
|
||||||
|
{
|
||||||
|
return dmpsHandler(key, name, ipid, output);
|
||||||
|
}
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||||
|
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS chassis. Output is not a DM Output.",
|
||||||
|
typeName, num);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS chassis", typeName, num);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static CrestronGenericBaseDevice GetDmRmcControllerForDmps4k(string key, string name, string typeName,
|
||||||
DmpsRoutingController controller, uint num)
|
DmpsRoutingController controller, uint num)
|
||||||
{
|
{
|
||||||
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmpsHandler;
|
Func<string, string, DMOutput, CrestronGenericBaseDevice> dmps4kHandler;
|
||||||
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmpsHandler))
|
if (ChassisCpu3Dict.TryGetValue(typeName.ToLower(), out dmps4kHandler))
|
||||||
{
|
{
|
||||||
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
var output = controller.Dmps.SwitcherOutputs[num] as DMOutput;
|
||||||
|
|
||||||
if (output != null)
|
if (output != null)
|
||||||
{
|
{
|
||||||
return dmpsHandler(key, name, output);
|
return dmps4kHandler(key, name, output);
|
||||||
}
|
}
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
Debug.Console(0, Debug.ErrorLogLevel.Error,
|
||||||
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS chassis. Output is not a DM Output.",
|
"Cannot attach DM-RMC of type '{0}' to output {1} on DMPS-4K chassis. Output is not a DM Output.",
|
||||||
typeName, num);
|
typeName, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS chassis", typeName, num);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Cannot create DM-RMC of type '{0}' to output {1} on DMPS-4K chassis", typeName, num);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,99 +65,136 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
|
||||||
if (!(parentDev is IDmSwitch))
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a DM Chassis.",
|
|
||||||
key, pKey);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var parentDev = DeviceManager.GetDeviceForKey(pKey);
|
||||||
|
DMInput dmInput;
|
||||||
|
bool noIpId = false;
|
||||||
|
|
||||||
|
if (parentDev is IDmSwitch)
|
||||||
|
{
|
||||||
// Get the Crestron chassis and link stuff up
|
// Get the Crestron chassis and link stuff up
|
||||||
var switchDev = (parentDev as IDmSwitch);
|
var switchDev = (parentDev as IDmSwitch);
|
||||||
var chassis = switchDev.Chassis;
|
var chassis = switchDev.Chassis;
|
||||||
|
|
||||||
var num = props.ParentInputNumber;
|
//Check that the input is within range of this chassis' possible inputs
|
||||||
if (num <= 0 || num > chassis.NumberOfInputs)
|
var num = props.ParentInputNumber;
|
||||||
{
|
if (num <= 0 || num > chassis.NumberOfInputs)
|
||||||
Debug.Console(0, "Cannot create DM device '{0}'. Input number '{1}' is out of range",
|
{
|
||||||
key, num);
|
Debug.Console(0, "Cannot create DM device '{0}'. Input number '{1}' is out of range",
|
||||||
return null;
|
key, num);
|
||||||
}
|
return null;
|
||||||
else
|
}
|
||||||
|
|
||||||
|
switchDev.TxDictionary.Add(num, key);
|
||||||
|
dmInput = chassis.Inputs[num];
|
||||||
|
|
||||||
|
//Determine if IpId is needed for this chassis type
|
||||||
|
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
|
||||||
|
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
|
||||||
|
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps ||
|
||||||
|
chassis is DmMd128x128 || chassis is DmMd64x64)
|
||||||
{
|
{
|
||||||
var controller = (parentDev as IDmSwitch);
|
noIpId = true;
|
||||||
controller.TxDictionary.Add(num, key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Catch constructor failures, mainly dues to IPID
|
}
|
||||||
try
|
else if(parentDev is DmpsRoutingController)
|
||||||
{
|
{
|
||||||
// Must use different constructor for CPU3 chassis types. No IPID
|
// Get the DMPS chassis and link stuff up
|
||||||
if (chassis is DmMd8x8Cpu3 || chassis is DmMd16x16Cpu3 ||
|
var dmpsDev = (parentDev as DmpsRoutingController);
|
||||||
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
|
var chassis = dmpsDev.Dmps;
|
||||||
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps||
|
|
||||||
chassis is DmMd128x128 || chassis is DmMd64x64)
|
//Check that the input is within range of this chassis' possible inputs
|
||||||
{
|
var num = props.ParentInputNumber;
|
||||||
if (typeName.StartsWith("dmtx200"))
|
if (num <= 0 || num > chassis.SwitcherInputs.Count)
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(chassis.Inputs[num]));
|
{
|
||||||
if (typeName.StartsWith("dmtx201c"))
|
Debug.Console(0, "Cannot create DMPS device '{0}'. Input number '{1}' is out of range",
|
||||||
return new DmTx201CController(key, name, new DmTx201C(chassis.Inputs[num]));
|
key, num);
|
||||||
if (typeName.StartsWith("dmtx201s"))
|
return null;
|
||||||
return new DmTx201SController(key, name, new DmTx201S(chassis.Inputs[num]));
|
}
|
||||||
if (typeName.StartsWith("dmtx4k100"))
|
|
||||||
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(chassis.Inputs[num]));
|
dmpsDev.TxDictionary.Add(num, key);
|
||||||
if (typeName.StartsWith("dmtx4kz100"))
|
noIpId = dmpsDev.Dmps4kType;
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
try
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(chassis.Inputs[num]));
|
{
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
dmInput = chassis.SwitcherInputs[num] as DMInput;
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(chassis.Inputs[num]));
|
}
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
catch
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(chassis.Inputs[num]));
|
{
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
Debug.Console(0, "Cannot create DMPS device '{0}'. Input number '{1}' is not a DM input", key, num);
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(chassis.Inputs[num]));
|
return null;
|
||||||
if (typeName.StartsWith("dmtx401"))
|
}
|
||||||
return new DmTx401CController(key, name, new DmTx401C(chassis.Inputs[num]));
|
}
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(chassis.Inputs[num]));
|
else
|
||||||
}
|
{
|
||||||
else
|
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a processor, DM Chassis or DMPS.", key, pKey);
|
||||||
{
|
return null;
|
||||||
if (typeName.StartsWith("dmtx200"))
|
|
||||||
return new DmTx200Controller(key, name, new DmTx200C2G(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"))
|
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("dmtx401"))
|
|
||||||
return new DmTx401CController(key, name, new DmTx401C(ipid, chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(ipid, chassis.Inputs[num]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
try
|
||||||
|
{
|
||||||
|
// Must use different constructor for CPU3 or DMPS3-4K types. No IPID
|
||||||
|
if (noIpId)
|
||||||
|
{
|
||||||
|
if (typeName.StartsWith("dmtx200"))
|
||||||
|
return new DmTx200Controller(key, name, new DmTx200C2G(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx201c"))
|
||||||
|
return new DmTx201CController(key, name, new DmTx201C(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx201s"))
|
||||||
|
return new DmTx201SController(key, name, new DmTx201S(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4k100"))
|
||||||
|
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4kz100"))
|
||||||
|
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4k202"))
|
||||||
|
return new DmTx4k202CController(key, name, new DmTx4k202C(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4kz202"))
|
||||||
|
return new DmTx4kz202CController(key, name, new DmTx4kz202C(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4k302"))
|
||||||
|
return new DmTx4k302CController(key, name, new DmTx4k302C(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4kz302"))
|
||||||
|
return new DmTx4kz302CController(key, name, new DmTx4kz302C(dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx401"))
|
||||||
|
return new DmTx401CController(key, name, new DmTx401C(dmInput));
|
||||||
|
if (typeName.StartsWith("hdbasettx"))
|
||||||
|
return new HDBaseTTxController(key, name, new HDTx3CB(dmInput));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (typeName.StartsWith("dmtx200"))
|
||||||
|
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx201c"))
|
||||||
|
return new DmTx201CController(key, name, new DmTx201C(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx201s"))
|
||||||
|
return new DmTx201SController(key, name, new DmTx201S(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4k100"))
|
||||||
|
return new DmTx4k100Controller(key, name, new DmTx4K100C1G(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4kz100"))
|
||||||
|
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4k202"))
|
||||||
|
return new DmTx4k202CController(key, name, new DmTx4k202C(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4kz202"))
|
||||||
|
return new DmTx4kz202CController(key, name, new DmTx4kz202C(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4k302"))
|
||||||
|
return new DmTx4k302CController(key, name, new DmTx4k302C(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx4kz302"))
|
||||||
|
return new DmTx4kz302CController(key, name, new DmTx4kz302C(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("dmtx401"))
|
||||||
|
return new DmTx401CController(key, name, new DmTx401C(ipid, dmInput));
|
||||||
|
if (typeName.StartsWith("hdbasettx"))
|
||||||
|
return new HDBaseTTxController(key, name, new HDTx3CB(ipid, dmInput));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
JoinType = eJoinType.Digital
|
JoinType = eJoinType.Digital
|
||||||
});
|
});
|
||||||
|
|
||||||
|
[JoinName("EnteringStandbyMode")]
|
||||||
|
public JoinDataComplete EnteringStandbyMode = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 229,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "High to indicate that the codec is entering standby mode",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -319,7 +319,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
SupportsCameraOff = true;
|
SupportsCameraOff = true;
|
||||||
|
|
||||||
DoNotDisturbModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Conference.DoNotDisturb.BoolValue);
|
DoNotDisturbModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Conference.DoNotDisturb.BoolValue);
|
||||||
HalfWakeModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Standby.State.Value == "Halfwake");
|
HalfWakeModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Standby.State.Value.ToLower() == "halfwake");
|
||||||
|
EnteringStandbyModeFeedback = new BoolFeedback(() => CodecStatus.Status.Standby.State.Value.ToLower() == "enteringstandby");
|
||||||
|
|
||||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
||||||
|
|
||||||
@@ -422,6 +423,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
StandbyIsOnFeedback.FireUpdate();
|
StandbyIsOnFeedback.FireUpdate();
|
||||||
HalfWakeModeIsOnFeedback.FireUpdate();
|
HalfWakeModeIsOnFeedback.FireUpdate();
|
||||||
|
EnteringStandbyModeFeedback.FireUpdate();
|
||||||
});
|
});
|
||||||
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
||||||
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
||||||
@@ -1546,6 +1548,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
halfwakeCodec.StandbyIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.ActivateStandby.JoinNumber]);
|
halfwakeCodec.StandbyIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.ActivateStandby.JoinNumber]);
|
||||||
halfwakeCodec.StandbyIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.DeactivateStandby.JoinNumber]);
|
halfwakeCodec.StandbyIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.DeactivateStandby.JoinNumber]);
|
||||||
halfwakeCodec.HalfWakeModeIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.ActivateHalfWakeMode.JoinNumber]);
|
halfwakeCodec.HalfWakeModeIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.ActivateHalfWakeMode.JoinNumber]);
|
||||||
|
halfwakeCodec.EnteringStandbyModeFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnteringStandbyMode.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetSigFalseAction(joinMap.ActivateStandby.JoinNumber, () => halfwakeCodec.StandbyActivate());
|
trilist.SetSigFalseAction(joinMap.ActivateStandby.JoinNumber, () => halfwakeCodec.StandbyActivate());
|
||||||
trilist.SetSigFalseAction(joinMap.DeactivateStandby.JoinNumber, () => halfwakeCodec.StandbyDeactivate());
|
trilist.SetSigFalseAction(joinMap.DeactivateStandby.JoinNumber, () => halfwakeCodec.StandbyDeactivate());
|
||||||
@@ -2157,6 +2160,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
public BoolFeedback HalfWakeModeIsOnFeedback { get; private set; }
|
public BoolFeedback HalfWakeModeIsOnFeedback { get; private set; }
|
||||||
|
|
||||||
|
public BoolFeedback EnteringStandbyModeFeedback { get; private set; }
|
||||||
|
|
||||||
public void HalfwakeActivate()
|
public void HalfwakeActivate()
|
||||||
{
|
{
|
||||||
SendText("xCommand Standby Halfwake");
|
SendText("xCommand Standby Halfwake");
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
{
|
{
|
||||||
BoolFeedback HalfWakeModeIsOnFeedback { get; }
|
BoolFeedback HalfWakeModeIsOnFeedback { get; }
|
||||||
|
|
||||||
|
BoolFeedback EnteringStandbyModeFeedback { get; }
|
||||||
|
|
||||||
void HalfwakeActivate();
|
void HalfwakeActivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.0.48" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
<package id="PepperDashCore" version="1.1.0" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user