Resolved ecs-582,602,608

This commit is contained in:
Neil Dorin
2017-10-23 15:34:28 -06:00
parent 23fb8311fe
commit 8dbb3fd898
5 changed files with 167 additions and 76 deletions

View File

@@ -132,6 +132,30 @@ namespace PepperDash.Essentials.Core.Routing
/// </summary> /// </summary>
public const string HdmiOut = "hdmiOut"; public const string HdmiOut = "hdmiOut";
/// <summary> /// <summary>
/// hdmiOut1
/// </summary>
public const string HdmiOut1 = "hdmiOut1";
/// <summary>
/// hdmiOut2
/// </summary>
public const string HdmiOut2 = "hdmiOut2";
/// <summary>
/// hdmiOut3
/// </summary>
public const string HdmiOut3 = "hdmiOut3";
/// <summary>
/// hdmiOut4
/// </summary>
public const string HdmiOut4 = "hdmiOut4";
/// <summary>
/// hdmiOut5
/// </summary>
public const string HdmiOut5 = "hdmiOut5";
/// <summary>
/// hdmiOut6
/// </summary>
public const string HdmiOut6 = "hdmiOut6";
/// <summary>
/// none /// none
/// </summary> /// </summary>
public const string None = "none"; public const string None = "none";

View File

@@ -207,10 +207,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public bool CommDebuggingIsOn; public bool CommDebuggingIsOn;
string Delimiter = "\r\n"; string Delimiter = "\r\n";
int PresentationSource; /// <summary>
/// Used to track the current connector used for the presentation source
/// </summary>
int PresentationSourceConnector;
string PresentationSourceKey; string PresentationSourceKey;
@@ -227,9 +229,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
// **___________________________________________________________________** // **___________________________________________________________________**
public RoutingInputPort CodecOsdIn { get; private set; } public RoutingInputPort CodecOsdIn { get; private set; }
public RoutingInputPort HdmiIn1 { get; private set; }
public RoutingInputPort HdmiIn2 { get; private set; } public RoutingInputPort HdmiIn2 { get; private set; }
public RoutingOutputPort HdmiOut { get; private set; } public RoutingInputPort HdmiIn3 { get; private set; }
public RoutingOutputPort HdmiOut1 { get; private set; }
public RoutingOutputPort HdmiOut2 { get; private set; }
// Constructor for IBasicCommunication // Constructor for IBasicCommunication
public CiscoSparkCodec(string key, string name, IBasicCommunication comm, CiscoSparkCodecPropertiesConfig props ) public CiscoSparkCodec(string key, string name, IBasicCommunication comm, CiscoSparkCodecPropertiesConfig props )
@@ -304,18 +308,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo, CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this); eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this);
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource2), this); eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSourceConnector2), this);
HdmiIn3 = new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSourceConnector3), this);
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo, HdmiOut1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, null, this); eRoutingPortConnectionType.Hdmi, null, this);
HdmiOut2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, null, this);
InputPorts.Add(CodecOsdIn); InputPorts.Add(CodecOsdIn);
InputPorts.Add(HdmiIn1);
InputPorts.Add(HdmiIn2); InputPorts.Add(HdmiIn2);
OutputPorts.Add(HdmiOut); InputPorts.Add(HdmiIn3);
OutputPorts.Add(HdmiOut1);
CreateOsdSource(); CreateOsdSource();
} }
@@ -540,6 +546,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
JsonConvert.PopulateObject(response, tempCodecStatus); JsonConvert.PopulateObject(response, tempCodecStatus);
// Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value
var conference = tempCodecStatus.Status.Conference;
if (conference.Presentation.LocalInstance.Count > 0)
{
if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost))
PresentationSourceConnector = 0;
else if (conference.Presentation.LocalInstance[0].Source != null)
{
PresentationSourceConnector = conference.Presentation.LocalInstance[0].Source.IntValue;
}
}
// Check to see if this is a call status message received after the initial status message // Check to see if this is a call status message received after the initial status message
if (tempCodecStatus.Status.Call.Count > 0) if (tempCodecStatus.Status.Call.Count > 0)
{ {
@@ -783,6 +802,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
{ {
ExecuteSwitch(inputSelector); ExecuteSwitch(inputSelector);
PresentationSourceKey = inputSelector.ToString();
} }
@@ -972,9 +992,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
} }
} }
public void SelectPresentationSource(int source) public void SelectPresentationByConnector(int connector)
{ {
PresentationSource = source; PresentationSourceConnector = connector;
StartSharing(); StartSharing();
} }
@@ -982,17 +1002,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
/// <summary> /// <summary>
/// Select source 1 as the presetnation source /// Select source 1 as the presetnation source
/// </summary> /// </summary>
public void SelectPresentationSource1() public void SelectPresentationSourceConnector2()
{ {
SelectPresentationSource(1); SelectPresentationByConnector(2);
} }
/// <summary> /// <summary>
/// Select source 2 as the presetnation source /// Select source 2 as the presetnation source
/// </summary> /// </summary>
public void SelectPresentationSource2() public void SelectPresentationSourceConnector3()
{ {
SelectPresentationSource(2); SelectPresentationByConnector(3);
} }
/// <summary> /// <summary>
@@ -1007,7 +1027,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
else else
sendingMode = "LocalOnly"; sendingMode = "LocalOnly";
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode)); SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSourceConnector, sendingMode));
} }
/// <summary> /// <summary>
@@ -1015,6 +1035,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
/// </summary> /// </summary>
public override void StopSharing() public override void StopSharing()
{ {
PresentationSourceConnector = 0;
SendText("xCommand Presentation Stop"); SendText("xCommand Presentation Stop");
} }

