Compare commits

..

1 Commits

Author SHA1 Message Date
jdevito
0834f08189 Merge c7cc98bff7 into a91af6bd75 2021-05-21 00:33:42 +00:00
15 changed files with 86 additions and 381 deletions

View File

@@ -7,9 +7,6 @@ assignees: ''
--- ---
**Was this bug identified in a specific build version?**
Please note the build version where this bug was identified
**Describe the bug** **Describe the bug**
A clear and concise description of what the bug is. A clear and concise description of what the bug is.

View File

@@ -90,6 +90,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload the build package to the release # Upload the build package to the release
- name: Upload Release Package - name: Upload Release Package
if: contains(env.VERSION,'-rc-') || contains(env.VERSION,'-hotfix-')
id: upload_release id: upload_release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
with: with:

View File

@@ -107,18 +107,14 @@ namespace PepperDash.Essentials
private void TunerPresetsOnPresetRecalled(ISetTopBoxNumericKeypad device, string channel) private void TunerPresetsOnPresetRecalled(ISetTopBoxNumericKeypad device, string channel)
{ {
//Debug.Console(2, this, "TunerPresetsOnPresetRecalled");
if (!_currentPresets.ContainsKey(device.Key)) if (!_currentPresets.ContainsKey(device.Key))
{ {
return; return;
} }
//Debug.Console(2, this, "Tuner Key: {0} Channel: {1}", device.Key, channel);
_currentPresets[device.Key] = channel; _currentPresets[device.Key] = channel;
if (CurrentPresetsFeedbacks.ContainsKey(device.Key)) if (!CurrentPresetsFeedbacks.ContainsKey(device.Key))
{ {
CurrentPresetsFeedbacks[device.Key].FireUpdate(); CurrentPresetsFeedbacks[device.Key].FireUpdate();
} }

View File

@@ -79,16 +79,6 @@ namespace PepperDash.Essentials
Panel = new Tsw1052(id, Global.ControlSystem); Panel = new Tsw1052(id, Global.ControlSystem);
else if (type == "tsw1060") else if (type == "tsw1060")
Panel = new Tsw1060(id, Global.ControlSystem); Panel = new Tsw1060(id, Global.ControlSystem);
else if (type == "tsw570")
Panel = new Tsw570(id, Global.ControlSystem);
else if (type == "tsw770")
Panel = new Tsw770(id, Global.ControlSystem);
else if (type == "ts770")
Panel = new Ts770(id, Global.ControlSystem);
else if (type == "tsw1070")
Panel = new Tsw1070(id, Global.ControlSystem);
else if (type == "ts1070")
Panel = new Ts1070(id, Global.ControlSystem);
else else
{ {
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type); Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type);
@@ -213,7 +203,7 @@ namespace PepperDash.Essentials
{ {
public EssentialsTouchpanelControllerFactory() public EssentialsTouchpanelControllerFactory()
{ {
TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" }; TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "xpanel" };
} }
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)

View File

@@ -385,7 +385,7 @@ namespace PepperDash.Essentials.Core.Bridges
{ {
public EiscApiAdvancedFactory() public EiscApiAdvancedFactory()
{ {
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" }; TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "vceiscapiadv", "vceiscapiadvanced" };
} }
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)
@@ -403,16 +403,6 @@ namespace PepperDash.Essentials.Core.Bridges
controlProperties.TcpSshProperties.Address, Global.ControlSystem); controlProperties.TcpSshProperties.Address, Global.ControlSystem);
return new EiscApiAdvanced(dc, eisc); return new EiscApiAdvanced(dc, eisc);
} }
case "eiscapiadvancedserver":
{
var eisc = new EISCServer(controlProperties.IpIdInt, Global.ControlSystem);
return new EiscApiAdvanced(dc, eisc);
}
case "eiscapiadvancedclient":
{
var eisc = new EISCClient(controlProperties.IpIdInt, controlProperties.TcpSshProperties.Address, Global.ControlSystem);
return new EiscApiAdvanced(dc, eisc);
}
case "vceiscapiadv": case "vceiscapiadv":
case "vceiscapiadvanced": case "vceiscapiadvanced":
{ {

View File

@@ -20,23 +20,8 @@ namespace PepperDash.Essentials.Core
/// <param name="json"></param> /// <param name="json"></param>
public static void DoDeviceActionWithJson(string json) public static void DoDeviceActionWithJson(string json)
{ {
if (String.IsNullOrEmpty(json)) var action = JsonConvert.DeserializeObject<DeviceActionWrapper>(json);
{ DoDeviceAction(action);
CrestronConsole.ConsoleCommandResponse(
"Please provide a JSON object matching the format {\"deviceKey\":\"myDevice\", \"methodName\":\"someMethod\", \"params\": [\"param1\", true]}.\r\nIf the method has no parameters, the \"params\" object may be omitted.");
return;
}
try
{
var action = JsonConvert.DeserializeObject<DeviceActionWrapper>(json);
DoDeviceAction(action);
}
catch (Exception ex)
{
CrestronConsole.ConsoleCommandResponse("Incorrect format for JSON. Please check that the format matches {\"deviceKey\":\"myDevice\", \"methodName\":\"someMethod\", \"params\": [\"param1\", true]}");
}
} }
@@ -48,47 +33,29 @@ namespace PepperDash.Essentials.Core
{ {
var key = action.DeviceKey; var key = action.DeviceKey;
var obj = FindObjectOnPath(key); var obj = FindObjectOnPath(key);
if (obj == null) if (obj == null)
{ return;
CrestronConsole.ConsoleCommandResponse("Unable to find object at path {0}", key);
return;
}
if (action.Params == null) CType t = obj.GetType();
{ var method = t.GetMethod(action.MethodName);
//no params, so setting action.Params to empty array if (method == null)
action.Params = new object[0]; {
} Debug.Console(0, "Method '{0}' not found", action.MethodName);
return;
CType t = obj.GetType(); }
try var mParams = method.GetParameters();
{ // Add empty params if not provided
var methods = t.GetMethods().Where(m => m.Name == action.MethodName).ToList(); if (action.Params == null) action.Params = new object[0];
if (mParams.Length > action.Params.Length)
var method = methods.Count == 1 ? methods[0] : methods.FirstOrDefault(m => m.GetParameters().Length == action.Params.Length); {
Debug.Console(0, "Method '{0}' requires {1} params", action.MethodName, mParams.Length);
if (method == null) return;
{ }
CrestronConsole.ConsoleCommandResponse( object[] convertedParams = mParams
"Unable to find method with name {0} and that matches parameters {1}", action.MethodName, .Select((p, i) => Convert.ChangeType(action.Params[i], p.ParameterType,
action.Params); System.Globalization.CultureInfo.InvariantCulture))
return; .ToArray();
} object ret = method.Invoke(obj, convertedParams);
var mParams = method.GetParameters();
var convertedParams = mParams
.Select((p, i) => Convert.ChangeType(action.Params[i], p.ParameterType,
System.Globalization.CultureInfo.InvariantCulture))
.ToArray();
var ret = method.Invoke(obj, convertedParams);
CrestronConsole.ConsoleCommandResponse("Method {0} successfully called on device {1}", method.Name,
action.DeviceKey);
}
catch (Exception ex)
{
CrestronConsole.ConsoleCommandResponse("Unable to call method with name {0}. {1}", action.MethodName,
ex.Message);}
} }
/// <summary> /// <summary>

View File

@@ -375,7 +375,7 @@ namespace PepperDash.Essentials
{ {
try try
{ {
if (typeof (IPluginDeviceFactory).IsAssignableFrom(type) && !type.IsAbstract) if (typeof (IPluginDeviceFactory).IsAssignableFrom(type))
{ {
var plugin = var plugin =
(IPluginDeviceFactory) Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); (IPluginDeviceFactory) Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);

View File

@@ -122,7 +122,6 @@
<Compile Include="Display\PanasonicThDisplay.cs" /> <Compile Include="Display\PanasonicThDisplay.cs" />
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" /> <Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" /> <Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" /> <Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
<Compile Include="Codec\iHasCallFavorites.cs" /> <Compile Include="Codec\iHasCallFavorites.cs" />
<Compile Include="Codec\iHasCallHistory.cs" /> <Compile Include="Codec\iHasCallHistory.cs" />

View File

@@ -90,11 +90,5 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
public bool HandIsRaisedFb { get; set; } public bool HandIsRaisedFb { get; set; }
public bool IsPinnedFb { get; set; } public bool IsPinnedFb { get; set; }
public int ScreenIndexIsPinnedToFb { get; set; } public int ScreenIndexIsPinnedToFb { get; set; }
public Participant()
{
// Initialize to -1 (no screen)
ScreenIndexIsPinnedToFb = -1;
}
} }
} }

View File

@@ -1,13 +0,0 @@
using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco;
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{
public interface IHasSelfviewSize
{
StringFeedback SelfviewPipSizeFeedback { get; }
void SelfviewPipSizeSet(CodecCommandWithLabel size);
void SelfviewPipSizeToggle();
}
}

View File

@@ -530,43 +530,28 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
{ {
// make sure to update the values when the EISC comes online
trilist.OnlineStatusChange += (sender, args) =>
{
if (sender.IsOnline)
{
UpdateParticipantsXSig(codec, trilist, joinMap);
}
};
// set actions and update the values when the list changes
codec.Participants.ParticipantsListHasChanged += (sender, args) => codec.Participants.ParticipantsListHasChanged += (sender, args) =>
{ {
string participantsXSig;
if (codec.Participants.CurrentParticipants.Count == 0)
{
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
return;
}
SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants); SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants);
UpdateParticipantsXSig(codec, trilist, joinMap); participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
}; };
} }
private void UpdateParticipantsXSig(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
{
string participantsXSig;
if (codec.Participants.CurrentParticipants.Count == 0)
{
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
return;
}
participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
}
/// <summary> /// <summary>
/// Sets the actions for each participant in the list /// Sets the actions for each participant in the list
/// </summary> /// </summary>
@@ -628,39 +613,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
{ {
if (meetingIndex >= maxParticipants * offset) break; if (meetingIndex >= maxParticipants * offset) break;
Debug.Console(2, this,
@"Updating Participant on xsig:
Name: {0} (s{9})
AudioMute: {1} (d{10})
VideoMute: {2} (d{11})
CanMuteVideo: {3} (d{12})
CanUMuteVideo: {4} (d{13})
IsHost: {5} (d{14})
HandIsRaised: {6} (d{15})
IsPinned: {7} (d{16})
ScreenIndexIsPinnedTo: {8} (a{17})
",
participant.Name,
participant.AudioMuteFb,
participant.VideoMuteFb,
participant.CanMuteVideo,
participant.CanUnmuteVideo,
participant.IsHost,
participant.HandIsRaisedFb,
participant.IsPinnedFb,
participant.ScreenIndexIsPinnedToFb,
stringIndex + 1,
digitalIndex + 1,
digitalIndex + 2,
digitalIndex + 3,
digitalIndex + 4,
digitalIndex + 5,
digitalIndex + 6,
digitalIndex + 7,
analogIndex + 1
);
//digitals //digitals
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb); tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb);
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, participant.VideoMuteFb); tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, participant.VideoMuteFb);
@@ -670,8 +622,6 @@ ScreenIndexIsPinnedTo: {8} (a{17})
tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb); tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb);
tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb); tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb);
Debug.Console(2, this, "Index: {0} byte value: {1}", digitalIndex + 7, ComTextHelper.GetEscapedText(tokenArray[digitalIndex + 6].GetBytes()));
//serials //serials
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name); tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name);
@@ -707,12 +657,7 @@ ScreenIndexIsPinnedTo: {8} (a{17})
analogIndex += maxAnalogs; analogIndex += maxAnalogs;
} }
var returnString = GetXSigString(tokenArray); return GetXSigString(tokenArray);
//Debug.Console(2, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString)));
return returnString;
} }
private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap)

