Compare commits

..

13 Commits

Author SHA1 Message Date
Trevor Payne
080375345b fix:merge fixes 2022-09-06 11:53:08 -05:00
Trevor Payne
4d911d492f Fixed Commit Messages 2022-09-06 11:46:37 -05:00
Trevor Payne
e4226eb74b Post Lab Cisco-RoomOS Codec Pugin Testing
Multiple Changes
2022-09-06 09:56:46 -05:00
Trevor Payne
75c8dea4d3 Merged with Development 2022-09-06 00:10:40 -05:00
Trevor Payne
960c882436 Post BAML CodecTesting
Multiple Changes
2022-09-05 23:51:12 -05:00
Trevor Payne
d302a1b06b fix: merge in changes from issue #983
fix: DeviceInfo Null Check

Change IConvertiblePreset to abstract class ConvertiblePreset
2022-08-18 16:34:48 -05:00
Trevor Payne
780ec0aa4b fix: Check for local version 2022-08-17 13:22:48 -05:00
Trevor Payne
c2deaf9534 merge: feature/VideoCodec-Phonebook-Clear 2022-08-17 13:18:25 -05:00
Trevor Payne
cf3563d6b6 Merge branch 'feature/VideoCodec-Phonebook-Clear' into feature/explicit-essentials-version-check 2022-08-17 13:17:15 -05:00
Trevor Payne
e45643e9ab feat: add PluginDevelopmentDeviceFactory and associated Interfaces
feat: add method to Global to check against list of development versions
2022-08-17 13:01:21 -05:00
Trevor Payne
03a640d3d4 fix: Joinmap Index overwriting - adjusted 2022-08-12 16:18:58 -05:00
Trevor Payne
96cc263dbe feat: Resolves #982 2022-08-12 16:08:00 -05:00
Trevor Payne
9860e5f498 feat: Add method to clear selected phonebook entry 2022-08-12 15:58:19 -05:00
22 changed files with 304 additions and 699 deletions

View File

@@ -195,8 +195,6 @@ namespace PepperDash.Essentials
}
else // Handles Linux OS (Virtual Control)
{
Debug.SetDebugLevel(2);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", Global.AssemblyVersion);
// Set path to User/

View File

@@ -97,10 +97,10 @@ namespace PepperDash.Essentials
{
TriList.SetSigFalseAction(ButtonPressJoinBase + 1, ShadeDevice.Open);
TriList.SetSigFalseAction(ButtonPressJoinBase + 2, (ShadeDevice as IShadesOpenCloseStop).Stop);
if (ShadeDevice is IShadesOpenCloseStop)
TriList.SetString(StringJoinBase + 2, "Stop");
TriList.SetSigFalseAction(ButtonPressJoinBase + 2, (ShadeDevice as IShadesOpenCloseStop).StopOrPreset);
if(ShadeDevice is RelayControlledShade)
TriList.SetString(StringJoinBase + 2, (ShadeDevice as RelayControlledShade).StopOrPresetButtonLabel);
TriList.SetSigFalseAction(ButtonPressJoinBase + 3, ShadeDevice.Close);
}

View File

@@ -394,51 +394,35 @@ namespace PepperDash.Essentials.Core.Bridges
var controlProperties = CommFactory.GetControlPropertiesConfig(dc);
BasicTriList eisc;
switch (dc.Type.ToLower())
{
case "eiscapiadv":
case "eiscapiadvanced":
{
eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt,
var eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(controlProperties.IpIdInt,
controlProperties.TcpSshProperties.Address, Global.ControlSystem);
break;
return new EiscApiAdvanced(dc, eisc);
}
case "eiscapiadvancedserver":
{
eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem);
break;
var eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem);
return new EiscApiAdvanced(dc, eisc);
}
case "eiscapiadvancedclient":
{
eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem);
break;
var eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem);
return new EiscApiAdvanced(dc, eisc);
}
case "vceiscapiadv":
case "vceiscapiadvanced":
{
if (string.IsNullOrEmpty(controlProperties.RoomId))
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
eisc = null;
break;
}
eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, controlProperties.RoomId,
var eisc = new VirtualControlEISCClient(controlProperties.IpIdInt, InitialParametersClass.RoomId,
Global.ControlSystem);
break;
return new EiscApiAdvanced(dc, eisc);
}
default:
eisc = null;
break;
return null;
}
if (eisc == null)
{
return null;
}
return new EiscApiAdvanced(dc, eisc);
}
}

View File

