diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs b/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs index a9909e7c..850f6ce4 100644 --- a/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs +++ b/Essentials Core/PepperDashEssentialsBase/Devices/IUsageTracking.cs @@ -27,6 +27,8 @@ namespace PepperDash.Essentials.Core public InUseTracking InUseTracker { get; protected set; } public bool UsageIsTracked { get; set; } + + public bool UsageTrackingStarted { get; protected set; } public DateTime UsageStartTime { get; protected set; } public DateTime UsageEndTime { get; protected set; } @@ -59,6 +61,7 @@ namespace PepperDash.Essentials.Core /// public void StartDeviceUsage() { + UsageTrackingStarted = true; UsageStartTime = DateTime.Now; } @@ -69,6 +72,8 @@ namespace PepperDash.Essentials.Core { try { + UsageTrackingStarted = false; + UsageEndTime = DateTime.Now; if (UsageStartTime != null) diff --git a/Essentials Core/PepperDashEssentialsBase/Routing/RoutingPortNames.cs b/Essentials Core/PepperDashEssentialsBase/Routing/RoutingPortNames.cs index c50055fd..7e72230b 100644 --- a/Essentials Core/PepperDashEssentialsBase/Routing/RoutingPortNames.cs +++ b/Essentials Core/PepperDashEssentialsBase/Routing/RoutingPortNames.cs @@ -132,6 +132,30 @@ namespace PepperDash.Essentials.Core.Routing /// public const string HdmiOut = "hdmiOut"; /// + /// hdmiOut1 + /// + public const string HdmiOut1 = "hdmiOut1"; + /// + /// hdmiOut2 + /// + public const string HdmiOut2 = "hdmiOut2"; + /// + /// hdmiOut3 + /// + public const string HdmiOut3 = "hdmiOut3"; + /// + /// hdmiOut4 + /// + public const string HdmiOut4 = "hdmiOut4"; + /// + /// hdmiOut5 + /// + public const string HdmiOut5 = "hdmiOut5"; + /// + /// hdmiOut6 + /// + public const string HdmiOut6 = "hdmiOut6"; + /// /// none /// public const string None = "none"; diff --git a/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs b/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs index 07225be0..4bf04f91 100644 --- a/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs +++ b/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs @@ -42,14 +42,16 @@ namespace PepperDash.Essentials.Devices.Common.Codec public void AddFoldersToDirectory(List folders) { - DirectoryResults.AddRange(folders); + if(folders != null) + DirectoryResults.AddRange(folders); SortDirectory(); } public void AddContactsToDirectory(List contacts) { - DirectoryResults.AddRange(contacts); + if(contacts != null) + DirectoryResults.AddRange(contacts); SortDirectory(); } diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj index 35e80c21..991e2d08 100644 --- a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj +++ b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj @@ -137,8 +137,10 @@ + + diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs index 405b5047..9525aa57 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs @@ -23,7 +23,27 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public class LastUpdated { - public DateTime Value { get; set; } + string _value; + + public DateTime Value { + get + { + DateTime _valueDateTime; + try + { + _valueDateTime = DateTime.Parse(_value); + return _valueDateTime; + } + catch + { + return new DateTime(); + } + } + set + { + _value = value.ToString(); + } + } } public class Id @@ -275,7 +295,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec { public string status { get; set; } public ResultInfo ResultInfo { get; set; } - public LastUpdated LastUpdated { get; set; } + //public LastUpdated LastUpdated { get; set; } public List Booking { get; set; } } diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CameraConverter.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CameraConverter.cs new file mode 100644 index 00000000..5e67c059 --- /dev/null +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CameraConverter.cs @@ -0,0 +1,53 @@ +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using Crestron.SimplSharp; + +//namespace PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec +//{ +// /// +// /// This helps convert the camera section differences between Spark and Spark+ +// /// One of them returns an object. One returns an array. +// /// +// public class CameraConverter : JsonConverter +// { + +// public override bool CanConvert(System.Type objectType) +// { +// return objectType == typeof(Camera) || objectType == typeof(List); +// } + +// public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) +// { +// if (reader.TokenType == JsonToken.StartArray) +// { +// var l = new List(); +// reader.Read(); +// while (reader.TokenType != JsonToken.EndArray) +// { +// l.Add(reader.Value as Camera); +// reader.Read(); +// } +// return l; +// } +// else +// { +// return new List { reader.Value as Camera }; +// } +// } + +// public override bool CanWrite +// { +// get +// { +// return false; +// } +// } + +// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) +// { +// throw new NotImplementedException("SOD OFF HOSER"); +// } +// } +//} \ No newline at end of file diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index 2eb023df..9503374f 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using Crestron.SimplSharp; using Crestron.SimplSharp.Net.Https; using Crestron.SimplSharp.CrestronXml; @@ -44,11 +45,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public StringFeedback LocalLayoutFeedback { get; private set; } - /// - /// An internal pseudo-source that is routable and connected to the osd input - /// - public DummyRoutingInputsDevice OsdSource { get; private set; } - private CodecCommandWithLabel CurrentSelfviewPipPosition; private CodecCommandWithLabel CurrentLocalLayout; @@ -207,9 +203,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public bool CommDebuggingIsOn; - string Delimiter = "\r\n"; + /// + /// Used to track the current connector used for the presentation source + /// int PresentationSource; string PresentationSourceKey; @@ -227,9 +225,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco // **___________________________________________________________________** public RoutingInputPort CodecOsdIn { get; private set; } - public RoutingInputPort HdmiIn1 { 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 public CiscoSparkCodec(string key, string name, IBasicCommunication comm, CiscoSparkCodecPropertiesConfig props ) @@ -304,18 +304,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo, 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, + eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this); + HdmiIn3 = new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource2), this); - HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo, + HdmiOut1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null, this); + HdmiOut2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, null, this); InputPorts.Add(CodecOsdIn); - InputPorts.Add(HdmiIn1); InputPorts.Add(HdmiIn2); - OutputPorts.Add(HdmiOut); + InputPorts.Add(HdmiIn3); + OutputPorts.Add(HdmiOut1); CreateOsdSource(); } @@ -367,7 +369,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco prefix + "/Status/Video/Selfview" + Delimiter + prefix + "/Status/Video/Layout" + Delimiter + prefix + "/Bookings" + Delimiter + - prefix + "/Event/CallDisconnect" + Delimiter; + prefix + "/Event/CallDisconnect" + Delimiter + + prefix + "/Event/Bookings" + Delimiter; return base.CustomActivate(); } @@ -540,6 +543,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco 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)) + PresentationSource = 0; + else if (conference.Presentation.LocalInstance[0].Source != null) + { + PresentationSource = conference.Presentation.LocalInstance[0].Source.IntValue; + } + } + // Check to see if this is a call status message received after the initial status message if (tempCodecStatus.Status.Call.Count > 0) { @@ -647,13 +663,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco } else if (response.IndexOf("\"Event\":{") > -1) { - // Event Message + if (response.IndexOf("\"CallDisconnect\":{") > -1) + { + CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject(); - CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject(); + JsonConvert.PopulateObject(response, eventReceived); - JsonConvert.PopulateObject(response, eventReceived); - - EvalutateEvent(eventReceived); + EvalutateDisconnectEvent(eventReceived); + } } else if (response.IndexOf("\"CommandResponse\":{") > -1) { @@ -707,7 +724,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { var directoryResults = new CodecDirectory(); - directoryResults = CiscoCodecPhonebook.ConvertCiscoPhonebookToGeneric(codecPhonebookResponse.CommandResponse.PhonebookSearchResult); + if(codecPhonebookResponse.CommandResponse.PhonebookSearchResult.ResultInfo.TotalRows.Value != "0") + directoryResults = CiscoCodecPhonebook.ConvertCiscoPhonebookToGeneric(codecPhonebookResponse.CommandResponse.PhonebookSearchResult); PrintPhonebook(directoryResults); @@ -744,7 +762,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco /// Evaluates an event received from the codec /// /// - void EvalutateEvent(CiscoCodecEvents.RootObject eventReceived) + void EvalutateDisconnectEvent(CiscoCodecEvents.RootObject eventReceived) { if (eventReceived.Event.CallDisconnect != null) { @@ -783,6 +801,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) { ExecuteSwitch(inputSelector); + PresentationSourceKey = inputSelector.ToString(); } @@ -866,7 +885,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco private void GetPhonebookContacts() { // Get Phonebook Folders (determine local/corporate from config, and set results limit) - SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact", PhonebookMode)); + SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact Limit: {1}", PhonebookMode, PhonebookResultsLimit)); } /// @@ -984,7 +1003,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco /// public void SelectPresentationSource1() { - SelectPresentationSource(1); + SelectPresentationSource(2); } /// @@ -992,7 +1011,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco /// public void SelectPresentationSource2() { - SelectPresentationSource(2); + SelectPresentationSource(3); } /// @@ -1007,7 +1026,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco else sendingMode = "LocalOnly"; - SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode)); + if(PresentationSource > 0) + SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode)); } /// @@ -1015,6 +1035,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco /// public override void StopSharing() { + PresentationSource = 0; + SendText("xCommand Presentation Stop"); } @@ -1267,18 +1289,33 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { get { - if (CodecConfiguration.Configuration.H323.H323Alias.E164 != null) - return CodecConfiguration.Configuration.H323.H323Alias.E164.Value; + if (CodecStatus.Status.SIP.Registration.Count > 0) + { + var match = Regex.Match(CodecStatus.Status.SIP.Registration[0].URI.Value, @"(\d+)"); // extract numbers only + if (match.Success) + { + Debug.Console(1, "Extracted phone number as '{0}' from string '{1}'", match.Groups[1].Value, CodecStatus.Status.SIP.Registration[0].URI.Value); + return match.Groups[1].Value; + } + else + { + Debug.Console(1, "Unable to extract phone number from string: '{0}'", CodecStatus.Status.SIP.Registration[0].URI.Value); + return string.Empty; + } + } else + { + Debug.Console(1, "Unable to extract phone number. No SIP Registration items found"); return string.Empty; + } } } public override string SipUri { get { - if (CodecConfiguration.Configuration.H323.H323Alias.ID != null) - return CodecConfiguration.Configuration.H323.H323Alias.ID.Value; + if (CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null) + return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value; else return string.Empty; } diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs index bdded993..6c5f59da 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs @@ -2,8 +2,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; + using Crestron.SimplSharp; +using Newtonsoft.Json; + + namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { /// @@ -17,19 +21,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Dereverberation { public string valueSpaceRef { get; set; } public string Value { get; set; } } - public class Mode2 + public class Mode { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -44,7 +42,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class EchoControl { public Dereverberation Dereverberation { get; set; } - public Mode2 Mode { get; set; } + public Mode Mode { get; set; } public NoiseReduction NoiseReduction { get; set; } } @@ -54,12 +52,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } + public class Mode2 + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + public class Microphone { public string id { get; set; } - public Mode Mode { get; set; } public EchoControl EchoControl { get; set; } public Level Level { get; set; } + public Mode2 Mode { get; set; } } public class Input @@ -94,29 +98,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public Mode3 Mode { get; set; } } - public class Mode4 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - - public class OutputType - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - - public class Line - { - public string id { get; set; } - public Mode4 Mode { get; set; } - public OutputType OutputType { get; set; } - } - public class Output { public InternalSpeaker InternalSpeaker { get; set; } - public List Line { get; set; } } public class RingTone @@ -146,38 +130,121 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public SoundsAndAlerts SoundsAndAlerts { get; set; } } - public class Framerate + public class DefaultMode { public string valueSpaceRef { get; set; } public string Value { get; set; } } - public class Camera + public class Backlight { - public Framerate Framerate { get; set; } + public DefaultMode DefaultMode { get; set; } } - public class Closeup + public class DefaultLevel { public string valueSpaceRef { get; set; } public string Value { get; set; } } + public class Mode4 + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + + public class Brightness + { + public DefaultLevel DefaultLevel { get; set; } + public Mode4 Mode { get; set; } + } + public class Mode5 { public string valueSpaceRef { get; set; } public string Value { get; set; } } + public class Focus + { + public Mode5 Mode { get; set; } + } + + public class Level2 + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + + public class Mode6 + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + + public class Gamma + { + public Level2 Level { get; set; } + public Mode6 Mode { get; set; } + } + + public class Mirror + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + + public class Level3 + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + + public class Mode7 + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + + public class Whitebalance + { + public Level3 Level { get; set; } + public Mode7 Mode { get; set; } + } + + public class Camera + { + public string id { get; set; } + public Backlight Backlight { get; set; } + public Brightness Brightness { get; set; } + public Focus Focus { get; set; } + public Gamma Gamma { get; set; } + public Mirror Mirror { get; set; } + public Whitebalance Whitebalance { get; set; } + } + + public class Closeup + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + + public class Mode8 + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + public class SpeakerTrack { public Closeup Closeup { get; set; } - public Mode5 Mode { get; set; } + public Mode8 Mode { get; set; } } public class Cameras { - public Camera Camera { get; set; } + //[JsonConverter(typeof(CameraConverter))] + //public List Camera { get; set; } public SpeakerTrack SpeakerTrack { get; set; } } @@ -187,7 +254,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode6 + public class Mode9 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -202,7 +269,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class AutoAnswer { public Delay Delay { get; set; } - public Mode6 Mode { get; set; } + public Mode9 Mode { get; set; } public Mute2 Mute { get; set; } } @@ -235,7 +302,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public DefaultTimeout DefaultTimeout { get; set; } } - public class Mode7 + public class Mode10 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -243,10 +310,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class Encryption { - public Mode7 Mode { get; set; } + public Mode10 Mode { get; set; } } - public class Mode8 + public class Mode11 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -254,7 +321,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class FarEndControl { - public Mode8 Mode { get; set; } + public Mode11 Mode { get; set; } } public class MaxReceiveCallRate @@ -281,7 +348,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode9 + public class Mode12 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -289,7 +356,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class MultiStream { - public Mode9 Mode { get; set; } + public Mode12 Mode { get; set; } } public class Conference @@ -312,7 +379,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode10 + public class Mode13 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -327,11 +394,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class Authentication { public LoginName LoginName { get; set; } - public Mode10 Mode { get; set; } + public Mode13 Mode { get; set; } public Password Password { get; set; } } - public class Mode11 + public class Mode14 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -339,7 +406,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class CallSetup { - public Mode11 Mode { get; set; } + public Mode14 Mode { get; set; } } public class KeySize @@ -388,7 +455,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode12 + public class Mode15 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -397,7 +464,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class NAT { public Address2 Address { get; set; } - public Mode12 Mode { get; set; } + public Mode15 Mode { get; set; } } public class H323 @@ -483,7 +550,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode13 + public class Mode16 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -512,7 +579,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public AnonymousIdentity AnonymousIdentity { get; set; } public Eap Eap { get; set; } public Identity Identity { get; set; } - public Mode13 Mode { get; set; } + public Mode16 Mode { get; set; } public Password2 Password { get; set; } public TlsVerify TlsVerify { get; set; } public UseClientCertificate UseClientCertificate { get; set; } @@ -640,7 +707,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public Video Video { get; set; } } - public class Mode14 + public class Mode17 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -649,7 +716,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class QoS { public Diffserv Diffserv { get; set; } - public Mode14 Mode { get; set; } + public Mode17 Mode { get; set; } } public class Allow @@ -669,7 +736,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode15 + public class Mode18 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -683,7 +750,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class Voice { - public Mode15 Mode { get; set; } + public Mode18 Mode { get; set; } public VlanId VlanId { get; set; } } @@ -707,7 +774,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public VLAN VLAN { get; set; } } - public class Mode16 + public class Mode19 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -715,10 +782,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class CDP { - public Mode16 Mode { get; set; } + public Mode19 Mode { get; set; } } - public class Mode17 + public class Mode20 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -726,10 +793,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class H3232 { - public Mode17 Mode { get; set; } + public Mode20 Mode { get; set; } } - public class Mode18 + public class Mode21 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -737,7 +804,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class HTTP { - public Mode18 Mode { get; set; } + public Mode21 Mode { get; set; } } public class MinimumTLSVersion @@ -777,7 +844,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public VerifyServerCertificate VerifyServerCertificate { get; set; } } - public class Mode19 + public class Mode22 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -797,11 +864,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class NTP2 { - public Mode19 Mode { get; set; } + public Mode22 Mode { get; set; } public List Server { get; set; } } - public class Mode20 + public class Mode23 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -809,7 +876,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class SIP { - public Mode20 Mode { get; set; } + public Mode23 Mode { get; set; } } public class CommunityName @@ -830,7 +897,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public Address7 Address { get; set; } } - public class Mode21 + public class Mode24 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -852,12 +919,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { public CommunityName CommunityName { get; set; } public List Host { get; set; } - public Mode21 Mode { get; set; } + public Mode24 Mode { get; set; } public SystemContact SystemContact { get; set; } public SystemLocation SystemLocation { get; set; } } - public class Mode22 + public class Mode25 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -865,10 +932,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class SSH { - public Mode22 Mode { get; set; } + public Mode25 Mode { get; set; } } - public class Mode23 + public class Mode26 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -876,7 +943,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class UPnP { - public Mode23 Mode { get; set; } + public Mode26 Mode { get; set; } } public class WelcomeText @@ -1017,7 +1084,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode24 + public class Mode27 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1035,11 +1102,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public ExternalManager ExternalManager { get; set; } public HttpMethod HttpMethod { get; set; } public LoginName2 LoginName { get; set; } - public Mode24 Mode { get; set; } + public Mode27 Mode { get; set; } public Password3 Password { get; set; } } - public class Mode25 + public class Mode28 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1077,7 +1144,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class Proximity { - public Mode25 Mode { get; set; } + public Mode28 Mode { get; set; } public Services Services { get; set; } } @@ -1135,7 +1202,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode26 + public class Mode29 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1144,7 +1211,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class Ice { public DefaultCandidate DefaultCandidate { get; set; } - public Mode26 Mode { get; set; } + public Mode29 Mode { get; set; } } public class ListenPort @@ -1220,7 +1287,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode27 + public class Mode30 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1230,7 +1297,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { public BaudRate BaudRate { get; set; } public LoginRequired LoginRequired { get; set; } - public Mode27 Mode { get; set; } + public Mode30 Mode { get; set; } } public class BootAction @@ -1319,7 +1386,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public Type2 Type { get; set; } } - public class Mode28 + public class Mode31 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1327,7 +1394,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class KeyTones { - public Mode28 Mode { get; set; } + public Mode31 Mode { get; set; } } public class Language @@ -1397,7 +1464,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode29 + public class Mode32 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1434,7 +1501,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public BaseDN BaseDN { get; set; } public Encryption3 Encryption { get; set; } public MinimumTLSVersion2 MinimumTLSVersion { get; set; } - public Mode29 Mode { get; set; } + public Mode32 Mode { get; set; } public Server6 Server { get; set; } public VerifyServerCertificate2 VerifyServerCertificate { get; set; } } @@ -1456,7 +1523,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode30 + public class Mode33 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1465,7 +1532,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class CameraControl { public CameraId CameraId { get; set; } - public Mode30 Mode { get; set; } + public Mode33 Mode { get; set; } } public class InputSourceType @@ -1480,12 +1547,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Visibility - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class PreferredResolution { public string valueSpaceRef { get; set; } @@ -1504,16 +1565,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } + public class Visibility + { + public string valueSpaceRef { get; set; } + public string Value { get; set; } + } + public class Connector { public string id { get; set; } public CameraControl CameraControl { get; set; } public InputSourceType InputSourceType { get; set; } public Name3 Name { get; set; } - public Visibility Visibility { get; set; } public PreferredResolution PreferredResolution { get; set; } public PresentationSelection PresentationSelection { get; set; } public Quality Quality { get; set; } + public Visibility Visibility { get; set; } } public class Input2 @@ -1527,7 +1594,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode31 + public class Mode34 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1535,7 +1602,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class CEC { - public Mode31 Mode { get; set; } + public Mode34 Mode { get; set; } } public class MonitorRole @@ -1580,7 +1647,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode32 + public class Mode35 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1601,7 +1668,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class Default { public FullscreenMode FullscreenMode { get; set; } - public Mode32 Mode { get; set; } + public Mode35 Mode { get; set; } public OnMonitorRole OnMonitorRole { get; set; } public PIPPosition PIPPosition { get; set; } } @@ -1612,7 +1679,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } - public class Mode33 + public class Mode36 { public string valueSpaceRef { get; set; } public string Value { get; set; } @@ -1621,7 +1688,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class OnCall { public Duration Duration { get; set; } - public Mode33 Mode { get; set; } + public Mode36 Mode { get; set; } } public class Selfview diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs index 46b1dcfb..1982b83a 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs @@ -4,6 +4,8 @@ using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronXml.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using PepperDash.Core; @@ -31,15 +33,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco } + public class ConnectionStatus { public string Value { get; set; } } + public class EcReferenceDelay + { + public string Value { get; set; } + } + public class Microphone { public string id { get; set; } public ConnectionStatus ConnectionStatus { get; set; } + public EcReferenceDelay EcReferenceDelay { get; set; } } public class Connectors @@ -205,6 +214,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public string Value { get; set; } } + public class Flip + { + public string Value { get; set; } + } + + public class HardwareID + { + public string Value { get; set; } + } + public class Manufacturer { public string Value { get; set; } @@ -237,15 +256,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public Zoom Zoom { get; set; } } + public class SoftwareID + { + public string Value { get; set; } + } + public class Camera { public string id { get; set; } public Capabilities Capabilities { get; set; } public Connected Connected { get; set; } - public Framerate Framerate { get; set; } + public Flip Flip { get; set; } + public HardwareID HardwareID { get; set; } + public MacAddress MacAddress { get; set; } public Manufacturer Manufacturer { get; set; } public Model Model { get; set; } public Position Position { get; set; } + public SerialNumber SerialNumber { get; set; } + public SoftwareID SoftwareID { get; set; } } public class Availability @@ -287,12 +315,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class Cameras { - public List Camera { get; set; } + //[JsonConverter(typeof(CameraConverter))] + //public List Camera { get; set; } public SpeakerTrack SpeakerTrack { get; set; } public Cameras() { - Camera = new List(); + //Camera = new List(); SpeakerTrack = new SpeakerTrack(); } } @@ -397,9 +426,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public RequestFloorAvailability RequestFloorAvailability { get; set; } } - public class Source2 + public class Source2 : ValueProperty { - public string Value { get; set; } + string _Value; + + /// + /// Sets Value and triggers the action when set + /// + public string Value + { + get + { + return _Value; + } + set + { + _Value = value; + OnValueChanged(); + } + } + + /// + /// Converted value of _Value for use as feedback + /// + public int IntValue + { + get + { + if (!string.IsNullOrEmpty(_Value)) + return Convert.ToInt32(_Value); + else + return 0; + } + } } public class SendingMode @@ -410,16 +469,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class LocalInstance { public string id { get; set; } + public string ghost { get; set; } public SendingMode SendingMode {get; set;} public Source2 Source { get; set; } + + public LocalInstance() + { + Source = new Source2(); + } } public class Presentation { - public CallId2 CallId { get; set; } - public Mode2 Mode { get; set; } - public Whiteboard Whiteboard { get; set; } - public List LocalInstance { get; set; } + public CallId2 CallId { get; set; } + public Mode2 Mode { get; set; } + public Whiteboard Whiteboard { get; set; } + public List LocalInstance { get; set; } public Presentation() { @@ -1047,6 +1112,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco } } + public class Primary + { + public URI URI { get; set; } + + public Primary() + { + URI = new URI(); + } + } + + public class AlternateURI + { + public Primary Primary { get; set; } + + public AlternateURI() + { + Primary = new Primary(); + } + } + public class Authentication { public string Value { get; set; } @@ -1128,6 +1213,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public Reason3 Reason { get; set; } public Status10 Status { get; set; } public URI3 URI { get; set; } + + public Registration() + { + URI = new URI3(); + } } public class Secure @@ -1142,6 +1232,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public class SIP { + public AlternateURI AlternateURI { get; set; } public Authentication Authentication { get; set; } public CallForward CallForward { get; set; } public Mailbox Mailbox { get; set; } @@ -1149,6 +1240,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public List Registration { get; set; } public Secure Secure { get; set; } public Verified Verified { get; set; } + + public SIP() + { + AlternateURI = new AlternateURI(); + Registration = new List(); + } } public class Mode7 diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatusSparkPlus.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatusSparkPlus.cs new file mode 100644 index 00000000..014a4e60 --- /dev/null +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatusSparkPlus.cs @@ -0,0 +1,1552 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec +{ + public class xStatusSparkPlus + { + public class ConnectionStatus + { + public string Value { get; set; } + } + + public class EcReferenceDelay + { + public string Value { get; set; } + } + + public class Microphone + { + public string id { get; set; } + public ConnectionStatus ConnectionStatus { get; set; } + public EcReferenceDelay EcReferenceDelay { get; set; } + } + + public class Connectors + { + public List Microphone { get; set; } + } + + public class Input + { + public Connectors Connectors { get; set; } + } + + public class Mute + { + public string Value { get; set; } + } + + public class Microphones + { + public Mute Mute { get; set; } + } + + public class ConnectionStatus2 + { + public string Value { get; set; } + } + + public class DelayMs + { + public string Value { get; set; } + } + + public class Line + { + public string id { get; set; } + public ConnectionStatus2 ConnectionStatus { get; set; } + public DelayMs DelayMs { get; set; } + } + + public class Connectors2 + { + public List Line { get; set; } + } + + public class Output + { + public Connectors2 Connectors { get; set; } + } + + public class Volume + { + public string Value { get; set; } + } + + public class VolumeMute + { + public string Value { get; set; } + } + + public class Audio + { + public Input Input { get; set; } + public Microphones Microphones { get; set; } + public Output Output { get; set; } + public Volume Volume { get; set; } + public VolumeMute VolumeMute { get; set; } + } + + public class Id + { + public string Value { get; set; } + } + + public class Current + { + public Id Id { get; set; } + } + + public class Bookings + { + public Current Current { get; set; } + } + + public class Options + { + public string Value { get; set; } + } + + public class Capabilities + { + public Options Options { get; set; } + } + + public class Connected + { + public string Value { get; set; } + } + + public class Flip + { + public string Value { get; set; } + } + + public class HardwareID + { + public string Value { get; set; } + } + + public class MacAddress + { + public string Value { get; set; } + } + + public class Manufacturer + { + public string Value { get; set; } + } + + public class Model + { + public string Value { get; set; } + } + + public class Pan + { + public string Value { get; set; } + } + + public class Tilt + { + public string Value { get; set; } + } + + public class Zoom + { + public string Value { get; set; } + } + + public class Position + { + public Pan Pan { get; set; } + public Tilt Tilt { get; set; } + public Zoom Zoom { get; set; } + } + + public class SerialNumber + { + public string Value { get; set; } + } + + public class SoftwareID + { + public string Value { get; set; } + } + + public class Camera + { + public string id { get; set; } + public Capabilities Capabilities { get; set; } + public Connected Connected { get; set; } + public Flip Flip { get; set; } + public HardwareID HardwareID { get; set; } + public MacAddress MacAddress { get; set; } + public Manufacturer Manufacturer { get; set; } + public Model Model { get; set; } + public Position Position { get; set; } + public SerialNumber SerialNumber { get; set; } + public SoftwareID SoftwareID { get; set; } + } + + public class Availability + { + public string Value { get; set; } + } + + public class Status2 + { + public string Value { get; set; } + } + + public class SpeakerTrack + { + public Availability Availability { get; set; } + public Status2 Status { get; set; } + } + + public class Cameras + { + public List Camera { get; set; } + public SpeakerTrack SpeakerTrack { get; set; } + } + + public class MaxActiveCalls + { + public string Value { get; set; } + } + + public class MaxAudioCalls + { + public string Value { get; set; } + } + + public class MaxCalls + { + public string Value { get; set; } + } + + public class MaxVideoCalls + { + public string Value { get; set; } + } + + public class Conference + { + public MaxActiveCalls MaxActiveCalls { get; set; } + public MaxAudioCalls MaxAudioCalls { get; set; } + public MaxCalls MaxCalls { get; set; } + public MaxVideoCalls MaxVideoCalls { get; set; } + } + + public class Capabilities2 + { + public Conference Conference { get; set; } + } + + public class CallId + { + public string Value { get; set; } + } + + public class ActiveSpeaker + { + public CallId CallId { get; set; } + } + + public class DoNotDisturb + { + public string Value { get; set; } + } + + public class Mode + { + public string Value { get; set; } + } + + public class Line2 + { + public string id { get; set; } + public Mode Mode { get; set; } + } + + public class Mode2 + { + public string Value { get; set; } + } + + public class Multipoint + { + public Mode2 Mode { get; set; } + } + + public class CallId2 + { + public string Value { get; set; } + } + + public class SendingMode + { + public string Value { get; set; } + } + + public class Source + { + public string Value { get; set; } + } + + public class LocalInstance + { + public string id { get; set; } + public SendingMode SendingMode { get; set; } + public Source Source { get; set; } + } + + public class Mode3 + { + public string Value { get; set; } + } + + public class Mode4 + { + public string Value { get; set; } + } + + public class ReleaseFloorAvailability + { + public string Value { get; set; } + } + + public class RequestFloorAvailability + { + public string Value { get; set; } + } + + public class Whiteboard + { + public Mode4 Mode { get; set; } + public ReleaseFloorAvailability ReleaseFloorAvailability { get; set; } + public RequestFloorAvailability RequestFloorAvailability { get; set; } + } + + public class Presentation + { + public CallId2 CallId { get; set; } + public List LocalInstance { get; set; } + public Mode3 Mode { get; set; } + public Whiteboard Whiteboard { get; set; } + } + + public class CallId3 + { + public string Value { get; set; } + } + + public class Mode5 + { + public string Value { get; set; } + } + + public class SpeakerLock + { + public CallId3 CallId { get; set; } + public Mode5 Mode { get; set; } + } + + public class Conference2 + { + public ActiveSpeaker ActiveSpeaker { get; set; } + public DoNotDisturb DoNotDisturb { get; set; } + public List Line { get; set; } + public Multipoint Multipoint { get; set; } + public Presentation Presentation { get; set; } + public SpeakerLock SpeakerLock { get; set; } + } + + public class Conference3 + { + } + + public class Experimental + { + public Conference3 Conference { get; set; } + } + + public class Address + { + public string Value { get; set; } + } + + public class Port + { + public string Value { get; set; } + } + + public class Reason + { + public string Value { get; set; } + } + + public class Status3 + { + public string Value { get; set; } + } + + public class Gatekeeper + { + public Address Address { get; set; } + public Port Port { get; set; } + public Reason Reason { get; set; } + public Status3 Status { get; set; } + } + + public class Reason2 + { + public string Value { get; set; } + } + + public class Status4 + { + public string Value { get; set; } + } + + public class Mode6 + { + public Reason2 Reason { get; set; } + public Status4 Status { get; set; } + } + + public class H323 + { + public Gatekeeper Gatekeeper { get; set; } + public Mode6 Mode { get; set; } + } + + public class Expression + { + public string id { get; set; } + public string Value { get; set; } + } + + public class Format + { + public string Value { get; set; } + } + + public class URL + { + public string Value { get; set; } + } + + public class HttpFeedback + { + public string id { get; set; } + public List Expression { get; set; } + public Format Format { get; set; } + public URL URL { get; set; } + } + + public class MediaChannels + { + } + + public class Address2 + { + public string Value { get; set; } + } + + public class Capabilities3 + { + public string Value { get; set; } + } + + public class DeviceId + { + public string Value { get; set; } + } + + public class Duplex + { + public string Value { get; set; } + } + + public class Platform + { + public string Value { get; set; } + } + + public class PortID + { + public string Value { get; set; } + } + + public class PrimaryMgmtAddress + { + public string Value { get; set; } + } + + public class SysName + { + public string Value { get; set; } + } + + public class SysObjectID + { + public string Value { get; set; } + } + + public class VTPMgmtDomain + { + public string Value { get; set; } + } + + public class Version + { + public string Value { get; set; } + } + + public class VoIPApplianceVlanID + { + public string Value { get; set; } + } + + public class CDP + { + public Address2 Address { get; set; } + public Capabilities3 Capabilities { get; set; } + public DeviceId DeviceId { get; set; } + public Duplex Duplex { get; set; } + public Platform Platform { get; set; } + public PortID PortID { get; set; } + public PrimaryMgmtAddress PrimaryMgmtAddress { get; set; } + public SysName SysName { get; set; } + public SysObjectID SysObjectID { get; set; } + public VTPMgmtDomain VTPMgmtDomain { get; set; } + public Version Version { get; set; } + public VoIPApplianceVlanID VoIPApplianceVlanID { get; set; } + } + + public class Name + { + public string Value { get; set; } + } + + public class Domain + { + public Name Name { get; set; } + } + + public class Address3 + { + public string Value { get; set; } + } + + public class Server + { + public string id { get; set; } + public Address3 Address { get; set; } + } + + public class DNS + { + public Domain Domain { get; set; } + public List Server { get; set; } + } + + public class MacAddress2 + { + public string Value { get; set; } + } + + public class Speed + { + public string Value { get; set; } + } + + public class Ethernet + { + public MacAddress2 MacAddress { get; set; } + public Speed Speed { get; set; } + } + + public class Address4 + { + public string Value { get; set; } + } + + public class Gateway + { + public string Value { get; set; } + } + + public class SubnetMask + { + public string Value { get; set; } + } + + public class IPv4 + { + public Address4 Address { get; set; } + public Gateway Gateway { get; set; } + public SubnetMask SubnetMask { get; set; } + } + + public class Address5 + { + public string Value { get; set; } + } + + public class Gateway2 + { + public string Value { get; set; } + } + + public class IPv6 + { + public Address5 Address { get; set; } + public Gateway2 Gateway { get; set; } + } + + public class VlanId + { + public string Value { get; set; } + } + + public class Voice + { + public VlanId VlanId { get; set; } + } + + public class VLAN + { + public Voice Voice { get; set; } + } + + public class Network + { + public string id { get; set; } + public CDP CDP { get; set; } + public DNS DNS { get; set; } + public Ethernet Ethernet { get; set; } + public IPv4 IPv4 { get; set; } + public IPv6 IPv6 { get; set; } + public VLAN VLAN { get; set; } + } + + public class CurrentAddress + { + public string Value { get; set; } + } + + public class Address6 + { + public string Value { get; set; } + } + + public class Server2 + { + public string id { get; set; } + public Address6 Address { get; set; } + } + + public class Status5 + { + public string Value { get; set; } + } + + public class NTP + { + public CurrentAddress CurrentAddress { get; set; } + public List Server { get; set; } + public Status5 Status { get; set; } + } + + public class NetworkServices + { + public NTP NTP { get; set; } + } + + public class HardwareInfo + { + public string Value { get; set; } + } + + public class ID2 + { + public string Value { get; set; } + } + + public class Name2 + { + public string Value { get; set; } + } + + public class SoftwareInfo + { + public string Value { get; set; } + } + + public class Status6 + { + public string Value { get; set; } + } + + public class Type + { + public string Value { get; set; } + } + + public class UpgradeStatus + { + public string Value { get; set; } + } + + public class ConnectedDevice + { + public string id { get; set; } + public HardwareInfo HardwareInfo { get; set; } + public ID2 ID { get; set; } + public Name2 Name { get; set; } + public SoftwareInfo SoftwareInfo { get; set; } + public Status6 Status { get; set; } + public Type Type { get; set; } + public UpgradeStatus UpgradeStatus { get; set; } + } + + public class Peripherals + { + public List ConnectedDevice { get; set; } + } + + public class Enabled + { + public string Value { get; set; } + } + + public class LastLoggedInUserId + { + public string Value { get; set; } + } + + public class LoggedIn + { + public string Value { get; set; } + } + + public class ExtensionMobility + { + public Enabled Enabled { get; set; } + public LastLoggedInUserId LastLoggedInUserId { get; set; } + public LoggedIn LoggedIn { get; set; } + } + + public class CUCM + { + public ExtensionMobility ExtensionMobility { get; set; } + } + + public class CompletedAt + { + public string Value { get; set; } + } + + public class URL2 + { + public string Value { get; set; } + } + + public class VersionId + { + public string Value { get; set; } + } + + public class Current2 + { + public CompletedAt CompletedAt { get; set; } + public URL2 URL { get; set; } + public VersionId VersionId { get; set; } + } + + public class LastChange + { + public string Value { get; set; } + } + + public class Message + { + public string Value { get; set; } + } + + public class Phase + { + public string Value { get; set; } + } + + public class SessionId + { + public string Value { get; set; } + } + + public class Status7 + { + public string Value { get; set; } + } + + public class URL3 + { + public string Value { get; set; } + } + + public class VersionId2 + { + public string Value { get; set; } + } + + public class UpgradeStatus2 + { + public LastChange LastChange { get; set; } + public Message Message { get; set; } + public Phase Phase { get; set; } + public SessionId SessionId { get; set; } + public Status7 Status { get; set; } + public URL3 URL { get; set; } + public VersionId2 VersionId { get; set; } + } + + public class Software + { + public Current2 Current { get; set; } + public UpgradeStatus2 UpgradeStatus { get; set; } + } + + public class Status8 + { + public string Value { get; set; } + } + + public class Provisioning + { + public CUCM CUCM { get; set; } + public Software Software { get; set; } + public Status8 Status { get; set; } + } + + public class Availability2 + { + public string Value { get; set; } + } + + public class Services + { + public Availability2 Availability { get; set; } + } + + public class Proximity + { + public Services Services { get; set; } + } + + public class Current3 + { + public string Value { get; set; } + } + + public class PeopleCount + { + public Current3 Current { get; set; } + } + + public class PeoplePresence + { + public string Value { get; set; } + } + + public class RoomAnalytics + { + public PeopleCount PeopleCount { get; set; } + public PeoplePresence PeoplePresence { get; set; } + } + + public class URI + { + public string Value { get; set; } + } + + public class Primary + { + public URI URI { get; set; } + } + + public class AlternateURI + { + public Primary Primary { get; set; } + } + + public class Authentication + { + public string Value { get; set; } + } + + public class DisplayName + { + public string Value { get; set; } + } + + public class Mode7 + { + public string Value { get; set; } + } + + public class URI2 + { + public string Value { get; set; } + } + + public class CallForward + { + public DisplayName DisplayName { get; set; } + public Mode7 Mode { get; set; } + public URI2 URI { get; set; } + } + + public class MessagesWaiting + { + public string Value { get; set; } + } + + public class URI3 + { + public string Value { get; set; } + } + + public class Mailbox + { + public MessagesWaiting MessagesWaiting { get; set; } + public URI3 URI { get; set; } + } + + public class Address7 + { + public string Value { get; set; } + } + + public class Status9 + { + public string Value { get; set; } + } + + public class Proxy + { + public string id { get; set; } + public Address7 Address { get; set; } + public Status9 Status { get; set; } + } + + public class Reason3 + { + public string Value { get; set; } + } + + public class Status10 + { + public string Value { get; set; } + } + + public class URI4 + { + public string Value { get; set; } + } + + public class Registration + { + public string id { get; set; } + public Reason3 Reason { get; set; } + public Status10 Status { get; set; } + public URI4 URI { get; set; } + } + + public class Secure + { + public string Value { get; set; } + } + + public class Verified + { + public string Value { get; set; } + } + + public class SIP + { + public AlternateURI AlternateURI { get; set; } + public Authentication Authentication { get; set; } + public CallForward CallForward { get; set; } + public Mailbox Mailbox { get; set; } + public List Proxy { get; set; } + public List Registration { get; set; } + public Secure Secure { get; set; } + public Verified Verified { get; set; } + } + + public class Mode8 + { + public string Value { get; set; } + } + + public class FIPS + { + public Mode8 Mode { get; set; } + } + + public class CallHistory + { + public string Value { get; set; } + } + + public class Configurations + { + public string Value { get; set; } + } + + public class DHCP + { + public string Value { get; set; } + } + + public class InternalLogging + { + public string Value { get; set; } + } + + public class LocalPhonebook + { + public string Value { get; set; } + } + + public class Persistency + { + public CallHistory CallHistory { get; set; } + public Configurations Configurations { get; set; } + public DHCP DHCP { get; set; } + public InternalLogging InternalLogging { get; set; } + public LocalPhonebook LocalPhonebook { get; set; } + } + + public class Security + { + public FIPS FIPS { get; set; } + public Persistency Persistency { get; set; } + } + + public class State + { + public string Value { get; set; } + } + + public class Standby + { + public State State { get; set; } + } + + public class CompatibilityLevel + { + public string Value { get; set; } + } + + public class SerialNumber2 + { + public string Value { get; set; } + } + + public class Module + { + public CompatibilityLevel CompatibilityLevel { get; set; } + public SerialNumber2 SerialNumber { get; set; } + } + + public class Hardware + { + public Module Module { get; set; } + } + + public class ProductId + { + public string Value { get; set; } + } + + public class ProductPlatform + { + public string Value { get; set; } + } + + public class ProductType + { + public string Value { get; set; } + } + + public class DisplayName2 + { + public string Value { get; set; } + } + + public class Name3 + { + public string Value { get; set; } + } + + public class Encryption + { + public string Value { get; set; } + } + + public class MultiSite + { + public string Value { get; set; } + } + + public class RemoteMonitoring + { + public string Value { get; set; } + } + + public class OptionKeys + { + public Encryption Encryption { get; set; } + public MultiSite MultiSite { get; set; } + public RemoteMonitoring RemoteMonitoring { get; set; } + } + + public class ReleaseDate + { + public string Value { get; set; } + } + + public class Version2 + { + public string Value { get; set; } + } + + public class Software2 + { + public DisplayName2 DisplayName { get; set; } + public Name3 Name { get; set; } + public OptionKeys OptionKeys { get; set; } + public ReleaseDate ReleaseDate { get; set; } + public Version2 Version { get; set; } + } + + public class NumberOfActiveCalls + { + public string Value { get; set; } + } + + public class NumberOfInProgressCalls + { + public string Value { get; set; } + } + + public class NumberOfSuspendedCalls + { + public string Value { get; set; } + } + + public class State2 + { + public NumberOfActiveCalls NumberOfActiveCalls { get; set; } + public NumberOfInProgressCalls NumberOfInProgressCalls { get; set; } + public NumberOfSuspendedCalls NumberOfSuspendedCalls { get; set; } + } + + public class Uptime + { + public string Value { get; set; } + } + + public class SystemUnit + { + public Hardware Hardware { get; set; } + public ProductId ProductId { get; set; } + public ProductPlatform ProductPlatform { get; set; } + public ProductType ProductType { get; set; } + public Software2 Software { get; set; } + public State2 State { get; set; } + public Uptime Uptime { get; set; } + } + + public class SystemTime + { + public DateTime Value { get; set; } + } + + public class Time + { + public SystemTime SystemTime { get; set; } + } + + public class Number + { + public string Value { get; set; } + } + + public class ContactMethod + { + public string id { get; set; } + public Number Number { get; set; } + } + + public class Name4 + { + public string Value { get; set; } + } + + public class ContactInfo + { + public List ContactMethod { get; set; } + public Name4 Name { get; set; } + } + + public class UserInterface + { + public ContactInfo ContactInfo { get; set; } + } + + public class PIPPosition + { + public string Value { get; set; } + } + + public class ActiveSpeaker2 + { + public PIPPosition PIPPosition { get; set; } + } + + public class Connected2 + { + public string Value { get; set; } + } + + public class DeviceType + { + public string Value { get; set; } + } + + public class Name5 + { + public string Value { get; set; } + } + + public class PowerStatus + { + public string Value { get; set; } + } + + public class VendorId + { + public string Value { get; set; } + } + + public class CEC + { + public string id { get; set; } + public DeviceType DeviceType { get; set; } + public Name5 Name { get; set; } + public PowerStatus PowerStatus { get; set; } + public VendorId VendorId { get; set; } + } + + public class ConnectedDevice2 + { + public List CEC { get; set; } + } + + public class SignalState + { + public string Value { get; set; } + } + + public class SourceId + { + public string Value { get; set; } + } + + public class Type2 + { + public string Value { get; set; } + } + + public class Connector + { + public string id { get; set; } + public Connected2 Connected { get; set; } + public ConnectedDevice2 ConnectedDevice { get; set; } + public SignalState SignalState { get; set; } + public SourceId SourceId { get; set; } + public Type2 Type { get; set; } + } + + public class MainVideoSource + { + public string Value { get; set; } + } + + public class ConnectorId + { + public string Value { get; set; } + } + + public class FormatStatus + { + public string Value { get; set; } + } + + public class FormatType + { + public string Value { get; set; } + } + + public class MediaChannelId + { + public string Value { get; set; } + } + + public class Height + { + public string Value { get; set; } + } + + public class RefreshRate + { + public string Value { get; set; } + } + + public class Width + { + public string Value { get; set; } + } + + public class Resolution + { + public Height Height { get; set; } + public RefreshRate RefreshRate { get; set; } + public Width Width { get; set; } + } + + public class Source2 + { + public string id { get; set; } + public ConnectorId ConnectorId { get; set; } + public FormatStatus FormatStatus { get; set; } + public FormatType FormatType { get; set; } + public MediaChannelId MediaChannelId { get; set; } + public Resolution Resolution { get; set; } + } + + public class Input2 + { + public List Connector { get; set; } + public MainVideoSource MainVideoSource { get; set; } + public List Source { get; set; } + } + + public class Local + { + public string Value { get; set; } + } + + public class LayoutFamily + { + public Local Local { get; set; } + } + + public class Layout + { + public LayoutFamily LayoutFamily { get; set; } + } + + public class Monitors + { + public string Value { get; set; } + } + + public class Connected3 + { + public string Value { get; set; } + } + + public class DeviceType2 + { + public string Value { get; set; } + } + + public class Name6 + { + public string Value { get; set; } + } + + public class PowerStatus2 + { + public string Value { get; set; } + } + + public class VendorId2 + { + public string Value { get; set; } + } + + public class CEC2 + { + public string id { get; set; } + public DeviceType2 DeviceType { get; set; } + public Name6 Name { get; set; } + public PowerStatus2 PowerStatus { get; set; } + public VendorId2 VendorId { get; set; } + } + + public class Name7 + { + public string Value { get; set; } + } + + public class PreferredFormat + { + public string Value { get; set; } + } + + public class ConnectedDevice3 + { + public List CEC { get; set; } + public Name7 Name { get; set; } + public PreferredFormat PreferredFormat { get; set; } + } + + public class MonitorRole + { + public string Value { get; set; } + } + + public class Height2 + { + public string Value { get; set; } + } + + public class RefreshRate2 + { + public string Value { get; set; } + } + + public class Width2 + { + public string Value { get; set; } + } + + public class Resolution2 + { + public Height2 Height { get; set; } + public RefreshRate2 RefreshRate { get; set; } + public Width2 Width { get; set; } + } + + public class Type3 + { + public string Value { get; set; } + } + + public class Connector2 + { + public string id { get; set; } + public Connected3 Connected { get; set; } + public ConnectedDevice3 ConnectedDevice { get; set; } + public MonitorRole MonitorRole { get; set; } + public Resolution2 Resolution { get; set; } + public Type3 Type { get; set; } + } + + public class Output2 + { + public List Connector { get; set; } + } + + public class PIPPosition2 + { + public string Value { get; set; } + } + + public class Presentation2 + { + public PIPPosition2 PIPPosition { get; set; } + } + + public class FullscreenMode + { + public string Value { get; set; } + } + + public class Mode9 + { + public string Value { get; set; } + } + + public class OnMonitorRole + { + public string Value { get; set; } + } + + public class PIPPosition3 + { + public string Value { get; set; } + } + + public class Selfview + { + public FullscreenMode FullscreenMode { get; set; } + public Mode9 Mode { get; set; } + public OnMonitorRole OnMonitorRole { get; set; } + public PIPPosition3 PIPPosition { get; set; } + } + + public class Video + { + public ActiveSpeaker2 ActiveSpeaker { get; set; } + public Input2 Input { get; set; } + public Layout Layout { get; set; } + public Monitors Monitors { get; set; } + public Output2 Output { get; set; } + public Presentation2 Presentation { get; set; } + public Selfview Selfview { get; set; } + } + + public class Status + { + public Audio Audio { get; set; } + public Bookings Bookings { get; set; } + public Cameras Cameras { get; set; } + public Capabilities2 Capabilities { get; set; } + public Conference2 Conference { get; set; } + public Experimental Experimental { get; set; } + public H323 H323 { get; set; } + public List HttpFeedback { get; set; } + public MediaChannels MediaChannels { get; set; } + public List Network { get; set; } + public NetworkServices NetworkServices { get; set; } + public Peripherals Peripherals { get; set; } + public Provisioning Provisioning { get; set; } + public Proximity Proximity { get; set; } + public RoomAnalytics RoomAnalytics { get; set; } + public SIP SIP { get; set; } + public Security Security { get; set; } + public Standby Standby { get; set; } + public SystemUnit SystemUnit { get; set; } + public Time Time { get; set; } + public UserInterface UserInterface { get; set; } + public Video Video { get; set; } + } + + public class RootObject + { + public Status Status { get; set; } + } + } +} \ No newline at end of file diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs index 9b97cb81..2d9b505a 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs @@ -6,6 +6,7 @@ using Crestron.SimplSharp; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Devices.Common; using PepperDash.Essentials.Devices.Common.Codec; @@ -33,14 +34,28 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec #endregion + /// + /// An internal pseudo-source that is routable and connected to the osd input + /// + public DummyRoutingInputsDevice OsdSource { get; protected set; } + public RoutingPortCollection InputPorts { get; private set; } public RoutingPortCollection OutputPorts { get; private set; } + bool wasIsInCall; + /// /// Returns true when any call is not in state Unknown, Disconnecting, Disconnected /// - public bool IsInCall { get { return ActiveCalls.Any(c => c.IsActiveCall); } } + public bool IsInCall + { + get + { + var value = ActiveCalls.Any(c => c.IsActiveCall); + return value; + } + } public BoolFeedback StandbyIsOnFeedback { get; private set; } @@ -109,8 +124,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec OnCallStatusChange(call); - if (AutoShareContentWhileInCall) - StartSharing(); } /// @@ -124,6 +137,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec var handler = CallStatusChange; if (handler != null) handler(this, new CodecCallStatusItemChangeEventArgs(item)); + + if (AutoShareContentWhileInCall) + StartSharing(); + + if(IsInCall && !UsageTracker.UsageTrackingStarted) + UsageTracker.StartDeviceUsage(); + else if(UsageTracker.UsageTrackingStarted && !IsInCall) + UsageTracker.EndDeviceUsage(); } /// diff --git a/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs b/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs index f1c90c84..ac72c76f 100644 --- a/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs +++ b/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs @@ -58,9 +58,13 @@ namespace PepperDash.Essentials.Fusion var codecPowerOnAction = new Action(b => { if (!b) codec.StandbyDeactivate(); }); var codecPowerOffAction = new Action(b => { if (!b) codec.StandbyActivate(); }); - // Map FusionRoom Attributes: + // Codec volume + var codecVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig); + codecVolume.OutputSig.UserObject = new Action(b => (codec as IBasicVolumeWithFeedback).SetVolume(b)); + (codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig); + // In Call Status CodecIsInCall = FusionRoom.CreateOffsetBoolSig(69, "Conf - VC 1 In Call", eSigIoMask.InputSigOnly); codec.CallStatusChange += new EventHandler(codec_CallStatusChange); @@ -331,11 +335,6 @@ namespace PepperDash.Essentials.Fusion if (display == (Room as EssentialsHuddleVtc1Room).DefaultDisplay) { - // Display volume - var defaultDisplayVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig); - defaultDisplayVolume.OutputSig.UserObject = new Action(b => (display as IBasicVolumeWithFeedback).SetVolume(b)); - (display as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(defaultDisplayVolume.InputSig); - // Power on var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig); defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOn(); }); diff --git a/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs b/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs index af77fd66..bed3143c 100644 --- a/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs +++ b/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs @@ -55,8 +55,8 @@ namespace PepperDash.Essentials var disp = DefaultDisplay as DisplayBase; var val = CurrentSourceInfo != null && CurrentSourceInfo.Type == eSourceListItemType.Route - && disp != null - && disp.PowerIsOnFeedback.BoolValue; + && disp != null; + //&& disp.PowerIsOnFeedback.BoolValue; return val; }; } diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index 8dc56709..696f14f7 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -129,37 +129,17 @@ namespace PepperDash.Essentials /// public const uint VCSelfViewLayoutVisible = 1208; /// - /// 1211 + /// 1211 - 1215 /// - public const uint VCFavorite1Press = 1211; + public const uint VCFavoritePressStart = 1211; + // RANGE IN USE + public const uint VCFavoritePressEnd = 1215; /// - /// 1212 + /// 1221 - 1225 /// - public const uint VCFavorite2Press = 1212; - /// - /// 1213 - /// - public const uint VCFavorite3Press = 1213; - /// - /// 1214 - /// - public const uint VCFavorite4Press = 1214; - /// - /// 1221 - /// - public const uint VCFavorite1Visible = 1221; - /// - /// 1222 - /// - public const uint VCFavorite2Visible = 1222; - /// - /// 1223 - /// - public const uint VCFavorite3Visible = 1223; - /// - /// 1224 - /// - public const uint VCFavorite4Visible = 1224; + public const uint VCFavoriteVisibleStart = 1221; + // RANGE IN USE + public const uint VCFavoriteVisibleEnd = 1225; /// /// 1231 /// diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs index 208c732b..69d3dea4 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs @@ -51,32 +51,14 @@ namespace PepperDash.Essentials /// public const uint VCDirectoryListTextStart = 1301; // RANGE IN USE - public const uint VCDirectoryListTextEnd = 1400; + public const uint VCDirectoryListTextEnd = 1556; /// - /// 141112 + /// 1611 - 1615 /// - public const uint VCFavorites1Text = 1411; - - /// - /// 1412 - /// - public const uint VCFavorites2Text = 1412; - - /// - /// 1413 - /// - public const uint VCFavorites3Text = 1413; - - /// - /// 1414 - /// - public const uint VCFavorites4Text = 1414; - - /// - /// 1415 - /// - public const uint VCFavorites5Text = 1415; + public const uint VCFavoritesStart = 1611; + // RANGE IN USE + public const uint VCFavoritesTextEnd = 1615; //****************************************************** diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 2fa0dce8..bed77c66 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -73,6 +73,8 @@ namespace PepperDash.Essentials StringInputSig HeaderCallButtonIconSig; + BoolFeedback CallSharingInfoVisibleFeedback; + /// /// The parent driver for this @@ -441,6 +443,9 @@ namespace PepperDash.Essentials // If the room is on, and the meeting is joinable // and the LastMeetingDismissed != this meeting + + Debug.Console(0, "*#* Room on: {0}, LastMeetingDismissed: {1} *#*", CurrentRoom.OnFeedback.BoolValue, + LastMeetingDismissed != null ? LastMeetingDismissed.StartTime.ToShortTimeString() : "null"); if (CurrentRoom.OnFeedback.BoolValue && LastMeetingDismissed == meeting) { @@ -448,7 +453,11 @@ namespace PepperDash.Essentials } LastMeetingDismissed = null; - if (meeting != null) + if (meeting == null) + { + HideNextMeetingPopup(); + } + else { TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting"); TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToShortTimeString()); @@ -471,10 +480,11 @@ namespace PepperDash.Essentials // indexOf = 3, 4 meetings : if (indexOfNext < meetings.Count) - { TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, meetings[indexOfNext].StartTime.ToShortTimeString()); - } + else + TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today"); + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () => { // Mark the meeting to not re-harass the user @@ -932,6 +942,18 @@ namespace PepperDash.Essentials _CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange; RefreshSourceInfo(); + + CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue); + _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.OutputChange += new EventHandler(SharingContentIsOnFeedback_OutputChange); + CallSharingInfoVisibleFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]); + + SetActiveCallListSharingContentStatus(); + + if (_CurrentRoom != null) + _CurrentRoom.CurrentSingleSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange); + + TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd")); + SetupHeaderButtons(); } else @@ -941,6 +963,46 @@ namespace PepperDash.Essentials } } + /// + /// Updates the current shared source label on the call list when the source changes + /// + /// + /// + /// + void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) + { + if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue) + TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName; + } + + /// + /// Fires when the sharing source feedback of the codec changes + /// + /// + /// + void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e) + { + SetActiveCallListSharingContentStatus(); + } + + /// + /// Sets the values for the text and button visibilty for the active call list source sharing info + /// + void SetActiveCallListSharingContentStatus() + { + CallSharingInfoVisibleFeedback.FireUpdate(); + + string callListSharedSourceLabel; + + if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue) + callListSharedSourceLabel = _CurrentRoom.CurrentSourceInfo.PreferredName; + else + callListSharedSourceLabel = "None"; + + TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel; + } + + /// /// /// @@ -1265,7 +1327,7 @@ namespace PepperDash.Essentials { var routeInfo = CurrentRoom.CurrentSourceInfo; // This will show off popup too - if (this.IsVisible) + if (this.IsVisible && !VCDriver.IsVisible) ShowCurrentSource(); if (routeInfo == null)// || !CurrentRoom.OnFeedback.BoolValue) diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 1cdc4dd4..e1fd1d4f 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -79,9 +79,6 @@ namespace PepperDash.Essentials.UIDrivers.VC StringBuilder SearchStringBuilder = new StringBuilder(); BoolFeedback SearchStringBackspaceVisibleFeedback; - BoolFeedback CallSharingInfoVisibleFeedback; - //StringFeedback CallSharingInfoTextFeedback; - ModalDialog IncomingCallModal; eKeypadMode KeypadMode; @@ -106,7 +103,7 @@ namespace PepperDash.Essentials.UIDrivers.VC Parent = parent; SetupCallStagingPopover(); SetupDialKeypad(); - ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3); + ActiveCallsSRL = new SubpageReferenceList(triList, UISmartObjectJoin.CodecActiveCallsHeaderList, 5,5,5); SetupDirectoryList(); SetupRecentCallsList(); SetupFavorites(); @@ -148,7 +145,7 @@ namespace PepperDash.Essentials.UIDrivers.VC DialStringBackspaceVisibleFeedback = new BoolFeedback(() => DialStringBuilder.Length > 0); DialStringBackspaceVisibleFeedback - .LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCKeypadBackspaceVisible]); + .LinkInputSig(triList.BooleanInput[UIBoolJoin.VCKeypadBackspaceVisible]); SearchStringFeedback = new StringFeedback(() => { @@ -168,26 +165,20 @@ namespace PepperDash.Essentials.UIDrivers.VC SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0); 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 - .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.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500, + triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500, StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress); - CallSharingInfoVisibleFeedback = new BoolFeedback(() => Codec.SharingContentIsOnFeedback.BoolValue); - codec.SharingContentIsOnFeedback.OutputChange += new EventHandler(SharingContentIsOnFeedback_OutputChange); - CallSharingInfoVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.CallSharedSourceInfoVisible]); - Parent.CurrentRoom.CurrentSingleSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange); - - TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, Codec.StopSharing); } catch (Exception e) { @@ -195,36 +186,6 @@ namespace PepperDash.Essentials.UIDrivers.VC } } - /// - /// Updates the current shared source label on the call list when the source changes - /// - /// - /// - /// - void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) - { - if (Codec.SharingContentIsOnFeedback.BoolValue) - TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = Parent.CurrentRoom.CurrentSourceInfo.PreferredName; - } - - /// - /// Fires when the sharing source feedback of the codec changes - /// - /// - /// - 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; - } /// /// @@ -233,7 +194,7 @@ namespace PepperDash.Essentials.UIDrivers.VC /// void Codec_IsReady() { - TriList.SetString(UIStringJoin.RoomPhoneText, Codec.CodecInfo.PhoneNumber); + TriList.SetString(UIStringJoin.RoomPhoneText, GetFormattedPhoneNumber(Codec.CodecInfo.PhoneNumber)); TriList.SetString(UIStringJoin.RoomSipText, Codec.CodecInfo.SipUri); if(Parent.HeaderButtonsAreSetUp) @@ -260,6 +221,7 @@ namespace PepperDash.Essentials.UIDrivers.VC Parent.ShowNotificationRibbon("Connected", 2000); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); ShowKeypad(); + (Parent.CurrentRoom.CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff(); //VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); break; case eCodecCallStatus.Connecting: @@ -336,6 +298,7 @@ namespace PepperDash.Essentials.UIDrivers.VC ActiveCallsSRL.StringInputSig(i, 1).StringValue = c.Name; ActiveCallsSRL.StringInputSig(i, 2).StringValue = c.Number; 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); var cc = c; // for scope in lambda ActiveCallsSRL.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => Codec.EndCall(cc)); @@ -536,15 +499,15 @@ namespace PepperDash.Essentials.UIDrivers.VC if (i < favs.Count) { var fav = favs[(int)i]; - TriList.SetString(1411 + i, fav.Name); - TriList.SetBool(1221 + i, true); - TriList.SetSigFalseAction(1211 + i, () => + TriList.SetString(UIStringJoin.VCFavoritesStart + i, fav.Name); + TriList.SetBool(UIBoolJoin.VCFavoriteVisibleStart + i, true); + TriList.SetSigFalseAction(UIBoolJoin.VCFavoritePressStart + i, () => { Codec.Dial(fav.Number); }); } else - TriList.SetBool(1221 + i, false); + TriList.SetBool(UIBoolJoin.VCFavoriteVisibleStart + i, false); } } } @@ -1111,7 +1074,7 @@ namespace PepperDash.Essentials.UIDrivers.VC /// - /// + /// Returns the text value for the keypad dial entry field /// /// string GetFormattedDialString(string ds) @@ -1120,21 +1083,33 @@ namespace PepperDash.Essentials.UIDrivers.VC { return "Tap for keyboard"; } - if(Regex.Match(ds, @"^\d{4,7}$").Success) // 456-7890 - return string.Format("{0}-{1}", ds.Substring(0, 3), ds.Substring(3)); - if (Regex.Match(ds, @"^9\d{4,7}$").Success) // 456-7890 - return string.Format("9 {0}-{1}", ds.Substring(1, 3), ds.Substring(4)); - if (Regex.Match(ds, @"^\d{8,10}$").Success) // 123-456-78 - return string.Format("({0}) {1}-{2}", ds.Substring(0, 3), ds.Substring(3, 3), ds.Substring(6)); - if (Regex.Match(ds, @"^\d{10}$").Success) // 123-456-7890 full - return string.Format("({0}) {1}-{2}", ds.Substring(0, 3), ds.Substring(3, 3), ds.Substring(6)); - if (Regex.Match(ds, @"^1\d{10}$").Success) - return string.Format("+1 ({0}) {1}-{2}", ds.Substring(1, 3), ds.Substring(4, 3), ds.Substring(7)); - if (Regex.Match(ds, @"^9\d{10}$").Success) - return string.Format("9 ({0}) {1}-{2}", ds.Substring(1, 3), ds.Substring(4, 3), ds.Substring(7)); - if (Regex.Match(ds, @"^91\d{10}$").Success) - return string.Format("9 +1 ({0}) {1}-{2}", ds.Substring(2, 3), ds.Substring(5, 3), ds.Substring(8)); - return ds; + + return GetFormattedPhoneNumber(ds); + + } + + /// + /// Formats a string of numbers as a North American phone number + /// + /// + /// + string GetFormattedPhoneNumber(string s) + { + if (Regex.Match(s, @"^\d{4,7}$").Success) // 456-7890 + return string.Format("{0}-{1}", s.Substring(0, 3), s.Substring(3)); + if (Regex.Match(s, @"^9\d{4,7}$").Success) // 456-7890 + return string.Format("9 {0}-{1}", s.Substring(1, 3), s.Substring(4)); + if (Regex.Match(s, @"^\d{8,10}$").Success) // 123-456-78 + return string.Format("({0}) {1}-{2}", s.Substring(0, 3), s.Substring(3, 3), s.Substring(6)); + if (Regex.Match(s, @"^\d{10}$").Success) // 123-456-7890 full + return string.Format("({0}) {1}-{2}", s.Substring(0, 3), s.Substring(3, 3), s.Substring(6)); + if (Regex.Match(s, @"^1\d{10}$").Success) + return string.Format("+1 ({0}) {1}-{2}", s.Substring(1, 3), s.Substring(4, 3), s.Substring(7)); + if (Regex.Match(s, @"^9\d{10}$").Success) + return string.Format("9 ({0}) {1}-{2}", s.Substring(1, 3), s.Substring(4, 3), s.Substring(7)); + if (Regex.Match(s, @"^91\d{10}$").Success) + return string.Format("9 +1 ({0}) {1}-{2}", s.Substring(2, 3), s.Substring(5, 3), s.Substring(8)); + return s; } enum eKeypadMode diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 7034204d..872717dc 100644 Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll index a102c4ab..cff85298 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