View File

@@ -1440,7 +1440,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
CanMuteVideo = p.IsVideoCanMuteByHost, CanMuteVideo = p.IsVideoCanMuteByHost,
CanUnmuteVideo = p.IsVideoCanUnmuteByHost, CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED", AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
VideoMuteFb = !p.VideoStatusIsSending, VideoMuteFb = p.VideoStatusIsSending,
HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid, HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid,
}).ToList(); }).ToList();
} }
@@ -1454,16 +1454,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
if (participants == null) if (participants == null)
{ {
//Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)"); Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)");
return null; return null;
} }
// debug testing // debug testing
//foreach (ListParticipant participant in participants) foreach (ListParticipant participant in participants)
//{ {
// Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}", Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}",
// participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString()); participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString());
//} }
List<ListParticipant> handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList(); List<ListParticipant> handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList();
@@ -1471,8 +1471,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
IOrderedEnumerable<ListParticipant> orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp); IOrderedEnumerable<ListParticipant> orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp);
//foreach (var participant in handRaisedParticipantsList) foreach (var participant in handRaisedParticipantsList)
// Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId); Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId);
} }
List<ListParticipant> allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList(); List<ListParticipant> allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList();
@@ -1481,8 +1481,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
allOtherParticipantsList.OrderBy(p => p.UserName); allOtherParticipantsList.OrderBy(p => p.UserName);
//foreach (var participant in allOtherParticipantsList) foreach (var participant in allOtherParticipantsList)
// Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId); Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId);
} }
// merge the lists // merge the lists

