mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 04:34:56 +00:00
Merged in bugfix/ecs-1062 (pull request #8)
Bugfix/ecs 1062 Approved-by: Neil Dorin <ndorin@pepperdash.com>
This commit is contained in:
@@ -17,6 +17,7 @@ using PepperDash.Core;
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Room.Cotija;
|
using PepperDash.Essentials.Room.Cotija;
|
||||||
|
using PepperDash.Essentials.AppServer.Messengers;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
@@ -39,6 +40,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
Dictionary<string, CTimer> PushedActions = new Dictionary<string, CTimer>();
|
Dictionary<string, CTimer> PushedActions = new Dictionary<string, CTimer>();
|
||||||
|
|
||||||
|
public ConfigMessenger ConfigMessenger { get; private set; }
|
||||||
|
|
||||||
CTimer ServerHeartbeatCheckTimer;
|
CTimer ServerHeartbeatCheckTimer;
|
||||||
|
|
||||||
long ServerHeartbeatInterval = 20000;
|
long ServerHeartbeatInterval = 20000;
|
||||||
@@ -49,7 +52,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
DateTime LastAckMessage;
|
DateTime LastAckMessage;
|
||||||
|
|
||||||
string SystemUuid;
|
public string SystemUuid;
|
||||||
|
|
||||||
List<CotijaBridgeBase> RoomBridges = new List<CotijaBridgeBase>();
|
List<CotijaBridgeBase> RoomBridges = new List<CotijaBridgeBase>();
|
||||||
|
|
||||||
@@ -97,9 +100,15 @@ namespace PepperDash.Essentials
|
|||||||
CrestronConsole.AddNewConsoleCommand(s => CleanUpWebsocketClient(), "mobiledisco",
|
CrestronConsole.AddNewConsoleCommand(s => CleanUpWebsocketClient(), "mobiledisco",
|
||||||
"Disconnects websocket", ConsoleAccessLevelEnum.AccessOperator);
|
"Disconnects websocket", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
CrestronConsole.AddNewConsoleCommand(s => ParseStreamRx(s), "mobilesimulateaction", "Simulates a message from the server", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
|
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
|
||||||
CrestronEnvironment.EthernetEventHandler += new EthernetEventHandler(CrestronEnvironment_EthernetEventHandler);
|
CrestronEnvironment.EthernetEventHandler += new EthernetEventHandler(CrestronEnvironment_EthernetEventHandler);
|
||||||
|
|
||||||
|
// Config Messenger
|
||||||
|
var cmKey = Key + "-config";
|
||||||
|
ConfigMessenger = new ConfigMessenger(cmKey, "/config");
|
||||||
|
ConfigMessenger.RegisterWithAppServer(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -138,7 +147,9 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="programEventType"></param>
|
/// <param name="programEventType"></param>
|
||||||
void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType)
|
void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType)
|
||||||
{
|
{
|
||||||
if (programEventType == eProgramStatusEventType.Stopping && WSClient.Connected)
|
if (programEventType == eProgramStatusEventType.Stopping
|
||||||
|
&& WSClient != null
|
||||||
|
&& WSClient.Connected)
|
||||||
{
|
{
|
||||||
CleanUpWebsocketClient();
|
CleanUpWebsocketClient();
|
||||||
}
|
}
|
||||||
@@ -315,10 +326,12 @@ namespace PepperDash.Essentials
|
|||||||
CrestronConsole.ConsoleCommandResponse(@"Mobile Control Information:
|
CrestronConsole.ConsoleCommandResponse(@"Mobile Control Information:
|
||||||
Server address: {0}
|
Server address: {0}
|
||||||
System Name: {1}
|
System Name: {1}
|
||||||
System UUID: {2}
|
System URL: {2}
|
||||||
System User code: {3}
|
System UUID: {3}
|
||||||
Connected?: {4}
|
System User code: {4}
|
||||||
Seconds Since Last Ack: {5}", url, name, SystemUuid,
|
Connected?: {5}
|
||||||
|
Seconds Since Last Ack: {6}"
|
||||||
|
, url, name, ConfigReader.ConfigObject.SystemUrl, SystemUuid,
|
||||||
code, conn, secSinceLastAck.Seconds);
|
code, conn, secSinceLastAck.Seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,9 +461,9 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(1, this, "Socket send result error: {0}", result);
|
Debug.Console(1, this, "Socket send result error: {0}", result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!WSClient.Connected)
|
else if (WSClient == null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Cannot send. Not connected {0}");
|
Debug.Console(1, this, "Cannot send. Not connected.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
75
PepperDashEssentials/AppServer/Messengers/ConfigMessenger.cs
Normal file
75
PepperDashEssentials/AppServer/Messengers/ConfigMessenger.cs
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles interactions with the app server to update the config
|
||||||
|
/// </summary>
|
||||||
|
public class ConfigMessenger : MessengerBase
|
||||||
|
{
|
||||||
|
public ConfigMessenger(string key, string messagePath)
|
||||||
|
: base(key, messagePath)
|
||||||
|
{
|
||||||
|
ConfigUpdater.ConfigStatusChanged -= ConfigUpdater_ConfigStatusChanged;
|
||||||
|
ConfigUpdater.ConfigStatusChanged += new EventHandler<ConfigStatusEventArgs>(ConfigUpdater_ConfigStatusChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConfigUpdater_ConfigStatusChanged(object sender, ConfigStatusEventArgs e)
|
||||||
|
{
|
||||||
|
PostUpdateStatus(e.UpdateStatus.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void CustomRegisterWithAppServer(CotijaSystemController appServerController)
|
||||||
|
{
|
||||||
|
appServerController.AddAction(MessagePath + "/updateConfig", new Action<string>(s => GetConfigFile(s)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Generates or passes the URL to make the request to GET the config from a server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url"></param>
|
||||||
|
void GetConfigFile(string url)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Attempt to parse the URL
|
||||||
|
var parser = new Crestron.SimplSharp.Net.Http.UrlParser(url);
|
||||||
|
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Successfully parsed URL from AppServer message: {0}", parser.Url);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
// If unable to parse the URL, generate it from config data
|
||||||
|
Debug.Console(2, "Error parsing URL: {0}", e);
|
||||||
|
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Unable to parse URL from AppServer message. Generating URL from config data");
|
||||||
|
url = string.Format("http://{0}/api/system/{1}/config", AppServerController.Config.ServerUrl, AppServerController.SystemUuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigUpdater.GetConfigFromServer(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Posts a message with the current status of the config update
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="status"></param>
|
||||||
|
void PostUpdateStatus(string status)
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
updateStatus = status
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -16,12 +16,33 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
{
|
{
|
||||||
BasicTriList EISC;
|
BasicTriList EISC;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 221
|
||||||
|
/// </summary>
|
||||||
const uint BDialHangup = 221;
|
const uint BDialHangup = 221;
|
||||||
|
/// <summary>
|
||||||
|
/// 251
|
||||||
|
/// </summary>
|
||||||
const uint BIncomingAnswer = 251;
|
const uint BIncomingAnswer = 251;
|
||||||
|
/// <summary>
|
||||||
|
/// 252
|
||||||
|
/// </summary>
|
||||||
const uint BIncomingReject = 252;
|
const uint BIncomingReject = 252;
|
||||||
|
/// <summary>
|
||||||
|
/// 241
|
||||||
|
/// </summary>
|
||||||
const uint BSpeedDial1 = 241;
|
const uint BSpeedDial1 = 241;
|
||||||
|
/// <summary>
|
||||||
|
/// 242
|
||||||
|
/// </summary>
|
||||||
const uint BSpeedDial2 = 242;
|
const uint BSpeedDial2 = 242;
|
||||||
|
/// <summary>
|
||||||
|
/// 243
|
||||||
|
/// </summary>
|
||||||
const uint BSpeedDial3 = 243;
|
const uint BSpeedDial3 = 243;
|
||||||
|
/// <summary>
|
||||||
|
/// 244
|
||||||
|
/// </summary>
|
||||||
const uint BSpeedDial4 = 244;
|
const uint BSpeedDial4 = 244;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -46,7 +67,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
const uint SCallDirection = 222;
|
const uint SCallDirection = 222;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// 201-212 0-9*#
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Dictionary<string, uint> DTMFMap = new Dictionary<string, uint>
|
Dictionary<string, uint> DTMFMap = new Dictionary<string, uint>
|
||||||
{
|
{
|
||||||
@@ -64,6 +85,9 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
{ "#", 212 },
|
{ "#", 212 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
CodecActiveCallItem CurrentCallItem;
|
CodecActiveCallItem CurrentCallItem;
|
||||||
|
|
||||||
|
|
||||||
@@ -160,6 +184,9 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
void SendCallsList()
|
void SendCallsList()
|
||||||
{
|
{
|
||||||
PostStatusMessage(new
|
PostStatusMessage(new
|
||||||
604
PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs
Normal file
604
PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs
Normal file
@@ -0,0 +1,604 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
|
{
|
||||||
|
public class Ddvc01VtcMessenger : MessengerBase
|
||||||
|
{
|
||||||
|
BasicTriList EISC;
|
||||||
|
|
||||||
|
/********* Bools *********/
|
||||||
|
/// <summary>
|
||||||
|
/// 724
|
||||||
|
/// </summary>
|
||||||
|
const uint BDialHangup = 724;
|
||||||
|
/// <summary>
|
||||||
|
/// 750
|
||||||
|
/// </summary>
|
||||||
|
const uint BCallIncoming = 750;
|
||||||
|
/// <summary>
|
||||||
|
/// 751
|
||||||
|
/// </summary>
|
||||||
|
const uint BIncomingAnswer = 751;
|
||||||
|
/// <summary>
|
||||||
|
/// 752
|
||||||
|
/// </summary>
|
||||||
|
const uint BIncomingReject = 752;
|
||||||
|
/// <summary>
|
||||||
|
/// 741
|
||||||
|
/// </summary>
|
||||||
|
const uint BSpeedDial1 = 741;
|
||||||
|
/// <summary>
|
||||||
|
/// 742
|
||||||
|
/// </summary>
|
||||||
|
const uint BSpeedDial2 = 742;
|
||||||
|
/// <summary>
|
||||||
|
/// 743
|
||||||
|
/// </summary>
|
||||||
|
const uint BSpeedDial3 = 743;
|
||||||
|
/// <summary>
|
||||||
|
/// 744
|
||||||
|
/// </summary>
|
||||||
|
const uint BSpeedDial4 = 744;
|
||||||
|
/// <summary>
|
||||||
|
/// 800
|
||||||
|
/// </summary>
|
||||||
|
const uint BDirectorySearchBusy = 800;
|
||||||
|
/// <summary>
|
||||||
|
/// 801
|
||||||
|
/// </summary>
|
||||||
|
const uint BDirectoryLineSelected = 801;
|
||||||
|
/// <summary>
|
||||||
|
/// 801 when selected entry is a contact
|
||||||
|
/// </summary>
|
||||||
|
const uint BDirectoryEntryIsContact = 801;
|
||||||
|
/// <summary>
|
||||||
|
/// 802 To show/hide back button
|
||||||
|
/// </summary>
|
||||||
|
const uint BDirectoryIsRoot = 802;
|
||||||
|
/// <summary>
|
||||||
|
/// 803 Pulse from system to inform us when directory is ready
|
||||||
|
/// </summary>
|
||||||
|
const uint DDirectoryHasChanged = 803;
|
||||||
|
/// <summary>
|
||||||
|
/// 804
|
||||||
|
/// </summary>
|
||||||
|
const uint BDirectoryRoot = 804;
|
||||||
|
/// <summary>
|
||||||
|
/// 805
|
||||||
|
/// </summary>
|
||||||
|
const uint BDirectoryFolderBack = 805;
|
||||||
|
/// <summary>
|
||||||
|
/// 806
|
||||||
|
/// </summary>
|
||||||
|
const uint BDirectoryDialSelectedLine = 806;
|
||||||
|
/// <summary>
|
||||||
|
/// 811
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraControlUp = 811;
|
||||||
|
/// <summary>
|
||||||
|
/// 812
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraControlDown = 812;
|
||||||
|
/// <summary>
|
||||||
|
/// 813
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraControlLeft = 813;
|
||||||
|
/// <summary>
|
||||||
|
/// 814
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraControlRight = 814;
|
||||||
|
/// <summary>
|
||||||
|
/// 815
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraControlZoomIn = 815;
|
||||||
|
/// <summary>
|
||||||
|
/// 816
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraControlZoomOut = 816;
|
||||||
|
/// <summary>
|
||||||
|
/// 821 - 826
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraPresetStart = 821;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 831
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraModeAuto = 831;
|
||||||
|
/// <summary>
|
||||||
|
/// 832
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraModeManual = 832;
|
||||||
|
/// <summary>
|
||||||
|
/// 833
|
||||||
|
/// </summary>
|
||||||
|
const uint BCameraModeOff = 833;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/********* Ushorts *********/
|
||||||
|
/// <summary>
|
||||||
|
/// 760
|
||||||
|
/// </summary>
|
||||||
|
const uint UCameraNumberSelect = 760;
|
||||||
|
/// <summary>
|
||||||
|
/// 801
|
||||||
|
/// </summary>
|
||||||
|
const uint UDirectorySelectRow = 801;
|
||||||
|
/// <summary>
|
||||||
|
/// 801
|
||||||
|
/// </summary>
|
||||||
|
const uint UDirectoryRowCount = 801;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/********* Strings *********/
|
||||||
|
/// <summary>
|
||||||
|
/// 701
|
||||||
|
/// </summary>
|
||||||
|
const uint SCurrentDialString = 701;
|
||||||
|
/// <summary>
|
||||||
|
/// 702
|
||||||
|
/// </summary>
|
||||||
|
const uint SCurrentCallName = 702;
|
||||||
|
/// <summary>
|
||||||
|
/// 703
|
||||||
|
/// </summary>
|
||||||
|
const uint SCurrentCallNumber = 703;
|
||||||
|
/// <summary>
|
||||||
|
/// 731
|
||||||
|
/// </summary>
|
||||||
|
const uint SHookState = 731;
|
||||||
|
/// <summary>
|
||||||
|
/// 722
|
||||||
|
/// </summary>
|
||||||
|
const uint SCallDirection = 722;
|
||||||
|
/// <summary>
|
||||||
|
/// 751
|
||||||
|
/// </summary>
|
||||||
|
const uint SIncomingCallName = 751;
|
||||||
|
/// <summary>
|
||||||
|
/// 752
|
||||||
|
/// </summary>
|
||||||
|
const uint SIncomingCallNumber = 752;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 800
|
||||||
|
/// </summary>
|
||||||
|
const uint SDirectorySearchString = 800;
|
||||||
|
/// <summary>
|
||||||
|
/// 801-1055
|
||||||
|
/// </summary>
|
||||||
|
const uint SDirectoryEntriesStart = 801;
|
||||||
|
/// <summary>
|
||||||
|
/// 1056
|
||||||
|
/// </summary>
|
||||||
|
const uint SDirectoryEntrySelectedName = 1056;
|
||||||
|
/// <summary>
|
||||||
|
/// 1057
|
||||||
|
/// </summary>
|
||||||
|
const uint SDirectoryEntrySelectedNumber = 1057;
|
||||||
|
/// <summary>
|
||||||
|
/// 1058
|
||||||
|
/// </summary>
|
||||||
|
const uint SDirectorySelectedFolderName = 1058;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 701-712 0-9*#
|
||||||
|
/// </summary>
|
||||||
|
Dictionary<string, uint> DTMFMap = new Dictionary<string, uint>
|
||||||
|
{
|
||||||
|
{ "1", 701 },
|
||||||
|
{ "2", 702 },
|
||||||
|
{ "3", 703 },
|
||||||
|
{ "4", 704 },
|
||||||
|
{ "5", 705 },
|
||||||
|
{ "6", 706 },
|
||||||
|
{ "7", 707 },
|
||||||
|
{ "8", 708 },
|
||||||
|
{ "9", 709 },
|
||||||
|
{ "0", 710 },
|
||||||
|
{ "*", 711 },
|
||||||
|
{ "#", 712 },
|
||||||
|
};
|
||||||
|
|
||||||
|
CodecActiveCallItem CurrentCallItem;
|
||||||
|
CodecActiveCallItem IncomingCallItem;
|
||||||
|
|
||||||
|
ushort PreviousDirectoryLength = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="eisc"></param>
|
||||||
|
/// <param name="messagePath"></param>
|
||||||
|
public Ddvc01VtcMessenger(string key, BasicTriList eisc, string messagePath)
|
||||||
|
: base(key, messagePath)
|
||||||
|
{
|
||||||
|
EISC = eisc;
|
||||||
|
|
||||||
|
CurrentCallItem = new CodecActiveCallItem();
|
||||||
|
CurrentCallItem.Type = eCodecCallType.Video;
|
||||||
|
CurrentCallItem.Id = "-video-";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="appServerController"></param>
|
||||||
|
protected override void CustomRegisterWithAppServer(CotijaSystemController appServerController)
|
||||||
|
{
|
||||||
|
var asc = appServerController;
|
||||||
|
EISC.SetStringSigAction(SHookState, s =>
|
||||||
|
{
|
||||||
|
CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
|
||||||
|
PostFullStatus(); // SendCallsList();
|
||||||
|
});
|
||||||
|
|
||||||
|
EISC.SetStringSigAction(SCurrentCallNumber, s =>
|
||||||
|
{
|
||||||
|
CurrentCallItem.Number = s;
|
||||||
|
PostCallsList();
|
||||||
|
});
|
||||||
|
|
||||||
|
EISC.SetStringSigAction(SCurrentCallName, s =>
|
||||||
|
{
|
||||||
|
CurrentCallItem.Name = s;
|
||||||
|
PostCallsList();
|
||||||
|
});
|
||||||
|
|
||||||
|
EISC.SetStringSigAction(SCallDirection, s =>
|
||||||
|
{
|
||||||
|
CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
|
||||||
|
PostCallsList();
|
||||||
|
});
|
||||||
|
|
||||||
|
EISC.SetBoolSigAction(BCallIncoming, b =>
|
||||||
|
{
|
||||||
|
if (b)
|
||||||
|
{
|
||||||
|
var ica = new CodecActiveCallItem()
|
||||||
|
{
|
||||||
|
Direction = eCodecCallDirection.Incoming,
|
||||||
|
Id = "-video-incoming",
|
||||||
|
Name = EISC.GetString(SIncomingCallName),
|
||||||
|
Number = EISC.GetString(SIncomingCallNumber),
|
||||||
|
Status = eCodecCallStatus.Ringing,
|
||||||
|
Type = eCodecCallType.Video
|
||||||
|
};
|
||||||
|
IncomingCallItem = ica;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IncomingCallItem = null;
|
||||||
|
}
|
||||||
|
PostCallsList();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Directory insanity
|
||||||
|
EISC.SetUShortSigAction(UDirectoryRowCount, u =>
|
||||||
|
{
|
||||||
|
// The length of the list comes in before the list does.
|
||||||
|
// Splice the sig change operation onto the last string sig that will be changing
|
||||||
|
// when the directory entries make it through.
|
||||||
|
if (PreviousDirectoryLength > 0)
|
||||||
|
{
|
||||||
|
EISC.ClearStringSigAction(SDirectoryEntriesStart + PreviousDirectoryLength - 1);
|
||||||
|
}
|
||||||
|
EISC.SetStringSigAction(SDirectoryEntriesStart + u - 1, s => PostDirectory());
|
||||||
|
PreviousDirectoryLength = u;
|
||||||
|
});
|
||||||
|
|
||||||
|
EISC.SetStringSigAction(SDirectoryEntrySelectedName, s =>
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
directoryContactSelected = new
|
||||||
|
{
|
||||||
|
name = EISC.GetString(SDirectoryEntrySelectedName),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
EISC.SetStringSigAction(SDirectoryEntrySelectedNumber, s =>
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
directoryContactSelected = new
|
||||||
|
{
|
||||||
|
number = EISC.GetString(SDirectoryEntrySelectedNumber),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
EISC.SetStringSigAction(SDirectorySelectedFolderName, s => PostStatusMessage(new
|
||||||
|
{
|
||||||
|
directorySelectedFolderName = EISC.GetString(SDirectorySelectedFolderName)
|
||||||
|
}));
|
||||||
|
|
||||||
|
EISC.SetSigTrueAction(BCameraModeAuto, () => PostCameraMode());
|
||||||
|
EISC.SetSigTrueAction(BCameraModeManual, () => PostCameraMode());
|
||||||
|
EISC.SetSigTrueAction(BCameraModeOff, () => PostCameraMode());
|
||||||
|
|
||||||
|
EISC.SetUShortSigAction(UCameraNumberSelect, (u) => PostSelectedCamera());
|
||||||
|
|
||||||
|
|
||||||
|
// Add press and holds using helper action
|
||||||
|
Action<string, uint> addPHAction = (s, u) =>
|
||||||
|
AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
|
||||||
|
addPHAction("/cameraUp", BCameraControlUp);
|
||||||
|
addPHAction("/cameraDown", BCameraControlDown);
|
||||||
|
addPHAction("/cameraLeft", BCameraControlLeft);
|
||||||
|
addPHAction("/cameraRight", BCameraControlRight);
|
||||||
|
addPHAction("/cameraZoomIn", BCameraControlZoomIn);
|
||||||
|
addPHAction("/cameraZoomOut", BCameraControlZoomOut);
|
||||||
|
|
||||||
|
// Add straight pulse calls using helper action
|
||||||
|
Action<string, uint> addAction = (s, u) =>
|
||||||
|
AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
|
||||||
|
addAction("/endCallById", BDialHangup);
|
||||||
|
addAction("/acceptById", BIncomingAnswer);
|
||||||
|
addAction("/rejectById", BIncomingReject);
|
||||||
|
addAction("/speedDial1", BSpeedDial1);
|
||||||
|
addAction("/speedDial2", BSpeedDial2);
|
||||||
|
addAction("/speedDial3", BSpeedDial3);
|
||||||
|
addAction("/speedDial4", BSpeedDial4);
|
||||||
|
addAction("/cameraModeAuto", BCameraModeAuto);
|
||||||
|
addAction("/cameraModeManual", BCameraModeManual);
|
||||||
|
addAction("/cameraModeOff", BCameraModeOff);
|
||||||
|
|
||||||
|
asc.AddAction("/cameraSelect", new Action<string>(SelectCamera));
|
||||||
|
|
||||||
|
// camera presets
|
||||||
|
for(uint i = 0; i < 6; i++)
|
||||||
|
{
|
||||||
|
addAction("/cameraPreset" + (i + 1), BCameraPresetStart + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
asc.AddAction(MessagePath + "/isReady", new Action(PostIsReady));
|
||||||
|
// Get status
|
||||||
|
asc.AddAction(MessagePath + "/fullStatus", new Action(PostFullStatus));
|
||||||
|
// Dial on string
|
||||||
|
asc.AddAction(MessagePath + "/dial", new Action<string>(s =>
|
||||||
|
EISC.SetString(SCurrentDialString, s)));
|
||||||
|
// Pulse DTMF
|
||||||
|
asc.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
|
||||||
|
{
|
||||||
|
if (DTMFMap.ContainsKey(s))
|
||||||
|
{
|
||||||
|
EISC.PulseBool(DTMFMap[s], 100);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Directory madness
|
||||||
|
asc.AddAction(MessagePath + "/directoryRoot", new Action(() => EISC.PulseBool(BDirectoryRoot)));
|
||||||
|
asc.AddAction(MessagePath + "/directoryBack", new Action(() => EISC.PulseBool(BDirectoryFolderBack)));
|
||||||
|
asc.AddAction(MessagePath + "/directoryById", new Action<string>(s =>
|
||||||
|
{
|
||||||
|
// the id should contain the line number to forward to simpl
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var u = ushort.Parse(s);
|
||||||
|
EISC.SetUshort(UDirectorySelectRow, u);
|
||||||
|
EISC.PulseBool(BDirectoryLineSelected);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, Debug.ErrorLogLevel.Warning,
|
||||||
|
"/directoryById request contains non-numeric ID incompatible with DDVC bridge");
|
||||||
|
}
|
||||||
|
|
||||||
|
}));
|
||||||
|
asc.AddAction(MessagePath + "/directorySelectContact", new Action<string>(s =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var u = ushort.Parse(s);
|
||||||
|
EISC.SetUshort(UDirectorySelectRow, u);
|
||||||
|
EISC.PulseBool(BDirectoryLineSelected);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
asc.AddAction(MessagePath + "/directoryDialContact", new Action(() => {
|
||||||
|
EISC.PulseBool(BDirectoryDialSelectedLine);
|
||||||
|
}));
|
||||||
|
asc.AddAction(MessagePath + "/getDirectory", new Action(() =>
|
||||||
|
{
|
||||||
|
if (EISC.GetUshort(UDirectoryRowCount) > 0)
|
||||||
|
{
|
||||||
|
PostDirectory();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EISC.PulseBool(BDirectoryRoot);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
void PostFullStatus()
|
||||||
|
{
|
||||||
|
this.PostStatusMessage(new
|
||||||
|
{
|
||||||
|
calls = GetCurrentCallList(),
|
||||||
|
cameraMode = GetCameraMode(),
|
||||||
|
currentCallString = EISC.GetString(SCurrentCallNumber),
|
||||||
|
currentDialString = EISC.GetString(SCurrentDialString),
|
||||||
|
directoryContactSelected = new
|
||||||
|
{
|
||||||
|
name = EISC.GetString(SDirectoryEntrySelectedName),
|
||||||
|
number = EISC.GetString(SDirectoryEntrySelectedNumber)
|
||||||
|
},
|
||||||
|
directorySelectedFolderName = EISC.GetString(SDirectorySelectedFolderName),
|
||||||
|
isInCall = EISC.GetString(SHookState) == "Connected",
|
||||||
|
hasDirectory = true,
|
||||||
|
hasDirectorySearch = false,
|
||||||
|
hasRecents = true,
|
||||||
|
hasCameras = true,
|
||||||
|
selectedCamera = GetSelectedCamera(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
void PostDirectory()
|
||||||
|
{
|
||||||
|
var u = EISC.GetUshort(UDirectoryRowCount);
|
||||||
|
var items = new List<object>();
|
||||||
|
for (uint i = 0; i < u; i++)
|
||||||
|
{
|
||||||
|
var name = EISC.GetString(SDirectoryEntriesStart + i);
|
||||||
|
var id = (i + 1).ToString();
|
||||||
|
// is folder or contact?
|
||||||
|
if (name.StartsWith("[+]"))
|
||||||
|
{
|
||||||
|
items.Add(new
|
||||||
|
{
|
||||||
|
folderId = id,
|
||||||
|
name = name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
items.Add(new
|
||||||
|
{
|
||||||
|
contactId = id,
|
||||||
|
name = name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var directoryMessage = new
|
||||||
|
{
|
||||||
|
currentDirectory = new
|
||||||
|
{
|
||||||
|
isRootDirectory = EISC.GetBool(BDirectoryIsRoot),
|
||||||
|
directoryResults = items
|
||||||
|
}
|
||||||
|
};
|
||||||
|
PostStatusMessage(directoryMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
void PostCameraMode()
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
cameraMode = GetCameraMode()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mode"></param>
|
||||||
|
string GetCameraMode()
|
||||||
|
{
|
||||||
|
string m;
|
||||||
|
if (EISC.GetBool(BCameraModeAuto)) m = "auto";
|
||||||
|
else if (EISC.GetBool(BCameraModeManual)) m = "manual";
|
||||||
|
else m = "off";
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PostSelectedCamera()
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
selectedCamera = GetSelectedCamera()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
string GetSelectedCamera()
|
||||||
|
{
|
||||||
|
var num = EISC.GetUshort(UCameraNumberSelect);
|
||||||
|
string m;
|
||||||
|
if (num == 100)
|
||||||
|
{
|
||||||
|
m = "cameraFar";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m = "camera" + num;
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
void PostIsReady()
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
isReady = true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
void PostCallsList()
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
calls = GetCurrentCallList(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="s"></param>
|
||||||
|
void SelectCamera(string s)
|
||||||
|
{
|
||||||
|
var cam = s.Substring(6);
|
||||||
|
if (cam.ToLower() == "far")
|
||||||
|
{
|
||||||
|
EISC.SetUshort(UCameraNumberSelect, 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EISC.SetUshort(UCameraNumberSelect, UInt16.Parse(cam));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turns the
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<CodecActiveCallItem> GetCurrentCallList()
|
||||||
|
{
|
||||||
|
var list = new List<CodecActiveCallItem>();
|
||||||
|
if (CurrentCallItem.Status != eCodecCallStatus.Disconnected)
|
||||||
|
{
|
||||||
|
list.Add(CurrentCallItem);
|
||||||
|
}
|
||||||
|
if (EISC.GetBool(BCallIncoming)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,8 +40,11 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void ProgramInfoChanged(object sender, ProgramInfoEventArgs e)
|
void ProgramInfoChanged(object sender, ProgramInfoEventArgs e)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Posting Status Message: {0}", e.ProgramInfo.ToString());
|
if (e.ProgramInfo != null)
|
||||||
PostStatusMessage(e.ProgramInfo);
|
{
|
||||||
|
//Debug.Console(1, "Posting Status Message: {0}", e.ProgramInfo.ToString());
|
||||||
|
PostStatusMessage(e.ProgramInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
if (dirCodec != null)
|
if (dirCodec != null)
|
||||||
{
|
{
|
||||||
dirCodec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dirCodec_DirectoryResultReturned);
|
dirCodec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dirCodec_DirectoryResultReturned);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var recCodec = codec as IHasCallHistory;
|
var recCodec = codec as IHasCallHistory;
|
||||||
@@ -74,12 +75,73 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void dirCodec_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
void dirCodec_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
||||||
{
|
{
|
||||||
PostStatusMessage(new
|
SendDirectory((Codec as IHasDirectory).CurrentDirectoryResult, e.DirectoryIsOnRoot);
|
||||||
{
|
|
||||||
currentDirectory = e.Directory
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Posts the current directory
|
||||||
|
/// </summary>
|
||||||
|
void SendDirectory(CodecDirectory directory, bool isRoot)
|
||||||
|
{
|
||||||
|
var dirCodec = Codec as IHasDirectory;
|
||||||
|
|
||||||
|
if (dirCodec != null)
|
||||||
|
{
|
||||||
|
var prefixedDirectoryResults = PrefixDirectoryFolderItems(directory);
|
||||||
|
|
||||||
|
var directoryMessage = new
|
||||||
|
{
|
||||||
|
currentDirectory = new
|
||||||
|
{
|
||||||
|
directoryResults = prefixedDirectoryResults,
|
||||||
|
isRootDirectory = isRoot
|
||||||
|
}
|
||||||
|
};
|
||||||
|
PostStatusMessage(directoryMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Iterates a directory object and prefixes any folder items with "[+] "
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="directory"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<DirectoryItem> PrefixDirectoryFolderItems (CodecDirectory directory)
|
||||||
|
{
|
||||||
|
var tempDirectoryList = new List<DirectoryItem>();
|
||||||
|
|
||||||
|
if (directory.CurrentDirectoryResults.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in directory.CurrentDirectoryResults)
|
||||||
|
{
|
||||||
|
if (item is DirectoryFolder)
|
||||||
|
{
|
||||||
|
var newFolder = new DirectoryFolder();
|
||||||
|
|
||||||
|
newFolder = (DirectoryFolder)item.Clone();
|
||||||
|
|
||||||
|
string prefixName = "[+] " + newFolder.Name;
|
||||||
|
|
||||||
|
newFolder.Name = prefixName;
|
||||||
|
|
||||||
|
tempDirectoryList.Add(newFolder);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tempDirectoryList.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// DirectoryItem noResults = new DirectoryItem() { Name = "No Results Found" };
|
||||||
|
|
||||||
|
// tempDirectoryList.Add(noResults);
|
||||||
|
//}
|
||||||
|
|
||||||
|
return tempDirectoryList;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -122,10 +184,24 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
if (call != null)
|
if (call != null)
|
||||||
Codec.AcceptCall(call);
|
Codec.AcceptCall(call);
|
||||||
}));
|
}));
|
||||||
appServerController.AddAction(MessagePath + "/directoryRoot", new Action(GetDirectoryRoot));
|
|
||||||
appServerController.AddAction(MessagePath + "/directoryById", new Action<string>(s => GetDirectory(s)));
|
// Directory actions
|
||||||
appServerController.AddAction(MessagePath + "/directorySearch", new Action<string>(s => DirectorySearch(s)));
|
var dirCodec = Codec as IHasDirectory;
|
||||||
appServerController.AddAction(MessagePath + "/getCallHistory", new Action(GetCallHistory));
|
if (dirCodec != null)
|
||||||
|
{
|
||||||
|
appServerController.AddAction(MessagePath + "/getDirectory", new Action(GetDirectoryRoot));
|
||||||
|
appServerController.AddAction(MessagePath + "/directoryById", new Action<string>(s => GetDirectory(s)));
|
||||||
|
appServerController.AddAction(MessagePath + "/directorySearch", new Action<string>(s => DirectorySearch(s)));
|
||||||
|
appServerController.AddAction(MessagePath + "/directoryBack", new Action(GetPreviousDirectory));
|
||||||
|
}
|
||||||
|
|
||||||
|
// History actions
|
||||||
|
var recCodec = Codec as IHasCallHistory;
|
||||||
|
if (recCodec != null)
|
||||||
|
{
|
||||||
|
appServerController.AddAction(MessagePath + "/getCallHistory", new Action(GetCallHistory));
|
||||||
|
}
|
||||||
|
|
||||||
appServerController.AddAction(MessagePath + "/privacyModeOn", new Action(Codec.PrivacyModeOn));
|
appServerController.AddAction(MessagePath + "/privacyModeOn", new Action(Codec.PrivacyModeOn));
|
||||||
appServerController.AddAction(MessagePath + "/privacyModeOff", new Action(Codec.PrivacyModeOff));
|
appServerController.AddAction(MessagePath + "/privacyModeOff", new Action(Codec.PrivacyModeOff));
|
||||||
appServerController.AddAction(MessagePath + "/privacyModeToggle", new Action(Codec.PrivacyModeToggle));
|
appServerController.AddAction(MessagePath + "/privacyModeToggle", new Action(Codec.PrivacyModeToggle));
|
||||||
@@ -215,12 +291,28 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PostStatusMessage(new
|
dirCodec.SetCurrentDirectoryToRoot();
|
||||||
{
|
|
||||||
currentDirectory = dirCodec.DirectoryRoot
|
//PostStatusMessage(new
|
||||||
});
|
//{
|
||||||
|
// currentDirectory = dirCodec.DirectoryRoot
|
||||||
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Requests the parent folder contents
|
||||||
|
/// </summary>
|
||||||
|
void GetPreviousDirectory()
|
||||||
|
{
|
||||||
|
var dirCodec = Codec as IHasDirectory;
|
||||||
|
if (dirCodec == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dirCodec.GetDirectoryParentFolderContents();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handler for codec changes
|
/// Handler for codec changes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -271,6 +363,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
},
|
},
|
||||||
showSelfViewByDefault = Codec.ShowSelfViewByDefault,
|
showSelfViewByDefault = Codec.ShowSelfViewByDefault,
|
||||||
hasDirectory = Codec is IHasDirectory,
|
hasDirectory = Codec is IHasDirectory,
|
||||||
|
hasDirectorySearch = true,
|
||||||
hasRecents = Codec is IHasCallHistory,
|
hasRecents = Codec is IHasCallHistory,
|
||||||
hasCameras = Codec is IHasCameraControl
|
hasCameras = Codec is IHasCameraControl
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -56,7 +56,10 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
/// 1
|
/// 1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint MasterVolumeMuteToggle = 1;
|
public const uint MasterVolumeMuteToggle = 1;
|
||||||
|
/// <summary>
|
||||||
|
/// 1
|
||||||
|
/// </summary>
|
||||||
|
public const uint VolumeMutesJoinStart = 1;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 61
|
/// 61
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -72,7 +75,7 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 72
|
/// 72
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SourceHasChanged = 72;
|
public const uint SourceHasChanged = 71;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 261 - The start of the range of speed dial visibles
|
/// 261 - The start of the range of speed dial visibles
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -81,6 +84,11 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
/// 501
|
/// 501
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint ConfigIsReady = 501;
|
public const uint ConfigIsReady = 501;
|
||||||
|
/// <summary>
|
||||||
|
/// 601
|
||||||
|
/// </summary>
|
||||||
|
public const uint SourceShareDisableStartJoin = 601;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UshortJoin
|
public class UshortJoin
|
||||||
@@ -89,15 +97,26 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
/// 1
|
/// 1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint MasterVolumeLevel = 1;
|
public const uint MasterVolumeLevel = 1;
|
||||||
|
/// <summary>
|
||||||
|
/// 1
|
||||||
|
/// </summary>
|
||||||
|
public const uint VolumeSlidersJoinStart = 1;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 61
|
/// 61
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint ShutdownPromptDuration = 61;
|
public const uint ShutdownPromptDuration = 61;
|
||||||
|
/// <summary>
|
||||||
|
/// 101
|
||||||
|
/// </summary>
|
||||||
|
public const uint VolumeSliderCount = 101;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StringJoin
|
public class StringJoin
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 1
|
||||||
|
/// </summary>
|
||||||
|
public const uint VolumeSliderNamesJoinStart = 1;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 71
|
/// 71
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -141,6 +160,38 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
/// 402
|
/// 402
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint ServerUrl = 402;
|
public const uint ServerUrl = 402;
|
||||||
|
/// <summary>
|
||||||
|
/// 512
|
||||||
|
/// </summary>
|
||||||
|
public const uint RoomSpeedDialNamesJoinStart = 512;
|
||||||
|
/// <summary>
|
||||||
|
/// 516
|
||||||
|
/// </summary>
|
||||||
|
public const uint RoomSpeedDialNumberssJoinStart = 516;
|
||||||
|
/// <summary>
|
||||||
|
/// 601
|
||||||
|
/// </summary>
|
||||||
|
public const uint SourceNameJoinStart = 601;
|
||||||
|
/// <summary>
|
||||||
|
/// 621
|
||||||
|
/// </summary>
|
||||||
|
public const uint SourceIconJoinStart = 621;
|
||||||
|
/// <summary>
|
||||||
|
/// 641
|
||||||
|
/// </summary>
|
||||||
|
public const uint SourceKeyJoinStart = 641;
|
||||||
|
/// <summary>
|
||||||
|
/// 661
|
||||||
|
/// </summary>
|
||||||
|
public const uint SourceTypeJoinStart = 661;
|
||||||
|
/// <summary>
|
||||||
|
/// 761
|
||||||
|
/// </summary>
|
||||||
|
public const uint CameraNearNameStart = 761;
|
||||||
|
/// <summary>
|
||||||
|
/// 770 - presence of this name on the input will cause the camera to be added
|
||||||
|
/// </summary>
|
||||||
|
public const uint CameraFarName = 770;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -166,6 +217,7 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
CotijaDdvc01DeviceBridge SourceBridge;
|
CotijaDdvc01DeviceBridge SourceBridge;
|
||||||
|
|
||||||
Ddvc01AtcMessenger AtcMessenger;
|
Ddvc01AtcMessenger AtcMessenger;
|
||||||
|
Ddvc01VtcMessenger VtcMessenger;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -204,10 +256,14 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
SetupFunctions();
|
SetupFunctions();
|
||||||
SetupFeedbacks();
|
SetupFeedbacks();
|
||||||
|
|
||||||
var key = this.Key + "-" + Parent.Key;
|
var atcKey = string.Format("atc-{0}-{1}", this.Key, Parent.Key);
|
||||||
AtcMessenger = new Ddvc01AtcMessenger(key, EISC, "/device/audioCodec");
|
AtcMessenger = new Ddvc01AtcMessenger(atcKey, EISC, "/device/audioCodec");
|
||||||
AtcMessenger.RegisterWithAppServer(Parent);
|
AtcMessenger.RegisterWithAppServer(Parent);
|
||||||
|
|
||||||
|
var vtcKey = string.Format("atc-{0}-{1}", this.Key, Parent.Key);
|
||||||
|
VtcMessenger = new Ddvc01VtcMessenger(vtcKey, EISC, "/device/videoCodec");
|
||||||
|
VtcMessenger.RegisterWithAppServer(Parent);
|
||||||
|
|
||||||
EISC.SigChange += EISC_SigChange;
|
EISC.SigChange += EISC_SigChange;
|
||||||
EISC.OnlineStatusChange += (o, a) =>
|
EISC.OnlineStatusChange += (o, a) =>
|
||||||
{
|
{
|
||||||
@@ -251,7 +307,6 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetupFunctions()
|
void SetupFunctions()
|
||||||
{
|
{
|
||||||
#warning need join numbers for these
|
|
||||||
Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(BoolJoin.PromptForCode)));
|
Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(BoolJoin.PromptForCode)));
|
||||||
Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(BoolJoin.ClientJoined)));
|
Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(BoolJoin.ClientJoined)));
|
||||||
|
|
||||||
@@ -397,7 +452,7 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
Debug.Console(0, this, "Replacing Room[0] in config");
|
Debug.Console(0, this, "Replacing Room[0] in config");
|
||||||
co.Rooms[0] = rm;
|
co.Rooms[0] = rm;
|
||||||
}
|
}
|
||||||
rm.Name = EISC.StringOutput[501].StringValue;
|
rm.Name = EISC.StringOutput[StringJoin.ConfigRoomName].StringValue;
|
||||||
rm.Key = "room1";
|
rm.Key = "room1";
|
||||||
rm.Type = "ddvc01";
|
rm.Type = "ddvc01";
|
||||||
|
|
||||||
@@ -408,15 +463,17 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
rmProps = JsonConvert.DeserializeObject<DDVC01RoomPropertiesConfig>(rm.Properties.ToString());
|
rmProps = JsonConvert.DeserializeObject<DDVC01RoomPropertiesConfig>(rm.Properties.ToString());
|
||||||
|
|
||||||
rmProps.Help = new EssentialsHelpPropertiesConfig();
|
rmProps.Help = new EssentialsHelpPropertiesConfig();
|
||||||
rmProps.Help.CallButtonText = EISC.StringOutput[503].StringValue;
|
rmProps.Help.CallButtonText = EISC.StringOutput[StringJoin.ConfigHelpNumber].StringValue;
|
||||||
rmProps.Help.Message = EISC.StringOutput[502].StringValue;
|
rmProps.Help.Message = EISC.StringOutput[StringJoin.ConfigHelpMessage].StringValue;
|
||||||
|
|
||||||
rmProps.Environment = new EssentialsEnvironmentPropertiesConfig(); // enabled defaults to false
|
rmProps.Environment = new EssentialsEnvironmentPropertiesConfig(); // enabled defaults to false
|
||||||
|
|
||||||
rmProps.RoomPhoneNumber = EISC.StringOutput[504].StringValue;
|
rmProps.RoomPhoneNumber = EISC.StringOutput[StringJoin.ConfigRoomPhoneNumber].StringValue;
|
||||||
rmProps.RoomURI = EISC.StringOutput[505].StringValue;
|
rmProps.RoomURI = EISC.StringOutput[StringJoin.ConfigRoomURI].StringValue;
|
||||||
rmProps.SpeedDials = new List<DDVC01SpeedDial>();
|
rmProps.SpeedDials = new List<DDVC01SpeedDial>();
|
||||||
// add speed dials as long as there are more - up to 4
|
// add speed dials as long as there are more - up to 4
|
||||||
|
|
||||||
|
#warning fix speed dials - 512-515 names, 516-519 numbers
|
||||||
for (uint i = 512; i <= 519; i = i + 2)
|
for (uint i = 512; i <= 519; i = i + 2)
|
||||||
{
|
{
|
||||||
var num = EISC.StringOutput[i].StringValue;
|
var num = EISC.StringOutput[i].StringValue;
|
||||||
@@ -428,10 +485,10 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
|
|
||||||
// This MAY need a check
|
// This MAY need a check
|
||||||
rmProps.AudioCodecKey = "audioCodec";
|
rmProps.AudioCodecKey = "audioCodec";
|
||||||
rmProps.VideoCodecKey = null; // "videoCodec";
|
rmProps.VideoCodecKey = "videoCodec";
|
||||||
|
|
||||||
// volume control names
|
// volume control names
|
||||||
var volCount = EISC.UShortOutput[701].UShortValue;
|
var volCount = EISC.UShortOutput[UshortJoin.VolumeSliderCount].UShortValue;
|
||||||
|
|
||||||
//// use Volumes object or?
|
//// use Volumes object or?
|
||||||
//rmProps.VolumeSliderNames = new List<string>();
|
//rmProps.VolumeSliderNames = new List<string>();
|
||||||
@@ -459,24 +516,39 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
|
|
||||||
co.SourceLists = new Dictionary<string,Dictionary<string,SourceListItem>>();
|
co.SourceLists = new Dictionary<string,Dictionary<string,SourceListItem>>();
|
||||||
var newSl = new Dictionary<string, SourceListItem>();
|
var newSl = new Dictionary<string, SourceListItem>();
|
||||||
// add sources...
|
// add "none" source if VTC present
|
||||||
for (uint i = 0; i<= 19; i++)
|
|
||||||
|
if (!string.IsNullOrEmpty(rmProps.VideoCodecKey))
|
||||||
{
|
{
|
||||||
var name = EISC.StringOutput[601 + i].StringValue;
|
var codecOsd = new SourceListItem()
|
||||||
|
{
|
||||||
|
Name = "None",
|
||||||
|
IncludeInSourceList = true,
|
||||||
|
Order = 1,
|
||||||
|
Type = eSourceListItemType.Route,
|
||||||
|
SourceKey = ""
|
||||||
|
};
|
||||||
|
newSl.Add("Source-None", codecOsd);
|
||||||
|
}
|
||||||
|
// add sources...
|
||||||
|
for (uint i = 0; i <= 19; i++)
|
||||||
|
{
|
||||||
|
var name = EISC.StringOutput[StringJoin.SourceNameJoinStart + i].StringValue;
|
||||||
if(string.IsNullOrEmpty(name))
|
if(string.IsNullOrEmpty(name))
|
||||||
break;
|
break;
|
||||||
var icon = EISC.StringOutput[651 + i].StringValue;
|
var icon = EISC.StringOutput[StringJoin.SourceIconJoinStart + i].StringValue;
|
||||||
var key = EISC.StringOutput[671 + i].StringValue;
|
var key = EISC.StringOutput[StringJoin.SourceKeyJoinStart + i].StringValue;
|
||||||
|
var type = EISC.StringOutput[StringJoin.SourceTypeJoinStart + i].StringValue;
|
||||||
var type = EISC.StringOutput[701 + i].StringValue;
|
var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableStartJoin + i].BoolValue;
|
||||||
|
|
||||||
Debug.Console(0, this, "Adding source {0} '{1}'", key, name);
|
Debug.Console(0, this, "Adding source {0} '{1}'", key, name);
|
||||||
var newSLI = new SourceListItem{
|
var newSLI = new SourceListItem{
|
||||||
Icon = icon,
|
Icon = icon,
|
||||||
Name = name,
|
Name = name,
|
||||||
Order = (int)i + 1,
|
Order = (int)i + 10,
|
||||||
SourceKey = key,
|
SourceKey = key,
|
||||||
Type = eSourceListItemType.Route
|
Type = eSourceListItemType.Route,
|
||||||
|
DisableCodecSharing = disableShare,
|
||||||
};
|
};
|
||||||
newSl.Add(key, newSLI);
|
newSl.Add(key, newSLI);
|
||||||
|
|
||||||
@@ -536,7 +608,68 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
Properties = JToken.FromObject(acProps)
|
Properties = JToken.FromObject(acProps)
|
||||||
};
|
};
|
||||||
co.Devices.Add(acConf);
|
co.Devices.Add(acConf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(rmProps.VideoCodecKey))
|
||||||
|
{
|
||||||
|
#warning Break out these video codec favs
|
||||||
|
var favs = new List<PepperDash.Essentials.Devices.Common.Codec.CodecActiveCallItem>();
|
||||||
|
for (uint i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if (!EISC.GetBool(BoolJoin.SpeedDialVisibleStartJoin + i))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
favs.Add(new PepperDash.Essentials.Devices.Common.Codec.CodecActiveCallItem()
|
||||||
|
{
|
||||||
|
Name = EISC.GetString(StringJoin.SpeedDialNameStartJoin + i),
|
||||||
|
Number = EISC.GetString(StringJoin.SpeedDialNumberStartJoin + i),
|
||||||
|
Type = PepperDash.Essentials.Devices.Common.Codec.eCodecCallType.Audio
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// cameras
|
||||||
|
var camsProps = new List<object>();
|
||||||
|
for (uint i = 0; i < 9; i++)
|
||||||
|
{
|
||||||
|
var name = EISC.GetString(i + StringJoin.CameraNearNameStart);
|
||||||
|
if (!string.IsNullOrEmpty(name))
|
||||||
|
{
|
||||||
|
camsProps.Add(new
|
||||||
|
{
|
||||||
|
name = name,
|
||||||
|
selector = "camera" + (i + 1),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var farName = EISC.GetString(StringJoin.CameraFarName);
|
||||||
|
if (!string.IsNullOrEmpty(farName))
|
||||||
|
{
|
||||||
|
camsProps.Add(new
|
||||||
|
{
|
||||||
|
name = farName,
|
||||||
|
selector = "cameraFar",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var props = new
|
||||||
|
{
|
||||||
|
favorites = favs,
|
||||||
|
cameras = camsProps,
|
||||||
|
};
|
||||||
|
var str = "videoCodec";
|
||||||
|
var conf = new DeviceConfig()
|
||||||
|
{
|
||||||
|
Group = str,
|
||||||
|
Key = str,
|
||||||
|
Name = str,
|
||||||
|
Type = str,
|
||||||
|
Properties = JToken.FromObject(props)
|
||||||
|
};
|
||||||
|
co.Devices.Add(conf);
|
||||||
|
}
|
||||||
|
|
||||||
Debug.Console(0, this, "******* CONFIG FROM DDVC: \r{0}", JsonConvert.SerializeObject(ConfigReader.ConfigObject, Formatting.Indented));
|
Debug.Console(0, this, "******* CONFIG FROM DDVC: \r{0}", JsonConvert.SerializeObject(ConfigReader.ConfigObject, Formatting.Indented));
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
public AudioCodecBaseMessenger ACMessenger { get; private set; }
|
public AudioCodecBaseMessenger ACMessenger { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using PepperDash.Essentials.Devices.Common;
|
|||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
using PepperDash.Essentials.Core.CrestronIO;
|
||||||
using PepperDash.Essentials.DM;
|
using PepperDash.Essentials.DM;
|
||||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
//using PepperDash.Essentials.Devices.Common.Cameras;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
namespace PepperDash.Essentials.Bridges
|
||||||
{
|
{
|
||||||
@@ -88,16 +88,16 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
(device as GenericComm).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
(device as GenericComm).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (device is CameraBase)
|
//else if (device is CameraBase)
|
||||||
{
|
//{
|
||||||
(device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
// (device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
else if (device is PepperDash.Essentials.Core.TwoWayDisplayBase)
|
//else if (device is PepperDash.Essentials.Core.TwoWayDisplayBase)
|
||||||
{
|
//{
|
||||||
(device as TwoWayDisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
// (device as TwoWayDisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
else if (device is DmChassisController)
|
else if (device is DmChassisController)
|
||||||
{
|
{
|
||||||
(device as DmChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
(device as DmChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
@@ -124,16 +124,16 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
(device as IDigitalInput).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
(device as IDigitalInput).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (device is LightingBase)
|
//else if (device is LightingBase)
|
||||||
{
|
//{
|
||||||
(device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
// (device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
else if (device is DigitalLogger)
|
//else if (device is DigitalLogger)
|
||||||
{
|
//{
|
||||||
(device as DigitalLogger).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
// (device as DigitalLogger).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,187 +1,187 @@
|
|||||||
using System;
|
//using System;
|
||||||
using System.Collections.Generic;
|
//using System.Collections.Generic;
|
||||||
using System.Linq;
|
//using System.Linq;
|
||||||
using System.Text;
|
//using System.Text;
|
||||||
using Crestron.SimplSharp;
|
//using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
//using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
//using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
//using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
//namespace PepperDash.Essentials.Bridges
|
||||||
{
|
//{
|
||||||
public static class CameraControllerApiExtensions
|
// public static class CameraControllerApiExtensions
|
||||||
{
|
// {
|
||||||
|
|
||||||
public static BasicTriList _TriList;
|
// public static BasicTriList _TriList;
|
||||||
public static CameraControllerJoinMap JoinMap;
|
// public static CameraControllerJoinMap JoinMap;
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
// public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
// {
|
||||||
JoinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as CameraControllerJoinMap;
|
// JoinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as CameraControllerJoinMap;
|
||||||
|
|
||||||
_TriList = trilist;
|
// _TriList = trilist;
|
||||||
if (JoinMap == null)
|
// if (JoinMap == null)
|
||||||
{
|
// {
|
||||||
JoinMap = new CameraControllerJoinMap();
|
// JoinMap = new CameraControllerJoinMap();
|
||||||
}
|
// }
|
||||||
|
|
||||||
JoinMap.OffsetJoinNumbers(joinStart);
|
// JoinMap.OffsetJoinNumbers(joinStart);
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
// Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
|
// Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
var commMonitor = cameraDevice as ICommunicationMonitor;
|
// var commMonitor = cameraDevice as ICommunicationMonitor;
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
|
// commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
|
||||||
|
|
||||||
|
|
||||||
trilist.SetBoolSigAction(JoinMap.Left, (b) =>
|
// trilist.SetBoolSigAction(JoinMap.Left, (b) =>
|
||||||
{
|
// {
|
||||||
if (b)
|
// if (b)
|
||||||
{
|
// {
|
||||||
cameraDevice.PanLeft();
|
// cameraDevice.PanLeft();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
cameraDevice.Stop();
|
// cameraDevice.Stop();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
trilist.SetBoolSigAction(JoinMap.Right, (b) =>
|
// trilist.SetBoolSigAction(JoinMap.Right, (b) =>
|
||||||
{
|
// {
|
||||||
if (b)
|
// if (b)
|
||||||
{
|
// {
|
||||||
cameraDevice.PanRight();
|
// cameraDevice.PanRight();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
cameraDevice.Stop();
|
// cameraDevice.Stop();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
trilist.SetBoolSigAction(JoinMap.Up, (b) =>
|
// trilist.SetBoolSigAction(JoinMap.Up, (b) =>
|
||||||
{
|
// {
|
||||||
if (b)
|
// if (b)
|
||||||
{
|
// {
|
||||||
cameraDevice.TiltUp();
|
// cameraDevice.TiltUp();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
cameraDevice.Stop();
|
// cameraDevice.Stop();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
trilist.SetBoolSigAction(JoinMap.Down, (b) =>
|
// trilist.SetBoolSigAction(JoinMap.Down, (b) =>
|
||||||
{
|
// {
|
||||||
if (b)
|
// if (b)
|
||||||
{
|
// {
|
||||||
cameraDevice.TiltDown();
|
// cameraDevice.TiltDown();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
cameraDevice.Stop();
|
// cameraDevice.Stop();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
trilist.SetBoolSigAction(JoinMap.ZoomIn, (b) =>
|
// trilist.SetBoolSigAction(JoinMap.ZoomIn, (b) =>
|
||||||
{
|
// {
|
||||||
if (b)
|
// if (b)
|
||||||
{
|
// {
|
||||||
cameraDevice.ZoomIn();
|
// cameraDevice.ZoomIn();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
cameraDevice.Stop();
|
// cameraDevice.Stop();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
trilist.SetBoolSigAction(JoinMap.ZoomOut, (b) =>
|
// trilist.SetBoolSigAction(JoinMap.ZoomOut, (b) =>
|
||||||
{
|
// {
|
||||||
if (b)
|
// if (b)
|
||||||
{
|
// {
|
||||||
cameraDevice.ZoomOut();
|
// cameraDevice.ZoomOut();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
cameraDevice.Stop();
|
// cameraDevice.Stop();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
if (cameraDevice.GetType().Name.ToString().ToLower() == "cameravisca")
|
// if (cameraDevice.GetType().Name.ToString().ToLower() == "cameravisca")
|
||||||
{
|
// {
|
||||||
var viscaCamera = cameraDevice as PepperDash.Essentials.Devices.Common.Cameras.CameraVisca;
|
// var viscaCamera = cameraDevice as PepperDash.Essentials.Devices.Common.Cameras.CameraVisca;
|
||||||
trilist.SetSigTrueAction(JoinMap.PowerOn, () => viscaCamera.PowerOn());
|
// trilist.SetSigTrueAction(JoinMap.PowerOn, () => viscaCamera.PowerOn());
|
||||||
trilist.SetSigTrueAction(JoinMap.PowerOff, () => viscaCamera.PowerOff());
|
// trilist.SetSigTrueAction(JoinMap.PowerOff, () => viscaCamera.PowerOff());
|
||||||
|
|
||||||
viscaCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.PowerOn]);
|
// viscaCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.PowerOn]);
|
||||||
viscaCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[JoinMap.PowerOff]);
|
// viscaCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[JoinMap.PowerOff]);
|
||||||
|
|
||||||
viscaCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
|
// viscaCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
|
||||||
for (int i = 0; i < JoinMap.NumberOfPresets; i++)
|
// for (int i = 0; i < JoinMap.NumberOfPresets; i++)
|
||||||
{
|
// {
|
||||||
int tempNum = i;
|
// int tempNum = i;
|
||||||
trilist.SetSigTrueAction((ushort)(JoinMap.PresetRecallOffset + tempNum), () =>
|
// trilist.SetSigTrueAction((ushort)(JoinMap.PresetRecallOffset + tempNum), () =>
|
||||||
{
|
// {
|
||||||
viscaCamera.RecallPreset(tempNum);
|
// viscaCamera.RecallPreset(tempNum);
|
||||||
});
|
// });
|
||||||
trilist.SetSigTrueAction((ushort)(JoinMap.PresetSaveOffset + tempNum), () =>
|
// trilist.SetSigTrueAction((ushort)(JoinMap.PresetSaveOffset + tempNum), () =>
|
||||||
{
|
// {
|
||||||
viscaCamera.SavePreset(tempNum);
|
// viscaCamera.SavePreset(tempNum);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
public class CameraControllerJoinMap : JoinMapBase
|
// public class CameraControllerJoinMap : JoinMapBase
|
||||||
{
|
// {
|
||||||
public uint IsOnline { get; set; }
|
// public uint IsOnline { get; set; }
|
||||||
public uint PowerOff { get; set; }
|
// public uint PowerOff { get; set; }
|
||||||
public uint PowerOn { get; set; }
|
// public uint PowerOn { get; set; }
|
||||||
public uint Up { get; set; }
|
// public uint Up { get; set; }
|
||||||
public uint Down { get; set; }
|
// public uint Down { get; set; }
|
||||||
public uint Left { get; set; }
|
// public uint Left { get; set; }
|
||||||
public uint Right { get; set; }
|
// public uint Right { get; set; }
|
||||||
public uint ZoomIn { get; set; }
|
// public uint ZoomIn { get; set; }
|
||||||
public uint ZoomOut { get; set; }
|
// public uint ZoomOut { get; set; }
|
||||||
public uint PresetRecallOffset { get; set; }
|
// public uint PresetRecallOffset { get; set; }
|
||||||
public uint PresetSaveOffset { get; set; }
|
// public uint PresetSaveOffset { get; set; }
|
||||||
public uint NumberOfPresets { get; set; }
|
// public uint NumberOfPresets { get; set; }
|
||||||
|
|
||||||
public CameraControllerJoinMap()
|
// public CameraControllerJoinMap()
|
||||||
{
|
// {
|
||||||
// Digital
|
// // Digital
|
||||||
IsOnline = 9;
|
// IsOnline = 9;
|
||||||
PowerOff = 8;
|
// PowerOff = 8;
|
||||||
PowerOn = 7;
|
// PowerOn = 7;
|
||||||
Up = 1;
|
// Up = 1;
|
||||||
Down = 2;
|
// Down = 2;
|
||||||
Left = 3;
|
// Left = 3;
|
||||||
Right = 4;
|
// Right = 4;
|
||||||
ZoomIn = 5;
|
// ZoomIn = 5;
|
||||||
ZoomOut = 6;
|
// ZoomOut = 6;
|
||||||
PresetRecallOffset = 10;
|
// PresetRecallOffset = 10;
|
||||||
PresetSaveOffset = 30;
|
// PresetSaveOffset = 30;
|
||||||
NumberOfPresets = 5;
|
// NumberOfPresets = 5;
|
||||||
// Analog
|
// // Analog
|
||||||
}
|
// }
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
// public override void OffsetJoinNumbers(uint joinStart)
|
||||||
{
|
// {
|
||||||
var joinOffset = joinStart - 1;
|
// var joinOffset = joinStart - 1;
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
// IsOnline = IsOnline + joinOffset;
|
||||||
PowerOff = PowerOff + joinOffset;
|
// PowerOff = PowerOff + joinOffset;
|
||||||
PowerOn = PowerOn + joinOffset;
|
// PowerOn = PowerOn + joinOffset;
|
||||||
Up = Up + joinOffset;
|
// Up = Up + joinOffset;
|
||||||
Down = Down + joinOffset;
|
// Down = Down + joinOffset;
|
||||||
Left = Left + joinOffset;
|
// Left = Left + joinOffset;
|
||||||
Right = Right + joinOffset;
|
// Right = Right + joinOffset;
|
||||||
ZoomIn = ZoomIn + joinOffset;
|
// ZoomIn = ZoomIn + joinOffset;
|
||||||
ZoomOut = ZoomOut + joinOffset;
|
// ZoomOut = ZoomOut + joinOffset;
|
||||||
PresetRecallOffset = PresetRecallOffset + joinOffset;
|
// PresetRecallOffset = PresetRecallOffset + joinOffset;
|
||||||
PresetSaveOffset = PresetSaveOffset + joinOffset;
|
// PresetSaveOffset = PresetSaveOffset + joinOffset;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
@@ -1,77 +1,77 @@
|
|||||||
using System;
|
//using System;
|
||||||
using System.Collections.Generic;
|
//using System.Collections.Generic;
|
||||||
using System.Linq;
|
//using System.Linq;
|
||||||
using System.Text;
|
//using System.Text;
|
||||||
using Crestron.SimplSharp;
|
//using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
//using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
//using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
//using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
//namespace PepperDash.Essentials.Bridges
|
||||||
{
|
//{
|
||||||
public static class DigitalLoggerApiExtensions
|
// public static class DigitalLoggerApiExtensions
|
||||||
{
|
// {
|
||||||
public static void LinkToApi(this DigitalLogger DigitalLogger, BasicTriList trilist, uint joinStart, string joinMapKey)
|
// public static void LinkToApi(this DigitalLogger DigitalLogger, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
// {
|
||||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DigitalLoggerJoinMap;
|
// var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DigitalLoggerJoinMap;
|
||||||
|
|
||||||
if (joinMap == null)
|
// if (joinMap == null)
|
||||||
joinMap = new DigitalLoggerJoinMap();
|
// joinMap = new DigitalLoggerJoinMap();
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
// joinMap.OffsetJoinNumbers(joinStart);
|
||||||
Debug.Console(1, DigitalLogger, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
// Debug.Console(1, DigitalLogger, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
for (uint i = 1; i <= DigitalLogger.CircuitCount; i++)
|
// for (uint i = 1; i <= DigitalLogger.CircuitCount; i++)
|
||||||
{
|
// {
|
||||||
var circuit = i;
|
// var circuit = i;
|
||||||
DigitalLogger.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
// DigitalLogger.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
||||||
DigitalLogger.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
// DigitalLogger.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
||||||
DigitalLogger.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
// DigitalLogger.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => DigitalLogger.CycleCircuit(circuit - 1));
|
// trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => DigitalLogger.CycleCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => DigitalLogger.TurnOnCircuit(circuit - 1));
|
// trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => DigitalLogger.TurnOnCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => DigitalLogger.TurnOffCircuit(circuit - 1));
|
// trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => DigitalLogger.TurnOffCircuit(circuit - 1));
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
public class DigitalLoggerJoinMap : JoinMapBase
|
// public class DigitalLoggerJoinMap : JoinMapBase
|
||||||
{
|
// {
|
||||||
public uint IsOnline { get; set; }
|
// public uint IsOnline { get; set; }
|
||||||
public uint CircuitNames { get; set; }
|
// public uint CircuitNames { get; set; }
|
||||||
public uint CircuitState { get; set; }
|
// public uint CircuitState { get; set; }
|
||||||
public uint CircuitCycle { get; set; }
|
// public uint CircuitCycle { get; set; }
|
||||||
public uint CircuitIsCritical { get; set; }
|
// public uint CircuitIsCritical { get; set; }
|
||||||
public uint CircuitOnCmd { get; set; }
|
// public uint CircuitOnCmd { get; set; }
|
||||||
public uint CircuitOffCmd { get; set; }
|
// public uint CircuitOffCmd { get; set; }
|
||||||
public DigitalLoggerJoinMap()
|
// public DigitalLoggerJoinMap()
|
||||||
{
|
// {
|
||||||
// Digital
|
// // Digital
|
||||||
IsOnline = 9;
|
// IsOnline = 9;
|
||||||
CircuitState = 0;
|
// CircuitState = 0;
|
||||||
CircuitCycle = 0;
|
// CircuitCycle = 0;
|
||||||
CircuitIsCritical = 10;
|
// CircuitIsCritical = 10;
|
||||||
CircuitOnCmd = 10;
|
// CircuitOnCmd = 10;
|
||||||
CircuitOffCmd = 20;
|
// CircuitOffCmd = 20;
|
||||||
// Serial
|
// // Serial
|
||||||
CircuitNames = 0;
|
// CircuitNames = 0;
|
||||||
// Analog
|
// // Analog
|
||||||
}
|
// }
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
// public override void OffsetJoinNumbers(uint joinStart)
|
||||||
{
|
// {
|
||||||
var joinOffset = joinStart - 1;
|
// var joinOffset = joinStart - 1;
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
// IsOnline = IsOnline + joinOffset;
|
||||||
CircuitNames = CircuitNames + joinOffset;
|
// CircuitNames = CircuitNames + joinOffset;
|
||||||
CircuitState = CircuitState + joinOffset;
|
// CircuitState = CircuitState + joinOffset;
|
||||||
CircuitCycle = CircuitCycle + joinOffset;
|
// CircuitCycle = CircuitCycle + joinOffset;
|
||||||
CircuitIsCritical = CircuitIsCritical + joinOffset;
|
// CircuitIsCritical = CircuitIsCritical + joinOffset;
|
||||||
CircuitOnCmd = CircuitOnCmd + joinOffset;
|
// CircuitOnCmd = CircuitOnCmd + joinOffset;
|
||||||
CircuitOffCmd = CircuitOffCmd + joinOffset;
|
// CircuitOffCmd = CircuitOffCmd + joinOffset;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
//}
|
||||||
@@ -1,171 +1,171 @@
|
|||||||
using System;
|
//using System;
|
||||||
using System.Collections.Generic;
|
//using System.Collections.Generic;
|
||||||
using System.Linq;
|
//using System.Linq;
|
||||||
using System.Text;
|
//using System.Text;
|
||||||
using Crestron.SimplSharp;
|
//using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
//using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
//using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
//using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
//namespace PepperDash.Essentials.Bridges
|
||||||
{
|
//{
|
||||||
public static class DisplayControllerApiExtensions
|
// public static class DisplayControllerApiExtensions
|
||||||
{
|
// {
|
||||||
|
|
||||||
public static BasicTriList _TriList;
|
// public static BasicTriList _TriList;
|
||||||
public static DisplayControllerJoinMap JoinMap;
|
// public static DisplayControllerJoinMap JoinMap;
|
||||||
public static int InputNumber;
|
// public static int InputNumber;
|
||||||
public static IntFeedback InputNumberFeedback;
|
// public static IntFeedback InputNumberFeedback;
|
||||||
public static List<string> InputKeys = new List<string>();
|
// public static List<string> InputKeys = new List<string>();
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Core.TwoWayDisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
// public static void LinkToApi(this PepperDash.Essentials.Core.TwoWayDisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
// {
|
||||||
JoinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap;
|
// JoinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap;
|
||||||
_TriList = trilist;
|
// _TriList = trilist;
|
||||||
|
|
||||||
if (JoinMap == null)
|
// if (JoinMap == null)
|
||||||
{
|
// {
|
||||||
JoinMap = new DisplayControllerJoinMap();
|
// JoinMap = new DisplayControllerJoinMap();
|
||||||
}
|
// }
|
||||||
|
|
||||||
JoinMap.OffsetJoinNumbers(joinStart);
|
// JoinMap.OffsetJoinNumbers(joinStart);
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
// Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
Debug.Console(0, "Linking to Bridge Type {0}", displayDevice.GetType().Name.ToString());
|
// Debug.Console(0, "Linking to Bridge Type {0}", displayDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
trilist.StringInput[JoinMap.Name].StringValue = displayDevice.GetType().Name.ToString();
|
// trilist.StringInput[JoinMap.Name].StringValue = displayDevice.GetType().Name.ToString();
|
||||||
|
|
||||||
InputNumberFeedback = new IntFeedback(() => { return InputNumber;});
|
// InputNumberFeedback = new IntFeedback(() => { return InputNumber;});
|
||||||
InputNumberFeedback.LinkInputSig(trilist.UShortInput[JoinMap.InputSelect]);
|
// InputNumberFeedback.LinkInputSig(trilist.UShortInput[JoinMap.InputSelect]);
|
||||||
var commMonitor = displayDevice as ICommunicationMonitor;
|
// var commMonitor = displayDevice as ICommunicationMonitor;
|
||||||
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
|
// commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
|
||||||
|
|
||||||
// Poewer Off
|
// // Poewer Off
|
||||||
trilist.SetSigTrueAction(JoinMap.PowerOff, () =>
|
// trilist.SetSigTrueAction(JoinMap.PowerOff, () =>
|
||||||
{
|
// {
|
||||||
InputNumber = 102;
|
// InputNumber = 102;
|
||||||
InputNumberFeedback.FireUpdate();
|
// InputNumberFeedback.FireUpdate();
|
||||||
displayDevice.PowerOff();
|
// displayDevice.PowerOff();
|
||||||
});
|
// });
|
||||||
|
|
||||||
displayDevice.PowerIsOnFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(PowerIsOnFeedback_OutputChange);
|
// displayDevice.PowerIsOnFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(PowerIsOnFeedback_OutputChange);
|
||||||
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[JoinMap.PowerOff]);
|
// displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[JoinMap.PowerOff]);
|
||||||
|
|
||||||
// Poewer On
|
// // Poewer On
|
||||||
trilist.SetSigTrueAction(JoinMap.PowerOn, () =>
|
// trilist.SetSigTrueAction(JoinMap.PowerOn, () =>
|
||||||
{
|
// {
|
||||||
InputNumber = 0;
|
// InputNumber = 0;
|
||||||
InputNumberFeedback.FireUpdate();
|
// InputNumberFeedback.FireUpdate();
|
||||||
displayDevice.PowerOn();
|
// displayDevice.PowerOn();
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.PowerOn]);
|
// displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.PowerOn]);
|
||||||
|
|
||||||
int count = 1;
|
// int count = 1;
|
||||||
foreach (var input in displayDevice.InputPorts)
|
// foreach (var input in displayDevice.InputPorts)
|
||||||
{
|
// {
|
||||||
InputKeys.Add(input.Key.ToString());
|
// InputKeys.Add(input.Key.ToString());
|
||||||
var tempKey = InputKeys.ElementAt(count - 1);
|
// var tempKey = InputKeys.ElementAt(count - 1);
|
||||||
trilist.SetSigTrueAction((ushort)(JoinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); });
|
// trilist.SetSigTrueAction((ushort)(JoinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); });
|
||||||
trilist.StringInput[(ushort)(JoinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
|
// trilist.StringInput[(ushort)(JoinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
|
||||||
count++;
|
// count++;
|
||||||
}
|
// }
|
||||||
|
|
||||||
displayDevice.CurrentInputFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(CurrentInputFeedback_OutputChange);
|
// displayDevice.CurrentInputFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(CurrentInputFeedback_OutputChange);
|
||||||
trilist.SetUShortSigAction(JoinMap.InputSelect, (a) =>
|
// trilist.SetUShortSigAction(JoinMap.InputSelect, (a) =>
|
||||||
{
|
// {
|
||||||
if (a == 0)
|
// if (a == 0)
|
||||||
{
|
// {
|
||||||
displayDevice.PowerOff();
|
// displayDevice.PowerOff();
|
||||||
InputNumber = 0;
|
// InputNumber = 0;
|
||||||
}
|
// }
|
||||||
else if (a > 0 && a < displayDevice.InputPorts.Count && a != InputNumber)
|
// else if (a > 0 && a < displayDevice.InputPorts.Count && a != InputNumber)
|
||||||
{
|
// {
|
||||||
displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector);
|
// displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector);
|
||||||
InputNumber = a;
|
// InputNumber = a;
|
||||||
}
|
// }
|
||||||
else if (a == 102)
|
// else if (a == 102)
|
||||||
{
|
// {
|
||||||
displayDevice.PowerToggle();
|
// displayDevice.PowerToggle();
|
||||||
|
|
||||||
}
|
// }
|
||||||
InputNumberFeedback.FireUpdate();
|
// InputNumberFeedback.FireUpdate();
|
||||||
});
|
// });
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
static void CurrentInputFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
// static void CurrentInputFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
{
|
// {
|
||||||
|
|
||||||
Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", e.StringValue);
|
// Debug.Console(0, "CurrentInputFeedback_OutputChange {0}", e.StringValue);
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
static void PowerIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
// static void PowerIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
{
|
// {
|
||||||
|
|
||||||
// Debug.Console(0, "PowerIsOnFeedback_OutputChange {0}", e.BoolValue);
|
// // Debug.Console(0, "PowerIsOnFeedback_OutputChange {0}", e.BoolValue);
|
||||||
if (!e.BoolValue)
|
// if (!e.BoolValue)
|
||||||
{
|
// {
|
||||||
InputNumber = 102;
|
// InputNumber = 102;
|
||||||
InputNumberFeedback.FireUpdate();
|
// InputNumberFeedback.FireUpdate();
|
||||||
|
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
InputNumber = 0;
|
// InputNumber = 0;
|
||||||
InputNumberFeedback.FireUpdate();
|
// InputNumberFeedback.FireUpdate();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
public class DisplayControllerJoinMap : JoinMapBase
|
// public class DisplayControllerJoinMap : JoinMapBase
|
||||||
{
|
// {
|
||||||
public uint Name { get; set; }
|
// public uint Name { get; set; }
|
||||||
public uint InputNamesOffset { get; set; }
|
// public uint InputNamesOffset { get; set; }
|
||||||
public uint InputSelectOffset { get; set; }
|
// public uint InputSelectOffset { get; set; }
|
||||||
public uint IsOnline { get; set; }
|
// public uint IsOnline { get; set; }
|
||||||
public uint PowerOff { get; set; }
|
// public uint PowerOff { get; set; }
|
||||||
public uint InputSelect { get; set; }
|
// public uint InputSelect { get; set; }
|
||||||
public uint PowerOn { get; set; }
|
// public uint PowerOn { get; set; }
|
||||||
public uint SelectScene { get; set; }
|
// public uint SelectScene { get; set; }
|
||||||
public uint LightingSceneOffset { get; set; }
|
// public uint LightingSceneOffset { get; set; }
|
||||||
public uint ButtonVisibilityOffset { get; set; }
|
// public uint ButtonVisibilityOffset { get; set; }
|
||||||
public uint IntegrationIdSet { get; set; }
|
// public uint IntegrationIdSet { get; set; }
|
||||||
|
|
||||||
public DisplayControllerJoinMap()
|
// public DisplayControllerJoinMap()
|
||||||
{
|
// {
|
||||||
// Digital
|
// // Digital
|
||||||
IsOnline = 50;
|
// IsOnline = 50;
|
||||||
PowerOff = 1;
|
// PowerOff = 1;
|
||||||
PowerOn = 2;
|
// PowerOn = 2;
|
||||||
InputSelect = 4;
|
// InputSelect = 4;
|
||||||
IntegrationIdSet = 1;
|
// IntegrationIdSet = 1;
|
||||||
LightingSceneOffset = 10;
|
// LightingSceneOffset = 10;
|
||||||
ButtonVisibilityOffset = 40;
|
// ButtonVisibilityOffset = 40;
|
||||||
Name = 1;
|
// Name = 1;
|
||||||
InputNamesOffset = 10;
|
// InputNamesOffset = 10;
|
||||||
InputSelectOffset = 4;
|
// InputSelectOffset = 4;
|
||||||
// Analog
|
// // Analog
|
||||||
}
|
// }
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
// public override void OffsetJoinNumbers(uint joinStart)
|
||||||
{
|
// {
|
||||||
var joinOffset = joinStart - 1;
|
// var joinOffset = joinStart - 1;
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
// IsOnline = IsOnline + joinOffset;
|
||||||
PowerOff = PowerOff + joinOffset;
|
// PowerOff = PowerOff + joinOffset;
|
||||||
PowerOn = PowerOn + joinOffset;
|
// PowerOn = PowerOn + joinOffset;
|
||||||
SelectScene = SelectScene + joinOffset;
|
// SelectScene = SelectScene + joinOffset;
|
||||||
LightingSceneOffset = LightingSceneOffset + joinOffset;
|
// LightingSceneOffset = LightingSceneOffset + joinOffset;
|
||||||
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
// ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
||||||
Name = Name + joinOffset;
|
// Name = Name + joinOffset;
|
||||||
InputNamesOffset = InputNamesOffset + joinOffset;
|
// InputNamesOffset = InputNamesOffset + joinOffset;
|
||||||
InputSelectOffset = InputSelectOffset + joinOffset;
|
// InputSelectOffset = InputSelectOffset + joinOffset;
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
@@ -1,103 +1,103 @@
|
|||||||
using System;
|
//using System;
|
||||||
using System.Collections.Generic;
|
//using System.Collections.Generic;
|
||||||
using System.Linq;
|
//using System.Linq;
|
||||||
using System.Text;
|
//using System.Text;
|
||||||
using Crestron.SimplSharp;
|
//using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using PepperDash.Core;
|
//using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
//using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Devices.Common;
|
//using PepperDash.Essentials.Devices.Common;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Bridges
|
//namespace PepperDash.Essentials.Bridges
|
||||||
{
|
//{
|
||||||
public static class GenericLightingApiExtensions
|
// public static class GenericLightingApiExtensions
|
||||||
{
|
// {
|
||||||
public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
// public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||||
{
|
// {
|
||||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as GenericLightingJoinMap;
|
// var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as GenericLightingJoinMap;
|
||||||
|
|
||||||
if (joinMap == null)
|
// if (joinMap == null)
|
||||||
joinMap = new GenericLightingJoinMap();
|
// joinMap = new GenericLightingJoinMap();
|
||||||
|
|
||||||
joinMap.OffsetJoinNumbers(joinStart);
|
// joinMap.OffsetJoinNumbers(joinStart);
|
||||||
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
// Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(0, "Linking to lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
// Debug.Console(0, "Linking to lighting Type {0}", lightingDevice.GetType().Name.ToString());
|
||||||
|
|
||||||
// GenericLighitng Actions & FeedBack
|
// // GenericLighitng Actions & FeedBack
|
||||||
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
// trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
|
||||||
|
|
||||||
int sceneIndex = 1;
|
// int sceneIndex = 1;
|
||||||
foreach (var scene in lightingDevice.LightingScenes)
|
// foreach (var scene in lightingDevice.LightingScenes)
|
||||||
{
|
// {
|
||||||
var tempIndex = sceneIndex - 1;
|
// var tempIndex = sceneIndex - 1;
|
||||||
trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
|
// trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
|
||||||
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
// scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
|
||||||
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
// trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
|
||||||
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
// trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
|
||||||
sceneIndex++;
|
// sceneIndex++;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
// if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
|
||||||
{
|
// {
|
||||||
var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
// var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
// lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
|
||||||
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
// trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
// //ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
|
||||||
|
|
||||||
|
|
||||||
/*
|
// /*
|
||||||
var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
// var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
|
||||||
|
|
||||||
|
|
||||||
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
// for (uint i = 1; i <= lightingBase.CircuitCount; i++)
|
||||||
{
|
// {
|
||||||
var circuit = i;
|
// var circuit = i;
|
||||||
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
// lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
|
||||||
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
// lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
|
||||||
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
// lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
// trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
// trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
|
||||||
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
// trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
|
||||||
|
|
||||||
}
|
// }
|
||||||
*/
|
// */
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
public class GenericLightingJoinMap : JoinMapBase
|
// public class GenericLightingJoinMap : JoinMapBase
|
||||||
{
|
// {
|
||||||
public uint IsOnline { get; set; }
|
// public uint IsOnline { get; set; }
|
||||||
public uint SelectScene { get; set; }
|
// public uint SelectScene { get; set; }
|
||||||
public uint LightingSceneOffset { get; set; }
|
// public uint LightingSceneOffset { get; set; }
|
||||||
public uint ButtonVisibilityOffset { get; set; }
|
// public uint ButtonVisibilityOffset { get; set; }
|
||||||
public uint IntegrationIdSet { get; set; }
|
// public uint IntegrationIdSet { get; set; }
|
||||||
|
|
||||||
public GenericLightingJoinMap()
|
// public GenericLightingJoinMap()
|
||||||
{
|
// {
|
||||||
// Digital
|
// // Digital
|
||||||
IsOnline = 1;
|
// IsOnline = 1;
|
||||||
SelectScene = 1;
|
// SelectScene = 1;
|
||||||
IntegrationIdSet = 1;
|
// IntegrationIdSet = 1;
|
||||||
LightingSceneOffset = 10;
|
// LightingSceneOffset = 10;
|
||||||
ButtonVisibilityOffset = 40;
|
// ButtonVisibilityOffset = 40;
|
||||||
// Analog
|
// // Analog
|
||||||
}
|
// }
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
// public override void OffsetJoinNumbers(uint joinStart)
|
||||||
{
|
// {
|
||||||
var joinOffset = joinStart - 1;
|
// var joinOffset = joinStart - 1;
|
||||||
|
|
||||||
IsOnline = IsOnline + joinOffset;
|
// IsOnline = IsOnline + joinOffset;
|
||||||
SelectScene = SelectScene + joinOffset;
|
// SelectScene = SelectScene + joinOffset;
|
||||||
LightingSceneOffset = LightingSceneOffset + joinOffset;
|
// LightingSceneOffset = LightingSceneOffset + joinOffset;
|
||||||
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
// ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
@@ -30,7 +30,11 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
Debug.Console(1, comm, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, comm, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
// this is a permanent event handler. This cannot be -= from event
|
// this is a permanent event handler. This cannot be -= from event
|
||||||
comm.CommPort.TextReceived += (s, a) => trilist.SetString(joinMap.TextReceived, a.Text);
|
comm.CommPort.TextReceived += (s, a) =>
|
||||||
|
{
|
||||||
|
Debug.Console(2, comm, "RX: {0}", a.Text);
|
||||||
|
trilist.SetString(joinMap.TextReceived, a.Text);
|
||||||
|
};
|
||||||
trilist.SetStringSigAction(joinMap.SendText, new Action<string>(s => comm.CommPort.SendText(s)));
|
trilist.SetStringSigAction(joinMap.SendText, new Action<string>(s => comm.CommPort.SendText(s)));
|
||||||
trilist.SetStringSigAction(joinMap.SetPortConfig + 1, new Action<string>(s => comm.SetPortConfig(s)));
|
trilist.SetStringSigAction(joinMap.SetPortConfig + 1, new Action<string>(s => comm.SetPortConfig(s)));
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
{
|
{
|
||||||
SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true;
|
|
||||||
|
|
||||||
DeterminePlatform();
|
DeterminePlatform();
|
||||||
|
|
||||||
//CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file",
|
//CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file",
|
||||||
@@ -73,7 +71,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines if the program is running on a processor (appliance) or server (XiO Edge).
|
/// Determines if the program is running on a processor (appliance) or server (VC-4).
|
||||||
///
|
///
|
||||||
/// Sets Global.FilePathPrefix based on platform
|
/// Sets Global.FilePathPrefix based on platform
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -93,20 +91,40 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
directoryPrefix = Crestron.SimplSharp.CrestronIO.Directory.GetApplicationRootDirectory();
|
directoryPrefix = Crestron.SimplSharp.CrestronIO.Directory.GetApplicationRootDirectory();
|
||||||
|
|
||||||
//directoryPrefix = "";
|
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows OS
|
||||||
|
|
||||||
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server)
|
|
||||||
{
|
{
|
||||||
filePathPrefix = directoryPrefix + dirSeparator + "NVRAM"
|
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on 3-series Appliance", versionString);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on 3-series Appliance", versionString);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
filePathPrefix = directoryPrefix + dirSeparator + "User" + dirSeparator;
|
|
||||||
|
|
||||||
|
// Check if User/ProgramX exists
|
||||||
|
if(Directory.Exists(directoryPrefix + dirSeparator + "User"
|
||||||
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
||||||
|
{
|
||||||
|
Debug.Console(0, @"User/program{0} directory found", InitialParametersClass.ApplicationNumber);
|
||||||
|
filePathPrefix = directoryPrefix + dirSeparator + "User"
|
||||||
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
||||||
|
}
|
||||||
|
// Check if Nvram/Programx exists
|
||||||
|
else if (Directory.Exists(directoryPrefix + dirSeparator + "Nvram"
|
||||||
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
||||||
|
{
|
||||||
|
Debug.Console(0, @"Nvram/program{0} directory found", InitialParametersClass.ApplicationNumber);
|
||||||
|
filePathPrefix = directoryPrefix + dirSeparator + "Nvram"
|
||||||
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
||||||
|
}
|
||||||
|
// If neither exists, set path to User/ProgramX
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(0, @"No previous directory found. Using User/program{0}", InitialParametersClass.ApplicationNumber);
|
||||||
|
filePathPrefix = directoryPrefix + dirSeparator + "User"
|
||||||
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // Handles Linux OS (Virtual Control)
|
||||||
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", versionString);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", versionString);
|
||||||
|
|
||||||
|
// Set path to User/
|
||||||
|
filePathPrefix = directoryPrefix + dirSeparator + "User" + dirSeparator;
|
||||||
}
|
}
|
||||||
|
|
||||||
Global.SetFilePathPrefix(filePathPrefix);
|
Global.SetFilePathPrefix(filePathPrefix);
|
||||||
@@ -158,13 +176,13 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify the
|
// Notify the OS that the program intitialization has completed
|
||||||
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verifies filesystem is set up. IR, SGD, and program1 folders
|
/// Verifies filesystem is set up. IR, SGD, and programX folders
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool SetupFilesystem()
|
bool SetupFilesystem()
|
||||||
{
|
{
|
||||||
@@ -245,9 +263,8 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void LoadDevices()
|
public void LoadDevices()
|
||||||
{
|
{
|
||||||
# warning Missing PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
|
||||||
// Build the processor wrapper class
|
// Build the processor wrapper class
|
||||||
// DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
||||||
|
|
||||||
// Add global System Monitor device
|
// Add global System Monitor device
|
||||||
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor"));
|
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor"));
|
||||||
|
|||||||
@@ -108,8 +108,10 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AppServer\Messengers\AtcDdvc01Messenger.cs" />
|
<Compile Include="AppServer\Messengers\ConfigMessenger.cs" />
|
||||||
|
<Compile Include="AppServer\Messengers\Ddvc01AtcMessenger.cs" />
|
||||||
<Compile Include="AppServer\Messengers\AudioCodecBaseMessenger.cs" />
|
<Compile Include="AppServer\Messengers\AudioCodecBaseMessenger.cs" />
|
||||||
|
<Compile Include="AppServer\Messengers\Ddvc01VtcMessenger.cs" />
|
||||||
<Compile Include="AppServer\Messengers\MessengerBase.cs" />
|
<Compile Include="AppServer\Messengers\MessengerBase.cs" />
|
||||||
<Compile Include="AppServer\Messengers\SystemMonitorMessenger.cs" />
|
<Compile Include="AppServer\Messengers\SystemMonitorMessenger.cs" />
|
||||||
<Compile Include="AppServer\Messengers\VideoCodecBaseMessenger.cs" />
|
<Compile Include="AppServer\Messengers\VideoCodecBaseMessenger.cs" />
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
[assembly: AssemblyCompany("PepperDash Technology Corp")]
|
[assembly: AssemblyCompany("PepperDash Technology Corp")]
|
||||||
[assembly: AssemblyProduct("PepperDashEssentials")]
|
[assembly: AssemblyProduct("PepperDashEssentials")]
|
||||||
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")]
|
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")]
|
||||||
[assembly: AssemblyVersion("1.3.1.*")]
|
[assembly: AssemblyVersion("1.3.2.*")]
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
var microphonePrivacy = props.MicrophonePrivacy;
|
var microphonePrivacy = props.MicrophonePrivacy;
|
||||||
if (microphonePrivacy == null)
|
if (microphonePrivacy == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "ERROR: Cannot create microphone privacy with null properties");
|
Debug.Console(0, "Cannot create microphone privacy with null properties");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Get the MicrophonePrivacy device from the device manager
|
// Get the MicrophonePrivacy device from the device manager
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using PepperDash.Essentials.Room.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute
|
public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasCurrentVolumeControls
|
||||||
{
|
{
|
||||||
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
public event SourceInfoChangeHandler CurrentSingleSourceChange;
|
public event SourceInfoChangeHandler CurrentSingleSourceChange;
|
||||||
|
|||||||
@@ -266,6 +266,16 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
IsCoolingDownFeedback.FireUpdate();
|
IsCoolingDownFeedback.FireUpdate();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Get Microphone Privacy object, if any
|
||||||
|
this.MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(PropertiesConfig, this);
|
||||||
|
|
||||||
|
Debug.Console(2, this, "Microphone Privacy Config evaluated.");
|
||||||
|
|
||||||
|
// Get emergency object, if any
|
||||||
|
this.Emergency = EssentialsRoomConfigHelper.GetEmergency(PropertiesConfig, this);
|
||||||
|
|
||||||
|
Debug.Console(2, this, "Emergency Config evaluated.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -279,7 +289,7 @@ namespace PepperDash.Essentials
|
|||||||
inAudioCall = AudioCodec.IsInCall;
|
inAudioCall = AudioCodec.IsInCall;
|
||||||
|
|
||||||
if(VideoCodec != null)
|
if(VideoCodec != null)
|
||||||
inVideoCall = AudioCodec.IsInCall;
|
inVideoCall = VideoCodec.IsInCall;
|
||||||
|
|
||||||
if (inAudioCall || inVideoCall)
|
if (inAudioCall || inVideoCall)
|
||||||
return true;
|
return true;
|
||||||
@@ -327,12 +337,6 @@ namespace PepperDash.Essentials
|
|||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|
||||||
// Get Microphone Privacy object, if any
|
|
||||||
this.MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(PropertiesConfig, this);
|
|
||||||
|
|
||||||
// Get emergency object, if any
|
|
||||||
this.Emergency = EssentialsRoomConfigHelper.GetEmergency(PropertiesConfig, this);
|
|
||||||
|
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -927,7 +927,10 @@ namespace PepperDash.Essentials
|
|||||||
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
|
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
|
||||||
RefreshSourceInfo();
|
RefreshSourceInfo();
|
||||||
|
|
||||||
(_CurrentRoom.VideoCodec as IHasScheduleAwareness).CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged;
|
if (_CurrentRoom.VideoCodec is IHasScheduleAwareness)
|
||||||
|
{
|
||||||
|
(_CurrentRoom.VideoCodec as IHasScheduleAwareness).CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged;
|
||||||
|
}
|
||||||
|
|
||||||
CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
||||||
_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.OutputChange += SharingContentIsOnFeedback_OutputChange;
|
_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.OutputChange += SharingContentIsOnFeedback_OutputChange;
|
||||||
|
|||||||
@@ -58,16 +58,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
SmartObjectDynamicList RecentCallsList;
|
SmartObjectDynamicList RecentCallsList;
|
||||||
|
|
||||||
SmartObjectDynamicList DirectoryList;
|
SmartObjectDynamicList DirectoryList;
|
||||||
|
|
||||||
CodecDirectory CurrentDirectoryResult;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Tracks the directory browse history when browsing beyond the root directory
|
|
||||||
/// </summary>
|
|
||||||
List<CodecDirectory> DirectoryBrowseHistory;
|
|
||||||
|
|
||||||
bool NextDirectoryResultIsFolderContents;
|
|
||||||
|
|
||||||
BoolFeedback DirectoryBackButtonVisibleFeedback;
|
BoolFeedback DirectoryBackButtonVisibleFeedback;
|
||||||
|
|
||||||
// These are likely temp until we get a keyboard built
|
// These are likely temp until we get a keyboard built
|
||||||
@@ -111,7 +102,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
SetupCallStagingPopover();
|
SetupCallStagingPopover();
|
||||||
SetupDialKeypad();
|
SetupDialKeypad();
|
||||||
ActiveCallsSRL = new SubpageReferenceList(triList, UISmartObjectJoin.CodecActiveCallsHeaderList, 5,5,5);
|
ActiveCallsSRL = new SubpageReferenceList(triList, UISmartObjectJoin.CodecActiveCallsHeaderList, 5,5,5);
|
||||||
SetupDirectoryList();
|
|
||||||
SetupRecentCallsList();
|
SetupRecentCallsList();
|
||||||
SetupFavorites();
|
SetupFavorites();
|
||||||
SetupLayoutControls();
|
SetupLayoutControls();
|
||||||
@@ -169,12 +159,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
});
|
});
|
||||||
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
||||||
|
|
||||||
|
SetupDirectoryList();
|
||||||
|
|
||||||
SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0);
|
SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0);
|
||||||
SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]);
|
SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]);
|
||||||
|
|
||||||
triList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackPress, GetDirectoryParentFolderContents);
|
triList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackPress, GetDirectoryParentFolderContents);
|
||||||
|
|
||||||
DirectoryBackButtonVisibleFeedback = new BoolFeedback(() => CurrentDirectoryResult != (codec as IHasDirectory).DirectoryRoot);
|
DirectoryBackButtonVisibleFeedback = (codec as IHasDirectory).CurrentDirectoryResultIsNotDirectoryRoot;
|
||||||
DirectoryBackButtonVisibleFeedback
|
DirectoryBackButtonVisibleFeedback
|
||||||
.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackVisible]);
|
.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackVisible]);
|
||||||
|
|
||||||
@@ -532,8 +524,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetupDirectoryList()
|
void SetupDirectoryList()
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistory = new List<CodecDirectory>();
|
|
||||||
|
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
if (codec != null)
|
if (codec != null)
|
||||||
{
|
{
|
||||||
@@ -548,28 +538,20 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RefreshDirectory();
|
||||||
// If there is something here now, show it otherwise wait for the event
|
|
||||||
if (CurrentDirectoryResult != null && codec.DirectoryRoot.DirectoryResults.Count > 0)
|
|
||||||
{
|
|
||||||
RefreshDirectory();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the current directory resutls to the DirectorRoot and updates Back Button visibiltiy
|
/// Sets the current directory results to the DirectoryRoot and updates Back Button visibiltiy
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void SetCurrentDirectoryToRoot()
|
void SetCurrentDirectoryToRoot()
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistory.Clear();
|
(Codec as IHasDirectory).SetCurrentDirectoryToRoot();
|
||||||
|
|
||||||
CurrentDirectoryResult = (Codec as IHasDirectory).DirectoryRoot;
|
|
||||||
|
|
||||||
SearchKeypadClear();
|
SearchKeypadClear();
|
||||||
|
|
||||||
DirectoryBackButtonVisibleFeedback.FireUpdate();
|
|
||||||
|
|
||||||
RefreshDirectory();
|
RefreshDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -584,10 +566,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
SetCurrentDirectoryToRoot();
|
SetCurrentDirectoryToRoot();
|
||||||
|
|
||||||
if (CurrentDirectoryResult != null && codec.DirectoryRoot.DirectoryResults.Count > 0)
|
RefreshDirectory();
|
||||||
{
|
|
||||||
RefreshDirectory();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -597,13 +577,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void dir_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
void dir_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
||||||
{
|
{
|
||||||
if (NextDirectoryResultIsFolderContents)
|
|
||||||
{
|
|
||||||
NextDirectoryResultIsFolderContents = false;
|
|
||||||
DirectoryBrowseHistory.Add(e.Directory);
|
|
||||||
}
|
|
||||||
CurrentDirectoryResult = e.Directory;
|
|
||||||
DirectoryBackButtonVisibleFeedback.FireUpdate();
|
|
||||||
RefreshDirectory();
|
RefreshDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -615,7 +589,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
{
|
{
|
||||||
(Codec as IHasDirectory).GetDirectoryFolderContents(folder.FolderId);
|
(Codec as IHasDirectory).GetDirectoryFolderContents(folder.FolderId);
|
||||||
|
|
||||||
NextDirectoryResultIsFolderContents = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -625,18 +598,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
|
|
||||||
if (DirectoryBrowseHistory.Count > 0)
|
if (codec != null)
|
||||||
{
|
{
|
||||||
var lastItemIndex = DirectoryBrowseHistory.Count - 1;
|
codec.GetDirectoryParentFolderContents();
|
||||||
CurrentDirectoryResult = DirectoryBrowseHistory[lastItemIndex];
|
|
||||||
DirectoryBrowseHistory.Remove(DirectoryBrowseHistory[lastItemIndex]);
|
|
||||||
|
|
||||||
RefreshDirectory();
|
//RefreshDirectory();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetCurrentDirectoryToRoot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -645,10 +613,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// <param name="dir"></param>
|
/// <param name="dir"></param>
|
||||||
void RefreshDirectory()
|
void RefreshDirectory()
|
||||||
{
|
{
|
||||||
if (CurrentDirectoryResult.DirectoryResults.Count > 0)
|
if ((Codec as IHasDirectory).CurrentDirectoryResult.CurrentDirectoryResults.Count > 0)
|
||||||
{
|
{
|
||||||
ushort i = 0;
|
ushort i = 0;
|
||||||
foreach (var r in CurrentDirectoryResult.DirectoryResults)
|
foreach (var r in (Codec as IHasDirectory).CurrentDirectoryResult.CurrentDirectoryResults)
|
||||||
{
|
{
|
||||||
if (i == DirectoryList.MaxCount)
|
if (i == DirectoryList.MaxCount)
|
||||||
{
|
{
|
||||||
@@ -725,13 +693,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = "";
|
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = "";
|
||||||
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Connect";
|
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Connect";
|
||||||
Parent.MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = true;
|
Parent.MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = true;
|
||||||
var cc = c; // lambda scope
|
var cc = c; // to maintian lambda scope
|
||||||
Parent.MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() =>
|
Parent.MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() =>
|
||||||
{
|
{
|
||||||
Parent.PopupInterlock.Hide();
|
Parent.PopupInterlock.Hide();
|
||||||
var codec = Codec as VideoCodecBase;
|
var codec = Codec as VideoCodecBase;
|
||||||
if (codec != null)
|
if (codec != null)
|
||||||
codec.Dial(c.Number);
|
codec.Dial(cc.Number);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Parent.MeetingOrContactMethodModalSrl.Count = i;
|
Parent.MeetingOrContactMethodModalSrl.Count = i;
|
||||||
@@ -1102,7 +1070,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
SearchStringFeedback.FireUpdate();
|
SearchStringFeedback.FireUpdate();
|
||||||
SearchStringKeypadCheckEnables();
|
SearchStringKeypadCheckEnables();
|
||||||
|
|
||||||
if(CurrentDirectoryResult != (Codec as IHasDirectory).DirectoryRoot)
|
if ((Codec as IHasDirectory).CurrentDirectoryResultIsNotDirectoryRoot.BoolValue)
|
||||||
SetCurrentDirectoryToRoot();
|
SetCurrentDirectoryToRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,4 +30,8 @@ devjson:1 {"deviceKey":"room1.InCallFeedback","methodName":"SetTestValue", "para
|
|||||||
|
|
||||||
devjson:1 {"deviceKey":"room1.InCallFeedback","methodName":"ClearTestValue", "params": []}
|
devjson:1 {"deviceKey":"room1.InCallFeedback","methodName":"ClearTestValue", "params": []}
|
||||||
|
|
||||||
devjson:3 {"deviceKey":"room1.RoomOccupancy.RoomIsOccupiedFeedback","methodName":"SetTestValue", "params": [ true ]}
|
devjson:3 {"deviceKey":"room1.RoomOccupancy.RoomIsOccupiedFeedback","methodName":"SetTestValue", "params": [ true ]}
|
||||||
|
|
||||||
|
devjson:2 {"deviceKey":"codec-comms-ssh", "methodName":"SendText", "params": ["xcommand dial number: 10.11.50.211\r"]}
|
||||||
|
|
||||||
|
devjson:2 {"deviceKey":"codec-comms-ssh", "methodName":"Connect", "params": []}
|
||||||
Submodule essentials-framework updated: 4cfd0abff1...d232616339
Reference in New Issue
Block a user