View File

@@ -397,9 +397,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public RequestFloorAvailability RequestFloorAvailability { get; set; } public RequestFloorAvailability RequestFloorAvailability { get; set; }
} }
public class Source2 public class Source2 : ValueProperty
{ {
public string Value { get; set; } string _Value;
/// <summary>
/// Sets Value and triggers the action when set
/// </summary>
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
OnValueChanged();
}
}
/// <summary>
/// Converted value of _Value for use as feedback
/// </summary>
public int IntValue
{
get
{
if (!string.IsNullOrEmpty(_Value))
return Convert.ToInt32(_Value);
else
return 0;
}
}
} }
public class SendingMode public class SendingMode
@@ -410,16 +440,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class LocalInstance public class LocalInstance
{ {
public string id { get; set; } public string id { get; set; }
public string ghost { get; set; }
public SendingMode SendingMode {get; set;} public SendingMode SendingMode {get; set;}
public Source2 Source { get; set; } public Source2 Source { get; set; }
public LocalInstance()
{
Source = new Source2();
}
} }
public class Presentation public class Presentation
{ {
public CallId2 CallId { get; set; } public CallId2 CallId { get; set; }
public Mode2 Mode { get; set; } public Mode2 Mode { get; set; }
public Whiteboard Whiteboard { get; set; } public Whiteboard Whiteboard { get; set; }
public List<LocalInstance> LocalInstance { get; set; } public List<LocalInstance> LocalInstance { get; set; }
public Presentation() public Presentation()
{ {

View File

@@ -73,6 +73,8 @@ namespace PepperDash.Essentials
StringInputSig HeaderCallButtonIconSig; StringInputSig HeaderCallButtonIconSig;
BoolFeedback CallSharingInfoVisibleFeedback;
/// <summary> /// <summary>
/// The parent driver for this /// The parent driver for this
@@ -185,12 +187,7 @@ namespace PepperDash.Essentials
CTimer NextMeetingTimer; CTimer NextMeetingTimer;
/// <summary> /// <summary>
/// Tracks whether the user dismissed the meeting popup, while the system was on. Always false when
/// system is off.
/// </summary>
bool NextMeetingWarningWasDismissed;
/// <summary>
/// Tracks the last meeting that was cancelled /// Tracks the last meeting that was cancelled
/// </summary> /// </summary>
Meeting LastMeetingDismissed; Meeting LastMeetingDismissed;
@@ -945,6 +942,16 @@ namespace PepperDash.Essentials
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange; _CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
RefreshSourceInfo(); RefreshSourceInfo();
CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue);
_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.OutputChange += new EventHandler<EventArgs>(SharingContentIsOnFeedback_OutputChange);
CallSharingInfoVisibleFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]);
SetActiveCallListSharingContentStatus();
if (_CurrentRoom != null)
_CurrentRoom.CurrentSingleSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
SetupHeaderButtons(); SetupHeaderButtons();
} }
else else
@@ -954,6 +961,46 @@ namespace PepperDash.Essentials
} }
} }
/// <summary>
/// Updates the current shared source label on the call list when the source changes
/// </summary>
/// <param name="room"></param>
/// <param name="info"></param>
/// <param name="type"></param>
void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue)
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName;
}
/// <summary>
/// Fires when the sharing source feedback of the codec changes
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e)
{
SetActiveCallListSharingContentStatus();
}
/// <summary>
/// Sets the values for the text and button visibilty for the active call list source sharing info
/// </summary>
void SetActiveCallListSharingContentStatus()
{
CallSharingInfoVisibleFeedback.FireUpdate();
string callListSharedSourceLabel;
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue)
callListSharedSourceLabel = _CurrentRoom.CurrentSourceInfo.PreferredName;
else
callListSharedSourceLabel = "None";
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel;
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@@ -1456,7 +1503,6 @@ namespace PepperDash.Essentials
{ {
PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; } PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; }
JoinedSigInterlock PopupInterlock { get; } JoinedSigInterlock PopupInterlock { get; }
EssentialsHuddleVtc1Room CurrentRoom { get; }
void ShowNotificationRibbon(string message, int timeout); void ShowNotificationRibbon(string message, int timeout);
void HideNotificationRibbon(); void HideNotificationRibbon();
void ComputeHeaderCallStatus(VideoCodecBase codec); void ComputeHeaderCallStatus(VideoCodecBase codec);