@@ -398,6 +398,21 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("DirectoryClearSelection")]
public JoinDataComplete DirectoryClearSelection = new JoinDataComplete(
new JoinData
{
JoinNumber = 100,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Directory Clear Entry Selection",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("DirectoryEntryIsContact")]
public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete(
@@ -525,21 +540,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("DirectoryClearSelected")]
public JoinDataComplete DirectoryClearSelected = new JoinDataComplete(
new JoinData
{
JoinNumber = 110,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Clear Selected Entry and String from Search",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("CameraTiltUp")]
public JoinDataComplete CameraTiltUp = new JoinDataComplete(
new JoinData
@@ -792,16 +792,44 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
[JoinName("DialMeetingStart")]
public JoinDataComplete DialMeetingStart = new JoinDataComplete(
[JoinName("DialMeeting1")]
public JoinDataComplete DialMeeting1 = new JoinDataComplete(
new JoinData
{
JoinNumber = 161,
JoinSpan = 10
JoinSpan = 1
},
new JoinMetadata
{
Description = "Join meeting",
Description = "Join first meeting",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("DialMeeting2")]
public JoinDataComplete DialMeeting2 = new JoinDataComplete(
new JoinData
{
JoinNumber = 162,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Join second meeting",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("DialMeeting3")]
public JoinDataComplete DialMeeting3 = new JoinDataComplete(
new JoinData
{
JoinNumber = 163,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Join third meeting",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});

View File

@@ -1,56 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Describes the functionality required to prompt a user to enter a password
/// </summary>
public interface IPasswordPrompt
{
/// <summary>
/// Notifies when a password is required or is entered incorrectly
/// </summary>
event EventHandler<PasswordPromptEventArgs> PasswordRequired;
/// <summary>
/// Submits the password
/// </summary>
/// <param name="password"></param>
void SubmitPassword(string password);
}
public class PasswordPromptEventArgs : EventArgs
{
/// <summary>
/// Indicates if the last submitted password was incorrect
/// </summary>
public bool LastAttemptWasIncorrect { get; private set; }
/// <summary>
/// Indicates that the login attempt has failed
/// </summary>
public bool LoginAttemptFailed { get; private set; }
/// <summary>
/// Indicates that the process was cancelled and the prompt should be dismissed
/// </summary>
public bool LoginAttemptCancelled { get; private set; }
/// <summary>
/// A message to be displayed to the user
/// </summary>
public string Message { get; private set; }
public PasswordPromptEventArgs(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message)
{
LastAttemptWasIncorrect = lastAttemptIncorrect;
LoginAttemptFailed = loginFailed;
LoginAttemptCancelled = loginCancelled;
Message = message;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Describes the functionality required to prompt a user to enter a password
/// </summary>
public interface IPasswordPrompt
{
/// <summary>
/// Notifies when a password is required or is entered incorrectly
/// </summary>
event EventHandler<PasswordPromptEventArgs> PasswordRequired;
/// <summary>
/// Submits the password
/// </summary>
/// <param name="password"></param>
void SubmitPassword(string password);
}
public class PasswordPromptEventArgs : EventArgs
{
/// <summary>
/// Indicates if the last submitted password was incorrect
/// </summary>
public bool LastAttemptWasIncorrect { get; private set; }
/// <summary>
/// Indicates that the login attempt has failed
/// </summary>
public bool LoginAttemptFailed { get; private set; }
/// <summary>
/// Indicates that the process was cancelled and the prompt should be dismissed
/// </summary>
public bool LoginAttemptCancelled { get; private set; }
/// <summary>
/// A message to be displayed to the user
/// </summary>
public string Message { get; private set; }
public PasswordPromptEventArgs(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message)
{
LastAttemptWasIncorrect = lastAttemptIncorrect;
LoginAttemptFailed = loginFailed;
LoginAttemptCancelled = loginCancelled;
Message = message;
}
}
}

View File

@@ -283,10 +283,9 @@ namespace PepperDash.Essentials.Core
foreach (var join in joins)
{
Debug.Console(0,
@"Join Number: {0} | JoinSpan: '{1}' | JoinName: {2} | Description: '{3}' | Type: '{4}' | Capabilities: '{5}'",
@"Join Number: {0} | JoinSpan: '{1}' | Description: '{2}' | Type: '{3}' | Capabilities: '{4}'",
join.Value.JoinNumber,
join.Value.JoinSpan,
join.Key,
String.IsNullOrEmpty(join.Value.AttributeName) ? join.Value.Metadata.Label : join.Value.AttributeName,
join.Value.Metadata.JoinType.ToString(),
join.Value.Metadata.JoinCapabilities.ToString());

View File

@@ -19,7 +19,6 @@ namespace PepperDash.Essentials.Core.Shades
/// <summary>
/// Requirements for a device that implements basic Open/Close shade control
/// </summary>
[Obsolete("Please use IShadesOpenCloseStop instead")]
public interface IShadesOpenClose
{
void Open();
@@ -29,26 +28,15 @@ namespace PepperDash.Essentials.Core.Shades
/// <summary>
/// Requirements for a device that implements basic Open/Close/Stop shade control (Uses 3 relays)
/// </summary>
public interface IShadesOpenCloseStop
{
void Open();
void Close();
void Stop();
}
public interface IShadesOpenClosePreset : IShadesOpenCloseStop
{
void RecallPreset(uint presetNumber);
void SavePreset(uint presetNumber);
string StopOrPresetButtonLabel { get; }
event EventHandler PresetSaved;
public interface IShadesOpenCloseStop : IShadesOpenClose
{
void StopOrPreset();
string StopOrPresetButtonLabel { get; }
}
/// <summary>
/// Requirements for a shade that implements press/hold raise/lower functions
/// </summary>
[Obsolete("Please use IShadesOpenCloseStop instead")]
/// </summary>
public interface IShadesRaiseLower
{
void Raise(bool state);
@@ -67,7 +55,7 @@ namespace PepperDash.Essentials.Core.Shades
/// <summary>
/// Requirements for a shade/scene that is open or closed
/// </summary>
public interface IShadesOpenClosedFeedback: IShadesOpenCloseStop
public interface IShadesOpenClosedFeedback: IShadesOpenClose
{
BoolFeedback ShadeIsOpenFeedback { get; }
BoolFeedback ShadeIsClosedFeedback { get; }
@@ -75,16 +63,15 @@ namespace PepperDash.Essentials.Core.Shades
/// <summary>
///
/// </summary>
[Obsolete("Please use IShadesOpenCloseStop instead")]
public interface IShadesStop
/// </summary>
public interface IShadesStop
{
void Stop();
}
/// <summary>
/// Used to implement raise/stop/lower/stop from single button
/// </summary>
///
/// </summary>
public interface IShadesStopOrMove
{
void OpenOrStop();
@@ -95,7 +82,7 @@ namespace PepperDash.Essentials.Core.Shades
/// <summary>
/// Basic feedback for shades/scene stopped
/// </summary>
public interface IShadesStopFeedback : IShadesOpenCloseStop
public interface IShadesStopFeedback
{
BoolFeedback IsStoppedFeedback { get; }
}

View File

@@ -12,7 +12,7 @@ namespace PepperDash.Essentials.Core.Shades
/// <summary>
/// Base class for a shade device
/// </summary>
public abstract class ShadeBase : EssentialsDevice, IShadesOpenCloseStop
public abstract class ShadeBase : EssentialsDevice, IShadesOpenClose
{
public ShadeBase(string key, string name)
: base(key, name)
@@ -23,7 +23,7 @@ namespace PepperDash.Essentials.Core.Shades
#region iShadesOpenClose Members
public abstract void Open();
public abstract void Stop();
public abstract void StopOrPreset();
public abstract void Close();
#endregion

View File

@@ -223,7 +223,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
SendCameraPresetNamesToApi(presetsCamera, joinMap, trilist);
for (int i = 0; i < joinMap.NumberOfPresets.JoinSpan; i++)
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
{
int tempNum = i;

View File

@@ -49,6 +49,10 @@ namespace PepperDash.Essentials.Devices.Common.Codec
Stack<CodecDirectory> DirectoryBrowseHistoryStack { get; }
}
public interface IHasDirectoryClearSelection : IHasDirectory
{
void DirectoryClearSelection();
}
/// <summary>
///

View File

@@ -56,9 +56,9 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Somfy
PulseOutput(OpenRelay, RelayPulseTime);
}
public override void Stop()
public override void StopOrPreset()
{
Debug.Console(1, this, "Stopping Shade: '{0}'", this.Name);
Debug.Console(1, this, "Stopping or recalling preset on Shade: '{0}'", this.Name);
PulseOutput(StopOrPresetRelay, RelayPulseTime);
}

View File

@@ -185,7 +185,6 @@
<Compile Include="VideoCodec\MockVC\MockVC.cs" />
<Compile Include="VideoCodec\CiscoCodec\xStatus.cs" />
<Compile Include="VideoCodec\VideoCodecBase.cs" />
<Compile Include="VideoCodec\ZoomRoom\IZoomWirelessShareInstructions.cs" />
<Compile Include="VideoCodec\ZoomRoom\ResponseObjects.cs" />
<Compile Include="VideoCodec\ZoomRoom\ZoomRoom.cs" />
<Compile Include="VideoCodec\ZoomRoom\ZoomRoomCamera.cs" />

View File

@@ -26,7 +26,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public enum eExternalSourceType {camera, desktop, document_camera, mediaplayer, PC, whiteboard, other}
public enum eExternalSourceMode {Ready, NotReady, Hidden, Error}
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectoryClearSelection,
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets,
IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute, IHasDoNotDisturbMode,
@@ -493,6 +493,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
TieLineCollection.Default.Add(tl);
}
public void DirectoryClearSelection()
{
DirectoryClearSelectionBase();
}
public void InitializeBranding(string roomKey)
{
Debug.Console(1, this, "Initializing Branding for room {0}", roomKey);

View File

@@ -43,12 +43,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
[JsonProperty("isLocked", NullValueHandling = NullValueHandling.Ignore)]
public Boolean IsLocked { get; private set; }
[JsonProperty("isRecording", NullValueHandling = NullValueHandling.Ignore)]
public Boolean IsRecording { get; private set; }
[JsonProperty("canRecord", NullValueHandling = NullValueHandling.Ignore)]
public Boolean CanRecord { get; private set; }
public Boolean IsRecording { get; private set; }
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost, bool isLocked, bool isRecording, bool canRecord)
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost, bool isLocked, bool isRecording)
{
Id = id;
Name = name;
@@ -59,8 +57,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
IsSharingMeeting = isSharingMeeting;
WaitingForHost = waitingForHost;
IsLocked = isLocked;
IsRecording = isRecording;
CanRecord = CanRecord;
IsRecording = isRecording;
}
}

View File

@@ -3,9 +3,9 @@
public interface IHasPresentationOnlyMeeting
{
void StartSharingOnlyMeeting();
void StartSharingOnlyMeeting(eSharingMeetingMode displayMode);
void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration);
void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration, string password);
void StartSharingOnlyMeeting(eSharingMeetingMode mode);
void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration);
void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration, string password);
void StartNormalMeetingFromSharingOnlyMeeting();
}

View File

@@ -224,8 +224,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
handler(this, new CodecCallStatusItemChangeEventArgs(item));
}
PrivacyModeIsOnFeedback.FireUpdate();
if (AutoShareContentWhileInCall)
{
StartSharing();
@@ -811,22 +809,35 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
codec.CodecSchedule.MeetingWarningMinutes = i;
});
for (uint i = 0; i < joinMap.DialMeetingStart.JoinSpan; i++)
{
Debug.Console(1, this, "Setting action to Dial Meeting {0} to digital join {1}", i + 1, joinMap.DialMeetingStart.JoinNumber + i);
var joinNumber = joinMap.DialMeetingStart.JoinNumber + i;
var mtg = i + 1;
var index = (int)i;
trilist.SetSigFalseAction(joinNumber, () =>
{
Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}",
mtg, joinMap.DialMeetingStart.JoinNumber + i, index, _currentMeetings[index].Id, _currentMeetings[index].Title);
if (_currentMeetings[index] != null)
Dial(_currentMeetings[index]);
});
}
trilist.SetSigFalseAction(joinMap.DialMeeting1.JoinNumber, () =>
{
var mtg = 1;
var index = mtg - 1;
Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}",
mtg, joinMap.DialMeeting1.JoinNumber, index, _currentMeetings[index].Id, _currentMeetings[index].Title);
if (_currentMeetings[index] != null)
Dial(_currentMeetings[index]);
});
trilist.SetSigFalseAction(joinMap.DialMeeting2.JoinNumber, () =>
{
var mtg = 2;
var index = mtg - 1;
Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}",
mtg, joinMap.DialMeeting2.JoinNumber, index, _currentMeetings[index].Id, _currentMeetings[index].Title);
if (_currentMeetings[index] != null)
Dial(_currentMeetings[index]);
});
trilist.SetSigFalseAction(joinMap.DialMeeting3.JoinNumber, () =>
{
var mtg = 3;
var index = mtg - 1;
Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}",
mtg, joinMap.DialMeeting3.JoinNumber, index, _currentMeetings[index].Id, _currentMeetings[index].Title);
if (_currentMeetings[index] != null)
Dial(_currentMeetings[index]);
});
codec.CodecSchedule.MeetingsListHasChanged += (sender, args) => UpdateMeetingsList(codec, trilist, joinMap);
codec.CodecSchedule.MeetingEventChange += (sender, args) =>
@@ -837,6 +848,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
}
};
// TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set
trilist.SetUShortSigAction(joinMap.MeetingsToDisplay.JoinNumber, m => MeetingsToDisplay = m);
MeetingsToDisplayFeedback.LinkInputSig(trilist.UShortInput[joinMap.MeetingsToDisplay.JoinNumber]);
@@ -982,6 +994,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
return GetXSigString(tokenArray);
}
protected void DirectoryClearSelectionBase()
{
SelectDirectoryEntry(_directoryCodec, 0, _directoryTrilist, _directoryJoinmap);
}
private void LinkVideoCodecDirectoryToApi(IHasDirectory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
{
@@ -993,8 +1009,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
trilist.SetUShortSigAction(joinMap.DirectorySelectRow.JoinNumber, (i) => SelectDirectoryEntry(codec, i, trilist, joinMap));
//Special Change for protected directory clear
_directoryCodec = codec as IHasDirectoryClearSelection;
if (_directoryCodec != null)
{
_directoryTrilist = trilist;
_directoryJoinmap = joinMap;
trilist.SetBoolSigAction(joinMap.DirectoryClearSelection.JoinNumber, (b) => DirectoryClearSelectionBase());
}
trilist.SetBoolSigAction(joinMap.DirectoryClearSelected.JoinNumber, (b) => SelectDirectoryEntry(_directoryCodec, 0, _directoryTrilist, _directoryJoinmap));
// Report feedback for number of contact methods for selected contact
@@ -1393,11 +1417,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, call.IsOnHold);
//serials
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, call.Name ?? String.Empty);
tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, call.Number ?? String.Empty);
tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, call.Direction.ToString());
tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, call.Type.ToString());
tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, call.Status.ToString());
tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, call.Name ?? String.Empty);
tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, call.Number ?? String.Empty);
tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, call.Direction.ToString());
tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 4, call.Type.ToString());
tokenArray[arrayIndex + 5] = new XSigSerialToken(stringIndex + 5, call.Status.ToString());
if(call.Duration != null)
{
// May need to verify correct string format here
@@ -1407,9 +1431,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
arrayIndex += offset;
stringIndex += maxStrings;
digitalIndex += maxDigitals;
digitalIndex++;
}
while (arrayIndex < maxCalls * offset)
while (digitalIndex < maxCalls)
{
//digitals
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
@@ -1417,16 +1441,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
//serials
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty);
tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, String.Empty);
tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, String.Empty);
tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, String.Empty);
tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, String.Empty);
tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, String.Empty);
tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, String.Empty);
tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, String.Empty);
tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, String.Empty);
tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 4, String.Empty);
tokenArray[arrayIndex + 5] = new XSigSerialToken(stringIndex + 5, String.Empty);
tokenArray[arrayIndex + 6] = new XSigSerialToken(stringIndex + 6, String.Empty);
arrayIndex += offset;
stringIndex += maxStrings;
digitalIndex += maxDigitals;
digitalIndex++;
}
return GetXSigString(tokenArray);

