mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-18 22:25:00 +00:00
Compare commits
35 Commits
1.10.1-hot
...
1.10.8-hot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fe2d04d31 | ||
|
|
358f44cfe5 | ||
|
|
d7cccc0709 | ||
|
|
81b1117310 | ||
|
|
fb689c4484 | ||
|
|
40cb1b0fcf | ||
|
|
4574941288 | ||
|
|
122abc56e5 | ||
|
|
074ee190ad | ||
|
|
68a0157fbe | ||
|
|
e5393deea8 | ||
|
|
c446c3a976 | ||
|
|
49e44ec850 | ||
|
|
0ec42f8de2 | ||
|
|
008c82edb9 | ||
|
|
3033322212 | ||
|
|
5b350c7a0c | ||
|
|
afd2198eef | ||
|
|
05dadbe8ee | ||
|
|
c39fd231bf | ||
|
|
0df587071d | ||
|
|
cd4f2d5edd | ||
|
|
59b18d713b | ||
|
|
a7db15d9fd | ||
|
|
b8442e7048 | ||
|
|
1e65c961c6 | ||
|
|
bdc4f0ae28 | ||
|
|
82ac34d3b6 | ||
|
|
23555e5174 | ||
|
|
7c892b4f71 | ||
|
|
1abe54fa48 | ||
|
|
309605ee38 | ||
|
|
e2b8e356ff | ||
|
|
832102f4bb | ||
|
|
5f668c7173 |
@@ -708,11 +708,12 @@ namespace PepperDash.Essentials
|
|||||||
IRoutingSink dest = null;
|
IRoutingSink dest = null;
|
||||||
|
|
||||||
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
|
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
|
||||||
dest = DefaultAudioDevice as IRoutingSinkNoSwitching;
|
dest = DefaultAudioDevice as IRoutingSink;
|
||||||
else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
|
else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
|
||||||
dest = DefaultDisplay;
|
dest = DefaultDisplay;
|
||||||
else
|
else
|
||||||
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching;
|
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink;
|
||||||
|
|
||||||
|
|
||||||
if (dest == null)
|
if (dest == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using PepperDash.Essentials.Room.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay
|
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay, IHasCurrentVolumeControls
|
||||||
{
|
{
|
||||||
bool ExcludeFromGlobalFunctions { get; }
|
bool ExcludeFromGlobalFunctions { get; }
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -66,7 +66,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
public class C2NIoControllerFactory : EssentialsDeviceFactory<C2nRthsController>
|
public class C2NIoControllerFactory : EssentialsDeviceFactory<C2NIoController>
|
||||||
{
|
{
|
||||||
public C2NIoControllerFactory()
|
public C2NIoControllerFactory()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
|
Debug.Console(1, "Factory Attempting to create new DIN-CEN-CN2 Device");
|
||||||
|
|
||||||
var control = CommFactory.GetControlPropertiesConfig(dc);
|
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
var ipid = control.IpIdInt;
|
var ipid = control.IpIdInt;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// Wrapper class for CEN-IO-DIGIN-104 digital input module
|
/// Wrapper class for CEN-IO-DIGIN-104 digital input module
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper class for the CEN-IO-DIGIN-104 diginal input module")]
|
[Description("Wrapper class for the CEN-IO-DIGIN-104 diginal input module")]
|
||||||
public class CenIoDigIn104Controller : EssentialsDevice, IDigitalInputPorts
|
public class CenIoDigIn104Controller : CrestronGenericBaseDevice, IDigitalInputPorts
|
||||||
{
|
{
|
||||||
public CenIoDi104 Di104 { get; private set; }
|
public CenIoDi104 Di104 { get; private set; }
|
||||||
|
|
||||||
@@ -52,10 +52,17 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new CEN-DIGIN-104 Device");
|
Debug.Console(1, "Factory Attempting to create new CEN-DIGIN-104 Device");
|
||||||
|
|
||||||
var control = CommFactory.GetControlPropertiesConfig(dc);
|
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
var ipid = control.IpIdInt;
|
if (control == null)
|
||||||
|
{
|
||||||
return new CenIoDigIn104Controller(dc.Key, dc.Name, new Crestron.SimplSharpPro.GeneralIO.CenIoDi104(ipid, Global.ControlSystem));
|
Debug.Console(1, "Factory failed to create a new CEN-DIGIN-104 Device, control properties not found");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var ipid = control.IpIdInt;
|
||||||
|
if (ipid != 0) return new CenIoDigIn104Controller(dc.Key, dc.Name, new CenIoDi104(ipid, Global.ControlSystem));
|
||||||
|
|
||||||
|
Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device using IP-ID-{0}", ipid);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro;
|
||||||
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Wrapper class for CEN-IO-IR-104 module
|
||||||
|
/// </summary>
|
||||||
|
[Description("Wrapper class for the CEN-IO-IR-104 module")]
|
||||||
|
public class CenIoIr104Controller : CrestronGenericBaseDevice, IIROutputPorts
|
||||||
|
{
|
||||||
|
private readonly CenIoIr104 _ir104;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <param name="ir104"></param>
|
||||||
|
public CenIoIr104Controller(string key, string name, CenIoIr104 ir104)
|
||||||
|
: base(key, name, ir104)
|
||||||
|
{
|
||||||
|
_ir104 = ir104;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IDigitalInputPorts Members
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IR port collection
|
||||||
|
/// </summary>
|
||||||
|
public CrestronCollection<IROutputPort> IROutputPorts
|
||||||
|
{
|
||||||
|
get { return _ir104.IROutputPorts; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of relay ports property
|
||||||
|
/// </summary>
|
||||||
|
public int NumberOfIROutputPorts
|
||||||
|
{
|
||||||
|
get { return _ir104.NumberOfIROutputPorts; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CEN-IO-IR-104 controller fatory
|
||||||
|
/// </summary>
|
||||||
|
public class CenIoIr104ControllerFactory : EssentialsDeviceFactory<CenIoIr104Controller>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
public CenIoIr104ControllerFactory()
|
||||||
|
{
|
||||||
|
TypeNames = new List<string>() { "cenioir104" };
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Build device CEN-IO-IR-104
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dc"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory Attempting to create new CEN-IO-IR-104 Device");
|
||||||
|
|
||||||
|
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
|
if (control == null)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device, control properties not found");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var ipid = control.IpIdInt;
|
||||||
|
if(ipid != 0) return new CenIoIr104Controller(dc.Key, dc.Name, new CenIoIr104(ipid, Global.ControlSystem));
|
||||||
|
|
||||||
|
Debug.Console(1, "Factory failed to create a new CEN-IO-IR-104 Device using IP-ID-{0}", ipid);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// Wrapper class for CEN-IO-RY-104 relay module
|
/// Wrapper class for CEN-IO-RY-104 relay module
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper class for the CEN-IO-RY-104 relay module")]
|
[Description("Wrapper class for the CEN-IO-RY-104 relay module")]
|
||||||
public class CenIoRy104Controller : EssentialsDevice, IRelayPorts
|
public class CenIoRy104Controller : CrestronGenericBaseDevice, IRelayPorts
|
||||||
{
|
{
|
||||||
private readonly CenIoRy104 _ry104;
|
private readonly CenIoRy104 _ry104;
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="ry104"></param>
|
/// <param name="ry104"></param>
|
||||||
public CenIoRy104Controller(string key, string name, CenIoRy104 ry104)
|
public CenIoRy104Controller(string key, string name, CenIoRy104 ry104)
|
||||||
: base(key, name)
|
: base(key, name, ry104)
|
||||||
{
|
{
|
||||||
_ry104 = ry104;
|
_ry104 = ry104;
|
||||||
}
|
}
|
||||||
@@ -62,8 +62,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
var controlPropertiesConfig = CommFactory.GetControlPropertiesConfig(dc);
|
var controlPropertiesConfig = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
if (controlPropertiesConfig == null)
|
if (controlPropertiesConfig == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory failed to create a new CEN-IO-RY-104 Device");
|
Debug.Console(1, "Factory failed to create a new CEN-IO-RY-104 Device, control properties not found");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,9 +105,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey,
|
protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey,
|
||||||
EiscApiAdvanced bridge)
|
EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var inputNumber = 0;
|
|
||||||
var inputKeys = new List<string>();
|
|
||||||
|
|
||||||
var joinMap = new DisplayControllerJoinMap(joinStart);
|
var joinMap = new DisplayControllerJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
@@ -124,133 +121,141 @@ namespace PepperDash.Essentials.Core
|
|||||||
Debug.Console(0,this,"Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
Debug.Console(0,this,"Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
LinkDisplayToApi(displayDevice, trilist, joinMap);
|
||||||
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
|
|
||||||
|
|
||||||
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = displayDevice.Name;
|
|
||||||
|
|
||||||
var commMonitor = displayDevice as ICommunicationMonitor;
|
|
||||||
if (commMonitor != null)
|
|
||||||
{
|
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var inputNumberFeedback = new IntFeedback(() => inputNumber);
|
|
||||||
|
|
||||||
// Two way feedbacks
|
|
||||||
var twoWayDisplay = displayDevice as TwoWayDisplayBase;
|
|
||||||
|
|
||||||
if (twoWayDisplay != null)
|
|
||||||
{
|
|
||||||
trilist.SetBool(joinMap.IsTwoWayDisplay.JoinNumber, true);
|
|
||||||
|
|
||||||
twoWayDisplay.CurrentInputFeedback.OutputChange += (o, a) => Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", a.StringValue);
|
|
||||||
|
|
||||||
|
|
||||||
inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Power Off
|
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () =>
|
|
||||||
{
|
|
||||||
inputNumber = 102;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
displayDevice.PowerOff();
|
|
||||||
});
|
|
||||||
|
|
||||||
var twoWayDisplayDevice = displayDevice as TwoWayDisplayBase;
|
|
||||||
if (twoWayDisplayDevice != null)
|
|
||||||
{
|
|
||||||
twoWayDisplayDevice.PowerIsOnFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
if (!a.BoolValue)
|
|
||||||
{
|
|
||||||
inputNumber = 102;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
inputNumber = 0;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
twoWayDisplayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
|
|
||||||
twoWayDisplayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// PowerOn
|
|
||||||
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () =>
|
|
||||||
{
|
|
||||||
inputNumber = 0;
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
displayDevice.PowerOn();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < displayDevice.InputPorts.Count; i++)
|
|
||||||
{
|
|
||||||
if (i < joinMap.InputNamesOffset.JoinSpan)
|
|
||||||
{
|
|
||||||
inputKeys.Add(displayDevice.InputPorts[i].Key);
|
|
||||||
var tempKey = inputKeys.ElementAt(i);
|
|
||||||
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + i),
|
|
||||||
() => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector));
|
|
||||||
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}",
|
|
||||||
joinMap.InputSelectOffset.JoinNumber + i, displayDevice.InputPorts[tempKey].Key.ToString());
|
|
||||||
trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + i)].StringValue = displayDevice.InputPorts[i].Key.ToString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Debug.Console(0, displayDevice, Debug.ErrorLogLevel.Warning, "Device has {0} inputs. The Join Map allows up to {1} inputs. Discarding inputs {2} - {3} from bridge.",
|
|
||||||
displayDevice.InputPorts.Count, joinMap.InputNamesOffset.JoinSpan, i + 1, displayDevice.InputPorts.Count);
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
|
|
||||||
trilist.SetUShortSigAction(joinMap.InputSelect.JoinNumber, (a) =>
|
|
||||||
{
|
|
||||||
if (a == 0)
|
|
||||||
{
|
|
||||||
displayDevice.PowerOff();
|
|
||||||
inputNumber = 0;
|
|
||||||
}
|
|
||||||
else if (a > 0 && a < displayDevice.InputPorts.Count && a != inputNumber)
|
|
||||||
{
|
|
||||||
displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector);
|
|
||||||
inputNumber = a;
|
|
||||||
}
|
|
||||||
else if (a == 102)
|
|
||||||
{
|
|
||||||
displayDevice.PowerToggle();
|
|
||||||
|
|
||||||
}
|
|
||||||
if (twoWayDisplay != null)
|
|
||||||
inputNumberFeedback.FireUpdate();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var volumeDisplay = displayDevice as IBasicVolumeControls;
|
|
||||||
if (volumeDisplay == null) return;
|
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, volumeDisplay.VolumeUp);
|
|
||||||
trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, volumeDisplay.VolumeDown);
|
|
||||||
trilist.SetSigTrueAction(joinMap.VolumeMute.JoinNumber, volumeDisplay.MuteToggle);
|
|
||||||
|
|
||||||
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
|
|
||||||
|
|
||||||
if (volumeDisplayWithFeedback == null) return;
|
|
||||||
trilist.SetSigTrueAction(joinMap.VolumeMuteOn.JoinNumber, volumeDisplayWithFeedback.MuteOn);
|
|
||||||
trilist.SetSigTrueAction(joinMap.VolumeMuteOff.JoinNumber, volumeDisplayWithFeedback.MuteOff);
|
|
||||||
|
|
||||||
|
|
||||||
trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, volumeDisplayWithFeedback.SetVolume);
|
|
||||||
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]);
|
|
||||||
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute.JoinNumber]);
|
|
||||||
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]);
|
|
||||||
volumeDisplayWithFeedback.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void LinkDisplayToApi(DisplayBase displayDevice, BasicTriList trilist, DisplayControllerJoinMap joinMap)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
|
||||||
|
|
||||||
|
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = displayDevice.Name;
|
||||||
|
|
||||||
|
var commMonitor = displayDevice as ICommunicationMonitor;
|
||||||
|
if (commMonitor != null)
|
||||||
|
{
|
||||||
|
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var inputNumber = 0;
|
||||||
|
var inputKeys = new List<string>();
|
||||||
|
|
||||||
|
var inputNumberFeedback = new IntFeedback(() => inputNumber);
|
||||||
|
|
||||||
|
// Two way feedbacks
|
||||||
|
var twoWayDisplay = displayDevice as TwoWayDisplayBase;
|
||||||
|
|
||||||
|
if (twoWayDisplay != null)
|
||||||
|
{
|
||||||
|
trilist.SetBool(joinMap.IsTwoWayDisplay.JoinNumber, true);
|
||||||
|
|
||||||
|
twoWayDisplay.CurrentInputFeedback.OutputChange += (o, a) => Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", a.StringValue);
|
||||||
|
|
||||||
|
|
||||||
|
inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Power Off
|
||||||
|
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () =>
|
||||||
|
{
|
||||||
|
inputNumber = 102;
|
||||||
|
inputNumberFeedback.FireUpdate();
|
||||||
|
displayDevice.PowerOff();
|
||||||
|
});
|
||||||
|
|
||||||
|
var twoWayDisplayDevice = displayDevice as TwoWayDisplayBase;
|
||||||
|
if (twoWayDisplayDevice != null)
|
||||||
|
{
|
||||||
|
twoWayDisplayDevice.PowerIsOnFeedback.OutputChange += (o, a) =>
|
||||||
|
{
|
||||||
|
if (!a.BoolValue)
|
||||||
|
{
|
||||||
|
inputNumber = 102;
|
||||||
|
inputNumberFeedback.FireUpdate();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inputNumber = 0;
|
||||||
|
inputNumberFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
twoWayDisplayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
|
||||||
|
twoWayDisplayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// PowerOn
|
||||||
|
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () =>
|
||||||
|
{
|
||||||
|
inputNumber = 0;
|
||||||
|
inputNumberFeedback.FireUpdate();
|
||||||
|
displayDevice.PowerOn();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < displayDevice.InputPorts.Count; i++)
|
||||||
|
{
|
||||||
|
if (i < joinMap.InputNamesOffset.JoinSpan)
|
||||||
|
{
|
||||||
|
inputKeys.Add(displayDevice.InputPorts[i].Key);
|
||||||
|
var tempKey = inputKeys.ElementAt(i);
|
||||||
|
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + i),
|
||||||
|
() => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector));
|
||||||
|
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}",
|
||||||
|
joinMap.InputSelectOffset.JoinNumber + i, displayDevice.InputPorts[tempKey].Key.ToString());
|
||||||
|
trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + i)].StringValue = displayDevice.InputPorts[i].Key.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Debug.Console(0, displayDevice, Debug.ErrorLogLevel.Warning, "Device has {0} inputs. The Join Map allows up to {1} inputs. Discarding inputs {2} - {3} from bridge.",
|
||||||
|
displayDevice.InputPorts.Count, joinMap.InputNamesOffset.JoinSpan, i + 1, displayDevice.InputPorts.Count);
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
|
||||||
|
trilist.SetUShortSigAction(joinMap.InputSelect.JoinNumber, (a) =>
|
||||||
|
{
|
||||||
|
if (a == 0)
|
||||||
|
{
|
||||||
|
displayDevice.PowerOff();
|
||||||
|
inputNumber = 0;
|
||||||
|
}
|
||||||
|
else if (a > 0 && a < displayDevice.InputPorts.Count && a != inputNumber)
|
||||||
|
{
|
||||||
|
displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector);
|
||||||
|
inputNumber = a;
|
||||||
|
}
|
||||||
|
else if (a == 102)
|
||||||
|
{
|
||||||
|
displayDevice.PowerToggle();
|
||||||
|
|
||||||
|
}
|
||||||
|
if (twoWayDisplay != null)
|
||||||
|
inputNumberFeedback.FireUpdate();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var volumeDisplay = displayDevice as IBasicVolumeControls;
|
||||||
|
if (volumeDisplay == null) return;
|
||||||
|
|
||||||
|
trilist.SetBoolSigAction(joinMap.VolumeUp.JoinNumber, volumeDisplay.VolumeUp);
|
||||||
|
trilist.SetBoolSigAction(joinMap.VolumeDown.JoinNumber, volumeDisplay.VolumeDown);
|
||||||
|
trilist.SetSigTrueAction(joinMap.VolumeMute.JoinNumber, volumeDisplay.MuteToggle);
|
||||||
|
|
||||||
|
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
|
||||||
|
|
||||||
|
if (volumeDisplayWithFeedback == null) return;
|
||||||
|
trilist.SetSigTrueAction(joinMap.VolumeMuteOn.JoinNumber, volumeDisplayWithFeedback.MuteOn);
|
||||||
|
trilist.SetSigTrueAction(joinMap.VolumeMuteOff.JoinNumber, volumeDisplayWithFeedback.MuteOff);
|
||||||
|
|
||||||
|
|
||||||
|
trilist.SetUShortSigAction(joinMap.VolumeLevel.JoinNumber, volumeDisplayWithFeedback.SetVolume);
|
||||||
|
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel.JoinNumber]);
|
||||||
|
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute.JoinNumber]);
|
||||||
|
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMuteOn.JoinNumber]);
|
||||||
|
volumeDisplayWithFeedback.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.VolumeMuteOff.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -111,7 +111,12 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public override void ExecuteSwitch(object selector)
|
public override void ExecuteSwitch(object selector)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "ExecuteSwitch: {0}", selector);
|
Debug.Console(2, this, "ExecuteSwitch: {0}", selector);
|
||||||
|
|
||||||
|
if (!_PowerIsOn)
|
||||||
|
{
|
||||||
|
PowerOn();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,44 +70,71 @@ namespace PepperDash.Essentials.Core.Lighting
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart,
|
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, uint joinStart,
|
||||||
string joinMapKey, EiscApiAdvanced bridge)
|
string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new GenericLightingJoinMap(joinStart);
|
var joinMap = new GenericLightingJoinMap(joinStart);
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
if (bridge != null)
|
if (bridge != null)
|
||||||
{
|
{
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
return LinkLightingToApi(lightingDevice, trilist, joinMap);
|
||||||
|
}
|
||||||
|
|
||||||
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
protected GenericLightingJoinMap LinkLightingToApi(LightingBase lightingDevice, BasicTriList trilist, GenericLightingJoinMap joinMap)
|
||||||
|
{
|
||||||
|
|
||||||
// GenericLighitng Actions & FeedBack
|
|
||||||
trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
|
||||||
|
|
||||||
var sceneIndex = 0;
|
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
foreach (var scene in lightingDevice.LightingScenes)
|
|
||||||
{
|
|
||||||
trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[sceneIndex]));
|
|
||||||
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)]);
|
|
||||||
trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + sceneIndex)].StringValue = scene.Name;
|
|
||||||
trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + sceneIndex)].BoolValue = true;
|
|
||||||
sceneIndex++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return joinMap;
|
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
||||||
}
|
|
||||||
|
// GenericLighitng Actions & FeedBack
|
||||||
|
trilist.SetUShortSigAction(joinMap.SelectScene.JoinNumber, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
||||||
|
|
||||||
|
var sceneIndex = 0;
|
||||||
|
foreach (var scene in lightingDevice.LightingScenes)
|
||||||
|
{
|
||||||
|
var index = sceneIndex;
|
||||||
|
|
||||||
|
trilist.SetSigTrueAction((uint)(joinMap.SelectSceneDirect.JoinNumber + index), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[index]));
|
||||||
|
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + index)]);
|
||||||
|
trilist.StringInput[(uint)(joinMap.SelectSceneDirect.JoinNumber + index)].StringValue = scene.Name;
|
||||||
|
trilist.BooleanInput[(uint)(joinMap.ButtonVisibility.JoinNumber + index)].BoolValue = true;
|
||||||
|
|
||||||
|
sceneIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
trilist.OnlineStatusChange += (sender, args) =>
|
||||||
|
{
|
||||||
|
if (!args.DeviceOnLine) return;
|
||||||
|
|
||||||
|
sceneIndex = 0;
|
||||||
|
foreach (var scene in lightingDevice.LightingScenes)
|
||||||
|
{
|
||||||
|
var index = sceneIndex;
|
||||||
|
|
||||||
|
trilist.StringInput[(uint) (joinMap.SelectSceneDirect.JoinNumber + index)].StringValue = scene.Name;
|
||||||
|
trilist.BooleanInput[(uint) (joinMap.ButtonVisibility.JoinNumber + index)].BoolValue = true;
|
||||||
|
scene.IsActiveFeedback.FireUpdate();
|
||||||
|
|
||||||
|
sceneIndex++;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return joinMap;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,7 @@
|
|||||||
<Compile Include="Crestron IO\Inputs\GenericVersiportInputDevice.cs" />
|
<Compile Include="Crestron IO\Inputs\GenericVersiportInputDevice.cs" />
|
||||||
<Compile Include="Crestron IO\Inputs\IDigitalInput.cs" />
|
<Compile Include="Crestron IO\Inputs\IDigitalInput.cs" />
|
||||||
<Compile Include="Crestron IO\IOPortConfig.cs" />
|
<Compile Include="Crestron IO\IOPortConfig.cs" />
|
||||||
|
<Compile Include="Crestron IO\Ir\CenIoIr104Controller.cs" />
|
||||||
<Compile Include="Crestron IO\Relay\CenIoRy104Controller.cs" />
|
<Compile Include="Crestron IO\Relay\CenIoRy104Controller.cs" />
|
||||||
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
||||||
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
|
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
|
||||||
|
|||||||
@@ -11,12 +11,34 @@ using PepperDash.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
public class RouteRequest
|
||||||
|
{
|
||||||
|
public IRoutingSink Destination {get; set;}
|
||||||
|
public IRoutingOutputs Source {get; set;}
|
||||||
|
public eRoutingSignalType SignalType {get; set;}
|
||||||
|
|
||||||
|
public void HandleCooldown(object sender, FeedbackEventArgs args)
|
||||||
|
{
|
||||||
|
var coolingDevice = sender as IWarmingCooling;
|
||||||
|
|
||||||
|
if(args.BoolValue == false)
|
||||||
|
{
|
||||||
|
Destination.ReleaseAndMakeRoute(Source, SignalType);
|
||||||
|
|
||||||
|
if(sender == null) return;
|
||||||
|
|
||||||
|
coolingDevice.IsCoolingDownFeedback.OutputChange -= HandleCooldown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extensions added to any IRoutingInputs classes to provide discovery-based routing
|
/// Extensions added to any IRoutingInputs classes to provide discovery-based routing
|
||||||
/// on those destinations.
|
/// on those destinations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class IRoutingInputsExtensions
|
public static class IRoutingInputsExtensions
|
||||||
{
|
{
|
||||||
|
private static Dictionary<string, RouteRequest> RouteRequests = new Dictionary<string, RouteRequest>();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets any existing RouteDescriptor for a destination, clears it using ReleaseRoute
|
/// Gets any existing RouteDescriptor for a destination, clears it using ReleaseRoute
|
||||||
/// and then attempts a new Route and if sucessful, stores that RouteDescriptor
|
/// and then attempts a new Route and if sucessful, stores that RouteDescriptor
|
||||||
@@ -24,16 +46,58 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void ReleaseAndMakeRoute(this IRoutingSink destination, IRoutingOutputs source, eRoutingSignalType signalType)
|
public static void ReleaseAndMakeRoute(this IRoutingSink destination, IRoutingOutputs source, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
destination.ReleaseRoute();
|
var routeRequest = new RouteRequest {
|
||||||
|
Destination = destination,
|
||||||
|
Source = source,
|
||||||
|
SignalType = signalType
|
||||||
|
};
|
||||||
|
|
||||||
if (source == null) return;
|
var coolingDevice = destination as IWarmingCooling;
|
||||||
var newRoute = destination.GetRouteToSource(source, signalType);
|
|
||||||
if (newRoute == null) return;
|
RouteRequest existingRouteRequest;
|
||||||
RouteDescriptorCollection.DefaultCollection.AddRouteDescriptor(newRoute);
|
|
||||||
Debug.Console(2, destination, "Executing full route");
|
//We already have a route request for this device, and it's a cooling device and is cooling
|
||||||
newRoute.ExecuteRoutes();
|
if (RouteRequests.TryGetValue(destination.Key, out existingRouteRequest) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
|
||||||
|
{
|
||||||
|
coolingDevice.IsCoolingDownFeedback.OutputChange -= existingRouteRequest.HandleCooldown;
|
||||||
|
|
||||||
|
coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown;
|
||||||
|
|
||||||
|
RouteRequests[destination.Key] = routeRequest;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//New Request
|
||||||
|
if (coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
|
||||||
|
{
|
||||||
|
coolingDevice.IsCoolingDownFeedback.OutputChange -= routeRequest.HandleCooldown;
|
||||||
|
|
||||||
|
coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown;
|
||||||
|
|
||||||
|
RouteRequests.Add(destination.Key, routeRequest);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RouteRequests.ContainsKey(destination.Key) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == false)
|
||||||
|
{
|
||||||
|
RouteRequests.Remove(destination.Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
destination.ReleaseRoute();
|
||||||
|
|
||||||
|
RunRouteRequest(routeRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void RunRouteRequest(RouteRequest request)
|
||||||
|
{
|
||||||
|
if (request.Source == null) return;
|
||||||
|
var newRoute = request.Destination.GetRouteToSource(request.Source, request.SignalType);
|
||||||
|
if (newRoute == null) return;
|
||||||
|
RouteDescriptorCollection.DefaultCollection.AddRouteDescriptor(newRoute);
|
||||||
|
Debug.Console(2, request.Destination, "Executing full route");
|
||||||
|
newRoute.ExecuteRoutes();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Will release the existing route on the destination, if it is found in
|
/// Will release the existing route on the destination, if it is found in
|
||||||
/// RouteDescriptorCollection.DefaultCollection
|
/// RouteDescriptorCollection.DefaultCollection
|
||||||
@@ -41,6 +105,17 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <param name="destination"></param>
|
/// <param name="destination"></param>
|
||||||
public static void ReleaseRoute(this IRoutingSink destination)
|
public static void ReleaseRoute(this IRoutingSink destination)
|
||||||
{
|
{
|
||||||
|
RouteRequest existingRequest;
|
||||||
|
|
||||||
|
if (RouteRequests.TryGetValue(destination.Key, out existingRequest) && destination is IWarmingCooling)
|
||||||
|
{
|
||||||
|
var coolingDevice = destination as IWarmingCooling;
|
||||||
|
|
||||||
|
coolingDevice.IsCoolingDownFeedback.OutputChange -= existingRequest.HandleCooldown;
|
||||||
|
}
|
||||||
|
|
||||||
|
RouteRequests.Remove(destination.Key);
|
||||||
|
|
||||||
var current = RouteDescriptorCollection.DefaultCollection.RemoveRouteDescriptor(destination);
|
var current = RouteDescriptorCollection.DefaultCollection.RemoveRouteDescriptor(destination);
|
||||||
if (current != null)
|
if (current != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
Type = type;
|
Type = type;
|
||||||
ConnectionType = connType;
|
ConnectionType = connType;
|
||||||
Selector = selector;
|
Selector = selector;
|
||||||
IsInternal = IsInternal;
|
IsInternal = isInternal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,9 +42,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
public Boolean WaitingForHost { get; private set; }
|
public Boolean WaitingForHost { get; private set; }
|
||||||
[JsonProperty("isLocked", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("isLocked", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public Boolean IsLocked { get; private set; }
|
public Boolean IsLocked { get; private set; }
|
||||||
|
[JsonProperty("isRecording", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
public Boolean IsRecording { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost, bool isLocked)
|
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost, bool isLocked, bool isRecording)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
Name = name;
|
Name = name;
|
||||||
@@ -55,6 +57,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
IsSharingMeeting = isSharingMeeting;
|
IsSharingMeeting = isSharingMeeting;
|
||||||
WaitingForHost = waitingForHost;
|
WaitingForHost = waitingForHost;
|
||||||
IsLocked = isLocked;
|
IsLocked = isLocked;
|
||||||
|
IsRecording = isRecording;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,4 +15,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
void StopRecording();
|
void StopRecording();
|
||||||
void ToggleRecording();
|
void ToggleRecording();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface IHasMeetingRecordingWithPrompt : IHasMeetingRecording
|
||||||
|
{
|
||||||
|
BoolFeedback RecordConsentPromptIsVisible { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to agree or disagree to the meeting being recorded when prompted
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="agree"></param>
|
||||||
|
void RecordingPromptAcknowledgement(bool agree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="participant"></param>
|
/// <param name="participant"></param>
|
||||||
void SetParticipantAsHost(int userId);
|
void SetParticipantAsHost(int userId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Admits a participant from the waiting room
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userId"></param>
|
||||||
|
void AdmitParticipantFromWaitingRoom(int userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp.CrestronIO;
|
using Crestron.SimplSharp.CrestronIO;
|
||||||
|
using Crestron.SimplSharp.Reflection;
|
||||||
using Crestron.SimplSharp.Ssh;
|
using Crestron.SimplSharp.Ssh;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
@@ -1010,7 +1011,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber,
|
trilist.SetString(joinMap.DirectoryEntries.JoinNumber,
|
||||||
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
||||||
var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot, !codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue);
|
var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot, codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false);
|
||||||
|
|
||||||
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||||
|
|
||||||
@@ -1025,7 +1026,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber,
|
trilist.SetString(joinMap.DirectoryEntries.JoinNumber,
|
||||||
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
||||||
var directoryXSig = UpdateDirectoryXSig(args.Directory, !codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue);
|
var directoryXSig = UpdateDirectoryXSig(args.Directory, codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false);
|
||||||
|
|
||||||
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||||
|
|
||||||
@@ -1036,10 +1037,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
{
|
{
|
||||||
if (!args.DeviceOnLine) return;
|
if (!args.DeviceOnLine) return;
|
||||||
|
|
||||||
// TODO [ ] Issue #868
|
|
||||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber, "\xFC");
|
trilist.SetString(joinMap.DirectoryEntries.JoinNumber, "\xFC");
|
||||||
UpdateDirectoryXSig(codec.CurrentDirectoryResult,
|
UpdateDirectoryXSig(codec.CurrentDirectoryResult,
|
||||||
!codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue);
|
codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1180,31 +1180,44 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
private string UpdateDirectoryXSig(CodecDirectory directory, bool isRoot)
|
private string UpdateDirectoryXSig(CodecDirectory directory, bool isRoot)
|
||||||
{
|
{
|
||||||
var contactIndex = 1;
|
var xSigMaxIndex = 1023;
|
||||||
var tokenArray = new XSigToken[directory.CurrentDirectoryResults.Count];
|
var tokenArray = new XSigToken[directory.CurrentDirectoryResults.Count > xSigMaxIndex
|
||||||
|
? xSigMaxIndex
|
||||||
|
: directory.CurrentDirectoryResults.Count];
|
||||||
|
|
||||||
Debug.Console(2, this, "Is root {0} Directory Count: {1}", isRoot, directory.CurrentDirectoryResults.Count);
|
Debug.Console(2, this, "IsRoot: {0}, Directory Count: {1}, TokenArray.Length: {2}", isRoot, directory.CurrentDirectoryResults.Count, tokenArray.Length);
|
||||||
|
|
||||||
foreach (var entry in directory.CurrentDirectoryResults)
|
var contacts = directory.CurrentDirectoryResults.Count > xSigMaxIndex
|
||||||
|
? directory.CurrentDirectoryResults.Take(xSigMaxIndex)
|
||||||
|
: directory.CurrentDirectoryResults;
|
||||||
|
|
||||||
|
var contactsToDisplay = isRoot
|
||||||
|
? contacts.Where(c => c.ParentFolderId == "root")
|
||||||
|
: contacts.Where(c => c.ParentFolderId != "root");
|
||||||
|
|
||||||
|
var counterIndex = 1;
|
||||||
|
foreach (var entry in contactsToDisplay)
|
||||||
{
|
{
|
||||||
var arrayIndex = contactIndex - 1;
|
var arrayIndex = counterIndex - 1;
|
||||||
|
var entryIndex = counterIndex;
|
||||||
|
|
||||||
Debug.Console(2, this, "Entry Name: {0}, Folder ID: {1}", entry.Name, entry.FolderId);
|
Debug.Console(2, this, "Entry{2:0000} Name: {0}, Folder ID: {1}, Type: {3}, ParentFolderId: {4}",
|
||||||
|
entry.Name, entry.FolderId, entryIndex, entry.GetType().GetCType().FullName, entry.ParentFolderId);
|
||||||
|
|
||||||
if (entry is DirectoryFolder && entry.ParentFolderId == "root")
|
if (entry is DirectoryFolder)
|
||||||
{
|
{
|
||||||
tokenArray[arrayIndex] = new XSigSerialToken(contactIndex, String.Format("[+] {0}", entry.Name));
|
tokenArray[arrayIndex] = new XSigSerialToken(entryIndex, String.Format("[+] {0}", entry.Name));
|
||||||
|
|
||||||
contactIndex++;
|
counterIndex++;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
tokenArray[arrayIndex] = new XSigSerialToken(contactIndex, entry.Name);
|
tokenArray[arrayIndex] = new XSigSerialToken(entryIndex, entry.Name);
|
||||||
|
|
||||||
contactIndex++;
|
counterIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetXSigString(tokenArray);
|
return GetXSigString(tokenArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
protected void NotifyPropertyChanged(string propertyName)
|
protected void NotifyPropertyChanged(string propertyName)
|
||||||
{
|
{
|
||||||
if (PropertyChanged != null)
|
var handler = PropertyChanged;
|
||||||
{
|
if (handler != null)
|
||||||
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
{
|
||||||
}
|
handler(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(2, "PropertyChanged event is NULL");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -778,13 +783,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
//Debug.Console(2, "************************************setting value of meetingIsBeingRecorded to: {0}", value);
|
||||||
if (value != _meetingIsBeingRecorded)
|
if (value != _meetingIsBeingRecorded)
|
||||||
{
|
{
|
||||||
_meetingIsBeingRecorded = value;
|
_meetingIsBeingRecorded = value;
|
||||||
|
//Debug.Console(2, "********************************set value of meetingIsBeingRecorded to: {0}", _meetingIsBeingRecorded);
|
||||||
NotifyPropertyChanged("meetingIsBeingRecorded");
|
NotifyPropertyChanged("meetingIsBeingRecorded");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CallRecordInfo()
|
||||||
|
{
|
||||||
|
Debug.Console(2, Debug.ErrorLogLevel.Notice, "********************************************* CallRecordInfo() ******************************************");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMuteWithUnmuteReqeust, IHasCameraAutoMode,
|
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMuteWithUnmuteReqeust, IHasCameraAutoMode,
|
||||||
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
|
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
|
||||||
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting,
|
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting,
|
||||||
IHasMeetingLock, IHasMeetingRecording
|
IHasMeetingLock, IHasMeetingRecordingWithPrompt
|
||||||
{
|
{
|
||||||
public event EventHandler VideoUnmuteRequested;
|
public event EventHandler VideoUnmuteRequested;
|
||||||
|
|
||||||
@@ -113,14 +113,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
||||||
|
|
||||||
Output1 = new RoutingOutputPort(RoutingPortNames.AnyVideoOut,
|
Output1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1,
|
||||||
eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
Output2 = new RoutingOutputPort(RoutingPortNames.AnyVideoOut,
|
Output2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2,
|
||||||
eRoutingSignalType.Video,
|
eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.DisplayPort, null, this);
|
eRoutingPortConnectionType.DisplayPort, null, this);
|
||||||
|
|
||||||
|
Output3 = new RoutingOutputPort(RoutingPortNames.HdmiOut3,
|
||||||
|
eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc);
|
SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc);
|
||||||
|
|
||||||
CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc);
|
CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc);
|
||||||
@@ -171,6 +175,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
MeetingIsRecordingFeedback = new BoolFeedback(() => Status.Call.CallRecordInfo.meetingIsBeingRecorded );
|
MeetingIsRecordingFeedback = new BoolFeedback(() => Status.Call.CallRecordInfo.meetingIsBeingRecorded );
|
||||||
|
|
||||||
|
RecordConsentPromptIsVisible = new BoolFeedback(() => _recordConsentPromptIsVisible);
|
||||||
|
|
||||||
SetUpRouting();
|
SetUpRouting();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,6 +307,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public RoutingInputPort CodecOsdIn { get; private set; }
|
public RoutingInputPort CodecOsdIn { get; private set; }
|
||||||
public RoutingOutputPort Output1 { get; private set; }
|
public RoutingOutputPort Output1 { get; private set; }
|
||||||
public RoutingOutputPort Output2 { get; private set; }
|
public RoutingOutputPort Output2 { get; private set; }
|
||||||
|
public RoutingOutputPort Output3 { get; private set; }
|
||||||
|
|
||||||
#region ICommunicationMonitor Members
|
#region ICommunicationMonitor Members
|
||||||
|
|
||||||
@@ -494,20 +501,60 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
SetIsReady();
|
SetIsReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles subscriptions to Status.Call and sub objects. Needs to be called whenever Status.Call is constructed
|
||||||
|
/// </summary>
|
||||||
private void SetUpCallFeedbackActions()
|
private void SetUpCallFeedbackActions()
|
||||||
{
|
{
|
||||||
Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate;
|
Status.Call.Sharing.PropertyChanged -= HandleSharingStateUpdate;
|
||||||
|
Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate;
|
||||||
|
|
||||||
Status.Call.PropertyChanged += (o, a) =>
|
Status.Call.PropertyChanged -= HandleCallStateUpdate;
|
||||||
{
|
Status.Call.PropertyChanged += HandleCallStateUpdate;
|
||||||
if (a.PropertyName == "Info")
|
|
||||||
{
|
Status.Call.CallRecordInfo.PropertyChanged -= HandleCallRecordInfoStateUpdate;
|
||||||
Debug.Console(1, this, "Updating Call Status");
|
Status.Call.CallRecordInfo.PropertyChanged += HandleCallRecordInfoStateUpdate;
|
||||||
UpdateCallStatus();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleCallRecordInfoStateUpdate(object sender, PropertyChangedEventArgs a)
|
||||||
|
{
|
||||||
|
if (a.PropertyName == "meetingIsBeingRecorded")
|
||||||
|
{
|
||||||
|
MeetingIsRecordingFeedback.FireUpdate();
|
||||||
|
|
||||||
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id,
|
||||||
|
MeetingInfo.Name,
|
||||||
|
MeetingInfo.Host,
|
||||||
|
MeetingInfo.Password,
|
||||||
|
GetSharingStatus(),
|
||||||
|
GetIsHostMyself(),
|
||||||
|
MeetingInfo.IsSharingMeeting,
|
||||||
|
MeetingInfo.WaitingForHost,
|
||||||
|
MeetingIsLockedFeedback.BoolValue,
|
||||||
|
MeetingIsRecordingFeedback.BoolValue);
|
||||||
|
MeetingInfo = meetingInfo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleCallStateUpdate(object sender, PropertyChangedEventArgs a)
|
||||||
|
{
|
||||||
|
switch (a.PropertyName)
|
||||||
|
{
|
||||||
|
case "Info":
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Updating Call Status");
|
||||||
|
UpdateCallStatus();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case "Status":
|
||||||
|
{
|
||||||
|
UpdateCallStatus();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void HandleSharingStateUpdate(object sender, PropertyChangedEventArgs a)
|
private void HandleSharingStateUpdate(object sender, PropertyChangedEventArgs a)
|
||||||
{
|
{
|
||||||
if (a.PropertyName != "State")
|
if (a.PropertyName != "State")
|
||||||
@@ -525,19 +572,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
var sharingStatus = GetSharingStatus();
|
var sharingStatus = GetSharingStatus();
|
||||||
|
|
||||||
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue);
|
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None",
|
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None",
|
||||||
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue);
|
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Error processing state property update. {0}", e.Message);
|
Debug.Console(1, this, "Error processing state property update. {0}", e.Message);
|
||||||
Debug.Console(2, this, e.StackTrace);
|
Debug.Console(2, this, e.StackTrace);
|
||||||
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue);
|
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,6 +593,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void SetUpFeedbackActions()
|
private void SetUpFeedbackActions()
|
||||||
{
|
{
|
||||||
|
// Set these up initially.
|
||||||
|
SetUpCallFeedbackActions();
|
||||||
|
|
||||||
Configuration.Audio.Output.PropertyChanged += (o, a) =>
|
Configuration.Audio.Output.PropertyChanged += (o, a) =>
|
||||||
{
|
{
|
||||||
if (a.PropertyName == "Volume")
|
if (a.PropertyName == "Volume")
|
||||||
@@ -640,7 +690,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
MeetingInfo.IsHost,
|
MeetingInfo.IsHost,
|
||||||
MeetingInfo.IsSharingMeeting,
|
MeetingInfo.IsSharingMeeting,
|
||||||
MeetingInfo.WaitingForHost,
|
MeetingInfo.WaitingForHost,
|
||||||
MeetingIsLockedFeedback.BoolValue
|
MeetingIsLockedFeedback.BoolValue,
|
||||||
|
MeetingIsRecordingFeedback.BoolValue
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -673,41 +724,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Status.Call.Sharing.PropertyChanged += (o, a) =>
|
|
||||||
{
|
|
||||||
if (a.PropertyName == "State")
|
|
||||||
{
|
|
||||||
SharingContentIsOnFeedback.FireUpdate();
|
|
||||||
ReceivingContent.FireUpdate();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Status.Call.PropertyChanged += (o, a) =>
|
|
||||||
{
|
|
||||||
switch(a.PropertyName)
|
|
||||||
{
|
|
||||||
case "Info":
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Updating Call Status");
|
|
||||||
UpdateCallStatus();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case "Status":
|
|
||||||
{
|
|
||||||
UpdateCallStatus();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Status.Call.CallRecordInfo.PropertyChanged += (o, a) =>
|
|
||||||
{
|
|
||||||
if (a.PropertyName == "meetingIsBeingRecorded")
|
|
||||||
{
|
|
||||||
MeetingIsRecordingFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Status.Sharing.PropertyChanged += (o, a) =>
|
Status.Sharing.PropertyChanged += (o, a) =>
|
||||||
{
|
{
|
||||||
@@ -739,7 +755,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
GetIsHostMyself(),
|
GetIsHostMyself(),
|
||||||
MeetingInfo.IsSharingMeeting,
|
MeetingInfo.IsSharingMeeting,
|
||||||
MeetingInfo.WaitingForHost,
|
MeetingInfo.WaitingForHost,
|
||||||
MeetingIsLockedFeedback.BoolValue);
|
MeetingIsLockedFeedback.BoolValue,
|
||||||
|
MeetingIsRecordingFeedback.BoolValue);
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1436,7 +1453,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
GetIsHostMyself(),
|
GetIsHostMyself(),
|
||||||
MeetingInfo.IsSharingMeeting,
|
MeetingInfo.IsSharingMeeting,
|
||||||
MeetingInfo.WaitingForHost,
|
MeetingInfo.WaitingForHost,
|
||||||
MeetingIsLockedFeedback.BoolValue);
|
MeetingIsLockedFeedback.BoolValue,
|
||||||
|
MeetingIsRecordingFeedback.BoolValue);
|
||||||
MeetingInfo = meetingInfo;
|
MeetingInfo = meetingInfo;
|
||||||
|
|
||||||
PrintCurrentCallParticipants();
|
PrintCurrentCallParticipants();
|
||||||
@@ -1651,14 +1669,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
if (MeetingInfo == null)
|
if (MeetingInfo == null)
|
||||||
{
|
{
|
||||||
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
||||||
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue);
|
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
|
|
||||||
UpdateCallStatus();
|
UpdateCallStatus();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
||||||
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue);
|
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
|
|
||||||
UpdateCallStatus();
|
UpdateCallStatus();
|
||||||
|
|
||||||
@@ -1668,12 +1686,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
if (MeetingInfo == null)
|
if (MeetingInfo == null)
|
||||||
{
|
{
|
||||||
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
|
||||||
GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue);
|
GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password,
|
MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password,
|
||||||
GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue);
|
GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1682,12 +1700,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
// TODO: notify user that host has disabled unmuting video
|
// TODO: notify user that host has disabled unmuting video
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "updatedcallrecordinfo":
|
case "updatecallrecordinfo":
|
||||||
{
|
{
|
||||||
JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.CallRecordInfo);
|
JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.CallRecordInfo);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "recordingconsent":
|
||||||
|
{
|
||||||
|
_recordConsentPromptIsVisible = responseObj["isShow"].Value<bool>();
|
||||||
|
RecordConsentPromptIsVisible.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "phonecallstatus":
|
case "phonecallstatus":
|
||||||
{
|
{
|
||||||
JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall);
|
JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall);
|
||||||
@@ -1757,7 +1781,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
if (result.Success)
|
if (result.Success)
|
||||||
{
|
{
|
||||||
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue);
|
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1958,12 +1982,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
// If not crrently in a meeting, intialize the call object
|
// If not crrently in a meeting, intialize the call object
|
||||||
if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING)
|
if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING)
|
||||||
{
|
{
|
||||||
//Debug.Console(1, this, "[UpdateCallStatus] Creating new Status.Call object");
|
|
||||||
Status.Call = new zStatus.Call {Status = callStatus};
|
Status.Call = new zStatus.Call {Status = callStatus};
|
||||||
|
// Resubscribe to all property change events after Status.Call is reconstructed
|
||||||
|
SetUpCallFeedbackActions();
|
||||||
|
|
||||||
OnCallStatusChange(new CodecActiveCallItem() {Status = eCodecCallStatus.Disconnected});
|
OnCallStatusChange(new CodecActiveCallItem() {Status = eCodecCallStatus.Disconnected});
|
||||||
|
|
||||||
SetUpCallFeedbackActions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ActiveCalls.Count == 0)
|
if (ActiveCalls.Count == 0)
|
||||||
@@ -2103,7 +2126,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
GetIsHostMyself(),
|
GetIsHostMyself(),
|
||||||
!String.Equals(Status.Call.Info.meeting_type,"NORMAL"),
|
!String.Equals(Status.Call.Info.meeting_type,"NORMAL"),
|
||||||
false,
|
false,
|
||||||
MeetingIsLockedFeedback.BoolValue
|
MeetingIsLockedFeedback.BoolValue,
|
||||||
|
MeetingIsRecordingFeedback.BoolValue
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// TODO [ ] Issue #868
|
// TODO [ ] Issue #868
|
||||||
@@ -2118,6 +2142,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
false,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -2343,6 +2368,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// <param name="joinMap"></param>
|
/// <param name="joinMap"></param>
|
||||||
public void LinkZoomRoomToApi(BasicTriList trilist, ZoomRoomJoinMap joinMap)
|
public void LinkZoomRoomToApi(BasicTriList trilist, ZoomRoomJoinMap joinMap)
|
||||||
{
|
{
|
||||||
|
var recordingCodec = this as IHasMeetingRecordingWithPrompt;
|
||||||
|
if (recordingCodec != null)
|
||||||
|
{
|
||||||
|
trilist.SetSigFalseAction(joinMap.StartRecording.JoinNumber, () => recordingCodec.StartRecording());
|
||||||
|
trilist.SetSigFalseAction(joinMap.StopRecording.JoinNumber, () => recordingCodec.StopRecording());
|
||||||
|
|
||||||
|
recordingCodec.MeetingIsRecordingFeedback.LinkInputSig(trilist.BooleanInput[joinMap.StartRecording.JoinNumber]);
|
||||||
|
recordingCodec.MeetingIsRecordingFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.StopRecording.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.SetSigFalseAction(joinMap.RecordingPromptAgree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(true));
|
||||||
|
trilist.SetSigFalseAction(joinMap.RecordingPromptDisagree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(false));
|
||||||
|
|
||||||
|
recordingCodec.RecordConsentPromptIsVisible.LinkInputSig(trilist.BooleanInput[joinMap.RecordConsentPromptIsVisible.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
var layoutsCodec = this as IHasZoomRoomLayouts;
|
var layoutsCodec = this as IHasZoomRoomLayouts;
|
||||||
if (layoutsCodec != null)
|
if (layoutsCodec != null)
|
||||||
{
|
{
|
||||||
@@ -2429,29 +2469,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
});
|
});
|
||||||
|
|
||||||
layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]);
|
layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
PasswordRequired += (device, args) =>
|
|
||||||
{
|
|
||||||
if (args.LoginAttemptCancelled)
|
|
||||||
{
|
|
||||||
trilist.SetBool(joinMap.ShowPasswordPrompt.JoinNumber, false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(args.Message))
|
|
||||||
{
|
|
||||||
trilist.SetString(joinMap.PasswordPromptMessage.JoinNumber, args.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.LoginAttemptFailed)
|
|
||||||
{
|
|
||||||
trilist.SetBool(joinMap.PasswordLoginFailed.JoinNumber, true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
trilist.SetBool(joinMap.ShowPasswordPrompt.JoinNumber, true);
|
|
||||||
};
|
|
||||||
|
|
||||||
MeetingInfoChanged += (device, args) =>
|
MeetingInfoChanged += (device, args) =>
|
||||||
{
|
{
|
||||||
@@ -2711,7 +2729,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
Debug.Console(2, this, "OnDirectoryResultReturned. Result has {0} contacts", result.Contacts.Count);
|
Debug.Console(2, this, "OnDirectoryResultReturned. Result has {0} contacts", result.Contacts.Count);
|
||||||
|
|
||||||
|
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
||||||
|
|
||||||
var directoryResult = result;
|
var directoryResult = result;
|
||||||
|
var directoryIsRoot = CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false;
|
||||||
|
|
||||||
// If result is Root, create a copy and filter out contacts whose parent folder is not root
|
// If result is Root, create a copy and filter out contacts whose parent folder is not root
|
||||||
//if (!CurrentDirectoryResultIsNotDirectoryRoot.BoolValue)
|
//if (!CurrentDirectoryResultIsNotDirectoryRoot.BoolValue)
|
||||||
@@ -2729,7 +2750,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
Debug.Console(2, this, "Updating directoryResult. IsOnRoot: {0} Contact Count: {1}",
|
Debug.Console(2, this, "Updating directoryResult. IsOnRoot: {0} Contact Count: {1}",
|
||||||
!CurrentDirectoryResultIsNotDirectoryRoot.BoolValue, directoryResult.Contacts.Count);
|
directoryIsRoot, directoryResult.Contacts.Count);
|
||||||
|
|
||||||
// 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;
|
||||||
@@ -2738,11 +2759,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
handler(this, new DirectoryEventArgs
|
handler(this, new DirectoryEventArgs
|
||||||
{
|
{
|
||||||
Directory = directoryResult,
|
Directory = directoryResult,
|
||||||
DirectoryIsOnRoot = !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue
|
DirectoryIsOnRoot = directoryIsRoot
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -2818,6 +2839,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
SendText(string.Format("zCommand Call HostChange Id: {0}", userId));
|
SendText(string.Format("zCommand Call HostChange Id: {0}", userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AdmitParticipantFromWaitingRoom(int userId)
|
||||||
|
{
|
||||||
|
SendText(string.Format("zCommand Call Admit Participant Id: {0}", userId));
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IHasParticipantAudioMute Members
|
#region IHasParticipantAudioMute Members
|
||||||
@@ -3428,18 +3454,29 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IHasMeetingRecording Members
|
#region IHasMeetingRecordingWithPrompt Members
|
||||||
|
|
||||||
public BoolFeedback MeetingIsRecordingFeedback { get; private set; }
|
public BoolFeedback MeetingIsRecordingFeedback { get; private set; }
|
||||||
|
|
||||||
|
bool _recordConsentPromptIsVisible;
|
||||||
|
|
||||||
|
public BoolFeedback RecordConsentPromptIsVisible { get; private set; }
|
||||||
|
|
||||||
|
public void RecordingPromptAcknowledgement(bool agree)
|
||||||
|
{
|
||||||
|
var command = string.Format("zCommand Agree Recording: {0}", agree ? "on" : "off");
|
||||||
|
//Debug.Console(2, this, "Sending agree: {0} {1}", agree, command);
|
||||||
|
SendText(command);
|
||||||
|
}
|
||||||
|
|
||||||
public void StartRecording()
|
public void StartRecording()
|
||||||
{
|
{
|
||||||
SendText(string.Format("Command Call Record Enable: on"));
|
SendText(string.Format("zCommand Call Record Enable: on"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StopRecording()
|
public void StopRecording()
|
||||||
{
|
{
|
||||||
SendText(string.Format("Command Call Record Enable: off"));
|
SendText(string.Format("zCommand Call Record Enable: off"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleRecording()
|
public void ToggleRecording()
|
||||||
|
|||||||
@@ -295,7 +295,77 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Description = "Toggles the selfview pip size, (aka layout size)",
|
Description = "Toggles the selfview pip size, (aka layout size)",
|
||||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
JoinType = eJoinType.Digital
|
JoinType = eJoinType.Digital
|
||||||
});
|
});
|
||||||
|
|
||||||
|
[JoinName("StartRecording")]
|
||||||
|
public JoinDataComplete StartRecording = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 241,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Pulse to start the Meeting Recording. FB high if meeting is currently recording",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("StopRecording")]
|
||||||
|
public JoinDataComplete StopRecording = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 242,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Pulse to stop the Meeting Recording. FB high if meeting is currently NOT recording",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("RecordConsentPromptIsVisible")]
|
||||||
|
public JoinDataComplete RecordConsentPromptIsVisible = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 243,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "When high, indicates that the recording consent prompt is visible on the ZoomRoom UI",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("RecordingPromptAgree")]
|
||||||
|
public JoinDataComplete RecordingPromptAgree = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 244,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Pulse to agree to consent for meeting recording",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("RecordingPromptDisagree")]
|
||||||
|
public JoinDataComplete RecordingPromptDisagree = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 245,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Pulse to disagree to consent for meeting recording",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
//[JoinName("ParticipantAudioMuteToggleStart")]
|
//[JoinName("ParticipantAudioMuteToggleStart")]
|
||||||
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
|
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.1.1-rc-247" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
<package id="PepperDashCore" version="1.1.1" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user