mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Merge branch 'development' into feature/room-combining
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,24 @@ 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)
|
||||||
|
{
|
||||||
|
Debug.Console(2, "******************* InitializeSystem() Entering **********************");
|
||||||
|
|
||||||
|
_initializeEvent = new CEvent();
|
||||||
|
|
||||||
|
DeviceManager.AllDevicesActivated += (o, a) =>
|
||||||
|
{
|
||||||
|
_initializeEvent.Set();
|
||||||
|
Debug.Console(2, "******************* InitializeSystem() Exiting **********************");
|
||||||
|
};
|
||||||
|
|
||||||
|
_initializeEvent.Wait(30000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartSystem(object obj)
|
private void StartSystem(object obj)
|
||||||
@@ -343,7 +362,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 +380,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
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
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 });
|
||||||
@@ -61,5 +69,5 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
protected DmpsRoutingControllerJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
protected DmpsRoutingControllerJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,19 +69,28 @@ namespace PepperDash.Essentials.Core
|
|||||||
public override bool CustomActivate()
|
public override bool CustomActivate()
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Activating");
|
Debug.Console(0, this, "Activating");
|
||||||
if (!PreventRegistration)
|
if (!PreventRegistration)
|
||||||
{
|
{
|
||||||
//Debug.Console(1, this, " Does not require registration. Skipping");
|
//Debug.Console(1, this, " Does not require registration. Skipping");
|
||||||
|
|
||||||
var response = Hardware.RegisterWithLogging(Key);
|
var response = Hardware.RegisterWithLogging(Key);
|
||||||
if (response != eDeviceRegistrationUnRegistrationResponse.Success)
|
if (response != eDeviceRegistrationUnRegistrationResponse.Success)
|
||||||
{
|
{
|
||||||
//Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response);
|
//Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
IsRegistered.FireUpdate();
|
IsRegistered.FireUpdate();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddPostActivationAction(() =>
|
||||||
|
{
|
||||||
|
var response = Hardware.RegisterWithLogging(Key);
|
||||||
|
|
||||||
|
IsRegistered.FireUpdate();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var f in Feedbacks)
|
foreach (var f in Feedbacks)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,27 @@ 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>
|
||||||
|
/// True when the processor type is a DMPS 4K variant
|
||||||
|
/// </summary>
|
||||||
|
public static bool ControlSystemIsDmps4kType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ControlSystemIsDmpsType && ControlSystem.ControllerPrompt.ToLower().IndexOf("4k") > -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The file path prefix to the folder containing configuration files
|
/// The file path prefix to the folder containing configuration files
|
||||||
|
|||||||
@@ -25,9 +25,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; }
|
||||||
@@ -112,10 +119,29 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <param name="chassis"></param>
|
/// <param name="chassis"></param>
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var ipid = props.Control.IpIdInt;
|
var ipid = props.Control.IpIdInt;
|
||||||
var pKey = props.ParentDeviceKey.ToLower();
|
var pKey = props.ParentDeviceKey.ToLower();
|
||||||
|
|
||||||
if (pKey == "processor")
|
if (pKey == "processor")
|
||||||
{
|
{
|
||||||
// Catch constructor failures, mainly dues to IPID
|
// Catch constructor failures, mainly dues to IPID
|
||||||
try
|
try
|
||||||
@@ -65,99 +65,135 @@ 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 isCpu3 = 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);
|
isCpu3 = 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"))
|
|
||||||
return new DmTx4kz100Controller(key, name, new DmTx4kz100C1G(chassis.Inputs[num]));
|
try
|
||||||
if (typeName.StartsWith("dmtx4k202"))
|
{
|
||||||
return new DmTx4k202CController(key, name, new DmTx4k202C(chassis.Inputs[num]));
|
dmInput = chassis.SwitcherInputs[num] as DMInput;
|
||||||
if (typeName.StartsWith("dmtx4kz202"))
|
}
|
||||||
return new DmTx4kz202CController(key, name, new DmTx4kz202C(chassis.Inputs[num]));
|
catch
|
||||||
if (typeName.StartsWith("dmtx4k302"))
|
{
|
||||||
return new DmTx4k302CController(key, name, new DmTx4k302C(chassis.Inputs[num]));
|
Debug.Console(0, "Cannot create DMPS device '{0}'. Input number '{1}' is not a DM input", key, num);
|
||||||
if (typeName.StartsWith("dmtx4kz302"))
|
return null;
|
||||||
return new DmTx4kz302CController(key, name, new DmTx4kz302C(chassis.Inputs[num]));
|
}
|
||||||
if (typeName.StartsWith("dmtx401"))
|
}
|
||||||
return new DmTx401CController(key, name, new DmTx401C(chassis.Inputs[num]));
|
|
||||||
if (typeName.StartsWith("hdbasettx"))
|
else
|
||||||
return new HDBaseTTxController(key, name, new HDTx3CB(chassis.Inputs[num]));
|
{
|
||||||
}
|
Debug.Console(0, "Cannot create DM device '{0}'. '{1}' is not a processor, DM Chassis or DMPS.", key, pKey);
|
||||||
else
|
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 (isCpu3 || Global.ControlSystemIsDmps4kType)
|
||||||
|
{
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,11 +221,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
protected DmTxControllerBase(string key, string name, EndpointTransmitterBase hardware)
|
protected DmTxControllerBase(string key, string name, EndpointTransmitterBase hardware)
|
||||||
: base(key, name, hardware)
|
: base(key, name, hardware)
|
||||||
{
|
{
|
||||||
// if wired to a chassis, skip registration step in base class
|
// if wired to a chassis or DMPS, skip registration step in base class
|
||||||
if (hardware.DMInput != null)
|
if (hardware.DMInput != null || (Global.ControlSystemIsDmpsType && hardware.DMInput != null))
|
||||||
{
|
{
|
||||||
this.PreventRegistration = true;
|
this.PreventRegistration = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddToFeedbackList(ActiveVideoInputFeedback);
|
AddToFeedbackList(ActiveVideoInputFeedback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
|
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
|
||||||
public enum eExternalSourceType {camera, desktop, document_camera, mediaplayer, PC, whiteboard, other}
|
public enum eExternalSourceType {camera, desktop, document_camera, mediaplayer, PC, whiteboard, other}
|
||||||
public enum eExternalSourceMode {Ready, NotReady, Hidden, Error}
|
public enum eExternalSourceMode {Ready, NotReady, Hidden, Error}
|
||||||
|
|
||||||
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectoryHistoryStack,
|
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
|
||||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
||||||
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets,
|
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets,
|
||||||
IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute, IHasDoNotDisturbMode,
|
IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute, IHasDoNotDisturbMode,
|
||||||
@@ -108,9 +108,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public CodecDirectory DirectoryRoot { get; private set; }
|
public CodecDirectory DirectoryRoot { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
private CodecDirectory _currentDirectoryResult;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the current state of the directory and is computed on get
|
/// Represents the current state of the directory and is computed on get
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -118,15 +115,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return _currentDirectoryResult;
|
if (DirectoryBrowseHistory.Count > 0)
|
||||||
}
|
return DirectoryBrowseHistory[DirectoryBrowseHistory.Count - 1];
|
||||||
private set
|
else
|
||||||
{
|
return DirectoryRoot;
|
||||||
_currentDirectoryResult = value;
|
|
||||||
|
|
||||||
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
|
||||||
|
|
||||||
OnDirectoryResultReturned(_currentDirectoryResult);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,8 +129,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public List<CodecDirectory> DirectoryBrowseHistory { get; private set; }
|
public List<CodecDirectory> DirectoryBrowseHistory { get; private set; }
|
||||||
|
|
||||||
public Stack<CodecDirectory> DirectoryBrowseHistoryStack { get; private set; }
|
|
||||||
|
|
||||||
public CodecScheduleAwareness CodecSchedule { get; private set; }
|
public CodecScheduleAwareness CodecSchedule { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -329,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");
|
||||||
|
|
||||||
@@ -367,7 +358,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
CallHistory = new CodecCallHistory();
|
CallHistory = new CodecCallHistory();
|
||||||
|
|
||||||
if (props.Favorites != null)
|
|
||||||
|
if (props.Favorites != null)
|
||||||
{
|
{
|
||||||
CallFavorites = new CodecCallFavorites();
|
CallFavorites = new CodecCallFavorites();
|
||||||
CallFavorites.Favorites = props.Favorites;
|
CallFavorites.Favorites = props.Favorites;
|
||||||
@@ -377,12 +369,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
DirectoryBrowseHistory = new List<CodecDirectory>();
|
DirectoryBrowseHistory = new List<CodecDirectory>();
|
||||||
|
|
||||||
DirectoryBrowseHistoryStack = new Stack<CodecDirectory>();
|
CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => DirectoryBrowseHistory.Count > 0);
|
||||||
|
|
||||||
CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => CurrentDirectoryResult != DirectoryRoot);
|
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
||||||
|
|
||||||
CodecSchedule = new CodecScheduleAwareness();
|
CodecSchedule = new CodecScheduleAwareness();
|
||||||
|
|
||||||
|
//Set Feedback Actions
|
||||||
|
SetFeedbackActions();
|
||||||
|
|
||||||
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
||||||
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
@@ -417,9 +412,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
BrandingEnabled = props.UiBranding.Enable;
|
BrandingEnabled = props.UiBranding.Enable;
|
||||||
|
|
||||||
_brandingUrl = props.UiBranding.BrandingUrl;
|
_brandingUrl = props.UiBranding.BrandingUrl;
|
||||||
|
|
||||||
//Set Feedback Actions
|
|
||||||
SetFeedbackActions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetFeedbackActions()
|
private void SetFeedbackActions()
|
||||||
@@ -431,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;
|
||||||
@@ -449,11 +442,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Error setting MainVideoMute Action: {0}", ex);
|
Debug.Console(0, this, "Error setting MainVideuMute Action: {0}", ex);
|
||||||
|
|
||||||
if (ex.InnerException != null)
|
if (ex.InnerException != null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Error setting MainVideoMute Action: {0}", ex);
|
Debug.Console(0, this, "Error setting MainVideuMute Action: {0}", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1051,8 +1044,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
PhonebookSyncState.PhonebookRootEntriesReceived();
|
PhonebookSyncState.PhonebookRootEntriesReceived();
|
||||||
|
|
||||||
CurrentDirectoryResult = DirectoryRoot;
|
|
||||||
|
|
||||||
PrintDirectory(DirectoryRoot);
|
PrintDirectory(DirectoryRoot);
|
||||||
}
|
}
|
||||||
else if (PhonebookSyncState.InitialSyncComplete)
|
else if (PhonebookSyncState.InitialSyncComplete)
|
||||||
@@ -1064,7 +1055,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
PrintDirectory(directoryResults);
|
PrintDirectory(directoryResults);
|
||||||
|
|
||||||
CurrentDirectoryResult = directoryResults;
|
DirectoryBrowseHistory.Add(directoryResults);
|
||||||
|
|
||||||
|
OnDirectoryResultReturned(directoryResults);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1095,6 +1088,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
/// <param name="result"></param>
|
/// <param name="result"></param>
|
||||||
void OnDirectoryResultReturned(CodecDirectory result)
|
void OnDirectoryResultReturned(CodecDirectory result)
|
||||||
{
|
{
|
||||||
|
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
||||||
|
|
||||||
// This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology
|
// This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology
|
||||||
var handler = DirectoryResultReturned;
|
var handler = DirectoryResultReturned;
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
@@ -1246,8 +1241,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
/// <param name="searchString"></param>
|
/// <param name="searchString"></param>
|
||||||
public void SearchDirectory(string searchString)
|
public void SearchDirectory(string searchString)
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistoryStack.Push(CurrentDirectoryResult);
|
|
||||||
|
|
||||||
SendText(string.Format("xCommand Phonebook Search SearchString: \"{0}\" PhonebookType: {1} ContactType: Contact Limit: {2}", searchString, PhonebookMode, PhonebookResultsLimit));
|
SendText(string.Format("xCommand Phonebook Search SearchString: \"{0}\" PhonebookType: {1} ContactType: Contact Limit: {2}", searchString, PhonebookMode, PhonebookResultsLimit));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1257,8 +1250,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
/// <param name="folderId"></param>
|
/// <param name="folderId"></param>
|
||||||
public void GetDirectoryFolderContents(string folderId)
|
public void GetDirectoryFolderContents(string folderId)
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistoryStack.Push(CurrentDirectoryResult);
|
|
||||||
|
|
||||||
SendText(string.Format("xCommand Phonebook Search FolderId: {0} PhonebookType: {1} ContactType: Any Limit: {2}", folderId, PhonebookMode, PhonebookResultsLimit));
|
SendText(string.Format("xCommand Phonebook Search FolderId: {0} PhonebookType: {1} ContactType: Any Limit: {2}", folderId, PhonebookMode, PhonebookResultsLimit));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1268,12 +1259,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void GetDirectoryParentFolderContents()
|
public void GetDirectoryParentFolderContents()
|
||||||
{
|
{
|
||||||
if (DirectoryBrowseHistoryStack.Count == 0)
|
var currentDirectory = new CodecDirectory();
|
||||||
|
|
||||||
|
if (DirectoryBrowseHistory.Count > 0)
|
||||||
{
|
{
|
||||||
return;
|
var lastItemIndex = DirectoryBrowseHistory.Count - 1;
|
||||||
|
var parentDirectoryContents = DirectoryBrowseHistory[lastItemIndex];
|
||||||
|
|
||||||
|
DirectoryBrowseHistory.Remove(DirectoryBrowseHistory[lastItemIndex]);
|
||||||
|
|
||||||
|
currentDirectory = parentDirectoryContents;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentDirectory = DirectoryRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentDirectoryResult = DirectoryBrowseHistoryStack.Pop();
|
OnDirectoryResultReturned(currentDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1281,9 +1284,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetCurrentDirectoryToRoot()
|
public void SetCurrentDirectoryToRoot()
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistoryStack.Clear();
|
DirectoryBrowseHistory.Clear();
|
||||||
|
|
||||||
CurrentDirectoryResult = DirectoryRoot;
|
OnDirectoryResultReturned(DirectoryRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1545,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());
|
||||||
@@ -1937,27 +1941,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
try
|
if (CodecStatus.Status.SIP != null && CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null)
|
||||||
{
|
{
|
||||||
if (CodecStatus.Status.SIP != null && !string.IsNullOrEmpty(CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value))
|
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
|
||||||
{
|
|
||||||
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
|
|
||||||
}
|
|
||||||
else if (CodecStatus.Status.UserInterface != null &&
|
|
||||||
CodecStatus.Status.UserInterface.ContactInfo != null && CodecStatus.Status.UserInterface.ContactInfo.ContactMethod != null)
|
|
||||||
{
|
|
||||||
return CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
else if (CodecStatus.Status.UserInterface != null &&
|
||||||
|
CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value != null)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Error getting SipUri: {0}", e);
|
return CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2166,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.1.0" 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