View File

@@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
public class ShareInfoEventArgs : EventArgs
{
public zStatus.Sharing SharingStatus { get; private set; }
public ShareInfoEventArgs(zStatus.Sharing status)
{
SharingStatus = status;
}
}
public interface IZoomWirelessShareInstructions
{
event EventHandler<ShareInfoEventArgs> ShareInfoChanged;
zStatus.Sharing SharingState { get; }
}
}

View File

@@ -434,21 +434,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public bool supports_Web_Settings_Push { get; set; }
}
public enum eDisplayState
{
None,
Laptop,
IOS,
}
public class Sharing : NotifiableObject
{
private eDisplayState _dispState;
private string _dispState;
private string _password;
private bool _isAirHostClientConnected;
private bool _isSharingBlackMagic;
private bool _isDirectPresentationConnected;
private bool _isBlackMagicConnected;
public string directPresentationPairingCode { get; set; }
@@ -456,7 +448,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// Laptop client sharing key
/// </summary>
public string directPresentationSharingKey { get; set; }
public eDisplayState dispState
public string dispState
{
get
{
@@ -485,18 +477,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
public bool isBlackMagicConnected
{
get { return _isBlackMagicConnected; }
set
{
if (value != _isBlackMagicConnected)
{
_isBlackMagicConnected = value;
NotifyPropertyChanged("isBlackMagicConnected");
}
}
}
public bool isBlackMagicConnected { get; set; }
public bool isBlackMagicDataAvailable { get; set; }
public bool isDirectPresentationConnected
@@ -525,6 +506,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
/// <summary>
/// IOS Airplay code
/// </summary>
@@ -639,7 +622,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
// backer variables
private bool _can_Switch_Speaker_View;
private bool _can_Switch_Wall_View;
private bool _can_Switch_Strip_View;
private bool _can_Switch_Share_On_All_Screens;
private bool _can_Switch_Floating_Share_Content;
private bool _is_In_First_Page;
@@ -727,23 +709,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
[JsonProperty("can_Switch_Strip_View")]
public bool can_Switch_Strip_View
{
get
{
return _can_Switch_Strip_View;
}
set
{
if (value != _can_Switch_Strip_View)
{
_can_Switch_Strip_View = value;
NotifyPropertyChanged("can_Switch_Strip_View");
}
}
}
[JsonProperty("is_In_First_Page")]
public bool is_In_First_Page
{
@@ -805,43 +770,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public class CallRecordInfo : NotifiableObject
{
private bool _meetingIsBeingRecorded;
private bool _canRecord;
private bool _emailRequired;
public bool canRecord { get; set; }
public bool emailRequired { get; set; }
public bool amIRecording { get; set; }
public bool canRecord
{
get
{
return _canRecord;
}
set
{
if (value != _canRecord)
{
_canRecord = value;
NotifyPropertyChanged("canRecord");
}
}
}
public bool emailRequired
{
get
{
return _emailRequired;
}
set
{
if (value != _emailRequired)
{
_emailRequired = value;
NotifyPropertyChanged("emailRequired");
}
}
}
public bool meetingIsBeingRecorded
{
get
@@ -860,17 +793,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
/// <summary>
/// Indicates if recording is allowed (when meeting capable and and email is not required to be entered by the user)
/// </summary>
public bool AllowRecord
{
get
{
return canRecord && !emailRequired;
}
}
public CallRecordInfo()
{
Debug.Console(2, Debug.ErrorLogLevel.Notice, "********************************************* CallRecordInfo() ******************************************");

View File

@@ -27,7 +27,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMuteWithUnmuteReqeust, IHasCameraAutoMode,
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting,
IHasMeetingLock, IHasMeetingRecordingWithPrompt, IZoomWirelessShareInstructions
IHasMeetingLock, IHasMeetingRecordingWithPrompt
{
public event EventHandler VideoUnmuteRequested;
@@ -47,7 +47,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private const string JsonDelimiter = "\x0D\x0A\x7D\x0D\x0A";
private string[] Delimiters = new string[] { EchoDelimiter, JsonDelimiter, "OK\x0D\x0A", "end\x0D\x0A" };
//"echo off\x0D\x0A\x0A\x0D\x0A"
private readonly GenericQueue _receiveQueue;
//private readonly CrestronQueue<string> _receiveQueue;
//private readonly Thread _receiveThread;
private readonly ZoomRoomSyncState _syncState;
public bool CommDebuggingIsOn;
@@ -59,20 +64,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private CameraBase _selectedCamera;
private string _lastDialedMeetingNumber;
private readonly ZoomRoomPropertiesConfig _props;
private bool _meetingPasswordRequired;
private bool _waitingForUserToAcceptOrRejectIncomingCall;
public void Poll(string pollString)
{
if(_meetingPasswordRequired || _waitingForUserToAcceptOrRejectIncomingCall) return;
SendText(string.Format("{0}{1}", pollString, SendDelimiter));
}
public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
: base(config)
{
@@ -86,12 +79,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (_props.CommunicationMonitorProperties != null)
{
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, _props.CommunicationMonitorProperties.PollInterval, _props.CommunicationMonitorProperties.TimeToWarning, _props.CommunicationMonitorProperties.TimeToError,
() => Poll(_props.CommunicationMonitorProperties.PollString));
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication,
_props.CommunicationMonitorProperties);
}
else
{
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, () => Poll("zStatus SystemUnit"));
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000,
"zStatus SystemUnit" + SendDelimiter);
}
DeviceManager.AddDevice(CommunicationMonitor);
@@ -220,23 +214,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
protected override Func<bool> PrivacyModeIsOnFeedbackFunc
{
get
{
return () =>
{
//Debug.Console(2, this, "PrivacyModeIsOnFeedbackFunc. IsInCall: {0} muteState: {1}", IsInCall, Configuration.Call.Microphone.Mute);
if (IsInCall)
{
//Debug.Console(2, this, "reporting muteState: ", Configuration.Call.Microphone.Mute);
return Configuration.Call.Microphone.Mute;
}
else
{
//Debug.Console(2, this, "muteState: true", IsInCall);
return false;
}
};
}
get { return () => Configuration.Call.Microphone.Mute; }
}
protected override Func<bool> StandbyIsOnFeedbackFunc
@@ -246,23 +224,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
protected override Func<string> SharingSourceFeedbackFunc
{
get
{
return () =>
{
if (Status.Sharing.isAirHostClientConnected)
return "Airplay";
else if (Status.Sharing.isDirectPresentationConnected || Status.Sharing.isBlackMagicConnected)
return "Laptop";
else return "None";
};
}
get { return () => Status.Sharing.dispState; }
}
protected override Func<bool> SharingContentIsOnFeedbackFunc
{
get { return () => Status.Sharing.isAirHostClientConnected || Status.Sharing.isDirectPresentationConnected || Status.Sharing.isSharingBlackMagic; }
get { return () => Status.Call.Sharing.IsSharing; }
}
protected Func<bool> FarEndIsSharingContentFeedbackFunc
@@ -539,9 +506,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// </summary>
private void SetUpCallFeedbackActions()
{
Status.Sharing.PropertyChanged -= HandleSharingStateUpdate;
Status.Sharing.PropertyChanged += HandleSharingStateUpdate;
Status.Call.Sharing.PropertyChanged -= HandleSharingStateUpdate;
Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate;
@@ -554,7 +518,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private void HandleCallRecordInfoStateUpdate(object sender, PropertyChangedEventArgs a)
{
if (a.PropertyName == "meetingIsBeingRecorded" || a.PropertyName == "emailRequired" || a.PropertyName == "canRecord")
if (a.PropertyName == "meetingIsBeingRecorded")
{
MeetingIsRecordingFeedback.FireUpdate();
@@ -567,7 +531,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
}
}
@@ -593,10 +557,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private void HandleSharingStateUpdate(object sender, PropertyChangedEventArgs a)
{
//if (a.PropertyName != "State")
//{
// return;
//}
if (a.PropertyName != "State")
{
return;
}
SharingContentIsOnFeedback.FireUpdate();
ReceivingContent.FireUpdate();
@@ -606,19 +570,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
// Update the share status of the meeting info
if (MeetingInfo == null)
{
MeetingInfo = new MeetingInfo("", "", "", "", GetSharingStatus(), GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
var sharingStatus = GetSharingStatus();
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
return;
}
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None",
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
}
catch (Exception e)
{
Debug.Console(1, this, "Error processing state property update. {0}", e.Message);
Debug.Console(2, this, e.StackTrace);
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, false);
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
}
}
@@ -725,7 +691,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord
MeetingIsRecordingFeedback.BoolValue
);
}
};
@@ -761,12 +727,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Status.Sharing.PropertyChanged += (o, a) =>
{
OnShareInfoChanged(Status.Sharing);
SharingSourceFeedback.FireUpdate();
switch (a.PropertyName)
{
case "dispState":
SharingSourceFeedback.FireUpdate();
break;
case "password":
break;
case "isAirHostClientConnected":
case "isDirectPresentationConnected":
case "isSharingBlackMagic":
{
Debug.Console(2, this, "Updating sharing status: {0}", a.PropertyName);
@@ -787,7 +756,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
break;
}
@@ -821,10 +790,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName);
switch (a.PropertyName.ToLower())
{
case "can_Switch_speaker_view":
case "can_switch_speaker_view":
case "can_switch_wall_view":
case "can_switch_strip_view":
case "video_type":
case "can_switch_share_on_all_screens":
{
ComputeAvailableLayouts();
@@ -840,7 +807,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
LayoutViewIsOnLastPageFeedback.FireUpdate();
break;
}
case "can_switch_floating_share_content":
case "can_Switch_Floating_Share_Content":
{
CanSwapContentWithThumbnailFeedback.FireUpdate();
break;
@@ -970,18 +937,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void SendText(string command)
{
if (_meetingPasswordRequired)
{
Debug.Console(2, this, "Blocking commands to ZoomRoom while waiting for user to enter meeting password");
return;
}
if (_waitingForUserToAcceptOrRejectIncomingCall)
{
Debug.Console(2, this, "Blocking commands to ZoomRoom while waiting for user to accept or reject incoming call");
return;
}
if (CommDebuggingIsOn)
{
Debug.Console(1, this, "Sending: '{0}'", command);
@@ -1493,15 +1448,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
MeetingInfo.Id,
MeetingInfo.Name,
Participants.Host.Name,
MeetingInfo.Password,
GetSharingStatus(),
MeetingInfo.Password,
MeetingInfo.ShareStatus,
GetIsHostMyself(),
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue,
Status.Call.CallRecordInfo.AllowRecord
);
MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
PrintCurrentCallParticipants();
@@ -1586,7 +1539,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing);
SetDefaultLayout();
SetLayout();
break;
}
@@ -1606,8 +1559,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Id = incomingCall.callerJID
};
_waitingForUserToAcceptOrRejectIncomingCall = true;
ActiveCalls.Add(newCall);
OnCallStatusChange(newCall);
@@ -1634,8 +1585,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
OnCallStatusChange(existingCall);
}
_waitingForUserToAcceptOrRejectIncomingCall = false;
UpdateCallStatus();
}
@@ -1720,14 +1669,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (MeetingInfo == null)
{
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
UpdateCallStatus();
break;
}
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
UpdateCallStatus();
@@ -1737,12 +1686,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (MeetingInfo == null)
{
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
break;
}
MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password,
GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
break;
}
@@ -1832,7 +1781,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (result.Success)
{
MeetingInfo = new MeetingInfo("", "", "", "", GetSharingStatus(), true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord);
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
break;
}
@@ -1966,7 +1915,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
private void SetDefaultLayout()
private void SetLayout()
{
if (!_props.AutoDefaultLayouts) return;
@@ -1979,13 +1928,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
else
{
if (_props.DefaultCallLayout == (_props.DefaultCallLayout & AvailableLayouts))
{
SendText(String.Format("zconfiguration call layout style: {0}",
_props.DefaultCallLayout));
}
else
Debug.Console(0, this, "Unable to set default Layout. {0} not currently an available layout based on meeting state", _props.DefaultCallLayout);
SendText(String.Format("zconfiguration call layout style: {0}",
_props.DefaultCallLayout));
}
}
@@ -2018,8 +1962,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// </summary>
private void GetBookings()
{
if (_meetingPasswordRequired || _waitingForUserToAcceptOrRejectIncomingCall) return;
SendText("zCommand Bookings List");
}
@@ -2185,12 +2127,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
!String.Equals(Status.Call.Info.meeting_type,"NORMAL"),
false,
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue, Status.Call.CallRecordInfo.AllowRecord
MeetingIsRecordingFeedback.BoolValue
);
SetDefaultLayout();
}
// TODO [ ] Issue #868
else if (item.Status == eCodecCallStatus.Disconnected)
{
MeetingInfo = new MeetingInfo(
@@ -2203,15 +2143,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
false,
false,
false,
false, Status.Call.CallRecordInfo.AllowRecord
false
);
}
_meetingPasswordRequired = false;
base.OnCallStatusChange(item);
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
Status.Call != null ? Status.Call.Status.ToString() : "no call");
if (_props.AutoDefaultLayouts)
{
SetLayout();
}
}
private string GetSharingStatus()
@@ -2279,9 +2223,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
}
/// <summary>
/// Starts sharing HDMI source
/// </summary>
public override void StartSharing()
{
SendText("zCommand Call Sharing HDMI Start");
@@ -2427,20 +2368,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// <param name="joinMap"></param>
public void LinkZoomRoomToApi(BasicTriList trilist, ZoomRoomJoinMap joinMap)
{
var meetingInfoCodec = this as IHasMeetingInfo;
if (meetingInfoCodec != null)
{
if (meetingInfoCodec.MeetingInfo != null)
{
trilist.SetBool(joinMap.MeetingCanRecord.JoinNumber, meetingInfoCodec.MeetingInfo.CanRecord);
}
meetingInfoCodec.MeetingInfoChanged += (o, a) =>
{
trilist.SetBool(joinMap.MeetingCanRecord.JoinNumber, a.Info.CanRecord);
};
}
var recordingCodec = this as IHasMeetingRecordingWithPrompt;
if (recordingCodec != null)
{
@@ -2555,34 +2482,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
//trilist.SetString(joinMap.CurrentSource.JoinNumber, args.Info.ShareStatus);
};
trilist.SetSigFalseAction(joinMap.StartMeetingNow.JoinNumber, () => StartMeeting(0));
trilist.SetSigFalseAction(joinMap.ShareOnlyMeeting.JoinNumber, StartSharingOnlyMeeting);
trilist.SetSigFalseAction(joinMap.StartNormalMeetingFromSharingOnlyMeeting.JoinNumber, StartNormalMeetingFromSharingOnlyMeeting);
trilist.SetSigTrueAction(joinMap.StartMeetingNow.JoinNumber, () => StartMeeting(0));
trilist.SetSigTrueAction(joinMap.ShareOnlyMeeting.JoinNumber, StartSharingOnlyMeeting);
trilist.SetSigTrueAction(joinMap.StartNormalMeetingFromSharingOnlyMeeting.JoinNumber, StartNormalMeetingFromSharingOnlyMeeting);
// not sure if this would be needed here, should be handled by VideoCodecBase.cs LinkToApi methods
//DirectoryResultReturned += (device, args) =>
//{
// // add logic here if necessary when event fires
//};
trilist.SetStringSigAction(joinMap.SubmitPassword.JoinNumber, SubmitPassword);
// Subscribe to call status to clear ShowPasswordPrompt when in meeting
this.CallStatusChange += (o, a) =>
{
if (a.CallItem.Status == eCodecCallStatus.Connected || a.CallItem.Status == eCodecCallStatus.Disconnected)
{
trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false);
}
};
trilist.SetSigFalseAction(joinMap.CancelJoinAttempt.JoinNumber, () => {
trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false);
EndAllCalls();
});
PasswordRequired += (devices, args) =>
{
Debug.Console(2, this, "***********************************PaswordRequired. Message: {0} Cancelled: {1} Last Incorrect: {2} Failed: {3}", args.Message, args.LoginAttemptCancelled, args.LastAttemptWasIncorrect, args.LoginAttemptFailed);
if (args.LoginAttemptCancelled)
{
trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, false);
trilist.SetBool(joinMap.ShowPasswordPrompt.JoinNumber, false);
return;
}
@@ -2598,7 +2515,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
trilist.SetBool(joinMap.PasswordIncorrect.JoinNumber, args.LastAttemptWasIncorrect);
trilist.SetBool(joinMap.MeetingPasswordRequired.JoinNumber, true);
trilist.SetBool(joinMap.ShowPasswordPrompt.JoinNumber, true);
};
trilist.OnlineStatusChange += (device, args) =>
@@ -2614,34 +2531,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
pinCodec.NumberOfScreensFeedback.FireUpdate();
layoutSizeCodec.SelfviewPipSizeFeedback.FireUpdate();
};
var wirelessInfoCodec = this as IZoomWirelessShareInstructions;
if (wirelessInfoCodec != null)
{
if (Status != null && Status.Sharing != null)
{
SetSharingStateJoins(Status.Sharing, trilist, joinMap);
}
wirelessInfoCodec.ShareInfoChanged += (o, a) =>
{
SetSharingStateJoins(a.SharingStatus, trilist, joinMap);
};
}
}
void SetSharingStateJoins(zStatus.Sharing state, BasicTriList trilist, ZoomRoomJoinMap joinMap)
{
trilist.SetBool(joinMap.IsSharingAirplay.JoinNumber, state.isAirHostClientConnected);
trilist.SetBool(joinMap.IsSharingHdmi.JoinNumber, state.isBlackMagicConnected || state.isDirectPresentationConnected);
trilist.SetString(joinMap.DisplayState.JoinNumber, state.dispState.ToString());
trilist.SetString(joinMap.AirplayShareCode.JoinNumber, state.password);
trilist.SetString(joinMap.LaptopShareKey.JoinNumber, state.directPresentationSharingKey);
trilist.SetString(joinMap.WifiName.JoinNumber, state.wifiName);
trilist.SetString(joinMap.ServerName.JoinNumber, state.serverName);
}
public override void ExecuteSwitch(object selector)
{
var action = selector as Action;
@@ -2655,8 +2546,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void AcceptCall()
{
_waitingForUserToAcceptOrRejectIncomingCall = false;
var incomingCall =
ActiveCalls.FirstOrDefault(
c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming));
@@ -2666,8 +2555,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public override void AcceptCall(CodecActiveCallItem call)
{
_waitingForUserToAcceptOrRejectIncomingCall = false;
SendText(string.Format("zCommand Call Accept callerJID: {0}", call.Id));
call.Status = eCodecCallStatus.Connected;
@@ -2679,8 +2566,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void RejectCall()
{
_waitingForUserToAcceptOrRejectIncomingCall = false;
var incomingCall =
ActiveCalls.FirstOrDefault(
c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming));
@@ -2690,8 +2575,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public override void RejectCall(CodecActiveCallItem call)
{
_waitingForUserToAcceptOrRejectIncomingCall = false;
SendText(string.Format("zCommand Call Reject callerJID: {0}", call.Id));
call.Status = eCodecCallStatus.Disconnected;
@@ -2818,25 +2701,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void LeaveMeeting()
{
_meetingPasswordRequired = false;
_waitingForUserToAcceptOrRejectIncomingCall = false;
SendText("zCommand Call Leave");
SendText("zCommand Call Leave");
}
public override void EndCall(CodecActiveCallItem call)
{
_meetingPasswordRequired = false;
_waitingForUserToAcceptOrRejectIncomingCall = false;
SendText("zCommand Call Disconnect");
}
public override void EndAllCalls()
{
_meetingPasswordRequired = false;
_waitingForUserToAcceptOrRejectIncomingCall = false;
SendText("zCommand Call Disconnect");
}
@@ -3335,7 +3209,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
// There is no property that directly reports if strip mode is valid, but API stipulates
// that strip mode is available if the number of screens is 1
if (Status.NumberOfScreens.NumOfScreens == 1 || Status.Layout.can_Switch_Strip_View || Status.Layout.video_type.ToLower() == "strip")
if (Status.NumberOfScreens.NumOfScreens == 1)
{
availableLayouts |= zConfiguration.eLayoutStyle.Strip;
}
@@ -3350,15 +3224,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
var handler = LayoutInfoChanged;
if (handler != null)
{
var currentLayout = zConfiguration.eLayoutStyle.None;
currentLayout = (zConfiguration.eLayoutStyle)Enum.Parse(typeof(zConfiguration.eLayoutStyle), string.IsNullOrEmpty(LocalLayoutFeedback.StringValue) ? "None" : LocalLayoutFeedback.StringValue, true);
handler(this, new LayoutInfoChangedEventArgs()
{
AvailableLayouts = AvailableLayouts,
CurrentSelectedLayout = currentLayout,
CurrentSelectedLayout = (zConfiguration.eLayoutStyle)Enum.Parse(typeof(zConfiguration.eLayoutStyle),string.IsNullOrEmpty(LocalLayoutFeedback.StringValue) ? "None" : LocalLayoutFeedback.StringValue , true),
LayoutViewIsOnFirstPage = LayoutViewIsOnFirstPageFeedback.BoolValue,
LayoutViewIsOnLastPage = LayoutViewIsOnLastPageFeedback.BoolValue,
CanSwapContentWithThumbnail = CanSwapContentWithThumbnailFeedback.BoolValue,
@@ -3486,21 +3355,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void SubmitPassword(string password)
{
_meetingPasswordRequired = false;
Debug.Console(2, this, "Password Submitted: {0}", password);
Dial(_lastDialedMeetingNumber, password);
}
void OnPasswordRequired(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message)
{
_meetingPasswordRequired = !loginFailed || !loginCancelled;
var handler = PasswordRequired;
if (handler != null)
{
Debug.Console(2, this, "Meeting Password Required: {0}", _meetingPasswordRequired);
handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message));
{
handler(this, new PasswordPromptEventArgs(lastAttemptIncorrect, loginFailed, loginCancelled, message));
}
}
@@ -3539,19 +3403,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
StartSharingOnlyMeeting(eSharingMeetingMode.None, 30, String.Empty);
}
public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode)
public void StartSharingOnlyMeeting(eSharingMeetingMode mode)
{
StartSharingOnlyMeeting(displayMode, DefaultMeetingDurationMin, String.Empty);
StartSharingOnlyMeeting(mode, 30, String.Empty);
}
public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration)
public void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration)
{
StartSharingOnlyMeeting(displayMode, duration, String.Empty);
StartSharingOnlyMeeting(mode, duration, String.Empty);
}
public void StartSharingOnlyMeeting(eSharingMeetingMode displayMode, uint duration, string password)
public void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration, string password)
{
SendText(String.Format("zCommand Dial Sharing Duration: {0} DisplayState: {1} Password: {2}", duration, displayMode, password));
SendText(String.Format("zCommand Dial Sharing Duration: {0} DisplayState: {1} Password: {2}", duration, mode, password));
}
public void StartNormalMeetingFromSharingOnlyMeeting()
@@ -3628,41 +3492,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
#endregion
#region IZoomWirelessShareInstructions Members
public event EventHandler<ShareInfoEventArgs> ShareInfoChanged;
public zStatus.Sharing SharingState
{
get
{
return Status.Sharing;
}
}
void OnShareInfoChanged(zStatus.Sharing status)
{
Debug.Console(2, this,
@"ShareInfoChanged:
isSharingHDMI: {0}
isSharingAirplay: {1}
AirplayPassword: {2}
OSD Display State: {3}
",
status.isSharingBlackMagic,
status.isAirHostClientConnected,
status.password,
status.dispState);
var handler = ShareInfoChanged;
if (handler != null)
{
handler(this, new ShareInfoEventArgs(status));
}
}
#endregion
}
/// <summary>

