mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-08 09:15:06 +00:00
feat: change to use Debug.LogMessage everywhere
This commit is contained in:
@@ -16,6 +16,7 @@ using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
@@ -50,10 +51,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
DirectoryBrowseHistory = new List<CodecDirectory>();
|
||||
|
||||
// Debug helpers
|
||||
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
||||
PrivacyModeIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Privacy={0}", _PrivacyModeIsOn);
|
||||
SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource);
|
||||
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
||||
MuteFeedback.OutputChange += (o, a) => Debug.LogMessage(LogEventLevel.Debug, this, "Mute={0}", _IsMuted);
|
||||
PrivacyModeIsOnFeedback.OutputChange += (o, a) => Debug.LogMessage(LogEventLevel.Debug, this, "Privacy={0}", _PrivacyModeIsOn);
|
||||
SharingSourceFeedback.OutputChange += (o, a) => Debug.LogMessage(LogEventLevel.Debug, this, "SharingSource={0}", _SharingSource);
|
||||
VolumeLevelFeedback.OutputChange += (o, a) => Debug.LogMessage(LogEventLevel.Debug, this, "Volume={0}", _VolumeLevel);
|
||||
|
||||
CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => DirectoryBrowseHistory.Count > 0);
|
||||
|
||||
@@ -140,7 +141,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public override void Dial(string number)
|
||||
{
|
||||
Debug.Console(1, this, "Dial: {0}", number);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Dial: {0}", number);
|
||||
var call = new CodecActiveCallItem() { Name = number, Number = number, Id = number, Status = eCodecCallStatus.Dialing, Direction = eCodecCallDirection.Outgoing, Type = eCodecCallType.Video };
|
||||
ActiveCalls.Add(call);
|
||||
OnCallStatusChange(call);
|
||||
@@ -156,7 +157,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
public override void Dial(Meeting meeting)
|
||||
{
|
||||
Debug.Console(1, this, "Dial Meeting: {0}", meeting.Id);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Dial Meeting: {0}", meeting.Id);
|
||||
var call = new CodecActiveCallItem() { Name = meeting.Title, Number = meeting.Id, Id = meeting.Id, Status = eCodecCallStatus.Dialing, Direction = eCodecCallDirection.Outgoing, Type = eCodecCallType.Video };
|
||||
ActiveCalls.Add(call);
|
||||
OnCallStatusChange(call);
|
||||
@@ -177,7 +178,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public override void EndCall(CodecActiveCallItem call)
|
||||
{
|
||||
Debug.Console(1, this, "EndCall");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "EndCall");
|
||||
ActiveCalls.Remove(call);
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, call);
|
||||
//ActiveCallCountFeedback.FireUpdate();
|
||||
@@ -188,7 +189,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public override void EndAllCalls()
|
||||
{
|
||||
Debug.Console(1, this, "EndAllCalls");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "EndAllCalls");
|
||||
for(int i = ActiveCalls.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var call = ActiveCalls[i];
|
||||
@@ -203,7 +204,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public override void AcceptCall(CodecActiveCallItem call)
|
||||
{
|
||||
Debug.Console(1, this, "AcceptCall");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "AcceptCall");
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Connecting, call);
|
||||
new CTimer(o => SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Connected, call), 1000);
|
||||
// should already be in active list
|
||||
@@ -214,7 +215,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public override void RejectCall(CodecActiveCallItem call)
|
||||
{
|
||||
Debug.Console(1, this, "RejectCall");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "RejectCall");
|
||||
ActiveCalls.Remove(call);
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, call);
|
||||
//ActiveCallCountFeedback.FireUpdate();
|
||||
@@ -226,7 +227,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// <param name="s"></param>
|
||||
public override void SendDtmf(string s)
|
||||
{
|
||||
Debug.Console(1, this, "SendDTMF: {0}", s);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "SendDTMF: {0}", s);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -268,7 +269,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// <param name="selector"></param>
|
||||
public override void ExecuteSwitch(object selector)
|
||||
{
|
||||
Debug.Console(1, this, "ExecuteSwitch: {0}", selector);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "ExecuteSwitch: {0}", selector);
|
||||
_SharingSource = selector.ToString();
|
||||
}
|
||||
|
||||
@@ -330,7 +331,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public override void PrivacyModeOn()
|
||||
{
|
||||
Debug.Console(1, this, "PrivacyMuteOn");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "PrivacyMuteOn");
|
||||
if (_PrivacyModeIsOn)
|
||||
return;
|
||||
_PrivacyModeIsOn = true;
|
||||
@@ -342,7 +343,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public override void PrivacyModeOff()
|
||||
{
|
||||
Debug.Console(1, this, "PrivacyMuteOff");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "PrivacyMuteOff");
|
||||
if (!_PrivacyModeIsOn)
|
||||
return;
|
||||
_PrivacyModeIsOn = false;
|
||||
@@ -355,7 +356,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
public override void PrivacyModeToggle()
|
||||
{
|
||||
_PrivacyModeIsOn = !_PrivacyModeIsOn;
|
||||
Debug.Console(1, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn);
|
||||
PrivacyModeIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
@@ -368,7 +369,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// <param name="url"></param>
|
||||
public void TestIncomingVideoCall(string url)
|
||||
{
|
||||
Debug.Console(1, this, "TestIncomingVideoCall from {0}", url);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "TestIncomingVideoCall from {0}", url);
|
||||
var call = new CodecActiveCallItem() { Name = url, Id = url, Number = url, Type= eCodecCallType.Video, Direction = eCodecCallDirection.Incoming };
|
||||
ActiveCalls.Add(call);
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Ringing, call);
|
||||
@@ -383,7 +384,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// <param name="url"></param>
|
||||
public void TestIncomingAudioCall(string url)
|
||||
{
|
||||
Debug.Console(1, this, "TestIncomingAudioCall from {0}", url);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "TestIncomingAudioCall from {0}", url);
|
||||
var call = new CodecActiveCallItem() { Name = url, Id = url, Number = url, Type = eCodecCallType.Audio, Direction = eCodecCallDirection.Incoming };
|
||||
ActiveCalls.Add(call);
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Ringing, call);
|
||||
@@ -396,7 +397,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public void TestFarEndHangup()
|
||||
{
|
||||
Debug.Console(1, this, "TestFarEndHangup");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "TestFarEndHangup");
|
||||
|
||||
}
|
||||
|
||||
@@ -676,11 +677,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
var camera = Cameras.FirstOrDefault(c => c.Key.ToLower().IndexOf(key.ToLower()) > -1);
|
||||
if (camera != null)
|
||||
{
|
||||
Debug.Console(2, this, "Selected Camera with key: '{0}'", camera.Key);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Selected Camera with key: '{0}'", camera.Key);
|
||||
SelectedCamera = camera;
|
||||
}
|
||||
else
|
||||
Debug.Console(2, this, "Unable to select camera with key: '{0}'", key);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Unable to select camera with key: '{0}'", key);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -736,11 +737,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
if (SelectedCamera is IAmFarEndCamera)
|
||||
{
|
||||
Debug.Console(1, this, "Selecting Far End Preset: {0}", preset);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Selecting Far End Preset: {0}", preset);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, this, "Selecting Near End Preset: {0}", preset);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Selecting Near End Preset: {0}", preset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -768,7 +769,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
public void SelectFarEndPreset(int i)
|
||||
{
|
||||
Debug.Console(1, this, "Selecting Far End Preset: {0}", i);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Selecting Far End Preset: {0}", i);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -841,7 +842,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new MockVC Device");
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new MockVC Device");
|
||||
return new VideoCodec.MockVC(dc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
{
|
||||
@@ -27,7 +28,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void PositionHome()
|
||||
{
|
||||
Debug.Console(1, this, "Resetting to home position");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Resetting to home position");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -36,17 +37,17 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void PanLeft()
|
||||
{
|
||||
Debug.Console(1, this, "Panning Left");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Panning Left");
|
||||
}
|
||||
|
||||
public void PanRight()
|
||||
{
|
||||
Debug.Console(1, this, "Panning Right");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Panning Right");
|
||||
}
|
||||
|
||||
public void PanStop()
|
||||
{
|
||||
Debug.Console(1, this, "Stopping Pan");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Pan");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -55,17 +56,17 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void TiltDown()
|
||||
{
|
||||
Debug.Console(1, this, "Tilting Down");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Down");
|
||||
}
|
||||
|
||||
public void TiltUp()
|
||||
{
|
||||
Debug.Console(1, this, "Tilting Up");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Up");
|
||||
}
|
||||
|
||||
public void TiltStop()
|
||||
{
|
||||
Debug.Console(1, this, "Stopping Tilt");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Tilt");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -74,17 +75,17 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void ZoomIn()
|
||||
{
|
||||
Debug.Console(1, this, "Zooming In");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Zooming In");
|
||||
}
|
||||
|
||||
public void ZoomOut()
|
||||
{
|
||||
Debug.Console(1, this, "Zooming Out");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Zooming Out");
|
||||
}
|
||||
|
||||
public void ZoomStop()
|
||||
{
|
||||
Debug.Console(1, this, "Stopping Zoom");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Zoom");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -93,22 +94,22 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void FocusNear()
|
||||
{
|
||||
Debug.Console(1, this, "Focusing Near");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Focusing Near");
|
||||
}
|
||||
|
||||
public void FocusFar()
|
||||
{
|
||||
Debug.Console(1, this, "Focusing Far");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Focusing Far");
|
||||
}
|
||||
|
||||
public void FocusStop()
|
||||
{
|
||||
Debug.Console(1, this, "Stopping Focus");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Focus");
|
||||
}
|
||||
|
||||
public void TriggerAutoFocus()
|
||||
{
|
||||
Debug.Console(1, this, "AutoFocus Triggered");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "AutoFocus Triggered");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -136,7 +137,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void PositionHome()
|
||||
{
|
||||
Debug.Console(1, this, "Resetting to home position");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Resetting to home position");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -145,17 +146,17 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void PanLeft()
|
||||
{
|
||||
Debug.Console(1, this, "Panning Left");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Panning Left");
|
||||
}
|
||||
|
||||
public void PanRight()
|
||||
{
|
||||
Debug.Console(1, this, "Panning Right");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Panning Right");
|
||||
}
|
||||
|
||||
public void PanStop()
|
||||
{
|
||||
Debug.Console(1, this, "Stopping Pan");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Pan");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -164,17 +165,17 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void TiltDown()
|
||||
{
|
||||
Debug.Console(1, this, "Tilting Down");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Down");
|
||||
}
|
||||
|
||||
public void TiltUp()
|
||||
{
|
||||
Debug.Console(1, this, "Tilting Up");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Up");
|
||||
}
|
||||
|
||||
public void TiltStop()
|
||||
{
|
||||
Debug.Console(1, this, "Stopping Tilt");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Tilt");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -183,17 +184,17 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
public void ZoomIn()
|
||||
{
|
||||
Debug.Console(1, this, "Zooming In");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Zooming In");
|
||||
}
|
||||
|
||||
public void ZoomOut()
|
||||
{
|
||||
Debug.Console(1, this, "Zooming Out");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Zooming Out");
|
||||
}
|
||||
|
||||
public void ZoomStop()
|
||||
{
|
||||
Debug.Console(1, this, "Stopping Zoom");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Zoom");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -20,6 +20,7 @@ using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
|
||||
using PepperDash.Essentials.Core.Bridges.JoinMaps;
|
||||
using Feedback = PepperDash.Essentials.Core.Feedback;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
@@ -259,7 +260,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(2, this, "Error in SetIsReady() : {0}", e);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Error in SetIsReady() : {0}", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -270,14 +271,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public virtual void ListCalls()
|
||||
{
|
||||
Debug.Console(1, this, "Active Calls:");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Active Calls:");
|
||||
|
||||
var sb = new StringBuilder();
|
||||
foreach (var c in ActiveCalls)
|
||||
{
|
||||
sb.AppendFormat("id: {0} number: {1} -- name: {2} status: {3} onHold: {4}\r\n", c.Id, c.Number, c.Name, c.Status, c.IsOnHold);
|
||||
}
|
||||
Debug.Console(1, this, "\n{0}\n", sb.ToString());
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "\n{0}\n", sb.ToString());
|
||||
}
|
||||
|
||||
public abstract void StandbyActivate();
|
||||
@@ -329,7 +330,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// <param name="joinMap"></param>
|
||||
protected void LinkVideoCodecToApi(VideoCodecBase codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
Debug.Console(1, this, "Linking to Trilist {0}", trilist.ID.ToString("X"));
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking to Trilist {0}", trilist.ID.ToString("X"));
|
||||
|
||||
LinkVideoCodecDtmfToApi(trilist, joinMap);
|
||||
|
||||
@@ -697,7 +698,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
if (meetingIndex >= maxParticipants * offset) break;
|
||||
|
||||
// Debug.Console(2, this,
|
||||
// Debug.LogMessage(LogEventLevel.Verbose, this,
|
||||
//@"Updating Participant on xsig:
|
||||
//Name: {0} (s{9})
|
||||
//AudioMute: {1} (d{10})
|
||||
@@ -739,7 +740,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb);
|
||||
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()));
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Index: {0} byte value: {1}", digitalIndex + 7, ComTextHelper.GetEscapedText(tokenArray[digitalIndex + 6].GetBytes()));
|
||||
|
||||
//serials
|
||||
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name);
|
||||
@@ -778,7 +779,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
var returnString = GetXSigString(tokenArray);
|
||||
|
||||
//Debug.Console(2, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString)));
|
||||
//Debug.LogMessage(LogEventLevel.Verbose, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString)));
|
||||
|
||||
|
||||
return returnString;
|
||||
@@ -811,14 +812,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
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);
|
||||
Debug.LogMessage(LogEventLevel.Debug, 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}",
|
||||
Debug.LogMessage(LogEventLevel.Debug, 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]);
|
||||
@@ -931,7 +932,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
if (meetingIndex >= _meetingsToDisplay * offset)
|
||||
{
|
||||
Debug.Console(2, this, "Max Meetings reached");
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Max Meetings reached");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -955,7 +956,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
while (meetingIndex < _meetingsToDisplay * offset)
|
||||
{
|
||||
Debug.Console(2, this, "Clearing unused data. Meeting Index: {0} MaxMeetings * Offset: {1}",
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Clearing unused data. Meeting Index: {0} MaxMeetings * Offset: {1}",
|
||||
meetingIndex, _meetingsToDisplay * offset);
|
||||
|
||||
//digitals
|
||||
@@ -1003,7 +1004,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
var contactsCount = codec.DirectoryRoot.CurrentDirectoryResults.Where(c => c.ParentFolderId.Equals("root")).ToList().Count;
|
||||
trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)contactsCount);
|
||||
Debug.Console(2, this, ">>> contactsCount: {0}", contactsCount);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, ">>> contactsCount: {0}", contactsCount);
|
||||
|
||||
var clearBytes = XSigHelpers.ClearOutputs();
|
||||
|
||||
@@ -1012,7 +1013,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot,
|
||||
codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false);
|
||||
|
||||
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||
|
||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig);
|
||||
}
|
||||
@@ -1025,7 +1026,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
: args.Directory.CurrentDirectoryResults.Count;
|
||||
|
||||
trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)argsCount);
|
||||
Debug.Console(2, this, ">>> argsCount: {0}", argsCount);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, ">>> argsCount: {0}", argsCount);
|
||||
|
||||
var clearBytes = XSigHelpers.ClearOutputs();
|
||||
|
||||
@@ -1033,7 +1034,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
||||
var directoryXSig = UpdateDirectoryXSig(args.Directory,
|
||||
codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue == false);
|
||||
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||
|
||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig);
|
||||
};
|
||||
@@ -1159,7 +1160,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
// Create a new token array and set the size to the number of methods times the total number of signals
|
||||
var tokenArray = new XSigToken[maxMethods * offset];
|
||||
|
||||
Debug.Console(2, this, "Creating XSIG token array with size {0}", maxMethods * offset);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Creating XSIG token array with size {0}", maxMethods * offset);
|
||||
|
||||
// TODO: Add code to generate XSig data
|
||||
foreach (var method in contact.ContactMethods)
|
||||
@@ -1196,7 +1197,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
? xSigMaxIndex
|
||||
: directory.CurrentDirectoryResults.Count];
|
||||
|
||||
Debug.Console(2, this, "IsRoot: {0}, Directory Count: {1}, TokenArray.Length: {2}", isRoot, directory.CurrentDirectoryResults.Count, tokenArray.Length);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "IsRoot: {0}, Directory Count: {1}, TokenArray.Length: {2}", isRoot, directory.CurrentDirectoryResults.Count, tokenArray.Length);
|
||||
|
||||
var contacts = directory.CurrentDirectoryResults.Count > xSigMaxIndex
|
||||
? directory.CurrentDirectoryResults.Take(xSigMaxIndex)
|
||||
@@ -1212,7 +1213,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
var arrayIndex = counterIndex - 1;
|
||||
var entryIndex = counterIndex;
|
||||
|
||||
Debug.Console(2, this, "Entry{2:0000} Name: {0}, Folder ID: {1}, Type: {3}, ParentFolderId: {4}",
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Entry{2:0000} Name: {0}, Folder ID: {1}, Type: {3}, ParentFolderId: {4}",
|
||||
entry.Name, entry.FolderId, entryIndex, entry.GetType().GetCType().FullName, entry.ParentFolderId);
|
||||
|
||||
if (entry is DirectoryFolder)
|
||||
@@ -1250,7 +1251,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
if (callIndex < 0 || callIndex >= ActiveCalls.Count)
|
||||
{
|
||||
Debug.Console(2, this, "Cannot end call. No call found at index: {0}", callIndex);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Cannot end call. No call found at index: {0}", callIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1261,7 +1262,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[End Call] Unable to find call at index '{0}'", i);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "[End Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1272,8 +1273,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall);
|
||||
|
||||
Debug.Console(1, this, "Call Direction: {0}", args.CallItem.Direction);
|
||||
Debug.Console(1, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Call Direction: {0}", args.CallItem.Direction);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming);
|
||||
trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status == eCodecCallStatus.Ringing);
|
||||
|
||||
if (args.CallItem.Direction == eCodecCallDirection.Incoming)
|
||||
@@ -1311,7 +1312,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[Join Call] Unable to find call at index '{0}'", i);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "[Join Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1343,7 +1344,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[Hold Call] Unable to find call at index '{0}'", i);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "[Hold Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1358,7 +1359,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[Resume Call] Unable to find call at index '{0}'", i);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "[Resume Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1371,7 +1372,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
if (!args.DeviceOnLine) return;
|
||||
|
||||
// TODO [ ] #983
|
||||
Debug.Console(0, this, "LinkVideoCodecCallControlsToApi: device is {0}, IsInCall {1}", args.DeviceOnLine ? "online" : "offline", IsInCall);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "LinkVideoCodecCallControlsToApi: device is {0}, IsInCall {1}", args.DeviceOnLine ? "online" : "offline", IsInCall);
|
||||
trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall);
|
||||
trilist.SetString(joinMap.CurrentCallData.JoinNumber, "\xFC");
|
||||
trilist.SetString(joinMap.CurrentCallData.JoinNumber, UpdateCallStatusXSig());
|
||||
@@ -1480,12 +1481,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Warning: No call found at index {0} or call is not active.", callIndex);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Warning: No call found at index {0} or call is not active.", callIndex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Warning: Invalid call index specified. Please use a value of 1-8.");
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Warning: Invalid call index specified. Please use a value of 1-8.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1684,7 +1685,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Unable to select. No camera found at index {0}", i);
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Unable to select. No camera found at index {0}", i);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1787,7 +1788,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
if (u == 0 || u > codec.CallHistory.RecentCalls.Count)
|
||||
{
|
||||
Debug.Console(2, this, "Recent Call History index out of range");
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Recent Call History index out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1974,7 +1975,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
PhonebookHasFolders = value;
|
||||
|
||||
Debug.Console(1, this, "Phonebook has folders: {0}", PhonebookHasFolders);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Phonebook has folders: {0}", PhonebookHasFolders);
|
||||
}
|
||||
|
||||
public void SetNumberOfContacts(int contacts)
|
||||
@@ -1982,7 +1983,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
NumberOfContacts = contacts;
|
||||
NumberOfContactsWasReceived = true;
|
||||
|
||||
Debug.Console(1, this, "Phonebook contains {0} contacts.", NumberOfContacts);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Phonebook contains {0} contacts.", NumberOfContacts);
|
||||
|
||||
CheckSyncStatus();
|
||||
}
|
||||
@@ -2000,7 +2001,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
if (InitialPhonebookFoldersWasReceived && NumberOfContactsWasReceived && PhonebookRootEntriesWasRecieved)
|
||||
{
|
||||
InitialSyncComplete = true;
|
||||
Debug.Console(1, this, "Initial Phonebook Sync Complete!");
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Initial Phonebook Sync Complete!");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user