View File

@@ -79,9 +79,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
StringBuilder SearchStringBuilder = new StringBuilder(); StringBuilder SearchStringBuilder = new StringBuilder();
BoolFeedback SearchStringBackspaceVisibleFeedback; BoolFeedback SearchStringBackspaceVisibleFeedback;
BoolFeedback CallSharingInfoVisibleFeedback;
//StringFeedback CallSharingInfoTextFeedback;
ModalDialog IncomingCallModal; ModalDialog IncomingCallModal;
eKeypadMode KeypadMode; eKeypadMode KeypadMode;
@@ -106,7 +103,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
Parent = parent; Parent = parent;
SetupCallStagingPopover(); SetupCallStagingPopover();
SetupDialKeypad(); SetupDialKeypad();
ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3); ActiveCallsSRL = new SubpageReferenceList(triList, UISmartObjectJoin.CodecActiveCallsHeaderList, 5,5,5);
SetupDirectoryList(); SetupDirectoryList();
SetupRecentCallsList(); SetupRecentCallsList();
SetupFavorites(); SetupFavorites();
@@ -148,7 +145,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
DialStringBackspaceVisibleFeedback = new BoolFeedback(() => DialStringBuilder.Length > 0); DialStringBackspaceVisibleFeedback = new BoolFeedback(() => DialStringBuilder.Length > 0);
DialStringBackspaceVisibleFeedback DialStringBackspaceVisibleFeedback
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCKeypadBackspaceVisible]); .LinkInputSig(triList.BooleanInput[UIBoolJoin.VCKeypadBackspaceVisible]);
SearchStringFeedback = new StringFeedback(() => SearchStringFeedback = new StringFeedback(() =>
{ {
@@ -168,26 +165,21 @@ namespace PepperDash.Essentials.UIDrivers.VC
SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0); SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0);
SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]); SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]);
TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackPress, GetDirectoryParentFolderContents); triList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackPress, GetDirectoryParentFolderContents);
DirectoryBackButtonVisibleFeedback = new BoolFeedback(() => CurrentDirectoryResult != (codec as IHasDirectory).DirectoryRoot); DirectoryBackButtonVisibleFeedback = new BoolFeedback(() => CurrentDirectoryResult != (codec as IHasDirectory).DirectoryRoot);
DirectoryBackButtonVisibleFeedback DirectoryBackButtonVisibleFeedback
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCDirectoryBackVisible]); .LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackVisible]);
TriList.SetSigFalseAction(UIBoolJoin.VCKeypadTextPress, RevealKeyboard); triList.SetSigFalseAction(UIBoolJoin.VCKeypadTextPress, RevealKeyboard);
TriList.SetSigFalseAction(UIBoolJoin.VCDirectorySearchTextPress, RevealKeyboard); triList.SetSigFalseAction(UIBoolJoin.VCDirectorySearchTextPress, RevealKeyboard);
//TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackspacePress, SearchKeypadBackspacePress); //TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackspacePress, SearchKeypadBackspacePress);
TriList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500, triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress); StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress);
CallSharingInfoVisibleFeedback = new BoolFeedback(() => Codec.SharingContentIsOnFeedback.BoolValue); triList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, Codec.StopSharing);
codec.SharingContentIsOnFeedback.OutputChange += new EventHandler<EventArgs>(SharingContentIsOnFeedback_OutputChange);
CallSharingInfoVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]);
Parent.CurrentRoom.CurrentSingleSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, Codec.StopSharing);
} }
catch (Exception e) catch (Exception e)
{ {
@@ -195,36 +187,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
} }
} }
/// <summary>
/// Updates the current shared source label on the call list when the source changes
/// </summary>
/// <param name="room"></param>
/// <param name="info"></param>
/// <param name="type"></param>
void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{
if (Codec.SharingContentIsOnFeedback.BoolValue)
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = Parent.CurrentRoom.CurrentSourceInfo.PreferredName;
}
/// <summary>
/// Fires when the sharing source feedback of the codec changes
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e)
{
CallSharingInfoVisibleFeedback.FireUpdate();
string callListSharedSourceLabel;
if (Codec.SharingContentIsOnFeedback.BoolValue)
callListSharedSourceLabel = Parent.CurrentRoom.CurrentSourceInfo.PreferredName;
else
callListSharedSourceLabel = "None";
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel;
}
/// <summary> /// <summary>
/// ///
@@ -336,6 +298,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
ActiveCallsSRL.StringInputSig(i, 1).StringValue = c.Name; ActiveCallsSRL.StringInputSig(i, 1).StringValue = c.Name;
ActiveCallsSRL.StringInputSig(i, 2).StringValue = c.Number; ActiveCallsSRL.StringInputSig(i, 2).StringValue = c.Number;
ActiveCallsSRL.StringInputSig(i, 3).StringValue = c.Status.ToString(); ActiveCallsSRL.StringInputSig(i, 3).StringValue = c.Status.ToString();
ActiveCallsSRL.StringInputSig(i, 4).StringValue = string.Format("Participant {0}", i);
ActiveCallsSRL.UShortInputSig(i, 1).UShortValue = (ushort)(c.Type == eCodecCallType.Video ? 2 : 1); ActiveCallsSRL.UShortInputSig(i, 1).UShortValue = (ushort)(c.Type == eCodecCallType.Video ? 2 : 1);
var cc = c; // for scope in lambda var cc = c; // for scope in lambda
ActiveCallsSRL.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => Codec.EndCall(cc)); ActiveCallsSRL.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => Codec.EndCall(cc));