View File

@@ -8,22 +8,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
#region Digital
[JoinName("CancelJoinAttempt")]
public JoinDataComplete CancelJoinAttempt = new JoinDataComplete(
new JoinData
{
JoinNumber = 5,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to hide the password prompt",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("MeetingPasswordRequired")]
public JoinDataComplete MeetingPasswordRequired = new JoinDataComplete(
// TODO [ ] Issue #868
[JoinName("ShowPasswordPrompt")]
public JoinDataComplete ShowPasswordPrompt = new JoinDataComplete(
new JoinData
{
JoinNumber = 6,
@@ -36,6 +23,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("PasswordIncorrect")]
public JoinDataComplete PasswordIncorrect = new JoinDataComplete(
new JoinData
@@ -50,7 +38,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.Digital
});
[JoinName("PasswordLoginFailed")]
// TODO [ ] Issue #868
[JoinName("PassowrdLoginFailed")]
public JoinDataComplete PasswordLoginFailed = new JoinDataComplete(
new JoinData
{
@@ -64,6 +53,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("WaitingForHost")]
public JoinDataComplete WaitingForHost = new JoinDataComplete(
new JoinData
@@ -78,6 +68,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("IsHost")]
public JoinDataComplete IsHost = new JoinDataComplete(
new JoinData
@@ -92,6 +83,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("StartMeetingNow")]
public JoinDataComplete StartMeetingNow = new JoinDataComplete(
new JoinData
@@ -101,11 +93,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
},
new JoinMetadata
{
Description = "Pulse to start an ad-hoc meeting with the default duration",
Description = "FB Indicates the password prompt is active",
JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("ShareOnlyMeeting")]
public JoinDataComplete ShareOnlyMeeting = new JoinDataComplete(
new JoinData
@@ -120,6 +113,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.Digital
});
// TODO [ ] Issue #868
[JoinName("StartNormalMeetingFromSharingOnlyMeeting")]
public JoinDataComplete StartNormalMeetingFromSharingOnlyMeeting = new JoinDataComplete(
new JoinData
@@ -373,54 +367,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.Digital
});
[JoinName("MeetingCanRecord")]
public JoinDataComplete MeetingCanRecord = new JoinDataComplete(
new JoinData
{
JoinNumber = 246,
JoinSpan = 1
},
new JoinMetadata
{
Description = "When high, indicated that the current meeting can be recorded",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
#region Sharing Status
[JoinName("IsSharingAirplay")]
public JoinDataComplete IsSharingAirplay = new JoinDataComplete(
new JoinData
{
JoinNumber = 250,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Indicates an Airplay source is sharing",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("IsSharingHdmi")]
public JoinDataComplete IsSharingHdmi = new JoinDataComplete(
new JoinData
{
JoinNumber = 251,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Indicates an HDMI source is sharing",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
#endregion
//[JoinName("ParticipantAudioMuteToggleStart")]
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
// new JoinData
@@ -605,92 +551,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
JoinType = eJoinType.DigitalSerial
});
[JoinName("DisplayState")]
public JoinDataComplete DisplayState = new JoinDataComplete(
new JoinData
{
JoinNumber = 250,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the instructions the ZoomRoom is displaying on the monitor. <None | Laptop | IOS>",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("AirplayShareCode")]
public JoinDataComplete AirplayShareCode = new JoinDataComplete(
new JoinData
{
JoinNumber = 251,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the current code for Airplay Sharing.",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("LaptopShareKey")]
public JoinDataComplete LaptopShareKey = new JoinDataComplete(
new JoinData
{
JoinNumber = 252,
JoinSpan = 1
},
new JoinMetadata
{
Description = "The alpha-only sharing key that users type into a laptop client to share with the Zoom Room.",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("LaptopSharePairingCode")]
public JoinDataComplete LaptopSharePairingCode = new JoinDataComplete(
new JoinData
{
JoinNumber = 253,
JoinSpan = 1
},
new JoinMetadata
{
Description = "This is the paring code that is broadcast via an ultrasonic signal from the ZRC. It is different than the user-supplied paring code. The ZRC uses a Zoom-proprietary method of advertizing the ultrasonic pairing code, so it\'s not possible to advertize it using commonly available libraries.",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("WifiName")]
public JoinDataComplete WifiName = new JoinDataComplete(
new JoinData
{
JoinNumber = 254,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the Wifi SSID used by the ZoomRoom.",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
[JoinName("ServerName")]
public JoinDataComplete ServerName = new JoinDataComplete(
new JoinData
{
JoinNumber = 255,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Reports the namne of the the ZoomRoom.",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
#endregion
public ZoomRoomJoinMap(uint joinStart)

View File

@@ -4,7 +4,6 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Core;
using PepperDash.Essentials.Core;
@@ -30,13 +29,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/* This layout will be selected when Sharing starts (either from Far end or locally)*/
[JsonProperty("defaultSharingLayout")]
[JsonConverter(typeof(StringEnumConverter))]
public zConfiguration.eLayoutStyle DefaultSharingLayout { get; set; }
public string DefaultSharingLayout { get; set; }
//This layout will be selected when a call is connected and no content is being shared
[JsonProperty("defaultCallLayout")]
[JsonConverter(typeof(StringEnumConverter))]
public zConfiguration.eLayoutStyle DefaultCallLayout { get; set; }
public string DefaultCallLayout { get; set; }
[JsonProperty("minutesBeforeMeetingStart")]
public int MinutesBeforeMeetingStart { get; set; }

View File

@@ -1,3 +1,3 @@
<packages>
<package id="PepperDashCore" version="1.1.3" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
<package id="PepperDashCore" version="1.1.1" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
</packages>