View File

@@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor, public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor,
IRouting, IRouting,
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode, IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasParticipantAudioMute, IHasSelfviewSize IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasParticipantAudioMute
{ {
private const long MeetingRefreshTimer = 60000; private const long MeetingRefreshTimer = 60000;
private const uint DefaultMeetingDurationMin = 30; private const uint DefaultMeetingDurationMin = 30;
@@ -109,9 +109,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
// TODO: #714 [ ] SelfviewPipSizeFeedback
SelfviewPipSizeFeedback = new StringFeedback(SelfviewPipSizeFeedbackFunc);
SetUpFeedbackActions(); SetUpFeedbackActions();
Cameras = new List<CameraBase>(); Cameras = new List<CameraBase>();
@@ -231,19 +228,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
} }
// TODO: #714 [ ] SelfviewPipSizeFeedbackFunc
protected Func<string> SelfviewPipSizeFeedbackFunc
{
get
{
return
() =>
_currentSelfviewPipSize != null
? _currentSelfviewPipSize.Command ?? "Unknown"
: "Unknown";
}
}
protected Func<bool> LocalLayoutIsProminentFeedbackFunc protected Func<bool> LocalLayoutIsProminentFeedbackFunc
{ {
get { return () => false; } get { return () => false; }
@@ -511,7 +495,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
case "Position": case "Position":
{ {
ComputeSelfviewPipPositionStatus(); ComputeSelfviewPipStatus();
SelfviewPipPositionFeedback.FireUpdate(); SelfviewPipPositionFeedback.FireUpdate();
@@ -527,15 +511,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
LocalLayoutFeedback.FireUpdate(); LocalLayoutFeedback.FireUpdate();
break; break;
} }
case "Size":
{
// TODO: #714 [ ] SetupFeedbackActions >> Size
ComputeSelfviewPipSizeStatus();
SelfviewPipSizeFeedback.FireUpdate();
break;
}
} }
}; };
@@ -547,7 +522,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
case "Position": case "Position":
{ {
ComputeSelfviewPipPositionStatus(); ComputeSelfviewPipStatus();
SelfviewPipPositionFeedback.FireUpdate(); SelfviewPipPositionFeedback.FireUpdate();
@@ -621,22 +596,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Status.Layout.PropertyChanged += (o, a) => Status.Layout.PropertyChanged += (o, a) =>
{ {
Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName); switch (a.PropertyName)
switch (a.PropertyName.ToLower())
{ {
case "can_switch_speaker_view": case "can_Switch_Speaker_View":
case "can_switch_wall_view": case "can_Switch_Wall_View":
case "can_switch_share_on_all_screens": case "can_Switch_Share_On_All_Screens":
{ {
ComputeAvailableLayouts(); ComputeAvailableLayouts();
break; break;
} }
case "is_in_first_page": case "is_In_First_Page":
{ {
LayoutViewIsOnFirstPageFeedback.FireUpdate(); LayoutViewIsOnFirstPageFeedback.FireUpdate();
break; break;
} }
case "is_in_last_page": case "is_In_Last_Page":
{ {
LayoutViewIsOnLastPageFeedback.FireUpdate(); LayoutViewIsOnLastPageFeedback.FireUpdate();
break; break;
@@ -667,8 +641,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
DirectoryRoot = new CodecDirectory(); DirectoryRoot = new CodecDirectory();
_currentDirectoryResult = DirectoryRoot;
DirectoryBrowseHistory = new List<CodecDirectory>(); DirectoryBrowseHistory = new List<CodecDirectory>();
DirectoryBrowseHistoryStack = new Stack<CodecDirectory>(); DirectoryBrowseHistoryStack = new Stack<CodecDirectory>();
@@ -972,12 +944,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
SendText("echo off"); SendText("echo off");
Thread.Sleep(100); Thread.Sleep(100);
// set feedback exclusions // set feedback exclusions
SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list"); SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callin_country_list");
Thread.Sleep(100); Thread.Sleep(100);
SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list"); SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callout_country_list");
Thread.Sleep(100); Thread.Sleep(100);
SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist");
Thread.Sleep(100);
if (!_props.DisablePhonebookAutoDownload) if (!_props.DisablePhonebookAutoDownload)
{ {
@@ -1349,25 +1319,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
var status = responseObj.ToObject<zEvent.PinStatusOfScreenNotification>(); var status = responseObj.ToObject<zEvent.PinStatusOfScreenNotification>();
Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex);
Participant alreadyPinnedParticipant = null;
// Check for a participant already pinned to the same screen index.
if (status.PinnedUserId > 0)
{
alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
// Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb.
if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId)
{
Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.",
alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, alreadyPinnedParticipant.ScreenIndexIsPinnedToFb);
alreadyPinnedParticipant.IsPinnedFb = false;
alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1;
}
}
var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId)); var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId));
if (participant != null) if (participant != null)
@@ -1379,14 +1330,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
participant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); participant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
if (participant == null && alreadyPinnedParticipant == null) if (participant == null)
{ {
Debug.Console(1, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex); Debug.Console(2, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex);
return; return;
} }
else if (participant != null) else
{ {
Debug.Console(2, this, "Unpinning {0} with id: {1} from screen index: {2}", participant.Name, participant.UserId, status.ScreenIndex);
participant.IsPinnedFb = false; participant.IsPinnedFb = false;
participant.ScreenIndexIsPinnedToFb = -1; participant.ScreenIndexIsPinnedToFb = -1;
} }
@@ -1533,7 +1483,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
return; return;
} }
Debug.Console(1, this, "*************************** Call Participants **************************"); Debug.Console(1, this, "****************************Call Participants***************************");
foreach (var participant in Participants.CurrentParticipants) foreach (var participant in Participants.CurrentParticipants)
{ {
Debug.Console(1, this, "Name: {0} Audio: {1} IsHost: {2}", participant.Name, Debug.Console(1, this, "Name: {0} Audio: {1} IsHost: {2}", participant.Name,
@@ -1620,7 +1570,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
} }
Debug.Console(1, this, "*************************** Active Calls ********************************"); Debug.Console(1, this, "****************************Active Calls*********************************");
// Clean up any disconnected calls left in the list // Clean up any disconnected calls left in the list
for (int i = 0; i < ActiveCalls.Count; i++) for (int i = 0; i < ActiveCalls.Count; i++)
@@ -1636,7 +1586,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (!call.IsActiveCall) if (!call.IsActiveCall)
{ {
Debug.Console(1, this, "***** Removing Inactive Call: {0} *****", call.Name); Debug.Console(1, this, "******Removing Inactive Call: {0}******", call.Name);
ActiveCalls.Remove(call); ActiveCalls.Remove(call);
} }
} }
@@ -1791,7 +1741,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
LinkVideoCodecToApi(this, trilist, joinMap); LinkVideoCodecToApi(this, trilist, joinMap);
LinkZoomRoomToApi(trilist, joinMap); LinkZoomRoomToApi(trilist, joinMap);
} }
/// <summary> /// <summary>
@@ -1821,10 +1771,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
trilist.SetString(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip.ToString()); trilist.SetString(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip.ToString());
trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString()); trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString());
}; };
trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail());
layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]); layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]);
trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail());
layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]); layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]);
layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]); layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]);
@@ -1846,7 +1795,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
}); });
layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]);
} }
var pinCodec = this as IHasParticipantPinUnpin; var pinCodec = this as IHasParticipantPinUnpin;
@@ -1857,43 +1806,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
// Set the value of the local property to be used when pinning a participant // Set the value of the local property to be used when pinning a participant
trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u); trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u);
} }
}
// TODO: #714 [ ] LinkZoomRoomToApi >> layoutSizeCoodec
var layoutSizeCodec = this as IHasSelfviewSize;
if (layoutSizeCodec != null)
{
trilist.SetSigFalseAction(joinMap.GetSetSelfviewPipSize.JoinNumber, layoutSizeCodec.SelfviewPipSizeToggle);
trilist.SetStringSigAction(joinMap.GetSetSelfviewPipSize.JoinNumber, (s) =>
{
try
{
var size = (zConfiguration.eLayoutSize)Enum.Parse(typeof(zConfiguration.eLayoutSize), s, true);
var cmd = SelfviewPipSizes.FirstOrDefault(c => c.Command.Equals(size.ToString()));
SelfviewPipSizeSet(cmd);
}
catch (Exception e)
{
Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e);
}
});
layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]);
}
trilist.OnlineStatusChange += (device, args) =>
{
if (!args.DeviceOnLine) return;
ComputeAvailableLayouts();
layoutsCodec.LocalLayoutFeedback.FireUpdate();
layoutsCodec.CanSwapContentWithThumbnailFeedback.FireUpdate();
layoutsCodec.ContentSwappedWithThumbnailFeedback.FireUpdate();
layoutsCodec.LayoutViewIsOnFirstPageFeedback.FireUpdate();
layoutsCodec.LayoutViewIsOnLastPageFeedback.FireUpdate();
pinCodec.NumberOfScreensFeedback.FireUpdate();
layoutSizeCodec.SelfviewPipSizeFeedback.FireUpdate();
};
}
public override void ExecuteSwitch(object selector) public override void ExecuteSwitch(object selector)
{ {
@@ -2264,58 +2177,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
new CodecCommandWithLabel("DownLeft", "Lower Left") new CodecCommandWithLabel("DownLeft", "Lower Left")
}; };
private void ComputeSelfviewPipPositionStatus() private void ComputeSelfviewPipStatus()
{ {
_currentSelfviewPipPosition = _currentSelfviewPipPosition =
SelfviewPipPositions.FirstOrDefault( SelfviewPipPositions.FirstOrDefault(
p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower())); p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower()));
} }
#endregion
// TODO: #714 [ ] Implementation of IHasSelfviewPipSize
#region Implementation of IHasSelfviewPipSize
private CodecCommandWithLabel _currentSelfviewPipSize;
public StringFeedback SelfviewPipSizeFeedback { get; private set; }
public void SelfviewPipSizeSet(CodecCommandWithLabel size)
{
SendText(String.Format("zConfiguration Call Layout Size: {0}", size.Command));
}
public void SelfviewPipSizeToggle()
{
if (_currentSelfviewPipSize != null)
{
var nextPipSizeIndex = SelfviewPipSizes.IndexOf(_currentSelfviewPipSize) + 1;
if (nextPipSizeIndex >= SelfviewPipSizes.Count)
// Check if we need to loop back to the first item in the list
nextPipSizeIndex = 0;
SelfviewPipSizeSet(SelfviewPipSizes[nextPipSizeIndex]);
}
}
public List<CodecCommandWithLabel> SelfviewPipSizes = new List<CodecCommandWithLabel>()
{
new CodecCommandWithLabel("Off", "Off"),
new CodecCommandWithLabel("Size1", "Size 1"),
new CodecCommandWithLabel("Size2", "Size 2"),
new CodecCommandWithLabel("Size3", "Size 3"),
new CodecCommandWithLabel("Strip", "Strip")
};
private void ComputeSelfviewPipSizeStatus()
{
_currentSelfviewPipSize =
SelfviewPipSizes.FirstOrDefault(
p => p.Command.ToLower().Equals(Configuration.Call.Layout.Size.ToString().ToLower()));
}
#endregion #endregion
#region Implementation of IHasPhoneDialing #region Implementation of IHasPhoneDialing
@@ -2372,8 +2240,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// </summary> /// </summary>
private void ComputeAvailableLayouts() private void ComputeAvailableLayouts()
{ {
Debug.Console(1, this, "Computing available layouts...");
zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None; zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None;
// TODO: #697 [X] Compute the avaialble layouts and set the value of AvailableLayouts
// Will need to test and confirm that this logic evaluates correctly
if (Status.Layout.can_Switch_Wall_View) if (Status.Layout.can_Switch_Wall_View)
{ {
availableLayouts |= zConfiguration.eLayoutStyle.Gallery; availableLayouts |= zConfiguration.eLayoutStyle.Gallery;
@@ -2396,8 +2265,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
availableLayouts |= zConfiguration.eLayoutStyle.Strip; availableLayouts |= zConfiguration.eLayoutStyle.Strip;
} }
Debug.Console(1, this, "availablelayouts: {0}", availableLayouts);
var handler = AvailableLayoutsChanged; var handler = AvailableLayoutsChanged;
if (handler != null) if (handler != null)
{ {
@@ -2472,7 +2339,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void MinMaxLayoutToggle() public void MinMaxLayoutToggle()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion #endregion

View File

@@ -6,6 +6,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
public class ZoomRoomJoinMap : VideoCodecControllerJoinMap public class ZoomRoomJoinMap : VideoCodecControllerJoinMap
{ {
// TODO: #697 [X] Set join numbers
#region Digital #region Digital
[JoinName("CanSwapContentWithThumbnail")] [JoinName("CanSwapContentWithThumbnail")]
@@ -160,22 +162,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Description = "FB Indicates if layout 'ShareAll' is available", Description = "FB Indicates if layout 'ShareAll' is available",
JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.DigitalSerial JoinType = eJoinType.DigitalSerial
}); });
// TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle
[JoinName("SelfviewPipSizeToggle")]
public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete(
new JoinData
{
JoinNumber = 231,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Toggles the selfview pip size, (aka layout size)",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
//[JoinName("ParticipantAudioMuteToggleStart")] //[JoinName("ParticipantAudioMuteToggleStart")]
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( //public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
@@ -269,22 +256,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts", Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial JoinType = eJoinType.Serial
}); });
// TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize
[JoinName("GetSetSelfviewPipSize")]
public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete(
new JoinData
{
JoinNumber = 230,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Sets and reports the selfview pip size, (aka layout size).",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.DigitalSerial
});
#endregion #endregion

View File

@@ -1,3 +1,3 @@
<packages> <packages>
<package id="PepperDashCore" version="1.0.47" targetFramework="net35" allowedVersions="[1.0,1.1)"/> <package id="PepperDashCore" version="1.0.45" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
</packages> </packages>