mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-21 23:54:57 +00:00
Compare commits
25 Commits
1.9.8-alph
...
1.9.2-pr75
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79045cb92e | ||
|
|
ea254ef983 | ||
|
|
76e4d4a82d | ||
|
|
4bd777f6b9 | ||
|
|
f607394ee7 | ||
|
|
085a64c87b | ||
|
|
290e887903 | ||
|
|
de7a74eaff | ||
|
|
88e5c49663 | ||
|
|
1415999d86 | ||
|
|
5f6b650dba | ||
|
|
94c0e92f6b | ||
|
|
a5046df671 | ||
|
|
5a4f7b6a28 | ||
|
|
dfaaa3f6bc | ||
|
|
377cccf912 | ||
|
|
9795637d75 | ||
|
|
6f6ca50c37 | ||
|
|
7b7ec53355 | ||
|
|
e3920132bf | ||
|
|
c2e5bd290a | ||
|
|
7fd52814a0 | ||
|
|
06a3dda2e4 | ||
|
|
d97ca6d5a4 | ||
|
|
4c50d6980f |
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -7,9 +7,6 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Was this bug identified in a specific build version?**
|
|
||||||
Please note the build version where this bug was identified
|
|
||||||
|
|
||||||
**Describe the bug**
|
**Describe the bug**
|
||||||
A clear and concise description of what the bug is.
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
|||||||
1
.github/scripts/ZipBuildOutput.ps1
vendored
1
.github/scripts/ZipBuildOutput.ps1
vendored
@@ -8,7 +8,6 @@ $destination = "$($Env:GITHUB_HOME)\output"
|
|||||||
New-Item -ItemType Directory -Force -Path ($destination)
|
New-Item -ItemType Directory -Force -Path ($destination)
|
||||||
Get-ChildItem ($destination)
|
Get-ChildItem ($destination)
|
||||||
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
||||||
$exclusions += "Newtonsoft.Compact.Json.dll"
|
|
||||||
# Trying to get any .json schema files (not currently working)
|
# Trying to get any .json schema files (not currently working)
|
||||||
# Gets any files with the listed extensions.
|
# Gets any files with the listed extensions.
|
||||||
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll", "*.nuspec" | ForEach-Object {
|
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz", "*.dll", "*.nuspec" | ForEach-Object {
|
||||||
|
|||||||
5
.github/workflows/docker.yml
vendored
5
.github/workflows/docker.yml
vendored
@@ -8,9 +8,12 @@ on:
|
|||||||
- bugfix/*
|
- bugfix/*
|
||||||
- release/*
|
- release/*
|
||||||
- development
|
- development
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- development
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# solution path doesn't need slashes unless it is multiple folders deep
|
# solution path doesn't need slashes unless there it is multiple folders deep
|
||||||
# solution name does not include extension. .sln is assumed
|
# solution name does not include extension. .sln is assumed
|
||||||
SOLUTION_PATH: PepperDashEssentials
|
SOLUTION_PATH: PepperDashEssentials
|
||||||
SOLUTION_FILE: PepperDashEssentials
|
SOLUTION_FILE: PepperDashEssentials
|
||||||
|
|||||||
@@ -450,14 +450,13 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint fusionIpId = 0xf1;
|
||||||
|
|
||||||
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
||||||
{
|
{
|
||||||
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom;
|
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom;
|
||||||
if (room != null)
|
if (room != null)
|
||||||
{
|
{
|
||||||
// default IPID
|
|
||||||
uint fusionIpId = 0xf1;
|
|
||||||
|
|
||||||
// default to no join map key
|
// default to no join map key
|
||||||
string fusionJoinMapKey = string.Empty;
|
string fusionJoinMapKey = string.Empty;
|
||||||
|
|
||||||
@@ -478,7 +477,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
|
||||||
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
|
|
||||||
@@ -490,7 +489,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
|
||||||
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((IEssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey));
|
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((IEssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
||||||
@@ -502,7 +501,7 @@ namespace PepperDash.Essentials
|
|||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
||||||
"Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion");
|
"Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion with IP-ID {0:X2}", fusionIpId);
|
||||||
DeviceManager.AddDevice(new EssentialsTechRoomFusionSystemController((EssentialsTechRoom)room, fusionIpId, fusionJoinMapKey));
|
DeviceManager.AddDevice(new EssentialsTechRoomFusionSystemController((EssentialsTechRoom)room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge");
|
||||||
@@ -515,31 +514,26 @@ namespace PepperDash.Essentials
|
|||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fusionIpId += 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void CreateMobileControlBridge(object room)
|
private static void CreateMobileControlBridge(IEssentialsRoom room)
|
||||||
{
|
{
|
||||||
var mobileControl = GetMobileControlDevice();
|
var mobileControl = GetMobileControlDevice();
|
||||||
|
|
||||||
if (mobileControl == null) return;
|
if (mobileControl == null) return;
|
||||||
|
|
||||||
var mobileControl3 = mobileControl as IMobileControl3;
|
mobileControl.CreateMobileControlRoomBridge(room, mobileControl);
|
||||||
|
|
||||||
if (mobileControl3 != null)
|
|
||||||
{
|
|
||||||
mobileControl3.CreateMobileControlRoomBridge(room as IEssentialsRoom, mobileControl);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mobileControl.CreateMobileControlRoomBridge(room as EssentialsRoomBase, mobileControl);
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Creating Fusion Room symbol with GUID: {0}", RoomGuid);
|
Debug.Console(0, this, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId);
|
||||||
|
|
||||||
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
||||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
||||||
|
|||||||
@@ -149,7 +149,8 @@
|
|||||||
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
<Compile Include="Room\Types\EssentialsTechRoom.cs" />
|
||||||
<Compile Include="Room\Types\IEssentialsHuddleSpaceRoom.cs" />
|
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleSpaceRoom.cs" />
|
||||||
|
<Compile Include="Room\Types\Interfaces\IEssentialsHuddleVtc1Room.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
||||||
|
|
||||||
InitializeRoom();
|
Initialize();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -215,7 +215,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeRoom()
|
void Initialize()
|
||||||
{
|
{
|
||||||
if (DefaultAudioDevice is IBasicVolumeControls)
|
if (DefaultAudioDevice is IBasicVolumeControls)
|
||||||
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IRoutingSinkWithSwitching;
|
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
InitializeRoom();
|
Initialize();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -164,7 +164,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeRoom()
|
void Initialize()
|
||||||
{
|
{
|
||||||
if (DefaultAudioDevice is IBasicVolumeControls)
|
if (DefaultAudioDevice is IBasicVolumeControls)
|
||||||
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
||||||
|
|||||||
@@ -217,10 +217,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
|
|
||||||
if (VideoCodec == null)
|
if (VideoCodec == null)
|
||||||
{
|
throw new ArgumentNullException("codec cannot be null");
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "No Video Codec set. Please check 'videoCodecKey' property in room config");
|
|
||||||
throw new ArgumentNullException("VideoCodec cannot be null");
|
|
||||||
}
|
|
||||||
|
|
||||||
AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as
|
AudioCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.AudioCodecKey) as
|
||||||
PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase;
|
PepperDash.Essentials.Devices.Common.AudioCodec.AudioCodecBase;
|
||||||
@@ -228,13 +225,8 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(0, this, "No Audio Codec Found");
|
Debug.Console(0, this, "No Audio Codec Found");
|
||||||
|
|
||||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
||||||
if (DefaultAudioDevice == null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "No Default Audio Device set. Please check 'defaultAudioKey' property in room config");
|
|
||||||
throw new ArgumentNullException("DefaultAudioDevice cannot be null");
|
|
||||||
}
|
|
||||||
|
|
||||||
InitializeRoom();
|
Initialize();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -242,7 +234,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeRoom()
|
void Initialize()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -462,8 +454,7 @@ namespace PepperDash.Essentials
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "sourceListKey present but not yet implemented");
|
Debug.Console(1, this, "sourceListKey present but not yet implemented");
|
||||||
|
throw new NotImplementedException();
|
||||||
RunRouteAction(routeKey, new Action(() => { }));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,11 +471,7 @@ namespace PepperDash.Essentials
|
|||||||
RunRouteAction(routeKey, successCallback);
|
RunRouteAction(routeKey, successCallback);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
throw new NotImplementedException();
|
||||||
Debug.Console(1, this, "sourceListKey present but not yet implemented");
|
|
||||||
|
|
||||||
RunRouteAction(routeKey, successCallback);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
|
||||||
using PepperDash.Essentials.Room.Config;
|
|
||||||
using PepperDash.Essentials.Core.Devices;
|
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
|
||||||
using PepperDash.Essentials.Devices.Common.AudioCodec;
|
|
||||||
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
|
||||||
{
|
|
||||||
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IHasDefaultDisplay
|
|
||||||
{
|
|
||||||
bool ExcludeFromGlobalFunctions { get; }
|
|
||||||
|
|
||||||
void RunRouteAction(string routeKey);
|
|
||||||
|
|
||||||
EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; }
|
|
||||||
|
|
||||||
IBasicVolumeControls CurrentVolumeControls { get; }
|
|
||||||
|
|
||||||
event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
|
||||||
IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay
|
|
||||||
{
|
|
||||||
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
|
||||||
|
|
||||||
void RunRouteAction(string routeKey);
|
|
||||||
|
|
||||||
IHasScheduleAwareness ScheduleSource { get; }
|
|
||||||
|
|
||||||
string DefaultCodecRouteString { get; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Room.Config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IRunDefaultPresentRoute, IHasDefaultDisplay
|
||||||
|
{
|
||||||
|
bool ExcludeFromGlobalFunctions { get; }
|
||||||
|
|
||||||
|
void RunRouteAction(string routeKey);
|
||||||
|
|
||||||
|
EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
|
IBasicVolumeControls CurrentVolumeControls { get; }
|
||||||
|
|
||||||
|
event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Room.Config;
|
||||||
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
|
using PepperDash.Essentials.Devices.Common.AudioCodec;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange,
|
||||||
|
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback
|
||||||
|
{
|
||||||
|
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
|
void RunRouteAction(string routeKey);
|
||||||
|
|
||||||
|
IHasScheduleAwareness ScheduleSource { get; }
|
||||||
|
|
||||||
|
new BoolFeedback InCallFeedback { get; }
|
||||||
|
|
||||||
|
new BoolFeedback PrivacyModeIsOnFeedback { get; }
|
||||||
|
|
||||||
|
string DefaultCodecRouteString { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -79,16 +79,6 @@ namespace PepperDash.Essentials
|
|||||||
Panel = new Tsw1052(id, Global.ControlSystem);
|
Panel = new Tsw1052(id, Global.ControlSystem);
|
||||||
else if (type == "tsw1060")
|
else if (type == "tsw1060")
|
||||||
Panel = new Tsw1060(id, Global.ControlSystem);
|
Panel = new Tsw1060(id, Global.ControlSystem);
|
||||||
else if (type == "tsw570")
|
|
||||||
Panel = new Tsw570(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw770")
|
|
||||||
Panel = new Tsw770(id, Global.ControlSystem);
|
|
||||||
else if (type == "ts770")
|
|
||||||
Panel = new Ts770(id, Global.ControlSystem);
|
|
||||||
else if (type == "tsw1070")
|
|
||||||
Panel = new Tsw1070(id, Global.ControlSystem);
|
|
||||||
else if (type == "ts1070")
|
|
||||||
Panel = new Ts1070(id, Global.ControlSystem);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type);
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type);
|
||||||
@@ -213,7 +203,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
public EssentialsTouchpanelControllerFactory()
|
public EssentialsTouchpanelControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" };
|
TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "xpanel" };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
|||||||
@@ -49,16 +49,6 @@ namespace PepperDash.Essentials
|
|||||||
/// 1006
|
/// 1006
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint CallEndAllConfirmVisible = 1006;
|
public const uint CallEndAllConfirmVisible = 1006;
|
||||||
/// <summary>
|
|
||||||
/// 1007
|
|
||||||
/// </summary>
|
|
||||||
public const uint MeetingPasswordVisible = 1007;
|
|
||||||
/// <summary>
|
|
||||||
/// 1008
|
|
||||||
/// </summary>
|
|
||||||
public const uint MeetingLeavePress = 1008;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -113,7 +103,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1202
|
/// 1202
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCStagingInactivePopoverWithRecentsVisible = 1202;
|
public const uint VCStagingInactivePopoverVisible = 1202;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -131,11 +121,6 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCRecentsVisible = 1206;
|
public const uint VCRecentsVisible = 1206;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 1202
|
|
||||||
/// </summary>
|
|
||||||
public const uint VCStagingInactivePopoverWithoutRecentsVisible = 1207;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1208
|
/// 1208
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -163,11 +148,6 @@ namespace PepperDash.Essentials
|
|||||||
public const uint VCFavoriteVisibleStart = 1221;
|
public const uint VCFavoriteVisibleStart = 1221;
|
||||||
// RANGE IN USE
|
// RANGE IN USE
|
||||||
public const uint VCFavoriteVisibleEnd = 1225;
|
public const uint VCFavoriteVisibleEnd = 1225;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 1230
|
|
||||||
/// </summary>
|
|
||||||
public const uint VCStagingMeetNowPress = 1230;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1231
|
/// 1231
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -263,10 +243,6 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCCameraSelectBarWithoutModeVisible = 1261;
|
public const uint VCCameraSelectBarWithoutModeVisible = 1261;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 1262
|
|
||||||
/// </summary>
|
|
||||||
public const uint VCCameraAutoModeIsOnFb = 1262;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1271
|
/// 1271
|
||||||
@@ -768,9 +744,9 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SourceBackgroundOverlayClosePress = 15044;
|
public const uint SourceBackgroundOverlayClosePress = 15044;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15045
|
/// 15045 - Visibility for the bar containing call navigation button list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint ZoomRoomContentSharingVisible = 15045;
|
public const uint CallStagingBarVisible = 15045;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15046
|
/// 15046
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -859,11 +835,6 @@ namespace PepperDash.Essentials
|
|||||||
/// 15067
|
/// 15067
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint NotificationRibbonVisible = 15067;
|
public const uint NotificationRibbonVisible = 15067;
|
||||||
/// <summary>
|
|
||||||
/// 15068
|
|
||||||
/// </summary>
|
|
||||||
public const uint HeaderMeetingInfoVisible = 15068;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15083 - Press for Call help desk on AC/VC
|
/// 15083 - Press for Call help desk on AC/VC
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -968,24 +939,5 @@ namespace PepperDash.Essentials
|
|||||||
/// 15214
|
/// 15214
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint PinDialogDot4 = 15214;
|
public const uint PinDialogDot4 = 15214;
|
||||||
|
|
||||||
// Password Prompt Dialog **************************
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 15301
|
|
||||||
/// </summary>
|
|
||||||
public const uint PasswordPromptDialogVisible = 15301;
|
|
||||||
/// <summary>
|
|
||||||
/// 15302
|
|
||||||
/// </summary>
|
|
||||||
public const uint PasswordPromptTextPress = 15302;
|
|
||||||
/// <summary>
|
|
||||||
/// 15306
|
|
||||||
/// </summary>
|
|
||||||
public const uint PasswordPromptCancelPress = 15306;
|
|
||||||
/// <summary>
|
|
||||||
/// 15307
|
|
||||||
/// </summary>
|
|
||||||
public const uint PasswordPromptErrorVisible = 15307;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,33 +27,6 @@ namespace PepperDash.Essentials
|
|||||||
/// 1004
|
/// 1004
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint CallSharedSourceNameText = 1004;
|
public const uint CallSharedSourceNameText = 1004;
|
||||||
/// <summary>
|
|
||||||
/// 1005
|
|
||||||
/// </summary>
|
|
||||||
public const uint MeetingIdText = 1005;
|
|
||||||
/// <summary>
|
|
||||||
/// 1006
|
|
||||||
/// </summary>
|
|
||||||
public const uint MeetingHostText = 1006;
|
|
||||||
/// <summary>
|
|
||||||
/// 1007
|
|
||||||
/// </summary>
|
|
||||||
public const uint MeetingPasswordText = 1007;
|
|
||||||
/// <summary>
|
|
||||||
/// 1008
|
|
||||||
/// </summary>
|
|
||||||
public const uint MeetingLeaveText = 1008;
|
|
||||||
/// <summary>
|
|
||||||
/// 1009
|
|
||||||
/// </summary>
|
|
||||||
public const uint MeetingNameText = 1009;
|
|
||||||
|
|
||||||
///<summary>
|
|
||||||
/// 1240 - Used to determine text for meeting start button
|
|
||||||
///</summary>
|
|
||||||
public const uint MeetingStartButtonText = 1240;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -145,14 +118,6 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
//----- through 3120
|
//----- through 3120
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 3201
|
|
||||||
/// </summary>
|
|
||||||
public const uint PasswordPromptMessageText = 3201;
|
|
||||||
/// <summary>
|
|
||||||
/// 3202
|
|
||||||
/// </summary>
|
|
||||||
public const uint PasswordPromptPasswordText = 3202;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3812
|
/// 3812
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
// Video Codec
|
// Video Codec
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1234: values 0 = Connect, 1 = End, 2 = Start Meeting
|
/// 1234: values 0 = Connect, 1 = End
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCStagingConnectButtonMode = 1234;
|
public const uint VCStagingConnectButtonMode = 1234;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ using PepperDash.Core;
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.SmartObjects;
|
using PepperDash.Essentials.Core.SmartObjects;
|
||||||
using PepperDash.Essentials.Core.PageManagers;
|
using PepperDash.Essentials.Core.PageManagers;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
|
|
||||||
using PepperDash.Essentials.Room.Config;
|
using PepperDash.Essentials.Room.Config;
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
@@ -165,7 +164,7 @@ namespace PepperDash.Essentials
|
|||||||
CallCaretVisible = tempJoin + 10;
|
CallCaretVisible = tempJoin + 10;
|
||||||
TriList.SetSigFalseAction(tempJoin, () =>
|
TriList.SetSigFalseAction(tempJoin, () =>
|
||||||
{
|
{
|
||||||
avDriver.ShowActiveCallsListOrMeetingInfo();
|
avDriver.ShowActiveCallsList();
|
||||||
if(avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
if(avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
||||||
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
||||||
});
|
});
|
||||||
@@ -192,56 +191,31 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var meetingInfoCodec = codec as IHasMeetingInfo;
|
|
||||||
|
|
||||||
// Set mode of header button
|
// Set mode of header button
|
||||||
SetHeaderCallIcon(codec);
|
|
||||||
|
|
||||||
// Set the call status text
|
|
||||||
Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count);
|
|
||||||
|
|
||||||
if (codec.ActiveCalls.Count > 0)
|
|
||||||
{
|
|
||||||
if (codec.ActiveCalls.Count == 1 && meetingInfoCodec == null)
|
|
||||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "1 Active Call");
|
|
||||||
else if (codec.ActiveCalls.Count == 1 && meetingInfoCodec != null)
|
|
||||||
{
|
|
||||||
var headerCallStatusLabel = meetingInfoCodec.MeetingInfo.IsSharingMeeting
|
|
||||||
? "Sharing-Only Meeting"
|
|
||||||
: "Active Meeting";
|
|
||||||
|
|
||||||
headerCallStatusLabel = meetingInfoCodec.MeetingInfo.WaitingForHost
|
|
||||||
? "Waiting For Host"
|
|
||||||
: headerCallStatusLabel;
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, headerCallStatusLabel);
|
|
||||||
}
|
|
||||||
else if (codec.ActiveCalls.Count > 1)
|
|
||||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, string.Format("{0} Active Calls", codec.ActiveCalls.Count));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetHeaderCallIcon(VideoCodecBase codec)
|
|
||||||
{
|
|
||||||
if (!codec.IsInCall)
|
if (!codec.IsInCall)
|
||||||
{
|
{
|
||||||
HeaderCallButtonIconSig.StringValue = "DND";
|
HeaderCallButtonIconSig.StringValue = "DND";
|
||||||
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||||
}
|
}
|
||||||
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
|
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
|
||||||
{
|
|
||||||
HeaderCallButtonIconSig.StringValue = "Misc-06_Dark";
|
HeaderCallButtonIconSig.StringValue = "Misc-06_Dark";
|
||||||
}
|
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
||||||
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
||||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
HeaderCallButtonIconSig.StringValue = "Misc-09_Dark";
|
HeaderCallButtonIconSig.StringValue = "Misc-09_Dark";
|
||||||
}
|
|
||||||
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
|
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
|
||||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
||||||
|
|
||||||
|
// Set the call status text
|
||||||
|
if (codec.ActiveCalls.Count > 0)
|
||||||
|
{
|
||||||
|
if (codec.ActiveCalls.Count == 1)
|
||||||
|
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "1 Active Call");
|
||||||
|
else if (codec.ActiveCalls.Count > 1)
|
||||||
|
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, string.Format("{0} Active Calls", codec.ActiveCalls.Count));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
TriList.SetString(UIStringJoin.HeaderCallStatusLabel, "No Active Calls");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -281,7 +255,7 @@ namespace PepperDash.Essentials
|
|||||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress,
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress,
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
avDriver.ShowActiveCallsListOrMeetingInfo();
|
avDriver.ShowActiveCallsList();
|
||||||
if (avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
if (avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
||||||
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
||||||
});
|
});
|
||||||
@@ -379,8 +353,6 @@ namespace PepperDash.Essentials
|
|||||||
headerPopupShown = true;
|
headerPopupShown = true;
|
||||||
else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||||
headerPopupShown = true;
|
headerPopupShown = true;
|
||||||
else if (e.NewJoin == UIBoolJoin.HeaderMeetingInfoVisible)
|
|
||||||
headerPopupShown = true;
|
|
||||||
else if (e.NewJoin == UIBoolJoin.HelpPageVisible)
|
else if (e.NewJoin == UIBoolJoin.HelpPageVisible)
|
||||||
headerPopupShown = true;
|
headerPopupShown = true;
|
||||||
else if (e.NewJoin == UIBoolJoin.MeetingsOrContacMethodsListVisible)
|
else if (e.NewJoin == UIBoolJoin.MeetingsOrContacMethodsListVisible)
|
||||||
|
|||||||
@@ -918,7 +918,6 @@ namespace PepperDash.Essentials
|
|||||||
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = true;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ namespace PepperDash.Essentials.UIDrivers
|
|||||||
void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e)
|
void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var c = sender as ICommunicationMonitor;
|
var c = sender as ICommunicationMonitor;
|
||||||
if (c != null && StatusListDeviceIndexes.ContainsKey(c))
|
if (StatusListDeviceIndexes.ContainsKey(c))
|
||||||
{
|
{
|
||||||
var i = StatusListDeviceIndexes[c];
|
var i = StatusListDeviceIndexes[c];
|
||||||
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status;
|
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.UI;
|
using Crestron.SimplSharpPro.UI;
|
||||||
@@ -9,13 +8,11 @@ using Crestron.SimplSharpPro.UI;
|
|||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
|
||||||
using PepperDash.Essentials.Core.SmartObjects;
|
using PepperDash.Essentials.Core.SmartObjects;
|
||||||
using PepperDash.Essentials.Core.PageManagers;
|
using PepperDash.Essentials.Core.PageManagers;
|
||||||
using PepperDash.Essentials.Room.Config;
|
using PepperDash.Essentials.Room.Config;
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
@@ -101,9 +98,6 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; }
|
public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; }
|
||||||
|
|
||||||
public uint CallListOrMeetingInfoPopoverVisibilityJoin { get; private set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The list of buttons on the header. Managed with visibility only
|
/// The list of buttons on the header. Managed with visibility only
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -179,38 +173,10 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; }
|
public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
private UiDisplayMode _currentMode;
|
|
||||||
|
|
||||||
private bool _isZoomRoomWithNoExternalSources
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return CurrentRoom.VideoCodec is Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom && _sourceListCount <= 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private uint _sourceListCount;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mode showing. Presentation or call.
|
/// The mode showing. Presentation or call.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
UiDisplayMode CurrentMode
|
UiDisplayMode CurrentMode = UiDisplayMode.Start;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _currentMode;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value != _currentMode)
|
|
||||||
{
|
|
||||||
_currentMode = value;
|
|
||||||
|
|
||||||
SetActivityFooterFeedbacks();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CTimer NextMeetingTimer;
|
CTimer NextMeetingTimer;
|
||||||
|
|
||||||
@@ -241,7 +207,6 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5);
|
MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5);
|
||||||
|
|
||||||
CurrentMode = UiDisplayMode.Start;
|
|
||||||
|
|
||||||
// buttons are added in SetCurrentRoom
|
// buttons are added in SetCurrentRoom
|
||||||
//HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
//HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
||||||
@@ -366,17 +331,15 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call
|
/// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ShowActiveCallsListOrMeetingInfo()
|
public void ShowActiveCallsList()
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true);
|
TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true);
|
||||||
|
if(PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||||
if(PopupInterlock.CurrentJoin == CallListOrMeetingInfoPopoverVisibilityJoin)
|
|
||||||
PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(CurrentRoom.VideoCodec.IsInCall)
|
if((CurrentRoom.ScheduleSource as VideoCodecBase).IsInCall)
|
||||||
PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin);
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,92 +435,79 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowNextMeetingTimerCallback()
|
void ShowNextMeetingTimerCallback()
|
||||||
{
|
{
|
||||||
//Update calendar for Zoom. Zoom doesn't automatically update when meetings are in the past
|
|
||||||
if (_isZoomRoomWithNoExternalSources)
|
|
||||||
{
|
|
||||||
CurrentRoom.ScheduleSource.GetSchedule();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Every 60 seconds, refresh the calendar
|
// Every 60 seconds, refresh the calendar
|
||||||
RefreshMeetingsList();
|
RefreshMeetingsList();
|
||||||
// check meetings list for the closest, joinable meeting
|
// check meetings list for the closest, joinable meeting
|
||||||
var ss = CurrentRoom.ScheduleSource;
|
var ss = CurrentRoom.ScheduleSource;
|
||||||
var meetings = ss.CodecSchedule.Meetings;
|
var meetings = ss.CodecSchedule.Meetings;
|
||||||
|
|
||||||
if (meetings.Count <= 0)
|
if (meetings.Count > 0)
|
||||||
{
|
{
|
||||||
return;
|
// If the room is off pester the user
|
||||||
}
|
// If the room is on, and the meeting is joinable
|
||||||
// If the room is off pester the user
|
// and the LastMeetingDismissed != this meeting
|
||||||
// If the room is on, and the meeting is joinable
|
|
||||||
// and the LastMeetingDismissed != this meeting
|
|
||||||
|
|
||||||
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
|
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
|
||||||
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
Debug.Console(0, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
||||||
CurrentRoom.OnFeedback.BoolValue,
|
CurrentRoom.OnFeedback.BoolValue,
|
||||||
LastMeetingDismissedId,
|
LastMeetingDismissedId,
|
||||||
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
|
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToShortTimeString() : "");
|
||||||
|
|
||||||
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
||||||
if (CurrentRoom.OnFeedback.BoolValue
|
if (CurrentRoom.OnFeedback.BoolValue
|
||||||
&& lastMeetingDismissed == meeting)
|
&& lastMeetingDismissed == meeting)
|
||||||
{
|
{
|
||||||
// meeting no longer joinable, hide popup
|
return;
|
||||||
if(meeting == null)
|
}
|
||||||
HideNextMeetingPopup();
|
|
||||||
|
|
||||||
return;
|
LastMeetingDismissedId = null;
|
||||||
}
|
// Clear the popup when we run out of meetings
|
||||||
|
if (meeting == null)
|
||||||
|
{
|
||||||
|
HideNextMeetingPopup();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
||||||
|
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToShortTimeString());
|
||||||
|
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToShortTimeString());
|
||||||
|
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
|
||||||
|
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
|
||||||
|
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
|
||||||
|
{
|
||||||
|
HideNextMeetingPopup();
|
||||||
|
PopupInterlock.Hide();
|
||||||
|
RoomOnAndDialMeeting(meeting);
|
||||||
|
});
|
||||||
|
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
||||||
|
{
|
||||||
|
HideNextMeetingPopup();
|
||||||
|
//CalendarPress();
|
||||||
|
RefreshMeetingsList();
|
||||||
|
PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||||
|
});
|
||||||
|
var indexOfNext = meetings.IndexOf(meeting) + 1;
|
||||||
|
|
||||||
LastMeetingDismissedId = null;
|
// indexOf = 3, 4 meetings :
|
||||||
// Clear the popup when we run out of meetings
|
if (indexOfNext < meetings.Count)
|
||||||
if (meeting == null)
|
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
||||||
{
|
meetings[indexOfNext].StartTime.ToShortTimeString());
|
||||||
HideNextMeetingPopup();
|
else
|
||||||
}
|
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
|
||||||
|
{
|
||||||
|
// Mark the meeting to not re-harass the user
|
||||||
|
if(CurrentRoom.OnFeedback.BoolValue)
|
||||||
|
LastMeetingDismissedId = meeting.Id;
|
||||||
|
HideNextMeetingPopup();
|
||||||
|
});
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
||||||
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToString("t", Global.Culture));
|
}
|
||||||
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToString("t", Global.Culture));
|
}
|
||||||
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
|
|
||||||
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
|
|
||||||
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
|
|
||||||
{
|
|
||||||
HideNextMeetingPopup();
|
|
||||||
PopupInterlock.Hide();
|
|
||||||
RoomOnAndDialMeeting(meeting);
|
|
||||||
});
|
|
||||||
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
|
||||||
{
|
|
||||||
HideNextMeetingPopup();
|
|
||||||
//CalendarPress();
|
|
||||||
RefreshMeetingsList();
|
|
||||||
PopupInterlock.ShowInterlocked(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
|
||||||
});
|
|
||||||
var indexOfNext = meetings.IndexOf(meeting) + 1;
|
|
||||||
|
|
||||||
// indexOf = 3, 4 meetings :
|
|
||||||
if (indexOfNext < meetings.Count)
|
|
||||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
|
||||||
meetings[indexOfNext].StartTime.ToString("t", Global.Culture));
|
|
||||||
else
|
|
||||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
|
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
|
|
||||||
{
|
|
||||||
// Mark the meeting to not re-harass the user
|
|
||||||
if(CurrentRoom.OnFeedback.BoolValue)
|
|
||||||
LastMeetingDismissedId = meeting.Id;
|
|
||||||
HideNextMeetingPopup();
|
|
||||||
});
|
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -583,26 +533,19 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void RoomOnAndDialMeeting(Meeting meeting)
|
void RoomOnAndDialMeeting(Meeting meeting)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "[RoomOnAndDialMeeting] Joining meeting [{0}]", meeting);
|
|
||||||
Action dialAction = () =>
|
Action dialAction = () =>
|
||||||
{
|
{
|
||||||
var d = CurrentRoom.ScheduleSource as VideoCodecBase;
|
var d = CurrentRoom.ScheduleSource as VideoCodecBase;
|
||||||
if (d != null)
|
if (d != null)
|
||||||
{
|
{
|
||||||
Debug.Console(1,
|
|
||||||
"[RoomOnAndDialMeeting] [dialAction] Sending command to codec to join meeting {0}", meeting);
|
|
||||||
d.Dial(meeting);
|
d.Dial(meeting);
|
||||||
LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call
|
LastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (CurrentRoom.OnFeedback.BoolValue)
|
if (CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
dialAction();
|
||||||
Debug.Console(1, "[RoomOnAndDialMeeting] Room is on.");
|
|
||||||
dialAction();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, "RoomOnAndDialMeeting] Room is off or warming. Registering for Warming Feedback");
|
|
||||||
// Rig a one-time handler to catch when the room is warmed and then dial call
|
// Rig a one-time handler to catch when the room is warmed and then dial call
|
||||||
EventHandler<FeedbackEventArgs> oneTimeHandler = null;
|
EventHandler<FeedbackEventArgs> oneTimeHandler = null;
|
||||||
oneTimeHandler = (o, a) =>
|
oneTimeHandler = (o, a) =>
|
||||||
@@ -664,39 +607,11 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetActivityFooterFeedbacks()
|
void SetActivityFooterFeedbacks()
|
||||||
{
|
{
|
||||||
if (CurrentRoom != null)
|
CallButtonSig.BoolValue = CurrentMode == UiDisplayMode.Call
|
||||||
{
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
var startMode = CurrentMode == UiDisplayMode.Start;
|
ShareButtonSig.BoolValue = CurrentMode == UiDisplayMode.Presentation
|
||||||
var presentationMode = CurrentMode == UiDisplayMode.Presentation;
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
var callMode = CurrentMode == UiDisplayMode.Call;
|
EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
||||||
|
|
||||||
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
|
|
||||||
|
|
||||||
if (presentationMode &&_isZoomRoomWithNoExternalSources)
|
|
||||||
{
|
|
||||||
// For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage
|
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
|
||||||
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Otherwise, show the staging bar
|
|
||||||
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false);
|
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false);
|
|
||||||
|
|
||||||
}
|
|
||||||
if (!presentationMode)
|
|
||||||
{
|
|
||||||
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, false);
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
CallButtonSig.BoolValue = callMode
|
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
|
||||||
ShareButtonSig.BoolValue = presentationMode
|
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
|
||||||
EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -708,13 +623,14 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
HideLogo();
|
HideLogo();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
//TriList.SetBool(StartPageVisibleJoin, false);
|
TriList.SetBool(StartPageVisibleJoin, false);
|
||||||
//TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
||||||
//TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
if (CurrentSourcePageManager != null)
|
if (CurrentSourcePageManager != null)
|
||||||
CurrentSourcePageManager.Hide();
|
CurrentSourcePageManager.Hide();
|
||||||
PowerOnFromCall();
|
PowerOnFromCall();
|
||||||
CurrentMode = UiDisplayMode.Call;
|
CurrentMode = UiDisplayMode.Call;
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
VCDriver.Show();
|
VCDriver.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -727,63 +643,29 @@ namespace PepperDash.Essentials
|
|||||||
if (VCDriver.IsVisible)
|
if (VCDriver.IsVisible)
|
||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
|
TriList.SetBool(StartPageVisibleJoin, false);
|
||||||
|
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
||||||
if (_isZoomRoomWithNoExternalSources)
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
||||||
|
// Run default source when room is off and share is pressed
|
||||||
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
CurrentRoom.RunDefaultPresentRoute();
|
// If there's no default, show UI elements
|
||||||
}
|
if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
|
||||||
// For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
TriList.SetBool(UIBoolJoin.ZoomRoomContentSharingVisible, true);
|
}
|
||||||
|
|
||||||
var presentationMeetingCodec = CurrentRoom.VideoCodec as IHasPresentationOnlyMeeting;
|
|
||||||
var farEndContentStatusCodec = CurrentRoom.VideoCodec as IHasFarEndContentStatus;
|
|
||||||
var receivingContent = false;
|
|
||||||
|
|
||||||
if (farEndContentStatusCodec != null)
|
|
||||||
{
|
|
||||||
receivingContent = farEndContentStatusCodec.ReceivingContent.BoolValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (presentationMeetingCodec != null && !CurrentRoom.VideoCodec.IsInCall)
|
|
||||||
{
|
|
||||||
presentationMeetingCodec.StartSharingOnlyMeeting(eSharingMeetingMode.Laptop);
|
|
||||||
}
|
|
||||||
else if (CurrentRoom.VideoCodec.IsInCall && !CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue &&
|
|
||||||
!receivingContent)
|
|
||||||
{
|
|
||||||
CurrentRoom.VideoCodec.StartSharing();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CurrentSourcePageManager != null)
|
|
||||||
CurrentSourcePageManager.Hide();
|
|
||||||
}
|
}
|
||||||
else
|
else // room is on show what's active or select a source if nothing is yet active
|
||||||
{
|
{
|
||||||
// Run default source when room is off and share is pressed
|
if(CurrentRoom.CurrentSourceInfo == null || CurrentRoom.CurrentSourceInfoKey == CurrentRoom.DefaultCodecRouteString)
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
{
|
else if (CurrentSourcePageManager != null)
|
||||||
// If there's no default, show UI elements
|
CurrentSourcePageManager.Show();
|
||||||
if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
|
||||||
}
|
|
||||||
else // room is on show what's active or select a source if nothing is yet active
|
|
||||||
{
|
|
||||||
if (CurrentRoom.CurrentSourceInfo == null ||
|
|
||||||
(CurrentRoom.VideoCodec != null &&
|
|
||||||
CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key))
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
|
||||||
else if (CurrentSourcePageManager != null)
|
|
||||||
{
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
|
||||||
CurrentSourcePageManager.Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SetupSourceList();
|
|
||||||
}
|
}
|
||||||
CurrentMode = UiDisplayMode.Presentation;
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
|
SetupSourceList();
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -822,11 +704,9 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowCurrentSource()
|
void ShowCurrentSource()
|
||||||
{
|
{
|
||||||
if (CurrentRoom.CurrentSourceInfo == null || _isZoomRoomWithNoExternalSources)
|
if (CurrentRoom.CurrentSourceInfo == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CurrentMode = UiDisplayMode.Presentation;
|
|
||||||
|
|
||||||
if (CurrentRoom.CurrentSourceInfo.SourceDevice == null)
|
if (CurrentRoom.CurrentSourceInfo.SourceDevice == null)
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
@@ -1032,18 +912,6 @@ namespace PepperDash.Essentials
|
|||||||
_CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange;
|
_CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange;
|
||||||
_CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDownFeedback_OutputChange;
|
_CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDownFeedback_OutputChange;
|
||||||
_CurrentRoom.InCallFeedback.OutputChange -= CurrentRoom_InCallFeedback_OutputChange;
|
_CurrentRoom.InCallFeedback.OutputChange -= CurrentRoom_InCallFeedback_OutputChange;
|
||||||
|
|
||||||
var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness;
|
|
||||||
if (scheduleAwareCodec != null)
|
|
||||||
{
|
|
||||||
scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged -= CodecSchedule_MeetingsListHasChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo;
|
|
||||||
if (meetingInfoCodec != null)
|
|
||||||
{
|
|
||||||
meetingInfoCodec.MeetingInfoChanged -= meetingInfoCodec_MeetingInfoChanged;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_CurrentRoom = room;
|
_CurrentRoom = room;
|
||||||
@@ -1076,23 +944,9 @@ namespace PepperDash.Essentials
|
|||||||
_CurrentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange;
|
_CurrentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange;
|
||||||
RefreshSourceInfo();
|
RefreshSourceInfo();
|
||||||
|
|
||||||
|
if (_CurrentRoom.VideoCodec is IHasScheduleAwareness)
|
||||||
var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness;
|
|
||||||
if (scheduleAwareCodec != null)
|
|
||||||
{
|
{
|
||||||
scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged;
|
(_CurrentRoom.VideoCodec as IHasScheduleAwareness).CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged;
|
||||||
}
|
|
||||||
|
|
||||||
var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo;
|
|
||||||
if (meetingInfoCodec != null)
|
|
||||||
{
|
|
||||||
meetingInfoCodec.MeetingInfoChanged += new EventHandler<MeetingInfoEventArgs>(meetingInfoCodec_MeetingInfoChanged);
|
|
||||||
|
|
||||||
CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderMeetingInfoVisible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderActiveCallsListVisible;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
||||||
@@ -1104,8 +958,7 @@ namespace PepperDash.Essentials
|
|||||||
if (_CurrentRoom != null)
|
if (_CurrentRoom != null)
|
||||||
_CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
|
_CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
|
||||||
|
|
||||||
// Moved to EssentialsVideoCodecUiDriver
|
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey));
|
||||||
//TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey));
|
|
||||||
|
|
||||||
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
|
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
|
||||||
}
|
}
|
||||||
@@ -1116,26 +969,6 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Info == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id);
|
|
||||||
TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host);
|
|
||||||
TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name);
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password);
|
|
||||||
// Show the password fields if one is present
|
|
||||||
TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, !string.IsNullOrEmpty(e.Info.Password));
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus);
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingLeaveText, e.Info.IsHost ? "End Meeting" : "Leave Meeting");
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetCurrentRoom(IEssentialsHuddleVtc1Room room)
|
void SetCurrentRoom(IEssentialsHuddleVtc1Room room)
|
||||||
{
|
{
|
||||||
if (_CurrentRoom == room) return;
|
if (_CurrentRoom == room) return;
|
||||||
@@ -1202,7 +1035,7 @@ namespace PepperDash.Essentials
|
|||||||
if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing)
|
if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing)
|
||||||
{
|
{
|
||||||
Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source");
|
Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source");
|
||||||
CurrentRoom.RunRouteAction("codecOsd");
|
CurrentRoom.RunRouteAction("codecOsd", CurrentRoom.SourceListKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1249,8 +1082,7 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(1, "**** KEY {0}", kvp.Key);
|
Debug.Console(1, "**** KEY {0}", kvp.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
_sourceListCount = (i - 1);
|
SourceStagingSrl.Count = (ushort)(i - 1);
|
||||||
SourceStagingSrl.Count = (ushort)_sourceListCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1273,30 +1105,6 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
void CurrentRoom_CurrentSingleSourceChange(SourceListItem info, ChangeType type)
|
void CurrentRoom_CurrentSingleSourceChange(SourceListItem info, ChangeType type)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange");
|
|
||||||
|
|
||||||
// Show the Select a source subpage
|
|
||||||
if (TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue)
|
|
||||||
{
|
|
||||||
Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange SourceStagingBarVisisble: true");
|
|
||||||
|
|
||||||
if (_CurrentRoom.CurrentSourceInfo == null || (_CurrentRoom.VideoCodec != null && _CurrentRoom.CurrentSourceInfo.SourceDevice.Key == _CurrentRoom.VideoCodec.OsdSource.Key))
|
|
||||||
{
|
|
||||||
Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Showing SelectASourceVisible");
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
|
||||||
Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Hiding SelectASourceVisible");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(1, "AvFunctionsDriver: CurrentSingleSourceChange Hiding SelectASourceVisible");
|
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null)
|
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null)
|
||||||
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName;
|
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName;
|
||||||
}
|
}
|
||||||
@@ -1339,16 +1147,17 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
// See if this is helpful or if the callback response in the codec class maybe doesn't come it time?
|
// See if this is helpful or if the callback response in the codec class maybe doesn't come it time?
|
||||||
// Let's build list from event
|
// Let's build list from event
|
||||||
|
// CurrentRoom.ScheduleSource.GetSchedule();
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar");
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar");
|
||||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings");
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings");
|
||||||
|
|
||||||
ushort i = 0;
|
ushort i = 0;
|
||||||
foreach (var m in CurrentRoom.ScheduleSource.CodecSchedule.Meetings)
|
foreach (var m in CurrentRoom.ScheduleSource.CodecSchedule.Meetings)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
MeetingOrContactMethodModalSrl.StringInputSig(i, 1).StringValue = m.StartTime.ToString("t", Global.Culture);
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 1).StringValue = m.StartTime.ToShortTimeString();
|
||||||
MeetingOrContactMethodModalSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToString("t", Global.Culture);
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToShortTimeString();
|
||||||
MeetingOrContactMethodModalSrl.StringInputSig(i, 3).StringValue = m.Title;
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 3).StringValue = m.Title;
|
||||||
MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = string.Format("<br>{0}",m.Organizer);
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = string.Format("<br>{0}",m.Organizer);
|
||||||
MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Join";
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Join";
|
||||||
@@ -1393,12 +1202,12 @@ namespace PepperDash.Essentials
|
|||||||
var value = _CurrentRoom.OnFeedback.BoolValue;
|
var value = _CurrentRoom.OnFeedback.BoolValue;
|
||||||
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
||||||
|
|
||||||
//TriList.BooleanInput[StartPageVisibleJoin].BoolValue = !value;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = !value;
|
||||||
|
|
||||||
if (value) //ON
|
if (value) //ON
|
||||||
{
|
{
|
||||||
SetupActivityFooterWhenRoomOn();
|
SetupActivityFooterWhenRoomOn();
|
||||||
//TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1409,8 +1218,9 @@ namespace PepperDash.Essentials
|
|||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
ShowLogo();
|
ShowLogo();
|
||||||
//TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
SetActivityFooterFeedbacks();
|
||||||
//TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
||||||
|
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||||
// Clear this so that the pesky meeting warning can resurface every minute when off
|
// Clear this so that the pesky meeting warning can resurface every minute when off
|
||||||
LastMeetingDismissedId = null;
|
LastMeetingDismissedId = null;
|
||||||
}
|
}
|
||||||
@@ -1645,8 +1455,6 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void PrepareForCodecIncomingCall();
|
void PrepareForCodecIncomingCall();
|
||||||
|
|
||||||
uint CallListOrMeetingInfoPopoverVisibilityJoin { get; }
|
|
||||||
|
|
||||||
SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
|
SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Globalization;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
@@ -15,7 +14,6 @@ using PepperDash.Essentials.Core.SmartObjects;
|
|||||||
using PepperDash.Essentials.Core.Touchpanels.Keyboards;
|
using PepperDash.Essentials.Core.Touchpanels.Keyboards;
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
|
|
||||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.UIDrivers.VC
|
namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
@@ -85,9 +83,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
StringBuilder SearchStringBuilder = new StringBuilder();
|
StringBuilder SearchStringBuilder = new StringBuilder();
|
||||||
BoolFeedback SearchStringBackspaceVisibleFeedback;
|
BoolFeedback SearchStringBackspaceVisibleFeedback;
|
||||||
|
|
||||||
StringFeedback PasswordStringFeedback;
|
|
||||||
StringBuilder PasswordStringBuilder = new StringBuilder();
|
|
||||||
|
|
||||||
ModalDialog IncomingCallModal;
|
ModalDialog IncomingCallModal;
|
||||||
|
|
||||||
eKeypadMode KeypadMode;
|
eKeypadMode KeypadMode;
|
||||||
@@ -128,24 +123,26 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
||||||
|
|
||||||
|
// If the codec is ready, then get the values we want, otherwise wait
|
||||||
|
if (Codec.IsReady)
|
||||||
|
Codec_IsReady();
|
||||||
|
else
|
||||||
|
codec.IsReadyChange += (o, a) => Codec_IsReady();
|
||||||
|
|
||||||
//InCall = new BoolFeedback(() => false);
|
//InCall = new BoolFeedback(() => false);
|
||||||
LocalPrivacyIsMuted = new BoolFeedback(() => false);
|
LocalPrivacyIsMuted = new BoolFeedback(() => false);
|
||||||
|
|
||||||
VCControlsInterlock = new JoinedSigInterlock(triList);
|
VCControlsInterlock = new JoinedSigInterlock(triList);
|
||||||
VCCameraControlModeInterlock = new JoinedSigInterlock(triList);
|
VCCameraControlModeInterlock = new JoinedSigInterlock(triList);
|
||||||
|
|
||||||
VCControlsInterlock.HideAndClear();
|
|
||||||
|
|
||||||
/* if (CodecHasFavorites || codec is IHasZoomRoomLayouts) //Checking for Zoom Room...picked a ZoomRoom specific interface to check for
|
if (CodecHasFavorites)
|
||||||
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadWithFavoritesVisible);
|
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadWithFavoritesVisible);
|
||||||
else
|
else
|
||||||
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible); */
|
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible);
|
||||||
|
|
||||||
StagingBarsInterlock = new JoinedSigInterlock(triList);
|
StagingBarsInterlock = new JoinedSigInterlock(triList);
|
||||||
if(Codec is IHasCallHistory)
|
StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverVisible);
|
||||||
StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverWithRecentsVisible);
|
|
||||||
else
|
|
||||||
StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverWithoutRecentsVisible);
|
|
||||||
|
|
||||||
StagingButtonsFeedbackInterlock = new JoinedSigInterlock(triList);
|
StagingButtonsFeedbackInterlock = new JoinedSigInterlock(triList);
|
||||||
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
||||||
@@ -153,8 +150,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
// Return formatted when dialing, straight digits when in call
|
// Return formatted when dialing, straight digits when in call
|
||||||
DialStringFeedback = new StringFeedback(() =>
|
DialStringFeedback = new StringFeedback(() =>
|
||||||
{
|
{
|
||||||
// Format the number feedback if in dial mode and the codec is not IHasStartMeeting (ZoomRoom)
|
if (KeypadMode == eKeypadMode.Dial)
|
||||||
if (KeypadMode == eKeypadMode.Dial && !(Codec is IHasStartMeeting))
|
|
||||||
return GetFormattedDialString(DialStringBuilder.ToString());
|
return GetFormattedDialString(DialStringBuilder.ToString());
|
||||||
else
|
else
|
||||||
return DialStringBuilder.ToString();
|
return DialStringBuilder.ToString();
|
||||||
@@ -181,23 +177,9 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
});
|
});
|
||||||
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
||||||
|
|
||||||
PasswordStringFeedback = new StringFeedback(() =>
|
|
||||||
{
|
|
||||||
if (PasswordStringBuilder.Length > 0)
|
|
||||||
{
|
|
||||||
Parent.Keyboard.EnableGoButton();
|
|
||||||
return PasswordStringBuilder.ToString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Parent.Keyboard.DisableGoButton();
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
PasswordStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.PasswordPromptPasswordText]);
|
|
||||||
|
|
||||||
SetupDirectoryList();
|
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]);
|
||||||
|
|
||||||
@@ -214,18 +196,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
|
triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
|
||||||
StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress);
|
StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress);
|
||||||
|
|
||||||
|
|
||||||
if (Codec is IPasswordPrompt)
|
|
||||||
{
|
|
||||||
SetupPasswordPrompt();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// If the codec is ready, then get the values we want, otherwise wait
|
|
||||||
if (Codec.IsReady)
|
|
||||||
Codec_IsReady();
|
|
||||||
else
|
|
||||||
codec.IsReadyChange += (o, a) => Codec_IsReady();
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -321,20 +291,24 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var call = e.CallItem;
|
var call = e.CallItem;
|
||||||
var meetingInfoSender = sender as IHasMeetingInfo;
|
|
||||||
|
|
||||||
switch (e.CallItem.Status)
|
switch (e.CallItem.Status)
|
||||||
{
|
{
|
||||||
case eCodecCallStatus.Connected:
|
case eCodecCallStatus.Connected:
|
||||||
// fire at SRL item
|
// fire at SRL item
|
||||||
|
KeypadMode = eKeypadMode.DTMF;
|
||||||
|
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||||
|
DialStringFeedback.FireUpdate();
|
||||||
|
DialStringTextCheckEnables();
|
||||||
Parent.ShowNotificationRibbon("Connected", 2000);
|
Parent.ShowNotificationRibbon("Connected", 2000);
|
||||||
OnCallConnected();
|
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
||||||
|
ShowKeypad();
|
||||||
|
((Parent.CurrentRoom as IHasCurrentVolumeControls).CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff();
|
||||||
//VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
|
//VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
|
||||||
break;
|
break;
|
||||||
case eCodecCallStatus.Connecting:
|
case eCodecCallStatus.Connecting:
|
||||||
// fire at SRL item
|
// fire at SRL item
|
||||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||||
OnCallConnected();
|
|
||||||
break;
|
break;
|
||||||
case eCodecCallStatus.Dialing:
|
case eCodecCallStatus.Dialing:
|
||||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||||
@@ -350,10 +324,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||||
DialStringFeedback.FireUpdate();
|
DialStringFeedback.FireUpdate();
|
||||||
Parent.ShowNotificationRibbon("Disconnected", 2000);
|
Parent.ShowNotificationRibbon("Disconnected", 2000);
|
||||||
Debug.Console(0, "Setting Connect Button mode to 0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case eCodecCallStatus.Disconnecting:
|
case eCodecCallStatus.Disconnecting:
|
||||||
break;
|
break;
|
||||||
@@ -374,32 +345,16 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
ShowIncomingModal(call);
|
ShowIncomingModal(call);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
||||||
|
|
||||||
if (meetingInfoSender != null && Codec.IsInCall)
|
uint stageJoin;
|
||||||
{
|
if (Codec.IsInCall)
|
||||||
var meetingInfo = meetingInfoSender.MeetingInfo;
|
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
||||||
|
else
|
||||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue =
|
stageJoin = UIBoolJoin.VCStagingInactivePopoverVisible;
|
||||||
(ushort) (meetingInfo.IsSharingMeeting ? 2 : 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue =
|
|
||||||
(ushort) (Codec.IsInCall ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint stageJoin;
|
|
||||||
if (Codec.IsInCall)
|
|
||||||
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Codec is IHasCallHistory)
|
|
||||||
stageJoin = UIBoolJoin.VCStagingInactivePopoverWithRecentsVisible;
|
|
||||||
else
|
|
||||||
stageJoin = UIBoolJoin.VCStagingInactivePopoverWithoutRecentsVisible;
|
|
||||||
}
|
|
||||||
if (IsVisible)
|
if (IsVisible)
|
||||||
StagingBarsInterlock.ShowInterlocked(stageJoin);
|
StagingBarsInterlock.ShowInterlocked(stageJoin);
|
||||||
else
|
else
|
||||||
@@ -411,36 +366,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
UpdateHeaderActiveCallList();
|
UpdateHeaderActiveCallList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCallConnected()
|
|
||||||
{
|
|
||||||
HidePasswordPrompt();
|
|
||||||
KeypadMode = eKeypadMode.DTMF;
|
|
||||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
|
||||||
DialStringFeedback.FireUpdate();
|
|
||||||
DialStringTextCheckEnables();
|
|
||||||
|
|
||||||
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
|
||||||
ShowKeypad();
|
|
||||||
|
|
||||||
UnmuteRoomOnCallConnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UnmuteRoomOnCallConnect()
|
|
||||||
{
|
|
||||||
var volControl = Parent.CurrentRoom as IHasCurrentVolumeControls;
|
|
||||||
|
|
||||||
if (volControl == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var currentVolControls = volControl.CurrentVolumeControls as IBasicVolumeWithFeedback;
|
|
||||||
|
|
||||||
if (currentVolControls != null)
|
|
||||||
{
|
|
||||||
currentVolControls.MuteOff();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Redraws the calls list on the header
|
/// Redraws the calls list on the header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -464,8 +389,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
ActiveCallsSRL.Count = (ushort)activeList.Count;
|
ActiveCallsSRL.Count = (ushort)activeList.Count;
|
||||||
|
|
||||||
// If Active Calls list is visible and codec is not in a call, hide the list
|
// If Active Calls list is visible and codec is not in a call, hide the list
|
||||||
if (!Codec.IsInCall && Parent.PopupInterlock.CurrentJoin == Parent.CallListOrMeetingInfoPopoverVisibilityJoin)
|
if (!Codec.IsInCall && Parent.PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||||
Parent.PopupInterlock.ShowInterlockedWithToggle(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
|
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -556,67 +481,20 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents);
|
TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents);
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingCameraPress, ShowCameraControls);
|
TriList.SetSigFalseAction(UIBoolJoin.VCStagingCameraPress, ShowCameraControls);
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress);
|
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress);
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingMeetNowPress, MeetNowPress);
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, CallStopSharingPress);
|
|
||||||
|
|
||||||
var meetingInfoCodec = Codec as IHasMeetingInfo;
|
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () =>
|
||||||
{
|
{
|
||||||
if (Codec.ActiveCalls.Count > 1)
|
if (Codec.ActiveCalls.Count > 1)
|
||||||
{
|
{
|
||||||
Parent.PopupInterlock.ShowInterlocked(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
|
Parent.PopupInterlock.ShowInterlocked(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||||
}
|
|
||||||
else if (meetingInfoCodec != null && Codec.ActiveCalls.Count == 1)
|
|
||||||
{
|
|
||||||
var meetingInfo = meetingInfoCodec.MeetingInfo;
|
|
||||||
|
|
||||||
if (meetingInfo != null && meetingInfo.IsSharingMeeting)
|
|
||||||
{
|
|
||||||
var presentationMeetingCodec = Codec as IHasPresentationOnlyMeeting;
|
|
||||||
if (presentationMeetingCodec != null)
|
|
||||||
{
|
|
||||||
presentationMeetingCodec.StartNormalMeetingFromSharingOnlyMeeting();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Codec.EndAllCalls();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
Codec.EndAllCalls();
|
Codec.EndAllCalls();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallEndAllConfirmPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.CallEndAllConfirmPress, () =>
|
||||||
{
|
{
|
||||||
Parent.PopupInterlock.HideAndClear();
|
Parent.PopupInterlock.HideAndClear();
|
||||||
Codec.EndAllCalls();
|
Codec.EndAllCalls();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (meetingInfoCodec != null)
|
|
||||||
{
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.MeetingLeavePress, () =>
|
|
||||||
{
|
|
||||||
Parent.PopupInterlock.HideAndClear();
|
|
||||||
|
|
||||||
if (meetingInfoCodec.MeetingInfo.IsHost)
|
|
||||||
{
|
|
||||||
Codec.EndAllCalls();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var startMeetingCodec = Codec as IHasStartMeeting;
|
|
||||||
if (startMeetingCodec != null)
|
|
||||||
{
|
|
||||||
startMeetingCodec.LeaveMeeting();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupCameraControls()
|
void SetupCameraControls()
|
||||||
@@ -635,18 +513,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
var codecOffCameras = Codec as IHasCameraOff;
|
var codecOffCameras = Codec as IHasCameraOff;
|
||||||
|
|
||||||
var supportsCameraOffMode = Codec.SupportsCameraOff;
|
|
||||||
|
|
||||||
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
||||||
|
|
||||||
var supportsAutoCameraMode = Codec.SupportsCameraAutoMode;
|
if (codecAutoCameras != null)
|
||||||
|
|
||||||
if (codecAutoCameras != null && supportsAutoCameraMode)
|
|
||||||
{
|
{
|
||||||
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
||||||
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
||||||
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
||||||
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCCameraAutoModeIsOnFb]);
|
|
||||||
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 1 Pressed"].SetSigFalseAction(
|
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 1 Pressed"].SetSigFalseAction(
|
||||||
//() => codecAutoCameras.CameraAutoModeOn());
|
//() => codecAutoCameras.CameraAutoModeOn());
|
||||||
|
|
||||||
@@ -681,7 +554,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 2 Pressed"].SetSigFalseAction(
|
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 2 Pressed"].SetSigFalseAction(
|
||||||
// () => ShowCameraManualMode());
|
// () => ShowCameraManualMode());
|
||||||
|
|
||||||
if (codecOffCameras != null && supportsCameraOffMode)
|
if (codecOffCameras != null)
|
||||||
{
|
{
|
||||||
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
|
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
|
||||||
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
|
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
|
||||||
@@ -896,14 +769,12 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
if (camerasCodec != null && camerasCodec.SelectedCamera != null)
|
if (camerasCodec != null && camerasCodec.SelectedCamera != null)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Attempting to map camera actions to selected camera: '{0}'", camerasCodec.SelectedCamera.Key);
|
|
||||||
var dpad = CameraPtzPad;
|
var dpad = CameraPtzPad;
|
||||||
|
|
||||||
var camera = camerasCodec.SelectedCamera as IHasCameraPtzControl;
|
var camera = camerasCodec.SelectedCamera as IHasCameraPtzControl;
|
||||||
if (camera != null)
|
if (camera != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
Debug.Console(2, "Selected camera is IHasCameraPtzControl");
|
|
||||||
if (camerasCodec.SelectedCamera.CanTilt)
|
if (camerasCodec.SelectedCamera.CanTilt)
|
||||||
{
|
{
|
||||||
dpad.SigUp.SetBoolSigAction((b) =>
|
dpad.SigUp.SetBoolSigAction((b) =>
|
||||||
@@ -968,46 +839,25 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(2, "Selected Camera is not IHasCameraPtzControl. No controls to map");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(2, "Codec does not have cameras of selected camera is null");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determines if codec is in manual camera control mode and shows feedback
|
// Determines if codec is in manual camera control mode and shows feedback
|
||||||
void ShowCameraManualMode()
|
void ShowCameraManualMode()
|
||||||
{
|
{
|
||||||
Debug.Console(2, "ShowCameraManualMode");
|
|
||||||
|
|
||||||
var inManualMode = true;
|
var inManualMode = true;
|
||||||
|
|
||||||
var codecOffCameras = Codec as IHasCameraOff;
|
var codecOffCameras = Codec as IHasCameraOff;
|
||||||
|
|
||||||
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
||||||
|
|
||||||
var supportsAutoCameras = codecAutoCameras != null && Codec.SupportsCameraAutoMode;
|
|
||||||
|
|
||||||
if (codecOffCameras != null && codecOffCameras.CameraIsOffFeedback.BoolValue)
|
if (codecOffCameras != null && codecOffCameras.CameraIsOffFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
inManualMode = false;
|
inManualMode = false;
|
||||||
|
|
||||||
var codecCameraMute = Codec as IHasCameraMute;
|
|
||||||
|
|
||||||
if (codecCameraMute != null)
|
|
||||||
{
|
|
||||||
codecCameraMute.CameraMuteOff();
|
|
||||||
inManualMode = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear auto mode
|
// Clear auto mode
|
||||||
if (supportsAutoCameras)
|
if (codecAutoCameras != null )
|
||||||
{
|
{
|
||||||
if (codecAutoCameras.CameraAutoModeIsOnFeedback.BoolValue)
|
if (codecAutoCameras.CameraAutoModeIsOnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
@@ -1098,7 +948,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
// if it's today, show a simpler string
|
// if it's today, show a simpler string
|
||||||
string timeText = null;
|
string timeText = null;
|
||||||
if (c.StartTime.Date == DateTime.Now.Date)
|
if (c.StartTime.Date == DateTime.Now.Date)
|
||||||
timeText = c.StartTime.ToString("t", Global.Culture);
|
timeText = c.StartTime.ToShortTimeString();
|
||||||
else if (c.StartTime == DateTime.MinValue)
|
else if (c.StartTime == DateTime.MinValue)
|
||||||
timeText = "";
|
timeText = "";
|
||||||
else
|
else
|
||||||
@@ -1155,21 +1005,22 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
void SetupDirectoryList()
|
void SetupDirectoryList()
|
||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
if (codec == null)
|
if (codec != null)
|
||||||
{
|
{
|
||||||
return;
|
DirectoryList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCDirectoryList],
|
||||||
}
|
true, 1300);
|
||||||
|
codec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dir_DirectoryResultReturned);
|
||||||
|
|
||||||
DirectoryList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCDirectoryList],
|
if (codec.PhonebookSyncState.InitialSyncComplete)
|
||||||
true, 1300);
|
SetCurrentDirectoryToRoot();
|
||||||
codec.DirectoryResultReturned += dir_DirectoryResultReturned;
|
else
|
||||||
|
{
|
||||||
|
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
||||||
|
}
|
||||||
|
|
||||||
if (codec.PhonebookSyncState.InitialSyncComplete)
|
RefreshDirectory();
|
||||||
SetCurrentDirectoryToRoot();
|
|
||||||
else
|
}
|
||||||
{
|
|
||||||
codec.PhonebookSyncState.InitialSyncCompleted += PhonebookSyncState_InitialSyncCompleted;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1177,15 +1028,11 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetCurrentDirectoryToRoot()
|
void SetCurrentDirectoryToRoot()
|
||||||
{
|
{
|
||||||
var hasDirectory = Codec as IHasDirectory;
|
(Codec as IHasDirectory).SetCurrentDirectoryToRoot();
|
||||||
|
|
||||||
if (hasDirectory == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
hasDirectory.SetCurrentDirectoryToRoot();
|
|
||||||
SearchKeypadClear();
|
SearchKeypadClear();
|
||||||
|
|
||||||
|
RefreshDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1197,17 +1044,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
|
|
||||||
if (codec == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetCurrentDirectoryToRoot();
|
SetCurrentDirectoryToRoot();
|
||||||
|
|
||||||
|
RefreshDirectory();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1217,7 +1057,8 @@ 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)
|
||||||
{
|
{
|
||||||
RefreshDirectory(e.Directory);
|
|
||||||
|
RefreshDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1246,27 +1087,16 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void RefreshDirectory()
|
/// <param name="dir"></param>
|
||||||
|
void RefreshDirectory()
|
||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
if ((Codec as IHasDirectory).CurrentDirectoryResult.CurrentDirectoryResults.Count > 0)
|
||||||
|
|
||||||
if (codec == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefreshDirectory(codec.CurrentDirectoryResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RefreshDirectory(CodecDirectory directory)
|
|
||||||
{
|
|
||||||
if (directory.CurrentDirectoryResults.Count > 0)
|
|
||||||
{
|
{
|
||||||
ushort i = 0;
|
ushort i = 0;
|
||||||
foreach (var r in directory.CurrentDirectoryResults)
|
foreach (var r in (Codec as IHasDirectory).CurrentDirectoryResult.CurrentDirectoryResults)
|
||||||
{
|
{
|
||||||
if (i == DirectoryList.MaxCount)
|
if (i == DirectoryList.MaxCount)
|
||||||
{
|
{
|
||||||
@@ -1286,33 +1116,19 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
// If more than one contact method, show contact method modal dialog
|
// If more than one contact method, show contact method modal dialog
|
||||||
DirectoryList.SetItemButtonAction(i, b =>
|
DirectoryList.SetItemButtonAction(i, b =>
|
||||||
{
|
{
|
||||||
if (b)
|
if (!b)
|
||||||
{
|
{
|
||||||
return;
|
// Refresh the contact methods list
|
||||||
|
RefreshContactMethodsModalList(dc);
|
||||||
|
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||||
}
|
}
|
||||||
// Refresh the contact methods list
|
|
||||||
RefreshContactMethodsModalList(dc);
|
|
||||||
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (dc.ContactMethods.Count == 1)
|
|
||||||
{
|
|
||||||
var invitableContact = dc as IInvitableContact;
|
|
||||||
|
|
||||||
if (invitableContact != null)
|
|
||||||
{
|
|
||||||
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(invitableContact); });
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If only one contact method, just dial that method
|
|
||||||
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Unable to dial contact. No availble ContactMethod(s) specified");
|
// If only one contact method, just dial that method
|
||||||
|
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // is DirectoryFolder
|
else // is DirectoryFolder
|
||||||
@@ -1339,7 +1155,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
DirectoryList.SetItemMainText(1, "No Results Found");
|
DirectoryList.SetItemMainText(1, "No Results Found");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
void RefreshContactMethodsModalList(DirectoryContact contact)
|
void RefreshContactMethodsModalList(DirectoryContact contact)
|
||||||
{
|
{
|
||||||
@@ -1384,7 +1201,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
var lc = Codec as IHasCodecLayouts;
|
var lc = Codec as IHasCodecLayouts;
|
||||||
if (lc != null)
|
if (lc != null)
|
||||||
{
|
{
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggleSingleProminent);
|
||||||
lc.LocalLayoutFeedback.LinkInputSig(TriList.StringInput[UIStringJoin.VCLayoutModeText]);
|
lc.LocalLayoutFeedback.LinkInputSig(TriList.StringInput[UIStringJoin.VCLayoutModeText]);
|
||||||
lc.LocalLayoutFeedback.OutputChange += (o,a) =>
|
lc.LocalLayoutFeedback.OutputChange += (o,a) =>
|
||||||
{
|
{
|
||||||
@@ -1397,7 +1214,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
var cisco = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec;
|
var cisco = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec;
|
||||||
if (cisco != null)
|
if (cisco != null)
|
||||||
{
|
{
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggleSingleProminent);
|
|
||||||
// Cisco has min/max buttons that need special sauce
|
// Cisco has min/max buttons that need special sauce
|
||||||
cisco.SharingContentIsOnFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
cisco.SharingContentIsOnFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
||||||
//cisco.PresentationViewMaximizedFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
//cisco.PresentationViewMaximizedFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
||||||
@@ -1405,16 +1221,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.SetSigFalseAction(UIBoolJoin.VCMinMaxPress, cisco.MinMaxLayoutToggle);
|
TriList.SetSigFalseAction(UIBoolJoin.VCMinMaxPress, cisco.MinMaxLayoutToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
var zoomRoom = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom;
|
|
||||||
if (zoomRoom != null)
|
|
||||||
{
|
|
||||||
TriList.BooleanInput[UIBoolJoin.VCLayoutToggleEnable].BoolValue = true;
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggle);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1442,21 +1249,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void RevealKeyboard()
|
void RevealKeyboard()
|
||||||
{
|
{
|
||||||
if (_passwordPromptDialogVisible)
|
if (VCControlsInterlock.CurrentJoin == UIBoolJoin.VCKeypadWithFavoritesVisible && KeypadMode == eKeypadMode.Dial)
|
||||||
{
|
|
||||||
Debug.Console(2, "Attaching Keyboard to PasswordPromptDialog");
|
|
||||||
DetachDialKeyboard();
|
|
||||||
DetachSearchKeyboard();
|
|
||||||
var kb = Parent.Keyboard;
|
|
||||||
kb.KeyPress -= Keyboard_PasswordKeyPress;
|
|
||||||
kb.KeyPress += Keyboard_PasswordKeyPress;
|
|
||||||
kb.HideAction = this.DetachPasswordKeyboard;
|
|
||||||
kb.GoButtonText = "Submit";
|
|
||||||
kb.GoButtonVisible = true;
|
|
||||||
PasswordStringCheckEnables();
|
|
||||||
kb.Show();
|
|
||||||
}
|
|
||||||
else if (VCControlsInterlock.CurrentJoin == UIBoolJoin.VCKeypadWithFavoritesVisible && KeypadMode == eKeypadMode.Dial)
|
|
||||||
{
|
{
|
||||||
var kb = Parent.Keyboard;
|
var kb = Parent.Keyboard;
|
||||||
kb.KeyPress -= Keyboard_DialKeyPress;
|
kb.KeyPress -= Keyboard_DialKeyPress;
|
||||||
@@ -1478,7 +1271,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
SearchStringKeypadCheckEnables();
|
SearchStringKeypadCheckEnables();
|
||||||
kb.Show();
|
kb.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1534,32 +1326,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event handler for keyboard dialing
|
|
||||||
/// </summary>
|
|
||||||
void Keyboard_PasswordKeyPress(object sender, PepperDash.Essentials.Core.Touchpanels.Keyboards.KeyboardControllerPressEventArgs e)
|
|
||||||
{
|
|
||||||
if (_passwordPromptDialogVisible)
|
|
||||||
{
|
|
||||||
if (e.Text != null)
|
|
||||||
PasswordStringBuilder.Append(e.Text);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (e.SpecialKey == KeyboardSpecialKey.Backspace)
|
|
||||||
PasswordKeypadBackspacePress();
|
|
||||||
else if (e.SpecialKey == KeyboardSpecialKey.Clear)
|
|
||||||
PasswordKeypadClear();
|
|
||||||
else if (e.SpecialKey == KeyboardSpecialKey.GoButton)
|
|
||||||
{
|
|
||||||
(Codec as IPasswordPrompt).SubmitPassword(PasswordStringBuilder.ToString());
|
|
||||||
HidePasswordPrompt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PasswordStringFeedback.FireUpdate();
|
|
||||||
PasswordStringCheckEnables();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Call
|
/// Call
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1573,11 +1339,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Parent.Keyboard.KeyPress -= Keyboard_SearchKeyPress;
|
Parent.Keyboard.KeyPress -= Keyboard_SearchKeyPress;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetachPasswordKeyboard()
|
|
||||||
{
|
|
||||||
Parent.Keyboard.KeyPress -= Keyboard_PasswordKeyPress;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the camera controls subpage
|
/// Shows the camera controls subpage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1655,22 +1416,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
|
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Meet Now button
|
|
||||||
/// </summary>
|
|
||||||
void MeetNowPress()
|
|
||||||
{
|
|
||||||
var startMeetingCodec = Codec as IHasStartMeeting;
|
|
||||||
if (startMeetingCodec != null)
|
|
||||||
{
|
|
||||||
startMeetingCodec.StartMeeting(startMeetingCodec.DefaultMeetingDurationMin);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(2, "Codce does not implment IHasStartMeeting. Cannot meet now");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connect call button
|
/// Connect call button
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1681,16 +1426,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Codec.Dial(DialStringBuilder.ToString());
|
Codec.Dial(DialStringBuilder.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Stop Sharing button
|
|
||||||
/// </summary>
|
|
||||||
void CallStopSharingPress()
|
|
||||||
{
|
|
||||||
Codec.StopSharing();
|
|
||||||
Parent.CurrentRoom.RunRouteAction("codecOsd", Parent.CurrentRoom.SourceListKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1857,40 +1592,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Parent.Keyboard.DisableGoButton();
|
Parent.Keyboard.DisableGoButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clears the Password keypad
|
|
||||||
/// </summary>
|
|
||||||
void PasswordKeypadClear()
|
|
||||||
{
|
|
||||||
PasswordStringBuilder.Remove(0, PasswordStringBuilder.Length);
|
|
||||||
PasswordStringFeedback.FireUpdate();
|
|
||||||
PasswordStringCheckEnables();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
void PasswordKeypadBackspacePress()
|
|
||||||
{
|
|
||||||
PasswordStringBuilder.Remove(PasswordStringBuilder.Length - 1, 1);
|
|
||||||
|
|
||||||
PasswordStringFeedback.FireUpdate();
|
|
||||||
PasswordStringCheckEnables();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Checks the enabled states of various elements around the keypad
|
|
||||||
/// </summary>
|
|
||||||
void PasswordStringCheckEnables()
|
|
||||||
{
|
|
||||||
var textIsEntered = PasswordStringBuilder.Length > 0;
|
|
||||||
if (textIsEntered)
|
|
||||||
Parent.Keyboard.EnableGoButton();
|
|
||||||
else
|
|
||||||
Parent.Keyboard.DisableGoButton();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the text value for the keypad dial entry field
|
/// Returns the text value for the keypad dial entry field
|
||||||
@@ -1936,62 +1637,5 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Dial = 0,
|
Dial = 0,
|
||||||
DTMF
|
DTMF
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupPasswordPrompt()
|
|
||||||
{
|
|
||||||
var passwordPromptCodec = Codec as IPasswordPrompt;
|
|
||||||
|
|
||||||
passwordPromptCodec.PasswordRequired += new EventHandler<PasswordPromptEventArgs>(passwordPromptCodec_PasswordRequired);
|
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.PasswordPromptCancelPress, HidePasswordPrompt);
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.PasswordPromptTextPress, RevealKeyboard);
|
|
||||||
}
|
|
||||||
|
|
||||||
void passwordPromptCodec_PasswordRequired(object sender, PasswordPromptEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.LoginAttemptCancelled)
|
|
||||||
{
|
|
||||||
HidePasswordPrompt();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(e.Message))
|
|
||||||
{
|
|
||||||
TriList.SetString(UIStringJoin.PasswordPromptMessageText, e.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.LoginAttemptFailed)
|
|
||||||
{
|
|
||||||
// TODO: Show a message modal to indicate the login attempt failed
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.PasswordPromptErrorVisible, e.LastAttemptWasIncorrect);
|
|
||||||
|
|
||||||
ShowPasswordPrompt();
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool _passwordPromptDialogVisible;
|
|
||||||
|
|
||||||
void ShowPasswordPrompt()
|
|
||||||
{
|
|
||||||
// Clear out any previous data
|
|
||||||
PasswordKeypadClear();
|
|
||||||
|
|
||||||
_passwordPromptDialogVisible = true;
|
|
||||||
TriList.SetBool(UIBoolJoin.PasswordPromptDialogVisible, _passwordPromptDialogVisible);
|
|
||||||
RevealKeyboard();
|
|
||||||
}
|
|
||||||
|
|
||||||
void HidePasswordPrompt()
|
|
||||||
{
|
|
||||||
if (_passwordPromptDialogVisible)
|
|
||||||
{
|
|
||||||
_passwordPromptDialogVisible = false;
|
|
||||||
Parent.Keyboard.Hide();
|
|
||||||
TriList.SetBool(UIBoolJoin.PasswordPromptDialogVisible, _passwordPromptDialogVisible);
|
|
||||||
PasswordKeypadClear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,19 +8,11 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMobileControl : IKeyed
|
public interface IMobileControl : IKeyed
|
||||||
{
|
{
|
||||||
void CreateMobileControlRoomBridge(EssentialsRoomBase room, IMobileControl parent);
|
void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
|
||||||
|
|
||||||
void LinkSystemMonitorToAppServer();
|
void LinkSystemMonitorToAppServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Describes a MobileSystemController that accepts IEssentialsRoom
|
|
||||||
/// </summary>
|
|
||||||
public interface IMobileControl3 : IMobileControl
|
|
||||||
{
|
|
||||||
void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes a MobileControl Room Bridge
|
/// Describes a MobileControl Room Bridge
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Describes the functionality required to prompt a user to enter a password
|
|
||||||
/// </summary>
|
|
||||||
public interface IPasswordPrompt
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Notifies when a password is required or is entered incorrectly
|
|
||||||
/// </summary>
|
|
||||||
event EventHandler<PasswordPromptEventArgs> PasswordRequired;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Submits the password
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="password"></param>
|
|
||||||
void SubmitPassword(string password);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PasswordPromptEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates if the last submitted password was incorrect
|
|
||||||
/// </summary>
|
|
||||||
public bool LastAttemptWasIncorrect { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates that the login attempt has failed
|
|
||||||
/// </summary>
|
|
||||||
public bool LoginAttemptFailed { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates that the process was cancelled and the prompt should be dismissed
|
|
||||||
/// </summary>
|
|
||||||
public bool LoginAttemptCancelled { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A message to be displayed to the user
|
|
||||||
/// </summary>
|
|
||||||
public string Message { get; private set; }
|
|
||||||
|
|
||||||
public PasswordPromptEventArgs(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message)
|
|
||||||
{
|
|
||||||
LastAttemptWasIncorrect = lastAttemptIncorrect;
|
|
||||||
LoginAttemptFailed = loginFailed;
|
|
||||||
LoginAttemptCancelled = loginCancelled;
|
|
||||||
Message = message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -60,6 +60,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
DeviceCriticalSection.Enter();
|
DeviceCriticalSection.Enter();
|
||||||
AddDeviceEnabled = false;
|
AddDeviceEnabled = false;
|
||||||
// PreActivate all devices
|
// PreActivate all devices
|
||||||
|
Debug.Console(0,"****PreActivation starting...****");
|
||||||
foreach (var d in Devices.Values)
|
foreach (var d in Devices.Values)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -69,9 +70,12 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device PreActivation failure:\r{0}", e);
|
Debug.Console(0, d, "ERROR: Device {1} PreActivation failure: {0}", e.Message, d.Key);
|
||||||
|
Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Debug.Console(0, "****PreActivation complete****");
|
||||||
|
Debug.Console(0, "****Activation starting...****");
|
||||||
|
|
||||||
// Activate all devices
|
// Activate all devices
|
||||||
foreach (var d in Devices.Values)
|
foreach (var d in Devices.Values)
|
||||||
@@ -83,10 +87,14 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device Activation failure:\r{0}", e);
|
Debug.Console(0, d, "ERROR: Device {1} Activation failure: {0}", e.Message, d.Key);
|
||||||
|
Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Console(0, "****Activation complete****");
|
||||||
|
Debug.Console(0, "****PostActivation starting...****");
|
||||||
|
|
||||||
// PostActivate all devices
|
// PostActivate all devices
|
||||||
foreach (var d in Devices.Values)
|
foreach (var d in Devices.Values)
|
||||||
{
|
{
|
||||||
@@ -97,10 +105,13 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device PostActivation failure:\r{0}", e);
|
Debug.Console(0, d, "ERROR: Device {1} PostActivation failure: {0}", e.Message, d.Key);
|
||||||
|
Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Console(0, "****PostActivation complete****");
|
||||||
|
|
||||||
OnAllDevicesActivated();
|
OnAllDevicesActivated();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|||||||
@@ -156,15 +156,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message);
|
||||||
|
|
||||||
Debug.Console(2, "{0}", ex.StackTrace);
|
Debug.Console(2, "{0}", ex.StackTrace);
|
||||||
|
|
||||||
if (ex.InnerException == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Inner exception while creating device {0}: {1}", dc.Key,
|
|
||||||
ex.InnerException.Message);
|
|
||||||
Debug.Console(2, "{0}", ex.InnerException.StackTrace);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,11 @@ namespace PepperDash.Essentials.Core
|
|||||||
ValueFunc = valueFunc;
|
ValueFunc = valueFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetValueFunc(Func<bool> newFunc)
|
||||||
|
{
|
||||||
|
ValueFunc = newFunc;
|
||||||
|
}
|
||||||
|
|
||||||
public override void FireUpdate()
|
public override void FireUpdate()
|
||||||
{
|
{
|
||||||
bool newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
bool newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
||||||
|
|||||||
@@ -51,6 +51,12 @@ namespace PepperDash.Essentials.Core
|
|||||||
ValueFunc = valueFunc;
|
ValueFunc = valueFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetValueFunc(Func<int> newFunc)
|
||||||
|
{
|
||||||
|
ValueFunc = newFunc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public override void FireUpdate()
|
public override void FireUpdate()
|
||||||
{
|
{
|
||||||
var newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
var newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
||||||
|
|||||||
@@ -52,7 +52,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
ValueFunc = valueFunc;
|
ValueFunc = valueFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetValueFunc(Func<string> newFunc)
|
||||||
|
{
|
||||||
|
ValueFunc = newFunc;
|
||||||
|
}
|
||||||
|
|
||||||
public override void FireUpdate()
|
public override void FireUpdate()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -119,7 +119,19 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
var slot = Global.ControlSystem.ProgramNumber;
|
var slot = Global.ControlSystem.ProgramNumber;
|
||||||
|
|
||||||
var guidFilePath = Global.FilePathPrefix +
|
var guidFilePath = Global.FilePathPrefix +
|
||||||
string.Format(@"{0}-FusionGuids.json", InitialParametersClass.ProgramIDTag);
|
string.Format(@"{0}-FusionGuids-{1:X2}.json", InitialParametersClass.ProgramIDTag, _ipId);
|
||||||
|
|
||||||
|
var oldGuidFilePath = Global.FilePathPrefix +
|
||||||
|
string.Format(@"{0}-FusionGuids.json", InitialParametersClass.ProgramIDTag);
|
||||||
|
|
||||||
|
if (File.Exists(oldGuidFilePath))
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Migrating from old Fusion GUID file to new Fusion GUID File");
|
||||||
|
|
||||||
|
File.Copy(oldGuidFilePath, guidFilePath);
|
||||||
|
|
||||||
|
File.Delete(oldGuidFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
_guidFileExists = File.Exists(guidFilePath);
|
_guidFileExists = File.Exists(guidFilePath);
|
||||||
|
|
||||||
@@ -149,19 +161,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AddPostActivationAction(() =>
|
AddPostActivationAction(() => PostActivate(guidFilePath));
|
||||||
{
|
|
||||||
CreateSymbolAndBasicSigs(_ipId);
|
|
||||||
SetUpSources();
|
|
||||||
SetUpCommunitcationMonitors();
|
|
||||||
SetUpDisplay();
|
|
||||||
SetUpError();
|
|
||||||
ExecuteCustomSteps();
|
|
||||||
|
|
||||||
FusionRVI.GenerateFileForAllFusionDevices();
|
|
||||||
|
|
||||||
GenerateGuidFile(guidFilePath);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -169,6 +169,20 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PostActivate(string guidFilePath)
|
||||||
|
{
|
||||||
|
CreateSymbolAndBasicSigs(_ipId);
|
||||||
|
SetUpSources();
|
||||||
|
SetUpCommunitcationMonitors();
|
||||||
|
SetUpDisplay();
|
||||||
|
SetUpError();
|
||||||
|
ExecuteCustomSteps();
|
||||||
|
|
||||||
|
FusionRVI.GenerateFileForAllFusionDevices();
|
||||||
|
|
||||||
|
GenerateGuidFile(guidFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
protected string RoomGuid
|
protected string RoomGuid
|
||||||
{
|
{
|
||||||
get { return _guiDs.RoomGuid; }
|
get { return _guiDs.RoomGuid; }
|
||||||
@@ -314,7 +328,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
protected virtual void CreateSymbolAndBasicSigs(uint ipId)
|
protected virtual void CreateSymbolAndBasicSigs(uint ipId)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Creating Fusion Room symbol with GUID: {0}", RoomGuid);
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId);
|
||||||
|
|
||||||
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
||||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Globalization;
|
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Crestron.SimplSharp.CrestronIO;
|
using Crestron.SimplSharp.CrestronIO;
|
||||||
@@ -29,10 +28,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } }
|
public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } }
|
||||||
|
|
||||||
// TODO: consider making this configurable later
|
|
||||||
public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US");
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The file path prefix to the folder containing configuration files
|
/// The file path prefix to the folder containing configuration files
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,149 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents an abstract controller device for a partition dividing rooms that are combinable
|
||||||
|
///
|
||||||
|
/// In Auto mode, it can use a partition sensor to automatically determine whether the partition is present.
|
||||||
|
///
|
||||||
|
/// In Manual mode it accepts user input to tell it whether the partition is present.
|
||||||
|
/// </summary>
|
||||||
|
public class EssentialsPartitionController : IPartitionController
|
||||||
|
{
|
||||||
|
private IPartitionStateProvider _partitionSensor;
|
||||||
|
|
||||||
|
private bool isInAutoMode;
|
||||||
|
|
||||||
|
private bool partitionPresent;
|
||||||
|
|
||||||
|
public EssentialsPartitionController(string key, string name, IPartitionStateProvider sensor, bool defaultToManualMode, List<string> adjacentRoomKeys)
|
||||||
|
{
|
||||||
|
Key = key;
|
||||||
|
|
||||||
|
Name = name;
|
||||||
|
|
||||||
|
AdjacentRoomKeys = adjacentRoomKeys;
|
||||||
|
|
||||||
|
if (sensor != null)
|
||||||
|
{
|
||||||
|
_partitionSensor = sensor;
|
||||||
|
|
||||||
|
if (!defaultToManualMode)
|
||||||
|
{
|
||||||
|
SetAutoMode();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetManualMode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetManualMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
PartitionPresentFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PartitionPresentFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
if (isInAutoMode)
|
||||||
|
{
|
||||||
|
PartitionPresentFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IPartitionController Members
|
||||||
|
|
||||||
|
public List<string> AdjacentRoomKeys { get; private set; }
|
||||||
|
|
||||||
|
public void SetAutoMode()
|
||||||
|
{
|
||||||
|
isInAutoMode = true;
|
||||||
|
if (PartitionPresentFeedback != null)
|
||||||
|
{
|
||||||
|
PartitionPresentFeedback.SetValueFunc(() => _partitionSensor.PartitionPresentFeedback.BoolValue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PartitionPresentFeedback = new BoolFeedback(() => _partitionSensor.PartitionPresentFeedback.BoolValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_partitionSensor != null)
|
||||||
|
{
|
||||||
|
_partitionSensor.PartitionPresentFeedback.OutputChange += PartitionPresentFeedback_OutputChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetManualMode()
|
||||||
|
{
|
||||||
|
isInAutoMode = false;
|
||||||
|
if (PartitionPresentFeedback != null)
|
||||||
|
{
|
||||||
|
PartitionPresentFeedback.SetValueFunc(() => partitionPresent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PartitionPresentFeedback = new BoolFeedback(() => partitionPresent);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_partitionSensor != null)
|
||||||
|
{
|
||||||
|
_partitionSensor.PartitionPresentFeedback.OutputChange -= PartitionPresentFeedback_OutputChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void SetPartitionStatePresent()
|
||||||
|
{
|
||||||
|
if (!isInAutoMode)
|
||||||
|
{
|
||||||
|
partitionPresent = true;
|
||||||
|
PartitionPresentFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPartitionStateNotPresent()
|
||||||
|
{
|
||||||
|
if (!isInAutoMode)
|
||||||
|
{
|
||||||
|
partitionPresent = false;
|
||||||
|
PartitionPresentFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggglePartitionState()
|
||||||
|
{
|
||||||
|
if (!isInAutoMode)
|
||||||
|
{
|
||||||
|
partitionPresent = !partitionPresent;
|
||||||
|
PartitionPresentFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IPartitionStateProvider Members
|
||||||
|
|
||||||
|
public BoolFeedback PartitionPresentFeedback { get; private set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IKeyName Members
|
||||||
|
|
||||||
|
public string Name { get; private set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IKeyed Members
|
||||||
|
|
||||||
|
public string Key { get; private set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,13 +13,13 @@ using PepperDash.Essentials.Core.Config;
|
|||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for GLS Cresnet Partition Sensor")]
|
[Description("Wrapper class for GLS Cresnet Partition Sensor")]
|
||||||
public class GlsPartitionSensorController : CrestronGenericBridgeableBaseDevice
|
public class GlsPartitionSensorController : CrestronGenericBridgeableBaseDevice, IPartitionStateProvider
|
||||||
{
|
{
|
||||||
private GlsPartCn _partitionSensor;
|
private GlsPartCn _partitionSensor;
|
||||||
|
|
||||||
public StringFeedback NameFeedback { get; private set; }
|
public StringFeedback NameFeedback { get; private set; }
|
||||||
public BoolFeedback EnableFeedback { get; private set; }
|
public BoolFeedback EnableFeedback { get; private set; }
|
||||||
public BoolFeedback PartitionSensedFeedback { get; private set; }
|
public BoolFeedback PartitionPresentFeedback { get; private set; }
|
||||||
public BoolFeedback PartitionNotSensedFeedback { get; private set; }
|
public BoolFeedback PartitionNotSensedFeedback { get; private set; }
|
||||||
public IntFeedback SensitivityFeedback { get; private set; }
|
public IntFeedback SensitivityFeedback { get; private set; }
|
||||||
|
|
||||||
@@ -39,10 +39,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
RegisterCrestronGenericBase(_partitionSensor);
|
RegisterCrestronGenericBase(_partitionSensor);
|
||||||
|
|
||||||
NameFeedback = new StringFeedback(() => Name);
|
NameFeedback = new StringFeedback(() => Name);
|
||||||
EnableFeedback = new BoolFeedback(() => _partitionSensor.EnableFeedback.BoolValue);
|
EnableFeedback = new BoolFeedback(() => InTestMode ? TestEnableFeedback : _partitionSensor.EnableFeedback.BoolValue);
|
||||||
PartitionSensedFeedback = new BoolFeedback(() => _partitionSensor.PartitionSensedFeedback.BoolValue);
|
PartitionPresentFeedback = new BoolFeedback(() => InTestMode ? TestPartitionSensedFeedback : _partitionSensor.PartitionSensedFeedback.BoolValue);
|
||||||
PartitionNotSensedFeedback = new BoolFeedback(() => _partitionSensor.PartitionNotSensedFeedback.BoolValue);
|
PartitionNotSensedFeedback = new BoolFeedback(() => InTestMode ? !TestPartitionSensedFeedback : _partitionSensor.PartitionNotSensedFeedback.BoolValue);
|
||||||
SensitivityFeedback = new IntFeedback(() => _partitionSensor.SensitivityFeedback.UShortValue);
|
SensitivityFeedback = new IntFeedback(() => InTestMode ? TestSensitivityFeedback : _partitionSensor.SensitivityFeedback.UShortValue);
|
||||||
|
|
||||||
if (_partitionSensor != null) _partitionSensor.BaseEvent += PartitionSensor_BaseEvent;
|
if (_partitionSensor != null) _partitionSensor.BaseEvent += PartitionSensor_BaseEvent;
|
||||||
});
|
});
|
||||||
@@ -61,7 +61,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
case (GlsPartCn.PartitionSensedFeedbackEventId):
|
case (GlsPartCn.PartitionSensedFeedbackEventId):
|
||||||
{
|
{
|
||||||
PartitionSensedFeedback.FireUpdate();
|
PartitionPresentFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (GlsPartCn.PartitionNotSensedFeedbackEventId):
|
case (GlsPartCn.PartitionNotSensedFeedbackEventId):
|
||||||
@@ -93,6 +93,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
if (InTestMode)
|
if (InTestMode)
|
||||||
{
|
{
|
||||||
TestEnableFeedback = state;
|
TestEnableFeedback = state;
|
||||||
|
|
||||||
|
EnableFeedback.FireUpdate();
|
||||||
|
|
||||||
Debug.Console(1, this, "TestEnableFeedback: {0}", TestEnableFeedback.ToString());
|
Debug.Console(1, this, "TestEnableFeedback: {0}", TestEnableFeedback.ToString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -105,6 +108,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
if (InTestMode)
|
if (InTestMode)
|
||||||
{
|
{
|
||||||
TestPartitionSensedFeedback = state;
|
TestPartitionSensedFeedback = state;
|
||||||
|
|
||||||
|
PartitionPresentFeedback.FireUpdate();
|
||||||
|
PartitionNotSensedFeedback.FireUpdate();
|
||||||
|
|
||||||
Debug.Console(1, this, "TestPartitionSensedFeedback: {0}", TestPartitionSensedFeedback.ToString());
|
Debug.Console(1, this, "TestPartitionSensedFeedback: {0}", TestPartitionSensedFeedback.ToString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -117,6 +124,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
if (InTestMode)
|
if (InTestMode)
|
||||||
{
|
{
|
||||||
TestSensitivityFeedback = value;
|
TestSensitivityFeedback = value;
|
||||||
|
|
||||||
|
SensitivityFeedback.FireUpdate();
|
||||||
Debug.Console(1, this, "TestSensitivityFeedback: {0}", TestSensitivityFeedback);
|
Debug.Console(1, this, "TestSensitivityFeedback: {0}", TestSensitivityFeedback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -126,7 +135,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void SetEnableState(bool state)
|
public void SetEnableState(bool state)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Sensor is {0}, SetEnableState: {1}", _partitionSensor == null ? "null" : "not null", state);
|
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -135,7 +143,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void IncreaseSensitivity()
|
public void IncreaseSensitivity()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Sensor is {0}, IncreaseSensitivity", _partitionSensor == null ? "null" : "not null");
|
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -144,7 +151,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void DecreaseSensitivity()
|
public void DecreaseSensitivity()
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Sensor is {0}, DecreaseSensitivity", _partitionSensor == null ? "null" : "not null");
|
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -153,7 +159,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public void SetSensitivity(ushort value)
|
public void SetSensitivity(ushort value)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Sensor is {0}, SetSensitivity: {1}", _partitionSensor == null ? "null" : "not null", value);
|
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -181,7 +186,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
|
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
|
||||||
|
|
||||||
// link input from simpl
|
// link input from simpl
|
||||||
trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState);
|
trilist.SetSigTrueAction(joinMap.Enable.JoinNumber, () => SetEnableState(true));
|
||||||
|
trilist.SetSigFalseAction(joinMap.Enable.JoinNumber, () => SetEnableState(false));
|
||||||
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
|
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
|
||||||
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
|
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
|
||||||
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
||||||
@@ -189,7 +195,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
// link output to simpl
|
// link output to simpl
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]);
|
EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]);
|
||||||
PartitionSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]);
|
PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]);
|
||||||
PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]);
|
PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]);
|
||||||
SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]);
|
SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]);
|
||||||
|
|
||||||
@@ -219,7 +225,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
IsOnline.FireUpdate();
|
IsOnline.FireUpdate();
|
||||||
NameFeedback.FireUpdate();
|
NameFeedback.FireUpdate();
|
||||||
EnableFeedback.FireUpdate();
|
EnableFeedback.FireUpdate();
|
||||||
PartitionSensedFeedback.FireUpdate();
|
PartitionPresentFeedback.FireUpdate();
|
||||||
PartitionNotSensedFeedback.FireUpdate();
|
PartitionNotSensedFeedback.FireUpdate();
|
||||||
SensitivityFeedback.FireUpdate();
|
SensitivityFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
@@ -260,7 +266,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
|
Debug.Console(1, "Factory Attempting to create new GlsPartitionSensorController Device");
|
||||||
|
|
||||||
return new GlsPartitionSensorController(dc.Key, GetGlsPartCnDevice, dc);
|
return new GlsPartitionSensorController(dc.Key, GetGlsPartCnDevice, dc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes the functionality of a device that senses and provides partition state
|
||||||
|
/// </summary>
|
||||||
|
public interface IPartitionStateProvider : IKeyName
|
||||||
|
{
|
||||||
|
BoolFeedback PartitionPresentFeedback { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Describes the functionality of a device that can provide partition state either manually via user input or optionally via a sensor state
|
||||||
|
/// </summary>
|
||||||
|
public interface IPartitionController : IPartitionStateProvider
|
||||||
|
{
|
||||||
|
List<string> AdjacentRoomKeys { get; }
|
||||||
|
|
||||||
|
void SetPartitionStatePresent();
|
||||||
|
|
||||||
|
void SetPartitionStateNotPresent();
|
||||||
|
|
||||||
|
void ToggglePartitionState();
|
||||||
|
|
||||||
|
void SetManualMode();
|
||||||
|
|
||||||
|
void SetAutoMode();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -203,7 +203,6 @@
|
|||||||
<Compile Include="Devices\PC\Laptop.cs" />
|
<Compile Include="Devices\PC\Laptop.cs" />
|
||||||
<Compile Include="Devices\ReconfigurableDevice.cs" />
|
<Compile Include="Devices\ReconfigurableDevice.cs" />
|
||||||
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
|
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
|
||||||
<Compile Include="DeviceTypeInterfaces\IPasswordPrompt.cs" />
|
|
||||||
<Compile Include="DeviceTypeInterfaces\ITvPresetsProvider.cs" />
|
<Compile Include="DeviceTypeInterfaces\ITvPresetsProvider.cs" />
|
||||||
<Compile Include="DeviceTypeInterfaces\LanguageLabel.cs" />
|
<Compile Include="DeviceTypeInterfaces\LanguageLabel.cs" />
|
||||||
<Compile Include="DeviceTypeInterfaces\ILanguageProvider.cs" />
|
<Compile Include="DeviceTypeInterfaces\ILanguageProvider.cs" />
|
||||||
@@ -235,6 +234,8 @@
|
|||||||
<Compile Include="Interfaces\ILogStringsWithLevel.cs" />
|
<Compile Include="Interfaces\ILogStringsWithLevel.cs" />
|
||||||
<Compile Include="Occupancy\GlsOccupancySensorPropertiesConfig.cs" />
|
<Compile Include="Occupancy\GlsOccupancySensorPropertiesConfig.cs" />
|
||||||
<Compile Include="Occupancy\GlsOirOccupancySensorController.cs" />
|
<Compile Include="Occupancy\GlsOirOccupancySensorController.cs" />
|
||||||
|
<Compile Include="PartitionSensor\EssentialsPartitionController.cs" />
|
||||||
|
<Compile Include="PartitionSensor\IPartitionStateProvider.cs" />
|
||||||
<Compile Include="Occupancy\OccupancyAggregatorConfig.cs" />
|
<Compile Include="Occupancy\OccupancyAggregatorConfig.cs" />
|
||||||
<Compile Include="Queues\ComsMessage.cs" />
|
<Compile Include="Queues\ComsMessage.cs" />
|
||||||
<Compile Include="Queues\ProcessStringMessage.cs" />
|
<Compile Include="Queues\ProcessStringMessage.cs" />
|
||||||
@@ -290,6 +291,10 @@
|
|||||||
<Compile Include="Remotes\CrestronRemotePropertiesConfig.cs" />
|
<Compile Include="Remotes\CrestronRemotePropertiesConfig.cs" />
|
||||||
<Compile Include="Remotes\Hrxx0WirelessRemoteController.cs" />
|
<Compile Include="Remotes\Hrxx0WirelessRemoteController.cs" />
|
||||||
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
||||||
|
<Compile Include="Room\Combining\EssentialsRoomCombiner.cs" />
|
||||||
|
<Compile Include="Room\Combining\EssentialsRoomCombinerPropertiesConfig.cs" />
|
||||||
|
<Compile Include="Room\Combining\IEssentialsRoomCombiner.cs" />
|
||||||
|
<Compile Include="Room\Combining\RoomCombinationScenario.cs" />
|
||||||
<Compile Include="Room\EssentialsRoomBase.cs" />
|
<Compile Include="Room\EssentialsRoomBase.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsRoomScheduledEventsConfig.cs" />
|
<Compile Include="Room\Config\EssentialsRoomScheduledEventsConfig.cs" />
|
||||||
<Compile Include="Room\IEssentialsRoom.cs" />
|
<Compile Include="Room\IEssentialsRoom.cs" />
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<tags>crestron 3series 4series</tags>
|
<tags>crestron 3series 4series</tags>
|
||||||
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="PepperDashCore" version="[1.0.45, 2.0.0)"/>
|
<dependency id="PepperDashCore" version="[1.0.45, 1.1.0)"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|||||||
@@ -0,0 +1,264 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
public class EssentialsRoomCombiner : EssentialsDevice, IEssentialsRoomCombiner
|
||||||
|
{
|
||||||
|
private EssentialsRoomCombinerPropertiesConfig _propertiesConfig;
|
||||||
|
|
||||||
|
private IRoomCombinationScenario _currentScenario;
|
||||||
|
|
||||||
|
private List<IEssentialsRoom> _rooms;
|
||||||
|
|
||||||
|
private bool isInAutoMode;
|
||||||
|
|
||||||
|
private CTimer _scenarioChangeDebounceTimer;
|
||||||
|
|
||||||
|
private int _scenarioChangeDebounceTimeSeconds = 10; // default to 10s
|
||||||
|
|
||||||
|
public EssentialsRoomCombiner(string key, EssentialsRoomCombinerPropertiesConfig props)
|
||||||
|
: base(key)
|
||||||
|
{
|
||||||
|
_propertiesConfig = props;
|
||||||
|
|
||||||
|
Partitions = new List<IPartitionController>();
|
||||||
|
RoomCombinationScenarios = new List<IRoomCombinationScenario>();
|
||||||
|
|
||||||
|
if (_propertiesConfig.ScenarioChangeDebounceTimeSeconds > 0)
|
||||||
|
{
|
||||||
|
_scenarioChangeDebounceTimeSeconds = _propertiesConfig.ScenarioChangeDebounceTimeSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
IsInAutoModeFeedback = new BoolFeedback(() => isInAutoMode);
|
||||||
|
|
||||||
|
// default to auto mode
|
||||||
|
isInAutoMode = true;
|
||||||
|
|
||||||
|
if (_propertiesConfig.defaultToManualMode)
|
||||||
|
{
|
||||||
|
isInAutoMode = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
IsInAutoModeFeedback.FireUpdate();
|
||||||
|
|
||||||
|
CreateScenarios();
|
||||||
|
|
||||||
|
AddPostActivationAction(() =>
|
||||||
|
{
|
||||||
|
SetupPartitionStateProviders();
|
||||||
|
|
||||||
|
SetRooms();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateScenarios()
|
||||||
|
{
|
||||||
|
RoomCombinationScenarios = new List<IRoomCombinationScenario>();
|
||||||
|
|
||||||
|
foreach (var scenarioConfig in _propertiesConfig.Scenarios)
|
||||||
|
{
|
||||||
|
var scenario = new RoomCombinationScenario(scenarioConfig);
|
||||||
|
RoomCombinationScenarios.Add(scenario);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetRooms()
|
||||||
|
{
|
||||||
|
_rooms = new List<IEssentialsRoom>();
|
||||||
|
|
||||||
|
foreach (var roomKey in _propertiesConfig.RoomKeys)
|
||||||
|
{
|
||||||
|
var room = DeviceManager.GetDeviceForKey(roomKey) as IEssentialsRoom;
|
||||||
|
if (room != null)
|
||||||
|
{
|
||||||
|
_rooms.Add(room);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetupPartitionStateProviders()
|
||||||
|
{
|
||||||
|
foreach (var pConfig in _propertiesConfig.Partitions)
|
||||||
|
{
|
||||||
|
var sensor = DeviceManager.GetDeviceForKey(pConfig.DeviceKey) as IPartitionStateProvider;
|
||||||
|
|
||||||
|
var partition = new EssentialsPartitionController(pConfig.Key, pConfig.Name, sensor, _propertiesConfig.defaultToManualMode, pConfig.AdjacentRoomKeys);
|
||||||
|
|
||||||
|
partition.PartitionPresentFeedback.OutputChange += PartitionPresentFeedback_OutputChange;
|
||||||
|
|
||||||
|
Partitions.Add(partition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PartitionPresentFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
StartDebounceTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartDebounceTimer()
|
||||||
|
{
|
||||||
|
var time = _scenarioChangeDebounceTimeSeconds * 1000;
|
||||||
|
|
||||||
|
if (_scenarioChangeDebounceTimer == null)
|
||||||
|
{
|
||||||
|
_scenarioChangeDebounceTimer = new CTimer((o) => DetermineRoomCombinationScenario(), time);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_scenarioChangeDebounceTimer.Reset(time);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Determines the current room combination scenario based on the state of the partition sensors
|
||||||
|
/// </summary>
|
||||||
|
void DetermineRoomCombinationScenario()
|
||||||
|
{
|
||||||
|
if (_scenarioChangeDebounceTimer != null)
|
||||||
|
{
|
||||||
|
_scenarioChangeDebounceTimer.Dispose();
|
||||||
|
_scenarioChangeDebounceTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var currentScenario = RoomCombinationScenarios.FirstOrDefault((s) =>
|
||||||
|
{
|
||||||
|
// iterate the partition states
|
||||||
|
foreach (var partitionState in s.PartitionStates)
|
||||||
|
{
|
||||||
|
// get the partition by key
|
||||||
|
var partition = Partitions.FirstOrDefault((p) => p.Key.Equals(partitionState.PartitionKey));
|
||||||
|
|
||||||
|
if (partition != null && partitionState.PartitionPresent != partition.PartitionPresentFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
// the partition can't be found or the state doesn't match
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if it hasn't returned false by now we have the matching scenario
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (currentScenario != null)
|
||||||
|
{
|
||||||
|
CurrentScenario = currentScenario;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IEssentialsRoomCombiner Members
|
||||||
|
|
||||||
|
public event EventHandler<EventArgs> RoomCombinationScenarioChanged;
|
||||||
|
|
||||||
|
public IRoomCombinationScenario CurrentScenario
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _currentScenario;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != _currentScenario)
|
||||||
|
{
|
||||||
|
_currentScenario = value;
|
||||||
|
Debug.Console(1, this, "Current Scenario: {0}", _currentScenario.Name);
|
||||||
|
var handler = RoomCombinationScenarioChanged;
|
||||||
|
if (handler != null)
|
||||||
|
{
|
||||||
|
handler(this, new EventArgs());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public BoolFeedback IsInAutoModeFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void SetAutoMode()
|
||||||
|
{
|
||||||
|
isInAutoMode = true;
|
||||||
|
IsInAutoModeFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetManualMode()
|
||||||
|
{
|
||||||
|
isInAutoMode = false;
|
||||||
|
IsInAutoModeFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleMode()
|
||||||
|
{
|
||||||
|
isInAutoMode = !isInAutoMode;
|
||||||
|
IsInAutoModeFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<IRoomCombinationScenario> RoomCombinationScenarios { get; private set; }
|
||||||
|
|
||||||
|
public List<IPartitionController> Partitions { get; private set; }
|
||||||
|
|
||||||
|
public void TogglePartitionState(string partitionKey)
|
||||||
|
{
|
||||||
|
var partition = Partitions.FirstOrDefault((p) => p.Key.Equals(partitionKey)) as IPartitionController;
|
||||||
|
|
||||||
|
if (partition != null)
|
||||||
|
{
|
||||||
|
partition.ToggglePartitionState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetRoomCombinationScenario(string scenarioKey)
|
||||||
|
{
|
||||||
|
if (isInAutoMode)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Cannot set room combination scenario when in auto mode. Set to auto mode first.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the scenario
|
||||||
|
var scenario = RoomCombinationScenarios.FirstOrDefault((s) => s.Key.Equals(scenarioKey));
|
||||||
|
|
||||||
|
// Set the parition states from the scenario manually
|
||||||
|
if (scenario != null)
|
||||||
|
{
|
||||||
|
foreach (var partitionState in scenario.PartitionStates)
|
||||||
|
{
|
||||||
|
var partition = Partitions.FirstOrDefault((p) => p.Key.Equals(partitionState.PartitionKey));
|
||||||
|
|
||||||
|
if (partition != null)
|
||||||
|
{
|
||||||
|
if (partitionState.PartitionPresent)
|
||||||
|
{
|
||||||
|
partition.SetPartitionStatePresent();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
partition.SetPartitionStateNotPresent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
public class EssentialsRoomCombinerFactory : EssentialsDeviceFactory<EssentialsRoomCombiner>
|
||||||
|
{
|
||||||
|
public EssentialsRoomCombinerFactory()
|
||||||
|
{
|
||||||
|
TypeNames = new List<string> { "essentialsroomcombiner" };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override EssentialsDevice BuildDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory Attempting to create new EssentialsRoomCombiner Device");
|
||||||
|
|
||||||
|
var props = dc.Properties.ToObject<EssentialsRoomCombinerPropertiesConfig>();
|
||||||
|
|
||||||
|
return new EssentialsRoomCombiner(dc.Key, props);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Config properties for an EssentialsRoomCombiner device
|
||||||
|
/// </summary>
|
||||||
|
public class EssentialsRoomCombinerPropertiesConfig
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The list of partitions that device the rooms
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("partitions")]
|
||||||
|
public List<PartitionConfig> Partitions {get; set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The list of combinations scenarios for the rooms
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("scenarios")]
|
||||||
|
public List<RoomCombinationScenarioConfig> Scenarios { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The list of rooms keys that can be combined
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("roomMap")]
|
||||||
|
public List<string> RoomKeys {get; set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to default to manual mode
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("defaultToManualMode")]
|
||||||
|
public bool defaultToManualMode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The key of the scenario to default to at system startup if in manual mode
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("defaultScenarioKey")]
|
||||||
|
public string defaultScenarioKey { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("scenarioChangeDebounceTimeSeconds")]
|
||||||
|
public int ScenarioChangeDebounceTimeSeconds { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Config properties for a partition that separates rooms
|
||||||
|
/// </summary>
|
||||||
|
public class PartitionConfig : IKeyName
|
||||||
|
{
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string Key { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Key of the device that implements IPartitionStateProvider to provide the state of the partition
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("deviceKey")]
|
||||||
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Keys of the rooms that this partion would be located between
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("adjacentRoomKeys")]
|
||||||
|
public List<string> AdjacentRoomKeys { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Config propeties for a room combination scenario
|
||||||
|
/// </summary>
|
||||||
|
public class RoomCombinationScenarioConfig : IKeyName
|
||||||
|
{
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string Key { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("partitionStates")]
|
||||||
|
public List<PartitionState> PartitionStates { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("uiMap")]
|
||||||
|
public Dictionary<string, string> UiMap { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("activationActions")]
|
||||||
|
public List<DeviceActionWrapper> ActivationActions { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("deactivationActions")]
|
||||||
|
public List<DeviceActionWrapper> DeactivationActions { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Config properties to represent the state of a partition sensor in a RoomCombinationScenario
|
||||||
|
/// </summary>
|
||||||
|
public class PartitionState
|
||||||
|
{
|
||||||
|
[JsonProperty("partitionKey")]
|
||||||
|
public string PartitionKey { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("partitionSensedState")]
|
||||||
|
public bool PartitionPresent { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes the functionality for an EssentailsRoomCombiner device
|
||||||
|
/// </summary>
|
||||||
|
public interface IEssentialsRoomCombiner : IKeyed
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the room combination scenario has changed
|
||||||
|
/// </summary>
|
||||||
|
event EventHandler<EventArgs> RoomCombinationScenarioChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The current room combination scenario
|
||||||
|
/// </summary>
|
||||||
|
IRoomCombinationScenario CurrentScenario { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When true, indicates the current mode is auto mode
|
||||||
|
/// </summary>
|
||||||
|
BoolFeedback IsInAutoModeFeedback {get;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets auto mode
|
||||||
|
/// </summary>
|
||||||
|
void SetAutoMode();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets manual mode
|
||||||
|
/// </summary>
|
||||||
|
void SetManualMode();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toggles the current mode between auto and manual
|
||||||
|
/// </summary>
|
||||||
|
void ToggleMode();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The available room combinatino scenarios
|
||||||
|
/// </summary>
|
||||||
|
List<IRoomCombinationScenario> RoomCombinationScenarios { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The partition
|
||||||
|
/// </summary>
|
||||||
|
List<IPartitionController> Partitions { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toggles the state of a manual partition sensor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="partitionKey"></param>
|
||||||
|
void TogglePartitionState(string partitionKey);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the room combination scenario (if in manual mode)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="scenarioKey"></param>
|
||||||
|
void SetRoomCombinationScenario(string scenarioKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IRoomCombinationScenario : IKeyName
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// When true, indicates that this room combination scenario is active
|
||||||
|
/// </summary>
|
||||||
|
BoolFeedback IsActiveFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Activates this room combination scenario
|
||||||
|
/// </summary>
|
||||||
|
void Activate();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The state of the partitions that would activate this scenario
|
||||||
|
/// </summary>
|
||||||
|
List<PartitionState> PartitionStates { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The mapping of UIs by key to rooms by key
|
||||||
|
/// </summary>
|
||||||
|
Dictionary<string, string> UiMap { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a room combination scenario
|
||||||
|
/// </summary>
|
||||||
|
public class RoomCombinationScenario: IRoomCombinationScenario
|
||||||
|
{
|
||||||
|
private RoomCombinationScenarioConfig _config;
|
||||||
|
|
||||||
|
public string Key { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public List<PartitionState> PartitionStates { get; private set; }
|
||||||
|
|
||||||
|
public Dictionary<string, string> UiMap { get; set; }
|
||||||
|
|
||||||
|
private bool _isActive;
|
||||||
|
|
||||||
|
public BoolFeedback IsActiveFeedback { get; private set; }
|
||||||
|
|
||||||
|
List<DeviceActionWrapper> activationActions;
|
||||||
|
|
||||||
|
List<DeviceActionWrapper> deactivationActions;
|
||||||
|
|
||||||
|
public RoomCombinationScenario(RoomCombinationScenarioConfig config)
|
||||||
|
{
|
||||||
|
Key = config.Key;
|
||||||
|
|
||||||
|
Name = config.Name;
|
||||||
|
|
||||||
|
PartitionStates = config.PartitionStates;
|
||||||
|
|
||||||
|
UiMap = config.UiMap;
|
||||||
|
|
||||||
|
activationActions = config.ActivationActions;
|
||||||
|
|
||||||
|
deactivationActions = config.DeactivationActions;
|
||||||
|
|
||||||
|
_config = config;
|
||||||
|
|
||||||
|
IsActiveFeedback = new BoolFeedback(() => _isActive);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Activate()
|
||||||
|
{
|
||||||
|
if (activationActions != null)
|
||||||
|
{
|
||||||
|
foreach (var action in activationActions)
|
||||||
|
{
|
||||||
|
DeviceJsonApi.DoDeviceAction(action);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_isActive = true;
|
||||||
|
IsActiveFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Deactivate()
|
||||||
|
{
|
||||||
|
if (deactivationActions != null)
|
||||||
|
{
|
||||||
|
foreach (var action in deactivationActions)
|
||||||
|
{
|
||||||
|
DeviceJsonApi.DoDeviceAction(action);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_isActive = false;
|
||||||
|
IsActiveFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes the basic functionality of an EssentialsRoom
|
/// Describes the basic functionality of an EssentialsRoom
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute
|
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice
|
||||||
{
|
{
|
||||||
BoolFeedback OnFeedback { get; }
|
BoolFeedback OnFeedback { get; }
|
||||||
|
|
||||||
@@ -56,6 +56,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
void SetRoomOccupancy(IOccupancyStatusProvider statusProvider, int timeoutMinutes);
|
void SetRoomOccupancy(IOccupancyStatusProvider statusProvider, int timeoutMinutes);
|
||||||
|
|
||||||
void PowerOnToDefaultOrLastSource();
|
void PowerOnToDefaultOrLastSource();
|
||||||
|
bool RunDefaultPresentRoute();
|
||||||
|
|
||||||
void SetDefaultLevels();
|
void SetDefaultLevels();
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
|||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Cards;
|
using Crestron.SimplSharpPro.DM.Cards;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints;
|
using Crestron.SimplSharpPro.DM.Endpoints;
|
||||||
using Crestron.SimplSharpProInternal;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -483,24 +482,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RegisterForInputResolutionFeedback(IVideoAttributesBasic input, uint number, RoutingInputPortWithVideoStatuses inputPort)
|
|
||||||
{
|
|
||||||
if (input == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(1, this, "Registering for resolution feedback for input {0} using Routing Port {1}", number, inputPort.Key);
|
|
||||||
|
|
||||||
input.VideoAttributes.AttributeChange += (sender, args) =>
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Input {0} resolution updated", number);
|
|
||||||
|
|
||||||
Debug.Console(1, this, "Updating resolution feedback for input {0}", number);
|
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -516,189 +497,166 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
case "dmchd":
|
case "dmchd":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcHd(number, Chassis);
|
var inputCard = new DmcHd(number, this.Chassis);
|
||||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
var cecPort = inputCard.HdmiInput as ICec;
|
||||||
|
AddHdmiInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmchddsp":
|
case "dmchddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcHdDsp(number, Chassis);
|
var inputCard = new DmcHdDsp(number, this.Chassis);
|
||||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
var cecPort = inputCard.HdmiInput as ICec;
|
||||||
|
AddHdmiInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4khd":
|
case "dmc4khd":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kHd(number, Chassis);
|
var inputCard = new Dmc4kHd(number, this.Chassis);
|
||||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
var cecPort = inputCard.HdmiInput as ICec;
|
||||||
|
AddHdmiInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4khddsp":
|
case "dmc4khddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kHdDsp(number, Chassis);
|
var inputCard = new Dmc4kHdDsp(number, this.Chassis);
|
||||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
var cecPort = inputCard.HdmiInput as ICec;
|
||||||
|
AddHdmiInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4kzhd":
|
case "dmc4kzhd":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzHd(number, Chassis);
|
var inputCard = new Dmc4kzHd(number, this.Chassis);
|
||||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
var cecPort = inputCard.HdmiInput as ICec;
|
||||||
break;
|
AddHdmiInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "dmc4kzhddsp":
|
case "dmc4kzhddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzHdDsp(number, Chassis);
|
var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
|
||||||
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
var cecPort = inputCard.HdmiInput as ICec;
|
||||||
break;
|
AddHdmiInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "dmcc":
|
case "dmcc":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcC(number, Chassis);
|
var inputCard = new DmcC(number, this.Chassis);
|
||||||
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
var cecPort = inputCard.DmInput as ICec;
|
||||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
AddDmInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmccdsp":
|
case "dmccdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcCDsp(number, Chassis);
|
var inputCard = new DmcCDsp(number, this.Chassis);
|
||||||
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
var cecPort = inputCard.DmInput as ICec;
|
||||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
AddDmInCardPorts(number, cecPort);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "dmc4kc":
|
case "dmc4kc":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kC(number, Chassis);
|
var inputCard = new Dmc4kC(number, this.Chassis);
|
||||||
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
var cecPort = inputCard.DmInput as ICec;
|
||||||
break;
|
AddDmInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "dmc4kcdsp":
|
case "dmc4kcdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kCDsp(number, Chassis);
|
var inputCard = new Dmc4kCDsp(number, this.Chassis);
|
||||||
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
var cecPort = inputCard.DmInput as ICec;
|
||||||
break;
|
AddDmInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "dmc4kzc":
|
case "dmc4kzc":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzC(number, Chassis);
|
var inputCard = new Dmc4kzC(number, this.Chassis);
|
||||||
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
var cecPort = inputCard.DmInput as ICec;
|
||||||
break;
|
AddDmInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "dmc4kzcdsp":
|
case "dmc4kzcdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzCDsp(number, Chassis);
|
var inputCard = new Dmc4kzCDsp(number, this.Chassis);
|
||||||
AddDmInCardPorts(number, inputCard.DmInput, inputCard.DmInput);
|
var cecPort = inputCard.DmInput as ICec;
|
||||||
break;
|
AddDmInCardPorts(number, cecPort);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "dmccat":
|
case "dmccat":
|
||||||
{
|
new DmcCat(number, this.Chassis);
|
||||||
var inputCard = new DmcCat(number, Chassis);
|
AddDmInCardPorts(number);
|
||||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmccatdsp":
|
case "dmccatdsp":
|
||||||
{
|
new DmcCatDsp(number, this.Chassis);
|
||||||
var inputCard = new DmcCatDsp(number, Chassis);
|
AddDmInCardPorts(number);
|
||||||
AddDmInCardPorts(number, null, inputCard.DmInput);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcs":
|
case "dmcs":
|
||||||
{
|
new DmcS(number, Chassis);
|
||||||
var inputCard = new DmcS(number, Chassis);
|
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput);
|
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcsdsp":
|
case "dmcsdsp":
|
||||||
{
|
new DmcSDsp(number, Chassis);
|
||||||
var inputCard = new DmcSDsp(number, Chassis);
|
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, null, inputCard.DmInput);
|
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcs2":
|
case "dmcs2":
|
||||||
{
|
new DmcS2(number, Chassis);
|
||||||
var inputCard = new DmcS2(number, Chassis);
|
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput);
|
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcs2dsp":
|
case "dmcs2dsp":
|
||||||
{
|
new DmcS2Dsp(number, Chassis);
|
||||||
var inputCard = new DmcS2Dsp(number, Chassis);
|
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, null, inputCard.DmInput);
|
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcsdi":
|
case "dmcsdi":
|
||||||
{
|
new DmcSdi(number, Chassis);
|
||||||
var inputCard = new DmcSdi(number, Chassis);
|
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
|
||||||
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null, inputCard.SdiInput);
|
|
||||||
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Sdi, null);
|
eRoutingPortConnectionType.Sdi, null);
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcdvi":
|
case "dmcdvi":
|
||||||
{
|
new DmcDvi(number, Chassis);
|
||||||
var inputCard = new DmcDvi(number, Chassis);
|
AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
|
||||||
AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi, null, inputCard.DviInput);
|
|
||||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcvga":
|
case "dmcvga":
|
||||||
{
|
new DmcVga(number, Chassis);
|
||||||
var inputCard = new DmcVga(number, Chassis);
|
AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
|
||||||
AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, null, inputCard.VgaInput);
|
|
||||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcvidbnc":
|
case "dmcvidbnc":
|
||||||
{
|
new DmcVidBnc(number, Chassis);
|
||||||
var inputCard = new DmcVidBnc(number, Chassis);
|
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
||||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput);
|
|
||||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcvidrcaa":
|
case "dmcvidrcaa":
|
||||||
{
|
new DmcVidRcaA(number, Chassis);
|
||||||
var inputCard = new DmcVidRcaA(number, Chassis);
|
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
||||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput);
|
|
||||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcvidrcad":
|
case "dmcvidrcad":
|
||||||
{
|
new DmcVidRcaD(number, Chassis);
|
||||||
var inputCard = new DmcVidRcaD(number, Chassis);
|
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
||||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component, null, inputCard.VideoInput);
|
|
||||||
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
|
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcvid4":
|
case "dmcvid4":
|
||||||
{
|
new DmcVid4(number, Chassis);
|
||||||
var inputCard = new DmcVid4(number, Chassis);
|
|
||||||
AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
|
||||||
AddInCardHdmiLoopPort(number);
|
AddInCardHdmiLoopPort(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case "dmcstr":
|
case "dmcstr":
|
||||||
{
|
new DmcStr(number, Chassis);
|
||||||
var inputCard = new DmcStr(number, Chassis);
|
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
|
||||||
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, null, inputCard.Source);
|
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -714,24 +672,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDmInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes)
|
|
||||||
{
|
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort, videoAttributes);
|
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddHdmiInCardPorts(uint number, ICec cecPort)
|
void AddHdmiInCardPorts(uint number, ICec cecPort)
|
||||||
{
|
{
|
||||||
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddHdmiInCardPorts(uint number, ICec cecPort, IVideoAttributesBasic videoAttributes)
|
|
||||||
{
|
|
||||||
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort, videoAttributes);
|
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddInCardHdmiAndAudioLoopPorts(uint number)
|
void AddInCardHdmiAndAudioLoopPorts(uint number)
|
||||||
{
|
{
|
||||||
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
@@ -870,55 +816,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
|
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
|
||||||
{
|
{
|
||||||
//Cast is necessary here to determine the correct overload
|
AddInputPortWithDebug(cardNum, portName, sigType, portType, null);
|
||||||
AddInputPortWithDebug(cardNum, portName, sigType, portType, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType,
|
|
||||||
eRoutingPortConnectionType portType, ICec cecPort)
|
|
||||||
{
|
|
||||||
//Cast is necessary here to determine the correct overload
|
|
||||||
AddInputPortWithDebug(cardNum, portName, sigType, portType, cecPort, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds InputPort and sets Port as ICec object. If videoAttributesBasic is defined, RoutingPort will be RoutingInputPortWithVideoStatuses
|
/// Adds InputPort and sets Port as ICec object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort, IVideoAttributesBasic videoAttributesBasic)
|
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
|
||||||
{
|
{
|
||||||
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
|
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
|
||||||
Debug.Console(2, this, "Adding input port '{0}'", portKey);
|
Debug.Console(2, this, "Adding input port '{0}'", portKey);
|
||||||
|
var inputPort = new RoutingInputPort(portKey, sigType, portType, Chassis.Inputs[cardNum], this)
|
||||||
RoutingInputPort inputPort;
|
|
||||||
|
|
||||||
if (videoAttributesBasic != null)
|
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "card {0} supports IVideoAttributesBasic", cardNum);
|
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
||||||
var statusFuncs = new VideoStatusFuncsWrapper
|
}; ;
|
||||||
{
|
|
||||||
VideoResolutionFeedbackFunc = () =>
|
|
||||||
{
|
|
||||||
var resolution = videoAttributesBasic.VideoAttributes.GetVideoResolutionString();
|
|
||||||
Debug.Console(1, this, "Updating resolution for input {0}. New resolution: {1}", cardNum, resolution);
|
|
||||||
return resolution;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
inputPort = new RoutingInputPortWithVideoStatuses(portKey, sigType, portType,
|
|
||||||
Chassis.Inputs[cardNum], this, statusFuncs)
|
|
||||||
{
|
|
||||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
|
||||||
};
|
|
||||||
|
|
||||||
RegisterForInputResolutionFeedback(videoAttributesBasic, cardNum, inputPort as RoutingInputPortWithVideoStatuses);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
inputPort = new RoutingInputPort(portKey, sigType, portType,
|
|
||||||
Chassis.Inputs[cardNum], this)
|
|
||||||
{
|
|
||||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cecPort != null)
|
if (cecPort != null)
|
||||||
inputPort.Port = cecPort;
|
inputPort.Port = cecPort;
|
||||||
@@ -1078,23 +989,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks");
|
Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMInputEventIds.HorizontalResolutionFeedbackEventId:
|
|
||||||
case DMInputEventIds.VerticalResolutionFeedbackEventId:
|
|
||||||
case DMInputEventIds.FramesPerSecondFeedbackEventId:
|
|
||||||
case DMInputEventIds.ResolutionEventId:
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Input {0} resolution updated", args.Number);
|
|
||||||
var inputPort =
|
|
||||||
InputPorts.Cast<RoutingInputPortWithVideoStatuses>()
|
|
||||||
.FirstOrDefault((ip) => ip.Key.Contains(String.Format("inputCard{0}", args.Number)));
|
|
||||||
|
|
||||||
if (inputPort != null)
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Updating resolution feedback for input {0}", args.Number);
|
|
||||||
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
|
Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
|
||||||
@@ -1156,7 +1050,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.
|
var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.
|
||||||
Outputs[output].VideoOutFeedback.Number;
|
Outputs[output].VideoOutFeedback.Number;
|
||||||
|
|
||||||
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output);
|
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, inputNumber, output);
|
||||||
|
|
||||||
if (VideoOutputFeedbacks.ContainsKey(output))
|
if (VideoOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
@@ -1183,7 +1077,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis.
|
var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis.
|
||||||
Outputs[output].AudioOutFeedback.Number;
|
Outputs[output].AudioOutFeedback.Number;
|
||||||
|
|
||||||
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output);
|
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, inputNumber, output);
|
||||||
|
|
||||||
if (AudioOutputFeedbacks.ContainsKey(output))
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
@@ -1285,10 +1179,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
var output = outputSelector as DMOutput;
|
var output = outputSelector as DMOutput;
|
||||||
|
|
||||||
var isUsbInput = (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput;
|
if (output == null)
|
||||||
var isUsbOutput = (sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput;
|
|
||||||
|
|
||||||
if (output == null && !(isUsbOutput || isUsbInput))
|
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
||||||
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
||||||
@@ -1319,10 +1210,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
{
|
{
|
||||||
Chassis.VideoEnter.BoolValue = true;
|
Chassis.VideoEnter.BoolValue = true;
|
||||||
if (output != null)
|
output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard;
|
||||||
{
|
|
||||||
output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
@@ -1332,66 +1220,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
dmMdMnxn.AudioEnter.BoolValue = true;
|
dmMdMnxn.AudioEnter.BoolValue = true;
|
||||||
}
|
}
|
||||||
if (output != null)
|
output.AudioOut = input;
|
||||||
{
|
//Chassis.Outputs[output].AudioOut = inCard;
|
||||||
output.AudioOut = input;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput || (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||||
|
|
||||||
{
|
|
||||||
Chassis.USBEnter.BoolValue = true;
|
|
||||||
if (inputSelector == null && output != null)
|
|
||||||
{
|
|
||||||
//clearing the route is intended
|
|
||||||
output.USBRoutedTo = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputSelector != null && input == null)
|
|
||||||
{
|
|
||||||
//input selector is DMOutput...we're doing a out to out route
|
|
||||||
var tempInput = inputSelector as DMOutput;
|
|
||||||
|
|
||||||
if (tempInput == null || output == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
output.USBRoutedTo = tempInput;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (input != null & output != null)
|
|
||||||
{
|
|
||||||
output.USBRoutedTo = input;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if((sigType & eRoutingSignalType.UsbInput) != eRoutingSignalType.UsbInput)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Chassis.USBEnter.BoolValue = true;
|
|
||||||
if (output != null)
|
|
||||||
{
|
{
|
||||||
|
Chassis.USBEnter.BoolValue = true;
|
||||||
output.USBRoutedTo = input;
|
output.USBRoutedTo = input;
|
||||||
return;
|
|
||||||
}
|
|
||||||
var tempOutput = outputSelector as DMInput;
|
|
||||||
|
|
||||||
if (tempOutput == null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
|
||||||
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
|
||||||
outputSelector);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tempOutput.USBRoutedTo = input;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRoutingNumeric Members
|
#region IRoutingNumeric Members
|
||||||
@@ -1404,10 +1243,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
DMInputOutputBase dmCard;
|
DMInputOutputBase dmCard;
|
||||||
|
|
||||||
//Routing Input to Input or Output to Input
|
|
||||||
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
|
||||||
if (outputSelector > chassisSize)
|
if (outputSelector > chassisSize)
|
||||||
{
|
{
|
||||||
uint outputIndex;
|
uint outputIndex;
|
||||||
@@ -1427,14 +1264,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
dmCard = Chassis.Inputs[inputSelector];
|
dmCard = Chassis.Inputs[inputSelector];
|
||||||
}
|
}
|
||||||
|
|
||||||
ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType);
|
ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
||||||
|
|
||||||
//routing Output to Output or Input to Output
|
|
||||||
if (inputSelector > chassisSize)
|
if (inputSelector > chassisSize)
|
||||||
{
|
{
|
||||||
//wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8
|
//wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8
|
||||||
@@ -1552,16 +1388,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var videoStatus = inputPort as RoutingInputPortWithVideoStatuses;
|
|
||||||
|
|
||||||
if (videoStatus == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin);
|
|
||||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LinkStreamInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
|
private void LinkStreamInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
|
||||||
@@ -1602,13 +1428,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
InputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]);
|
InputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]);
|
||||||
|
|
||||||
trilist.UShortInput[join].UShortValue = InputStreamCardStateFeedbacks[ioSlot].UShortValue;
|
trilist.UShortInput[join].UShortValue = InputStreamCardStateFeedbacks[ioSlot].UShortValue;
|
||||||
|
|
||||||
var videoStatus = inputPort as RoutingInputPortWithVideoStatuses;
|
|
||||||
|
|
||||||
if (videoStatus != null)
|
|
||||||
{
|
|
||||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LinkStreamOutputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
|
private void LinkStreamOutputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
|
||||||
@@ -1745,19 +1564,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var videoStatus = inputPort as RoutingInputPortWithVideoStatuses;
|
|
||||||
|
|
||||||
if (videoStatus == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key, joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin);
|
|
||||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap,
|
private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap,
|
||||||
uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
|
uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
|
||||||
{
|
{
|
||||||
var transmitter = basicTransmitter as DmTxControllerBase;
|
var transmitter = basicTransmitter as DmTxControllerBase;
|
||||||
if (transmitter == null) return;
|
if (transmitter == null) return;
|
||||||
@@ -1771,9 +1581,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
if (txRoutingInputs == null) return;
|
if (txRoutingInputs == null) return;
|
||||||
|
|
||||||
var inputPorts =
|
var inputPorts = txRoutingInputs.InputPorts.Where((p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
|
||||||
txRoutingInputs.InputPorts.Where(
|
|
||||||
(p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
|
|
||||||
|
|
||||||
if (inputPorts.Count == 0)
|
if (inputPorts.Count == 0)
|
||||||
{
|
{
|
||||||
@@ -1806,19 +1614,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
|
trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
|
||||||
(ushort) transmitter.HdcpSupportCapability;
|
(ushort) transmitter.HdcpSupportCapability;
|
||||||
|
|
||||||
|
|
||||||
var videoStatus =
|
|
||||||
InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)] as RoutingInputPortWithVideoStatuses;
|
|
||||||
|
|
||||||
if (videoStatus == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Debug.Console(1, this, "Linking {0} to join {1} for resolution feedback.", videoStatus.Key,
|
|
||||||
joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin);
|
|
||||||
videoStatus.VideoStatus.VideoResolutionFeedback.LinkInputSig(
|
|
||||||
trilist.StringInput[joinMap.InputCurrentResolution.JoinNumber + ioSlotJoin]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap,
|
private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap,
|
||||||
@@ -2101,15 +1896,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||||
return DmChassisController.
|
return PepperDash.Essentials.DM.DmChassisController.
|
||||||
GetDmChassisController(dc.Key, dc.Name, type, props);
|
GetDmChassisController(dc.Key, dc.Name, type, props);
|
||||||
}
|
}
|
||||||
else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
|
else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
|
||||||
{
|
{
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||||
return DmBladeChassisController.
|
return PepperDash.Essentials.DM.DmBladeChassisController.
|
||||||
GetDmChassisController(dc.Key, dc.Name, type, props);
|
GetDmChassisController(dc.Key, dc.Name, type, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
@@ -16,489 +15,421 @@ using PepperDash.Essentials.Core.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Chassis
|
namespace PepperDash.Essentials.DM.Chassis
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
||||||
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IHasFeedback
|
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IHasFeedback
|
||||||
{
|
{
|
||||||
private HdMdNxM _Chassis;
|
private HdMdNxM _Chassis;
|
||||||
private HdMd4x14kE _Chassis4x1;
|
private HdMd4x14kE _Chassis4x1;
|
||||||
|
|
||||||
//IroutingNumericEvent
|
//IroutingNumericEvent
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
||||||
|
|
||||||
public Dictionary<uint, string> InputNames { get; set; }
|
public Dictionary<uint, string> InputNames { get; set; }
|
||||||
public Dictionary<uint, string> OutputNames { get; set; }
|
public Dictionary<uint, string> OutputNames { get; set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
public FeedbackCollection<BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
|
public FeedbackCollection<BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<IntFeedback> VideoOutputRouteFeedbacks { get; private set; }
|
public FeedbackCollection<IntFeedback> VideoOutputRouteFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<StringFeedback> InputNameFeedbacks { get; private set; }
|
public FeedbackCollection<StringFeedback> InputNameFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<StringFeedback> OutputNameFeedbacks { get; private set; }
|
public FeedbackCollection<StringFeedback> OutputNameFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<StringFeedback> OutputRouteNameFeedbacks { get; private set; }
|
public FeedbackCollection<StringFeedback> OutputRouteNameFeedbacks { get; private set; }
|
||||||
public FeedbackCollection<BoolFeedback> InputHdcpEnableFeedback { get; private set; }
|
public FeedbackCollection<BoolFeedback> InputHdcpEnableFeedback { get; private set; }
|
||||||
public StringFeedback DeviceNameFeedback { get; private set; }
|
public FeedbackCollection<StringFeedback> DeviceNameFeedback { get; private set; }
|
||||||
public BoolFeedback AutoRouteFeedback { get; private set; }
|
public FeedbackCollection<BoolFeedback> AutoRouteFeedback { get; private set; }
|
||||||
|
|
||||||
#region Constructor
|
#region Constructor
|
||||||
|
|
||||||
public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis,
|
public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis,
|
||||||
HdMdNxM4kEBridgeablePropertiesConfig props)
|
HdMdNxM4kEBridgeablePropertiesConfig props)
|
||||||
: base(key, name, chassis)
|
: base(key, name, chassis)
|
||||||
{
|
{
|
||||||
_Chassis = chassis;
|
_Chassis = chassis;
|
||||||
Name = name;
|
var _props = props;
|
||||||
|
|
||||||
if (props == null)
|
InputNames = props.Inputs;
|
||||||
{
|
OutputNames = props.Outputs;
|
||||||
Debug.Console(1, this, "HdMdNx4keBridgeableController properties are null, failed to build the device");
|
|
||||||
return;
|
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
||||||
}
|
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
||||||
|
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
|
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
if (props.Inputs != null)
|
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
{
|
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
||||||
foreach (var kvp in props.Inputs)
|
DeviceNameFeedback = new FeedbackCollection<StringFeedback>();
|
||||||
{
|
AutoRouteFeedback = new FeedbackCollection<BoolFeedback>();
|
||||||
Debug.Console(1, this, "props.Inputs: {0}-{1}", kvp.Key, kvp.Value);
|
|
||||||
}
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
InputNames = props.Inputs;
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||||
}
|
|
||||||
if (props.Outputs != null)
|
DeviceNameFeedback.Add(new StringFeedback(this.Name, () => this.Name));
|
||||||
{
|
|
||||||
foreach (var kvp in props.Outputs)
|
if (_Chassis.NumberOfInputs == 1)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "props.Outputs: {0}-{1}", kvp.Key, kvp.Value);
|
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
||||||
}
|
AutoRouteFeedback.Add(new BoolFeedback(this.Name + "-" + InputNames[1], () => _Chassis4x1.AutoModeOnFeedback.BoolValue));
|
||||||
OutputNames = props.Outputs;
|
}
|
||||||
}
|
|
||||||
|
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||||
DeviceNameFeedback = new StringFeedback(()=>Name);
|
{
|
||||||
|
var index = i;
|
||||||
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
var inputName = InputNames[index];
|
||||||
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
_Chassis.Inputs[index].Name.StringValue = inputName;
|
||||||
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
|
||||||
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
||||||
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
eRoutingPortConnectionType.Hdmi, index, this)
|
||||||
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
{
|
||||||
|
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
});
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
||||||
|
InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].Name.StringValue));
|
||||||
if (_Chassis.NumberOfInputs == 1)
|
InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue));
|
||||||
{
|
}
|
||||||
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
|
||||||
AutoRouteFeedback = new BoolFeedback(() => _Chassis4x1.AutoModeOnFeedback.BoolValue);
|
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||||
}
|
{
|
||||||
|
var index = i;
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
var outputName = OutputNames[index];
|
||||||
{
|
_Chassis.Outputs[i].Name.StringValue = outputName;
|
||||||
var index = i;
|
|
||||||
var inputName = InputNames[index];
|
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
||||||
//_Chassis.Inputs[index].Name.StringValue = inputName;
|
eRoutingPortConnectionType.Hdmi, index, this)
|
||||||
_Chassis.HdmiInputs[index].Name.StringValue = inputName;
|
{
|
||||||
|
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
||||||
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
});
|
||||||
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiInputs[index], this)
|
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
||||||
{
|
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].Name.StringValue));
|
||||||
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue));
|
||||||
});
|
}
|
||||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
|
||||||
//InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].NameFeedback.StringValue));
|
_Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
|
||||||
InputNameFeedbacks.Add(new StringFeedback(inputName, () => InputNames[index]));
|
_Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
|
||||||
InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue));
|
|
||||||
}
|
AddPostActivationAction(AddFeedbackCollections);
|
||||||
|
}
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
|
||||||
{
|
#endregion
|
||||||
var index = i;
|
|
||||||
var outputName = OutputNames[index];
|
#region Methods
|
||||||
//_Chassis.Outputs[index].Name.StringValue = outputName;
|
|
||||||
//_Chassis.HdmiOutputs[index].Name.StringValue = outputName;
|
/// <summary>
|
||||||
|
/// Raise an event when the status of a switch object changes.
|
||||||
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
/// </summary>
|
||||||
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiOutputs[index], this)
|
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
||||||
{
|
private void OnSwitchChange(RoutingNumericEventArgs e)
|
||||||
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
{
|
||||||
});
|
var newEvent = NumericSwitchChange;
|
||||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback == null ? 0 : (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
if (newEvent != null) newEvent(this, e);
|
||||||
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => OutputNames[index]));
|
}
|
||||||
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue));
|
|
||||||
}
|
public void EnableHdcp(uint port)
|
||||||
|
{
|
||||||
_Chassis.DMInputChange += Chassis_DMInputChange;
|
if (port > _Chassis.NumberOfInputs) return;
|
||||||
_Chassis.DMOutputChange += Chassis_DMOutputChange;
|
if (port <= 0) return;
|
||||||
|
|
||||||
AddPostActivationAction(AddFeedbackCollections);
|
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
||||||
}
|
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||||
|
}
|
||||||
#endregion
|
|
||||||
|
public void DisableHdcp(uint port)
|
||||||
#region Methods
|
{
|
||||||
|
if (port > _Chassis.NumberOfInputs) return;
|
||||||
/// <summary>
|
if (port <= 0) return;
|
||||||
/// Raise an event when the status of a switch object changes.
|
|
||||||
/// </summary>
|
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
||||||
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||||
private void OnSwitchChange(RoutingNumericEventArgs e)
|
}
|
||||||
{
|
|
||||||
var newEvent = NumericSwitchChange;
|
public void EnableAutoRoute()
|
||||||
if (newEvent != null) newEvent(this, e);
|
{
|
||||||
}
|
if (_Chassis.NumberOfInputs != 1) return;
|
||||||
|
|
||||||
public void EnableHdcp(uint port)
|
if (_Chassis4x1 == null) return;
|
||||||
{
|
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
_Chassis4x1.AutoModeOn();
|
||||||
if (port <= 0) return;
|
}
|
||||||
|
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
public void DisableAutoRoute()
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
{
|
||||||
}
|
if (_Chassis.NumberOfInputs != 1) return;
|
||||||
|
|
||||||
public void DisableHdcp(uint port)
|
if (_Chassis4x1 == null) return;
|
||||||
{
|
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
_Chassis4x1.AutoModeOff();
|
||||||
if (port <= 0) return;
|
}
|
||||||
|
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
#region PostActivate
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
|
||||||
}
|
public void AddFeedbackCollections()
|
||||||
|
{
|
||||||
public void EnableAutoRoute()
|
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
||||||
{
|
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks, DeviceNameFeedback);
|
||||||
|
}
|
||||||
if (_Chassis4x1 == null) return;
|
|
||||||
|
#endregion
|
||||||
_Chassis4x1.AutoModeOn();
|
|
||||||
}
|
#region FeedbackCollection Methods
|
||||||
|
|
||||||
public void DisableAutoRoute()
|
//Add arrays of collections
|
||||||
{
|
public void AddCollectionsToList(params FeedbackCollection<BoolFeedback>[] newFbs)
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
{
|
||||||
|
foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs)
|
||||||
if (_Chassis4x1 == null) return;
|
{
|
||||||
|
foreach (var item in newFbs)
|
||||||
_Chassis4x1.AutoModeOff();
|
{
|
||||||
}
|
AddCollectionToList(item);
|
||||||
|
}
|
||||||
#region PostActivate
|
}
|
||||||
|
}
|
||||||
public void AddFeedbackCollections()
|
public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
||||||
{
|
{
|
||||||
AddFeedbackToList(DeviceNameFeedback);
|
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
||||||
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
{
|
||||||
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
foreach (var item in newFbs)
|
||||||
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks);
|
{
|
||||||
}
|
AddCollectionToList(item);
|
||||||
|
}
|
||||||
#endregion
|
}
|
||||||
|
}
|
||||||
#region FeedbackCollection Methods
|
|
||||||
|
public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs)
|
||||||
//Add arrays of collections
|
{
|
||||||
public void AddCollectionsToList(params FeedbackCollection<BoolFeedback>[] newFbs)
|
foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs)
|
||||||
{
|
{
|
||||||
foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs)
|
foreach (var item in newFbs)
|
||||||
{
|
{
|
||||||
foreach (var item in newFbs)
|
AddCollectionToList(item);
|
||||||
{
|
}
|
||||||
AddCollectionToList(item);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
//Add Collections
|
||||||
public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
public void AddCollectionToList(FeedbackCollection<BoolFeedback> newFbs)
|
||||||
{
|
{
|
||||||
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
foreach (var f in newFbs)
|
||||||
{
|
{
|
||||||
foreach (var item in newFbs)
|
if (f == null) continue;
|
||||||
{
|
|
||||||
AddCollectionToList(item);
|
AddFeedbackToList(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public void AddCollectionToList(FeedbackCollection<IntFeedback> newFbs)
|
||||||
public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs)
|
{
|
||||||
{
|
foreach (var f in newFbs)
|
||||||
foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs)
|
{
|
||||||
{
|
if (f == null) continue;
|
||||||
foreach (var item in newFbs)
|
|
||||||
{
|
AddFeedbackToList(f);
|
||||||
AddCollectionToList(item);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
public void AddCollectionToList(FeedbackCollection<StringFeedback> newFbs)
|
||||||
|
{
|
||||||
//Add Collections
|
foreach (var f in newFbs)
|
||||||
public void AddCollectionToList(FeedbackCollection<BoolFeedback> newFbs)
|
{
|
||||||
{
|
if (f == null) continue;
|
||||||
foreach (var f in newFbs)
|
|
||||||
{
|
AddFeedbackToList(f);
|
||||||
if (f == null) continue;
|
}
|
||||||
|
}
|
||||||
AddFeedbackToList(f);
|
|
||||||
}
|
//Add Individual Feedbacks
|
||||||
}
|
public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb)
|
||||||
|
{
|
||||||
public void AddCollectionToList(FeedbackCollection<IntFeedback> newFbs)
|
if (newFb == null) return;
|
||||||
{
|
|
||||||
foreach (var f in newFbs)
|
if (!Feedbacks.Contains(newFb))
|
||||||
{
|
{
|
||||||
if (f == null) continue;
|
Feedbacks.Add(newFb);
|
||||||
|
}
|
||||||
AddFeedbackToList(f);
|
}
|
||||||
}
|
|
||||||
}
|
#endregion
|
||||||
|
|
||||||
public void AddCollectionToList(FeedbackCollection<StringFeedback> newFbs)
|
#region IRouting Members
|
||||||
{
|
|
||||||
foreach (var f in newFbs)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
if (f == null) continue;
|
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
||||||
|
var current = _Chassis.HdmiOutputs[(uint)outputSelector].VideoOut;
|
||||||
AddFeedbackToList(f);
|
if (current != _Chassis.HdmiInputs[(uint)inputSelector])
|
||||||
}
|
_Chassis.HdmiOutputs[(uint)outputSelector].VideoOut = _Chassis.HdmiInputs[(uint)inputSelector];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add Individual Feedbacks
|
#endregion
|
||||||
public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb)
|
|
||||||
{
|
#region IRoutingNumeric Members
|
||||||
if (newFb == null) return;
|
|
||||||
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
||||||
if (!Feedbacks.Contains(newFb))
|
{
|
||||||
{
|
ExecuteSwitch(inputSelector, outputSelector, signalType);
|
||||||
Feedbacks.Add(newFb);
|
}
|
||||||
}
|
|
||||||
}
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRouting Members
|
#region Bridge Linking
|
||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var input = inputSelector as HdMdNxMHdmiInput; //changed from HdMdNxM4kzEHdmiInput;
|
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
||||||
var output = outputSelector as HdMdNxMHdmiOutput;
|
|
||||||
Debug.Console(2, this, "ExecuteSwitch: input={0} output={1}", input, output);
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
if (output == null)
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
{
|
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
||||||
Debug.Console(0, this, "Unable to make switch. output selector is not HdMdNxMHdmiOutput");
|
|
||||||
return;
|
if (bridge != null)
|
||||||
}
|
{
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
}
|
||||||
var current = output.VideoOut;
|
else
|
||||||
if (current != input)
|
{
|
||||||
output.VideoOut = input;
|
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
|
DeviceNameFeedback[this.Name].LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
||||||
#region IRoutingNumeric Members
|
|
||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
|
||||||
{
|
|
||||||
var input = inputSelector == 0 ? null : _Chassis.HdmiInputs[inputSelector];
|
|
||||||
var output = _Chassis.HdmiOutputs[outputSelector];
|
|
||||||
|
|
||||||
Debug.Console(2, this, "ExecuteNumericSwitch: input={0} output={1}", input, output);
|
|
||||||
|
|
||||||
ExecuteSwitch(input, output, signalType);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Bridge Linking
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
|
||||||
{
|
|
||||||
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
|
||||||
|
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
|
||||||
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
|
||||||
|
|
||||||
if (bridge != null)
|
|
||||||
{
|
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
|
||||||
}
|
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
|
||||||
DeviceNameFeedback.LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
|
||||||
|
|
||||||
if (_Chassis4x1 != null)
|
|
||||||
{
|
|
||||||
trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn());
|
|
||||||
trilist.SetSigFalseAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOff());
|
|
||||||
AutoRouteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
|
||||||
{
|
|
||||||
var joinIndex = i - 1;
|
|
||||||
var input = i;
|
|
||||||
//Digital
|
|
||||||
VideoInputSyncFeedbacks[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
|
||||||
InputHdcpEnableFeedback[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
|
||||||
InputHdcpEnableFeedback[InputNames[input]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
|
||||||
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(input));
|
|
||||||
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(input));
|
|
||||||
|
|
||||||
//Serial
|
|
||||||
InputNameFeedbacks[InputNames[input]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
|
||||||
{
|
|
||||||
var joinIndex = i - 1;
|
|
||||||
var output = i;
|
|
||||||
//Analog
|
|
||||||
VideoOutputRouteFeedbacks[OutputNames[output]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
|
||||||
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteNumericSwitch(a, (ushort) output, eRoutingSignalType.AudioVideo));
|
|
||||||
|
|
||||||
//Serial
|
|
||||||
OutputNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
|
||||||
OutputRouteNameFeedbacks[OutputNames[output]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
|
||||||
}
|
|
||||||
|
|
||||||
_Chassis.OnlineStatusChange += Chassis_OnlineStatusChange;
|
|
||||||
|
|
||||||
trilist.OnlineStatusChange += (d, args) =>
|
|
||||||
{
|
|
||||||
if (!args.DeviceOnLine) return;
|
|
||||||
|
|
||||||
// feedback updates was moved to the Chassis_OnlineStatusChange
|
|
||||||
// due to the amount of time it takes for the device to come online
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Events
|
|
||||||
|
|
||||||
void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args)
|
|
||||||
{
|
|
||||||
IsOnline.FireUpdate();
|
|
||||||
|
|
||||||
if (!args.DeviceOnLine) return;
|
|
||||||
|
|
||||||
foreach (var feedback in Feedbacks)
|
|
||||||
{
|
|
||||||
feedback.FireUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_Chassis4x1 != null)
|
if (_Chassis4x1 != null)
|
||||||
AutoRouteFeedback.FireUpdate();
|
{
|
||||||
}
|
trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn());
|
||||||
|
trilist.SetSigFalseAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOff());
|
||||||
|
AutoRouteFeedback[this.Name + "-" + InputNames[1]].LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
||||||
|
}
|
||||||
|
|
||||||
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||||
{
|
{
|
||||||
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
var joinIndex = i - 1;
|
||||||
|
//Digital
|
||||||
|
VideoInputSyncFeedbacks[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
||||||
|
InputHdcpEnableFeedback[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
||||||
|
InputHdcpEnableFeedback[InputNames[i]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
||||||
|
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(i));
|
||||||
|
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(i));
|
||||||
|
|
||||||
var output = args.Number;
|
//Serial
|
||||||
|
InputNameFeedbacks[InputNames[i]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
||||||
|
}
|
||||||
|
|
||||||
var inputNumber = _Chassis.HdmiOutputs[output].VideoOutFeedback == null
|
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||||
? 0
|
{
|
||||||
: _Chassis.HdmiOutputs[output].VideoOutFeedback.Number;
|
var joinIndex = i - 1;
|
||||||
|
//Analog
|
||||||
|
VideoOutputRouteFeedbacks[OutputNames[i]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
||||||
|
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteSwitch(a, i, eRoutingSignalType.AudioVideo));
|
||||||
|
|
||||||
var outputName = OutputNames[output];
|
//Serial
|
||||||
|
OutputNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
||||||
|
OutputRouteNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
||||||
|
}
|
||||||
|
|
||||||
var feedback = VideoOutputRouteFeedbacks[outputName];
|
_Chassis.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler(Chassis_OnlineStatusChange);
|
||||||
|
|
||||||
if (feedback == null)
|
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
||||||
{
|
{
|
||||||
return;
|
if (args.DeviceOnLine)
|
||||||
}
|
{
|
||||||
var inPort =
|
foreach (var feedback in Feedbacks)
|
||||||
InputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output].VideoOutFeedback);
|
|
||||||
var outPort = OutputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output]);
|
|
||||||
|
|
||||||
feedback.FireUpdate();
|
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(output, inputNumber, outPort, inPort, eRoutingSignalType.AudioVideo));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
|
||||||
{
|
|
||||||
switch (args.EventId)
|
|
||||||
{
|
|
||||||
case DMInputEventIds.VideoDetectedEventId:
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Event ID {0}: Updating VideoInputSyncFeedbacks", args.EventId);
|
|
||||||
foreach (var item in VideoInputSyncFeedbacks)
|
|
||||||
{
|
{
|
||||||
item.FireUpdate();
|
feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
}
|
});
|
||||||
case DMInputEventIds.InputNameFeedbackEventId:
|
}
|
||||||
case DMInputEventIds.InputNameEventId:
|
|
||||||
case DMInputEventIds.NameFeedbackEventId:
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Event ID {0}: Updating name feedbacks.", args.EventId);
|
|
||||||
Debug.Console(1, this, "Input {0} Name {1}", args.Number,
|
|
||||||
_Chassis.HdmiInputs[args.Number].NameFeedback.StringValue);
|
|
||||||
foreach (var item in InputNameFeedbacks)
|
|
||||||
{
|
|
||||||
item.FireUpdate();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Unhandled DM Input Event ID {0}", args.EventId);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Factory
|
#endregion
|
||||||
|
|
||||||
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
#region Events
|
||||||
{
|
|
||||||
public HdMdNxM4kEControllerFactory()
|
|
||||||
{
|
|
||||||
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device");
|
if (!args.DeviceOnLine) return;
|
||||||
|
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||||
|
{
|
||||||
|
_Chassis.Inputs[i].Name.StringValue = InputNames[i];
|
||||||
|
}
|
||||||
|
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||||
|
{
|
||||||
|
_Chassis.Outputs[i].Name.StringValue = OutputNames[i];
|
||||||
|
}
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject<HdMdNxM4kEBridgeablePropertiesConfig>(dc.Properties.ToString());
|
foreach (var feedback in Feedbacks)
|
||||||
|
{
|
||||||
|
feedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var type = dc.Type.ToLower();
|
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
var control = props.Control;
|
{
|
||||||
var ipid = control.IpIdInt;
|
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
||||||
var address = control.TcpSshProperties.Address;
|
|
||||||
|
|
||||||
switch (type)
|
for (var i = 0; i < VideoOutputRouteFeedbacks.Count; i++)
|
||||||
{
|
{
|
||||||
case ("hdmd4x14ke-bridgeable"):
|
var index = i;
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props);
|
var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1].VideoOutFeedback);
|
||||||
case ("hdmd4x24ke"):
|
var localOutputPort =
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props);
|
OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1]);
|
||||||
case ("hdmd6x24ke"):
|
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props);
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
VideoOutputRouteFeedbacks[i].FireUpdate();
|
||||||
|
OnSwitchChange(new RoutingNumericEventArgs((ushort)i, VideoOutputRouteFeedbacks[i].UShortValue, localOutputPort, localInputPort, eRoutingSignalType.AudioVideo));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.EventId != DMInputEventIds.VideoDetectedEventId) return;
|
||||||
|
foreach (var item in VideoInputSyncFeedbacks)
|
||||||
|
{
|
||||||
|
item.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Factory
|
||||||
|
|
||||||
|
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
||||||
|
{
|
||||||
|
public HdMdNxM4kEControllerFactory()
|
||||||
|
{
|
||||||
|
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device");
|
||||||
|
|
||||||
|
var props = JsonConvert.DeserializeObject<HdMdNxM4kEBridgeablePropertiesConfig>(dc.Properties.ToString());
|
||||||
|
|
||||||
|
var type = dc.Type.ToLower();
|
||||||
|
var control = props.Control;
|
||||||
|
var ipid = control.IpIdInt;
|
||||||
|
var address = control.TcpSshProperties.Address;
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case ("hdmd4x14ke-bridgeable"):
|
||||||
|
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props);
|
||||||
|
case ("hdmd4x24ke"):
|
||||||
|
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props);
|
||||||
|
case ("hdmd6x24ke"):
|
||||||
|
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props);
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@@ -14,7 +13,6 @@ using PepperDash.Essentials.DM.Config;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.DM.Chassis
|
namespace PepperDash.Essentials.DM.Chassis
|
||||||
{
|
{
|
||||||
[Obsolete("Please use HdMdNxM4kEBridgeable Controller")]
|
|
||||||
public class HdMdNxM4kEController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting
|
public class HdMdNxM4kEController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting
|
||||||
{
|
{
|
||||||
public HdMdNxM Chassis { get; private set; }
|
public HdMdNxM Chassis { get; private set; }
|
||||||
@@ -33,7 +31,6 @@ namespace PepperDash.Essentials.DM.Chassis
|
|||||||
HdMdNxM4kEPropertiesConfig props)
|
HdMdNxM4kEPropertiesConfig props)
|
||||||
: base(key, name, chassis)
|
: base(key, name, chassis)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Type hdmd4x14ke is obsolete. Please use hdmd4x14ke-bridgeable");
|
|
||||||
Chassis = chassis;
|
Chassis = chassis;
|
||||||
|
|
||||||
// logical ports
|
// logical ports
|
||||||
@@ -50,15 +47,10 @@ namespace PepperDash.Essentials.DM.Chassis
|
|||||||
// physical settings
|
// physical settings
|
||||||
if (props != null && props.Inputs != null)
|
if (props != null && props.Inputs != null)
|
||||||
{
|
{
|
||||||
var inputRegex = new Regex(@"(?<InputNum>\d)", RegexOptions.IgnoreCase);
|
|
||||||
foreach (var kvp in props.Inputs)
|
foreach (var kvp in props.Inputs)
|
||||||
{
|
{
|
||||||
// get numnbers from key and convert to int
|
// strip "hdmiIn"
|
||||||
//var inputNum = Convert.ToUInt32(kvp.Key.Substring(6));
|
var inputNum = Convert.ToUInt32(kvp.Key.Substring(6));
|
||||||
var inputMatch = inputRegex.Match(kvp.Key);
|
|
||||||
if (inputMatch == null) continue;
|
|
||||||
|
|
||||||
var inputNum = Convert.ToUInt32(inputMatch.Groups["InputNum"].Value);
|
|
||||||
|
|
||||||
var port = chassis.HdmiInputs[inputNum].HdmiInputPort;
|
var port = chassis.HdmiInputs[inputNum].HdmiInputPort;
|
||||||
// set hdcp disables
|
// set hdcp disables
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var localVideoInputPort =
|
var localVideoInputPort =
|
||||||
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
||||||
var localAudioInputPort =
|
var localAudioInputPort =
|
||||||
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
||||||
|
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
@@ -338,8 +338,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video));
|
OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video));
|
||||||
break;
|
break;
|
||||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
var localInputAudioPort = InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback);
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio));
|
OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var localVideoInputPort =
|
var localVideoInputPort =
|
||||||
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
||||||
var localAudioInputPort =
|
var localAudioInputPort =
|
||||||
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
||||||
|
|
||||||
ActiveVideoInputFeedback.FireUpdate();
|
ActiveVideoInputFeedback.FireUpdate();
|
||||||
VideoSourceNumericFeedback.FireUpdate();
|
VideoSourceNumericFeedback.FireUpdate();
|
||||||
@@ -364,8 +364,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video));
|
OnSwitchChange(new RoutingNumericEventArgs(1, VideoSourceNumericFeedback.UShortValue, OutputPorts.First(), localVideoInputPort, eRoutingSignalType.Video));
|
||||||
break;
|
break;
|
||||||
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
case EndpointTransmitterBase.AudioSourceFeedbackEventId:
|
||||||
var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
var localInputAudioPort = InputPorts.FirstOrDefault(p => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback);
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio));
|
OnSwitchChange(new RoutingNumericEventArgs(1, AudioSourceNumericFeedback.UShortValue, OutputPorts.First(), localInputAudioPort, eRoutingSignalType.Audio));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// For rooms that have audio codec
|
/// For rooms that have audio codec
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasAudioCodec:IHasInCallFeedback
|
public interface IHasAudioCodec
|
||||||
{
|
{
|
||||||
AudioCodecBase AudioCodec { get; }
|
AudioCodecBase AudioCodec { get; }
|
||||||
|
BoolFeedback InCallFeedback { get; }
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// Make this more specific
|
///// Make this more specific
|
||||||
|
|||||||
@@ -69,22 +69,6 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
[JsonProperty("directoryResults")]
|
[JsonProperty("directoryResults")]
|
||||||
public List<DirectoryItem> CurrentDirectoryResults { get; private set; }
|
public List<DirectoryItem> CurrentDirectoryResults { get; private set; }
|
||||||
|
|
||||||
public List<DirectoryItem> Contacts
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return CurrentDirectoryResults.OfType<DirectoryContact>().Cast<DirectoryItem>().ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<DirectoryItem> Folders
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return CurrentDirectoryResults.OfType<DirectoryFolder>().Cast<DirectoryItem>().ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to store the ID of the current folder for CurrentDirectoryResults
|
/// Used to store the ID of the current folder for CurrentDirectoryResults
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -120,15 +104,6 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
SortDirectory();
|
SortDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Filters the CurrentDirectoryResults by the predicate
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="predicate"></param>
|
|
||||||
public void FilterContacts(Func<DirectoryItem, bool> predicate)
|
|
||||||
{
|
|
||||||
CurrentDirectoryResults = CurrentDirectoryResults.Where(predicate).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sorts the DirectoryResults list to display all folders alphabetically, then all contacts alphabetically
|
/// Sorts the DirectoryResults list to display all folders alphabetically, then all contacts alphabetically
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -160,19 +135,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IInvitableContact
|
public interface IInvitableContact
|
||||||
{
|
{
|
||||||
bool IsInvitableContact { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class InvitableDirectoryContact : DirectoryContact, IInvitableContact
|
|
||||||
{
|
|
||||||
[JsonProperty("isInvitableContact")]
|
|
||||||
public bool IsInvitableContact
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this is IInvitableContact;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -221,6 +184,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
[JsonProperty("title")]
|
[JsonProperty("title")]
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[JsonProperty("contactMethods")]
|
[JsonProperty("contactMethods")]
|
||||||
public List<ContactMethod> ContactMethods { get; set; }
|
public List<ContactMethod> ContactMethods { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -235,15 +235,6 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
{
|
{
|
||||||
Calls = new List<Call>();
|
Calls = new List<Call>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Overrides of Object
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return String.Format("{0}:{1}: {2}-{3}", Title, Agenda, StartTime, EndTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Call
|
public class Call
|
||||||
|
|||||||
@@ -120,14 +120,9 @@
|
|||||||
<Compile Include="VideoCodec\CiscoCodec\RoomPresets.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\RoomPresets.cs" />
|
||||||
<Compile Include="Cameras\CameraControl.cs" />
|
<Compile Include="Cameras\CameraControl.cs" />
|
||||||
<Compile Include="Display\PanasonicThDisplay.cs" />
|
<Compile Include="Display\PanasonicThDisplay.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
|
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingLock.cs" />
|
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingRecording.cs" />
|
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
|
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasStartMeeting.cs" />
|
|
||||||
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
|
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
|
||||||
<Compile Include="Codec\iHasCallFavorites.cs" />
|
<Compile Include="Codec\iHasCallFavorites.cs" />
|
||||||
<Compile Include="Codec\iHasCallHistory.cs" />
|
<Compile Include="Codec\iHasCallHistory.cs" />
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
FarEndIsSharingContentFeedback = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
|
FarEndIsSharingContentFeedback = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
|
||||||
CameraIsOffFeedback = new BoolFeedback(() => CodecStatus.Status.Video.Input.MainVideoMute.BoolValue);
|
CameraIsOffFeedback = new BoolFeedback(() => CodecStatus.Status.Video.Input.MainVideoMute.BoolValue);
|
||||||
CameraIsMutedFeedback = CameraIsOffFeedback;
|
CameraIsMutedFeedback = CameraIsOffFeedback;
|
||||||
SupportsCameraOff = true;
|
|
||||||
|
|
||||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
||||||
|
|
||||||
@@ -417,7 +417,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
||||||
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Cameras.SpeakerTrack.Availability.ValueChangedAction = () => { SupportsCameraAutoMode = CodecStatus.Status.Cameras.SpeakerTrack.Availability.BoolValue; };
|
|
||||||
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
||||||
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
||||||
@@ -743,10 +742,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Appends the delimiter and send the command to the codec
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="command"></param>
|
|
||||||
public void SendText(string command)
|
public void SendText(string command)
|
||||||
{
|
{
|
||||||
if (CommDebuggingIsOn)
|
if (CommDebuggingIsOn)
|
||||||
|
|||||||
@@ -277,25 +277,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public SoftwareID SoftwareID { get; set; }
|
public SoftwareID SoftwareID { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Availability : ValueProperty
|
public class Availability
|
||||||
{
|
{
|
||||||
string _Value;
|
public string Value { get; set; }
|
||||||
public bool BoolValue { get; private set; }
|
|
||||||
|
|
||||||
public string Value
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _Value;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
// If the incoming value is "Available" it sets the BoolValue true, otherwise sets it false
|
|
||||||
_Value = value;
|
|
||||||
BoolValue = value == "Available";
|
|
||||||
OnValueChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Status2 : ValueProperty
|
public class Status2 : ValueProperty
|
||||||
@@ -327,7 +311,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public SpeakerTrack()
|
public SpeakerTrack()
|
||||||
{
|
{
|
||||||
Status = new Status2();
|
Status = new Status2();
|
||||||
Availability = new Availability();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Describes a device that provides meeting information (like a ZoomRoom)
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasMeetingInfo
|
|
||||||
{
|
|
||||||
event EventHandler<MeetingInfoEventArgs> MeetingInfoChanged;
|
|
||||||
|
|
||||||
MeetingInfo MeetingInfo { get; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the information about a meeting in progress
|
|
||||||
/// Currently used for Zoom meetings
|
|
||||||
/// </summary>
|
|
||||||
public class MeetingInfo
|
|
||||||
{
|
|
||||||
[JsonProperty("id")]
|
|
||||||
public string Id { get; private set; }
|
|
||||||
[JsonProperty("name")]
|
|
||||||
public string Name { get; private set; }
|
|
||||||
[JsonProperty("host")]
|
|
||||||
public string Host { get; private set; }
|
|
||||||
[JsonProperty("password")]
|
|
||||||
public string Password { get; private set; }
|
|
||||||
[JsonProperty("shareStatus")]
|
|
||||||
public string ShareStatus { get; private set; }
|
|
||||||
[JsonProperty("isHost")]
|
|
||||||
public Boolean IsHost { get; private set; }
|
|
||||||
[JsonProperty("isSharingMeeting")]
|
|
||||||
public Boolean IsSharingMeeting { get; private set; }
|
|
||||||
[JsonProperty("waitingForHost")]
|
|
||||||
public Boolean WaitingForHost { get; private set; }
|
|
||||||
|
|
||||||
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost)
|
|
||||||
{
|
|
||||||
Id = id;
|
|
||||||
Name = name;
|
|
||||||
Host = host;
|
|
||||||
Password = password;
|
|
||||||
ShareStatus = shareStatus;
|
|
||||||
IsHost = isHost;
|
|
||||||
IsSharingMeeting = isSharingMeeting;
|
|
||||||
WaitingForHost = waitingForHost;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MeetingInfoEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
public MeetingInfo Info { get; private set; }
|
|
||||||
|
|
||||||
public MeetingInfoEventArgs(MeetingInfo info)
|
|
||||||
{
|
|
||||||
Info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|
||||||
{
|
|
||||||
public interface IHasMeetingLock
|
|
||||||
{
|
|
||||||
BoolFeedback MeetingIsLockedFeedback { get; }
|
|
||||||
|
|
||||||
void LockMeeting();
|
|
||||||
void UnLockMeeting();
|
|
||||||
void ToggleMeetingLock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|
||||||
{
|
|
||||||
public interface IHasMeetingRecording
|
|
||||||
{
|
|
||||||
BoolFeedback MeetingIsRecordingFeedback { get; }
|
|
||||||
|
|
||||||
void StartRecording();
|
|
||||||
void StopRecording();
|
|
||||||
void ToggleRecording();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,129 +1,100 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes a device that has call participants
|
/// Describes a device that has call participants
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasParticipants
|
public interface IHasParticipants
|
||||||
{
|
{
|
||||||
CodecParticipants Participants { get; }
|
CodecParticipants Participants { get; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes the participant from the meeting
|
/// Describes the ability to mute and unmute a participant's video in a meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="participant"></param>
|
public interface IHasParticipantVideoMute:IHasParticipants
|
||||||
void RemoveParticipant(int userId);
|
{
|
||||||
|
void MuteVideoForParticipant(int userId);
|
||||||
|
void UnmuteVideoForParticipant(int userId);
|
||||||
|
void ToggleVideoForParticipant(int userId);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the participant as the new host
|
/// Describes the ability to mute and unmute a participant's audio in a meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="participant"></param>
|
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
|
||||||
void SetParticipantAsHost(int userId);
|
{
|
||||||
}
|
void MuteAudioForParticipant(int userId);
|
||||||
|
void UnmuteAudioForParticipant(int userId);
|
||||||
|
void ToggleAudioForParticipant(int userId);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes the ability to mute and unmute a participant's video in a meeting
|
/// Describes the ability to pin and unpin a participant in a meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasParticipantVideoMute : IHasParticipants
|
public interface IHasParticipantPinUnpin : IHasParticipants
|
||||||
{
|
{
|
||||||
void MuteVideoForParticipant(int userId);
|
IntFeedback NumberOfScreensFeedback { get; }
|
||||||
void UnmuteVideoForParticipant(int userId);
|
int ScreenIndexToPinUserTo { get; }
|
||||||
void ToggleVideoForParticipant(int userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
void PinParticipant(int userId, int screenIndex);
|
||||||
/// Describes the ability to mute and unmute a participant's audio in a meeting
|
void UnPinParticipant(int userId);
|
||||||
/// </summary>
|
void ToggleParticipantPinState(int userId, int screenIndex);
|
||||||
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
|
}
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Mute audio of all participants
|
|
||||||
/// </summary>
|
|
||||||
void MuteAudioForAllParticipants();
|
|
||||||
|
|
||||||
void MuteAudioForParticipant(int userId);
|
public class CodecParticipants
|
||||||
void UnmuteAudioForParticipant(int userId);
|
{
|
||||||
void ToggleAudioForParticipant(int userId);
|
private List<Participant> _currentParticipants;
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
public List<Participant> CurrentParticipants {
|
||||||
/// Describes the ability to pin and unpin a participant in a meeting
|
get { return _currentParticipants; }
|
||||||
/// </summary>
|
set
|
||||||
public interface IHasParticipantPinUnpin : IHasParticipants
|
|
||||||
{
|
|
||||||
IntFeedback NumberOfScreensFeedback { get; }
|
|
||||||
int ScreenIndexToPinUserTo { get; }
|
|
||||||
|
|
||||||
void PinParticipant(int userId, int screenIndex);
|
|
||||||
void UnPinParticipant(int userId);
|
|
||||||
void ToggleParticipantPinState(int userId, int screenIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CodecParticipants
|
|
||||||
{
|
|
||||||
private List<Participant> _currentParticipants;
|
|
||||||
|
|
||||||
public List<Participant> CurrentParticipants
|
|
||||||
{
|
|
||||||
get { return _currentParticipants; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_currentParticipants = value;
|
|
||||||
OnParticipantsChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Participant Host
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
{
|
||||||
return _currentParticipants.FirstOrDefault(p => p.IsHost);
|
_currentParticipants = value;
|
||||||
|
OnParticipantsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler<EventArgs> ParticipantsListHasChanged;
|
public event EventHandler<EventArgs> ParticipantsListHasChanged;
|
||||||
|
|
||||||
public CodecParticipants()
|
public CodecParticipants()
|
||||||
{
|
{
|
||||||
_currentParticipants = new List<Participant>();
|
_currentParticipants = new List<Participant>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnParticipantsChanged()
|
public void OnParticipantsChanged()
|
||||||
{
|
{
|
||||||
var handler = ParticipantsListHasChanged;
|
var handler = ParticipantsListHasChanged;
|
||||||
|
|
||||||
if (handler == null) return;
|
if (handler == null) return;
|
||||||
|
|
||||||
handler(this, new EventArgs());
|
handler(this, new EventArgs());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a call participant
|
/// Represents a call participant
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Participant
|
public class Participant
|
||||||
{
|
{
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
public bool IsHost { get; set; }
|
public bool IsHost { get; set; }
|
||||||
public bool IsMyself { get; set; }
|
public string Name { get; set; }
|
||||||
public string Name { get; set; }
|
public bool CanMuteVideo { get; set; }
|
||||||
public bool CanMuteVideo { get; set; }
|
public bool CanUnmuteVideo { get; set; }
|
||||||
public bool CanUnmuteVideo { get; set; }
|
public bool VideoMuteFb { get; set; }
|
||||||
public bool VideoMuteFb { get; set; }
|
public bool AudioMuteFb { get; set; }
|
||||||
public bool AudioMuteFb { get; set; }
|
public bool HandIsRaisedFb { get; set; }
|
||||||
public bool HandIsRaisedFb { get; set; }
|
public bool IsPinnedFb { get; set; }
|
||||||
public bool IsPinnedFb { get; set; }
|
public int ScreenIndexIsPinnedToFb { get; set; }
|
||||||
public int ScreenIndexIsPinnedToFb { get; set; }
|
|
||||||
|
|
||||||
public Participant()
|
public Participant()
|
||||||
{
|
{
|
||||||
// Initialize to -1 (no screen)
|
// Initialize to -1 (no screen)
|
||||||
ScreenIndexIsPinnedToFb = -1;
|
ScreenIndexIsPinnedToFb = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|
||||||
{
|
|
||||||
public interface IHasPresentationOnlyMeeting
|
|
||||||
{
|
|
||||||
void StartSharingOnlyMeeting();
|
|
||||||
void StartSharingOnlyMeeting(eSharingMeetingMode mode);
|
|
||||||
void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration);
|
|
||||||
void StartSharingOnlyMeeting(eSharingMeetingMode mode, ushort duration, string password);
|
|
||||||
void StartNormalMeetingFromSharingOnlyMeeting();
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum eSharingMeetingMode
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
Laptop,
|
|
||||||
Ios,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Describes the ability to start an ad-hoc meeting
|
|
||||||
/// </summary>
|
|
||||||
public interface IHasStartMeeting
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The default meeting duration in minutes
|
|
||||||
/// </summary>
|
|
||||||
uint DefaultMeetingDurationMin { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Start an ad-hoc meeting for the specified duration
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="duration"></param>
|
|
||||||
void StartMeeting(uint duration);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Leaves a meeting without ending it
|
|
||||||
/// </summary>
|
|
||||||
void LeaveMeeting();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,9 +11,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// For rooms that have video codec
|
/// For rooms that have video codec
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasVideoCodec:IHasInCallFeedback,IPrivacy
|
public interface IHasVideoCodec
|
||||||
{
|
{
|
||||||
VideoCodecBase VideoCodec { get; }
|
VideoCodecBase VideoCodec { get; }
|
||||||
|
BoolFeedback InCallFeedback { get; }
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// Make this more specific
|
///// Make this more specific
|
||||||
@@ -25,6 +26,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
IntFeedback CallTypeFeedback { get; }
|
IntFeedback CallTypeFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
BoolFeedback PrivacyModeIsOnFeedback { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When something in the room is sharing with the far end or through other means
|
/// When something in the room is sharing with the far end or through other means
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -78,8 +78,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
SetupCameras();
|
SetupCameras();
|
||||||
|
|
||||||
CreateOsdSource();
|
|
||||||
|
|
||||||
SetIsReady();
|
SetIsReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,19 +117,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
}
|
}
|
||||||
bool _StandbyIsOn;
|
bool _StandbyIsOn;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input
|
|
||||||
/// to enable routing
|
|
||||||
/// </summary>
|
|
||||||
private void CreateOsdSource()
|
|
||||||
{
|
|
||||||
OsdSource = new DummyRoutingInputsDevice(Key + "[osd]");
|
|
||||||
DeviceManager.AddDevice(OsdSource);
|
|
||||||
var tl = new TieLine(OsdSource.AudioVideoOutputPort, CodecOsdIn);
|
|
||||||
TieLineCollection.Default.Add(tl);
|
|
||||||
|
|
||||||
//foreach(var input in Status.Video.
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dials, yo!
|
/// Dials, yo!
|
||||||
@@ -582,10 +567,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
void SetupCameras()
|
void SetupCameras()
|
||||||
{
|
{
|
||||||
SupportsCameraAutoMode = true;
|
|
||||||
|
|
||||||
SupportsCameraOff = false;
|
|
||||||
|
|
||||||
Cameras = new List<CameraBase>();
|
Cameras = new List<CameraBase>();
|
||||||
|
|
||||||
var internalCamera = new MockVCCamera(Key + "-camera1", "Near End", this);
|
var internalCamera = new MockVCCamera(Key + "-camera1", "Near End", this);
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
public bool ShowSelfViewByDefault { get; protected set; }
|
public bool ShowSelfViewByDefault { get; protected set; }
|
||||||
|
|
||||||
public bool SupportsCameraOff { get; protected set; }
|
protected bool SupportsCameraOff;
|
||||||
public bool SupportsCameraAutoMode { get; protected set; }
|
protected bool SupportsCameraAutoMode;
|
||||||
|
|
||||||
public bool IsReady { get; protected set; }
|
public bool IsReady { get; protected set; }
|
||||||
|
|
||||||
@@ -298,13 +298,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
}
|
}
|
||||||
|
|
||||||
LinkVideoCodecToApi(codec, trilist, joinMap);
|
LinkVideoCodecToApi(codec, trilist, joinMap);
|
||||||
|
|
||||||
trilist.OnlineStatusChange += (device, args) =>
|
|
||||||
{
|
|
||||||
if (!args.DeviceOnLine) return;
|
|
||||||
|
|
||||||
trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC");
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -792,16 +785,6 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
|||||||
|
|
||||||
_currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
|
_currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
|
||||||
|
|
||||||
if (_currentMeetings.Count == 0)
|
|
||||||
{
|
|
||||||
var emptyXSigByteArray = XSigHelpers.ClearOutputs();
|
|
||||||
var emptyXSigString = Encoding.GetEncoding(XSigEncoding)
|
|
||||||
.GetString(emptyXSigByteArray, 0, emptyXSigByteArray.Length);
|
|
||||||
|
|
||||||
trilist.SetString(joinMap.Schedule.JoinNumber, emptyXSigString);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var meetingsData = UpdateMeetingsListXSig(_currentMeetings);
|
var meetingsData = UpdateMeetingsListXSig(_currentMeetings);
|
||||||
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
|
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
|
||||||
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);
|
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);
|
||||||
@@ -853,10 +836,10 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
|||||||
//serials
|
//serials
|
||||||
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, meeting.Organizer);
|
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, meeting.Organizer);
|
||||||
tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, meeting.Title);
|
tokenArray[stringIndex + 1] = new XSigSerialToken(stringIndex + 2, meeting.Title);
|
||||||
tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, meeting.StartTime.ToString("t", Global.Culture));
|
tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, meeting.StartTime.ToShortDateString());
|
||||||
tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, meeting.StartTime.ToString("t", Global.Culture));
|
tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, meeting.StartTime.ToShortTimeString());
|
||||||
tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, meeting.EndTime.ToString("t", Global.Culture));
|
tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, meeting.EndTime.ToShortDateString());
|
||||||
tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, meeting.EndTime.ToString("t", Global.Culture));
|
tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, meeting.EndTime.ToShortTimeString());
|
||||||
tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, meeting.Id);
|
tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, meeting.Id);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; }
|
public List<zStatus.AudioVideoInputOutputLineItem> AudioOuputs { get; set; }
|
||||||
public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; }
|
public List<zStatus.AudioVideoInputOutputLineItem> Cameras { get; set; }
|
||||||
public zEvent.PhoneCallStatus PhoneCall { get; set; }
|
public zEvent.PhoneCallStatus PhoneCall { get; set; }
|
||||||
public zEvent.NeedWaitForHost NeedWaitForHost { get; set; }
|
|
||||||
|
|
||||||
public ZoomRoomStatus()
|
public ZoomRoomStatus()
|
||||||
{
|
{
|
||||||
@@ -77,7 +76,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>();
|
AudioOuputs = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||||
Cameras = new List<zStatus.AudioVideoInputOutputLineItem>();
|
Cameras = new List<zStatus.AudioVideoInputOutputLineItem>();
|
||||||
PhoneCall = new zEvent.PhoneCallStatus();
|
PhoneCall = new zEvent.PhoneCallStatus();
|
||||||
NeedWaitForHost = new zEvent.NeedWaitForHost();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,6 +236,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to be able to inplement IInvitableContact on DirectoryContact
|
||||||
|
/// </summary>
|
||||||
|
public class ZoomDirectoryContact : DirectoryContact, IInvitableContact
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class Phonebook
|
public class Phonebook
|
||||||
{
|
{
|
||||||
[JsonProperty("Contacts")]
|
[JsonProperty("Contacts")]
|
||||||
@@ -270,9 +276,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
if (zoomRooms.Count > 0)
|
if (zoomRooms.Count > 0)
|
||||||
{
|
{
|
||||||
// If so, setup a rooms and contacts folder and add them.
|
// If so, setup a rooms and contacts folder and add them.
|
||||||
|
|
||||||
directory.ResultsFolderId = "root";
|
|
||||||
|
|
||||||
roomFolder.Name = "Rooms";
|
roomFolder.Name = "Rooms";
|
||||||
roomFolder.ParentFolderId = "root";
|
roomFolder.ParentFolderId = "root";
|
||||||
roomFolder.FolderId = "rooms";
|
roomFolder.FolderId = "rooms";
|
||||||
@@ -289,26 +292,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (zoomContacts.Count == 0)
|
if (zoomContacts.Count == 0) return directory;
|
||||||
{
|
|
||||||
return directory;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (Contact c in zoomContacts)
|
|
||||||
{
|
{
|
||||||
var contact = new InvitableDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
foreach (Contact c in zoomContacts)
|
||||||
|
|
||||||
contact.ContactMethods.Add(new ContactMethod() { Number = c.Jid, Device = eContactMethodDevice.Video, CallType = eContactMethodCallType.Video, ContactMethodId = c.Jid });
|
|
||||||
|
|
||||||
if (folders.Count > 0)
|
|
||||||
{
|
{
|
||||||
contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
|
var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
||||||
|
|
||||||
|
if (folders.Count > 0)
|
||||||
|
{
|
||||||
|
contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
|
||||||
|
}
|
||||||
|
|
||||||
|
contacts.Add(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
contacts.Add(contact);
|
directory.AddContactsToDirectory(contacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
directory.AddContactsToDirectory(contacts);
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -433,10 +432,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
private string _dispState;
|
private string _dispState;
|
||||||
private string _password;
|
private string _password;
|
||||||
private bool _isAirHostClientConnected;
|
|
||||||
private bool _isSharingBlackMagic;
|
|
||||||
private bool _isDirectPresentationConnected;
|
|
||||||
|
|
||||||
|
|
||||||
public string directPresentationPairingCode { get; set; }
|
public string directPresentationPairingCode { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -458,51 +453,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool isAirHostClientConnected { get; set; }
|
||||||
public bool isAirHostClientConnected
|
|
||||||
{
|
|
||||||
get { return _isAirHostClientConnected; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value != _isAirHostClientConnected)
|
|
||||||
{
|
|
||||||
_isAirHostClientConnected = value;
|
|
||||||
NotifyPropertyChanged("isAirHostClientConnected");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool isBlackMagicConnected { get; set; }
|
public bool isBlackMagicConnected { get; set; }
|
||||||
public bool isBlackMagicDataAvailable { get; set; }
|
public bool isBlackMagicDataAvailable { get; set; }
|
||||||
|
public bool isDirectPresentationConnected { get; set; }
|
||||||
public bool isDirectPresentationConnected
|
public bool isSharingBlackMagic { get; set; }
|
||||||
{
|
|
||||||
get { return _isDirectPresentationConnected; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value != _isDirectPresentationConnected)
|
|
||||||
{
|
|
||||||
_isDirectPresentationConnected = value;
|
|
||||||
NotifyPropertyChanged("isDirectPresentationConnected");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool isSharingBlackMagic
|
|
||||||
{
|
|
||||||
get { return _isSharingBlackMagic; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value != _isSharingBlackMagic)
|
|
||||||
{
|
|
||||||
_isSharingBlackMagic = value;
|
|
||||||
NotifyPropertyChanged("isSharingBlackMagic");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IOS Airplay code
|
/// IOS Airplay code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -744,29 +699,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CallRecordInfo : NotifiableObject
|
public class CallRecordInfo
|
||||||
{
|
{
|
||||||
private bool _meetingIsBeingRecorded;
|
|
||||||
|
|
||||||
public bool canRecord { get; set; }
|
public bool canRecord { get; set; }
|
||||||
public bool emailRequired { get; set; }
|
public bool emailRequired { get; set; }
|
||||||
public bool amIRecording { get; set; }
|
public bool amIRecording { get; set; }
|
||||||
|
public bool meetingIsBeingRecorded { get; set; }
|
||||||
public bool meetingIsBeingRecorded
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _meetingIsBeingRecorded;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value != _meetingIsBeingRecorded)
|
|
||||||
{
|
|
||||||
_meetingIsBeingRecorded = value;
|
|
||||||
NotifyPropertyChanged("meetingIsBeingRecorded");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -775,10 +713,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class zEvent
|
public class zEvent
|
||||||
{
|
{
|
||||||
public class StartLocalPresentMeeting
|
|
||||||
{
|
|
||||||
public bool Success { get; set; }
|
|
||||||
}
|
|
||||||
public class NeedWaitForHost
|
public class NeedWaitForHost
|
||||||
{
|
{
|
||||||
public bool Wait { get; set; }
|
public bool Wait { get; set; }
|
||||||
@@ -846,7 +780,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
private bool _paused;
|
private bool _paused;
|
||||||
private eSharingState _state;
|
private eSharingState _state;
|
||||||
|
|
||||||
public bool IsSharing { get; private set; }
|
public bool IsSharing;
|
||||||
|
|
||||||
[JsonProperty("paused")]
|
[JsonProperty("paused")]
|
||||||
public bool Paused
|
public bool Paused
|
||||||
@@ -986,15 +920,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
PhoneCallStatus_InCall,
|
PhoneCallStatus_InCall,
|
||||||
PhoneCallStatus_Init,
|
PhoneCallStatus_Init,
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MeetingNeedsPassword
|
|
||||||
{
|
|
||||||
[JsonProperty("needsPassword")]
|
|
||||||
public bool NeedsPassword { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("wrongAndRetry")]
|
|
||||||
public bool WrongAndRetry { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1140,25 +1065,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Lock : NotifiableObject
|
public class Lock
|
||||||
{
|
{
|
||||||
private bool _enable;
|
public bool Enable { get; set; }
|
||||||
|
|
||||||
public bool Enable
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _enable;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value != _enable)
|
|
||||||
{
|
|
||||||
_enable = value;
|
|
||||||
NotifyPropertyChanged("Enable");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ClosedCaption
|
public class ClosedCaption
|
||||||
@@ -1252,11 +1161,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
//if (value != _hideConfSelfVideo)
|
if (value != _hideConfSelfVideo)
|
||||||
//{
|
{
|
||||||
_hideConfSelfVideo = value;
|
_hideConfSelfVideo = value;
|
||||||
NotifyPropertyChanged("HideConfSelfVideo");
|
NotifyPropertyChanged("HideConfSelfVideo");
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1510,10 +1419,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public static List<Participant> GetGenericParticipantListFromParticipantsResult(
|
public static List<Participant> GetGenericParticipantListFromParticipantsResult(
|
||||||
List<ListParticipant> participants)
|
List<ListParticipant> participants)
|
||||||
{
|
{
|
||||||
if (participants.Count == 0)
|
|
||||||
{
|
|
||||||
return new List<Participant>();
|
|
||||||
}
|
|
||||||
//return participants.Select(p => new Participant
|
//return participants.Select(p => new Participant
|
||||||
// {
|
// {
|
||||||
// UserId = p.UserId,
|
// UserId = p.UserId,
|
||||||
@@ -1532,7 +1437,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
UserId = p.UserId,
|
UserId = p.UserId,
|
||||||
Name = p.UserName,
|
Name = p.UserName,
|
||||||
IsHost = p.IsHost,
|
IsHost = p.IsHost,
|
||||||
IsMyself = p.IsMyself,
|
|
||||||
CanMuteVideo = p.IsVideoCanMuteByHost,
|
CanMuteVideo = p.IsVideoCanMuteByHost,
|
||||||
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
|
||||||
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -63,8 +63,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
ParentCodec = codec;
|
ParentCodec = codec;
|
||||||
|
|
||||||
Capabilities = eCameraCapabilities.Pan | eCameraCapabilities.Tilt | eCameraCapabilities.Zoom;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -25,7 +25,5 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
//This layout will be selected when a call is connected and no content is being shared
|
//This layout will be selected when a call is connected and no content is being shared
|
||||||
public string DefaultCallLayout { get; set; }
|
public string DefaultCallLayout { get; set; }
|
||||||
|
|
||||||
public int MinutesBeforeMeetingStart { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.1.0" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
<package id="PepperDashCore" version="1.0.48" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user