mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-21 07:35:04 +00:00
Compare commits
72 Commits
1.9.4-hotf
...
1.9.5-hotf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d78a378859 | ||
|
|
eec4484f78 | ||
|
|
49e82f107b | ||
|
|
c5162fb94d | ||
|
|
63b9ffdd26 | ||
|
|
2e76b6ba0a | ||
|
|
cad45c04cb | ||
|
|
70d63a9f99 | ||
|
|
30f63eee03 | ||
|
|
9f1c512909 | ||
|
|
0d6cd8d55d | ||
|
|
8e64140651 | ||
|
|
0da35c8572 | ||
|
|
9f3a3f64a8 | ||
|
|
fe01842523 | ||
|
|
4ffea1c98f | ||
|
|
73e3b049d8 | ||
|
|
0ae38dddfc | ||
|
|
871894e248 | ||
|
|
fa6cabe246 | ||
|
|
db3d96d448 | ||
|
|
a28a078c4f | ||
|
|
d00a31e3a6 | ||
|
|
77134f0a30 | ||
|
|
93dfb8780b | ||
|
|
f791feb848 | ||
|
|
44509dc5ae | ||
|
|
2d0dcd7336 | ||
|
|
c255ae1525 | ||
|
|
d50027cc82 | ||
|
|
9b64b7b7f3 | ||
|
|
147e712a01 | ||
|
|
9a1b069e24 | ||
|
|
d8cd04b35f | ||
|
|
8539a6b79c | ||
|
|
adec25104c | ||
|
|
a54cd9e1df | ||
|
|
8af7b4b1db | ||
|
|
3edb0145d0 | ||
|
|
0a1af09830 | ||
|
|
532f3ba237 | ||
|
|
e1d9a46284 | ||
|
|
bfd383dfc7 | ||
|
|
8ab87af859 | ||
|
|
47035d8386 | ||
|
|
c84ec4c899 | ||
|
|
4444328600 | ||
|
|
0d3eb42495 | ||
|
|
540a00861c | ||
|
|
0014dd7a14 | ||
|
|
f922b871a1 | ||
|
|
b2331fa1e5 | ||
|
|
8bf4b0d568 | ||
|
|
621205e65c | ||
|
|
62fcf3856f | ||
|
|
dad986414c | ||
|
|
f298b5cc41 | ||
|
|
f8129fe7ae | ||
|
|
dbdaedcca3 | ||
|
|
893950d8c4 | ||
|
|
b780351bf0 | ||
|
|
6a1671aae1 | ||
|
|
9a1a23c88a | ||
|
|
2e4bb7466c | ||
|
|
36a41ac477 | ||
|
|
92f4d37cd6 | ||
|
|
b9479bab70 | ||
|
|
fd94a94ee9 | ||
|
|
3fa2954ca0 | ||
|
|
c4f6afa412 | ||
|
|
6bdda5451b | ||
|
|
3ee8c07ecd |
1
.github/scripts/ZipBuildOutput.ps1
vendored
1
.github/scripts/ZipBuildOutput.ps1
vendored
@@ -8,6 +8,7 @@ $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,12 +8,9 @@ on:
|
|||||||
- bugfix/*
|
- bugfix/*
|
||||||
- release/*
|
- release/*
|
||||||
- development
|
- development
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- development
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
# solution path doesn't need slashes unless 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,13 +450,14 @@ 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;
|
||||||
|
|
||||||
@@ -477,7 +478,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 with IP-ID {0:X2}", fusionIpId);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
||||||
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
|
|
||||||
@@ -489,7 +490,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 with IP-ID {0:X2}", fusionIpId);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion");
|
||||||
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...");
|
||||||
@@ -501,7 +502,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 with IP-ID {0:X2}", fusionIpId);
|
"Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion");
|
||||||
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");
|
||||||
@@ -514,13 +515,9 @@ 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.");
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Creating Fusion Room symbol with GUID: {0} and IP-ID {1:X2}", RoomGuid, ipId);
|
Debug.Console(1, this, "Creating Fusion Room symbol with GUID: {0}", RoomGuid);
|
||||||
|
|
||||||
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,8 +149,7 @@
|
|||||||
<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\Interfaces\IEssentialsHuddleSpaceRoom.cs" />
|
<Compile Include="Room\Types\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;
|
||||||
|
|
||||||
Initialize();
|
InitializeRoom();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -215,7 +215,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize()
|
void InitializeRoom()
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
|
||||||
Initialize();
|
InitializeRoom();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -164,7 +164,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize()
|
void InitializeRoom()
|
||||||
{
|
{
|
||||||
if (DefaultAudioDevice is IBasicVolumeControls)
|
if (DefaultAudioDevice is IBasicVolumeControls)
|
||||||
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
||||||
|
|
||||||
Initialize();
|
InitializeRoom();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -234,7 +234,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize()
|
void InitializeRoom()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -49,6 +49,16 @@ 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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -153,6 +163,11 @@ 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>
|
||||||
@@ -752,10 +767,10 @@ namespace PepperDash.Essentials
|
|||||||
/// 15044 Close button for source modal overlay
|
/// 15044 Close button for source modal overlay
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SourceBackgroundOverlayClosePress = 15044;
|
public const uint SourceBackgroundOverlayClosePress = 15044;
|
||||||
///// <summary>
|
/// <summary>
|
||||||
///// 15045 - Visibility for the bar containing call navigation button list
|
/// 15045
|
||||||
///// </summary>
|
/// </summary>
|
||||||
//public const uint CallStagingBarVisible = 15045;
|
public const uint ZoomRoomContentSharingVisible = 15045;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15046
|
/// 15046
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -844,6 +859,11 @@ 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>
|
||||||
@@ -948,5 +968,24 @@ 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,6 +27,33 @@ 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>
|
||||||
@@ -118,6 +145,14 @@ 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
|
/// 1234: values 0 = Connect, 1 = End, 2 = Start Meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCStagingConnectButtonMode = 1234;
|
public const uint VCStagingConnectButtonMode = 1234;
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ 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;
|
||||||
@@ -164,7 +165,7 @@ namespace PepperDash.Essentials
|
|||||||
CallCaretVisible = tempJoin + 10;
|
CallCaretVisible = tempJoin + 10;
|
||||||
TriList.SetSigFalseAction(tempJoin, () =>
|
TriList.SetSigFalseAction(tempJoin, () =>
|
||||||
{
|
{
|
||||||
avDriver.ShowActiveCallsList();
|
avDriver.ShowActiveCallsListOrMeetingInfo();
|
||||||
if(avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
if(avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
||||||
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
||||||
});
|
});
|
||||||
@@ -191,32 +192,56 @@ 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);
|
}
|
||||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
||||||
|
//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
|
|
||||||
Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count);
|
|
||||||
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>
|
||||||
@@ -256,7 +281,7 @@ namespace PepperDash.Essentials
|
|||||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress,
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress,
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
avDriver.ShowActiveCallsList();
|
avDriver.ShowActiveCallsListOrMeetingInfo();
|
||||||
if (avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
if (avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
||||||
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
||||||
});
|
});
|
||||||
@@ -354,6 +379,8 @@ 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,6 +918,7 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
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;
|
||||||
@@ -8,11 +9,13 @@ 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
|
||||||
{
|
{
|
||||||
@@ -98,6 +101,9 @@ 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>
|
||||||
@@ -176,6 +182,16 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
private UiDisplayMode _currentMode;
|
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>
|
||||||
@@ -350,15 +366,17 @@ 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 ShowActiveCallsList()
|
public void ShowActiveCallsListOrMeetingInfo()
|
||||||
{
|
{
|
||||||
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.ScheduleSource as VideoCodecBase).IsInCall)
|
if(CurrentRoom.VideoCodec.IsInCall)
|
||||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,79 +472,92 @@ 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)
|
||||||
{
|
{
|
||||||
// If the room is off pester the user
|
return;
|
||||||
// If the room is on, and the meeting is joinable
|
}
|
||||||
// and the LastMeetingDismissed != this meeting
|
// If the room is off pester the user
|
||||||
|
// 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.ToShortTimeString() : "");
|
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToString("t", Global.Culture) : "");
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
return;
|
// meeting no longer joinable, hide popup
|
||||||
}
|
if(meeting == null)
|
||||||
|
HideNextMeetingPopup();
|
||||||
|
|
||||||
LastMeetingDismissedId = null;
|
return;
|
||||||
// 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;
|
|
||||||
|
|
||||||
// indexOf = 3, 4 meetings :
|
LastMeetingDismissedId = null;
|
||||||
if (indexOfNext < meetings.Count)
|
// Clear the popup when we run out of meetings
|
||||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
if (meeting == null)
|
||||||
meetings[indexOfNext].StartTime.ToShortTimeString());
|
{
|
||||||
else
|
HideNextMeetingPopup();
|
||||||
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.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
||||||
}
|
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>
|
||||||
@@ -552,19 +583,26 @@ 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) =>
|
||||||
@@ -633,7 +671,25 @@ namespace PepperDash.Essentials
|
|||||||
var callMode = CurrentMode == UiDisplayMode.Call;
|
var callMode = CurrentMode == UiDisplayMode.Call;
|
||||||
|
|
||||||
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
|
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? 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
|
CallButtonSig.BoolValue = callMode
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
@@ -671,25 +727,63 @@ namespace PepperDash.Essentials
|
|||||||
if (VCDriver.IsVisible)
|
if (VCDriver.IsVisible)
|
||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
// Run default source when room is off and share is pressed
|
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
|
||||||
|
if (_isZoomRoomWithNoExternalSources)
|
||||||
{
|
{
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
// If there's no default, show UI elements
|
CurrentRoom.RunDefaultPresentRoute();
|
||||||
if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
|
}
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
// For now, if this is a Zoom Room and there are no shareable sources just display the informational subpage
|
||||||
}
|
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 // room is on show what's active or select a source if nothing is yet active
|
else
|
||||||
{
|
{
|
||||||
if(CurrentRoom.CurrentSourceInfo == null || CurrentRoom.CurrentSourceInfoKey == CurrentRoom.DefaultCodecRouteString)
|
// Run default source when room is off and share is pressed
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
else if (CurrentSourcePageManager != null)
|
{
|
||||||
CurrentSourcePageManager.Show();
|
// If there's no default, show UI elements
|
||||||
|
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -728,7 +822,7 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowCurrentSource()
|
void ShowCurrentSource()
|
||||||
{
|
{
|
||||||
if (CurrentRoom.CurrentSourceInfo == null)
|
if (CurrentRoom.CurrentSourceInfo == null || _isZoomRoomWithNoExternalSources)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CurrentMode = UiDisplayMode.Presentation;
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
@@ -938,6 +1032,18 @@ 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;
|
||||||
@@ -970,9 +1076,23 @@ 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)
|
||||||
{
|
{
|
||||||
(_CurrentRoom.VideoCodec as IHasScheduleAwareness).CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged;
|
scheduleAwareCodec.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);
|
||||||
@@ -984,7 +1104,8 @@ namespace PepperDash.Essentials
|
|||||||
if (_CurrentRoom != null)
|
if (_CurrentRoom != null)
|
||||||
_CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
|
_CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey));
|
// Moved to EssentialsVideoCodecUiDriver
|
||||||
|
//TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey));
|
||||||
|
|
||||||
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
|
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
|
||||||
}
|
}
|
||||||
@@ -995,6 +1116,26 @@ 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;
|
||||||
@@ -1108,7 +1249,8 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(1, "**** KEY {0}", kvp.Key);
|
Debug.Console(1, "**** KEY {0}", kvp.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
SourceStagingSrl.Count = (ushort)(i - 1);
|
_sourceListCount = (i - 1);
|
||||||
|
SourceStagingSrl.Count = (ushort)_sourceListCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1131,6 +1273,30 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -1173,17 +1339,16 @@ 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.ToShortTimeString();
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 1).StringValue = m.StartTime.ToString("t", Global.Culture);
|
||||||
MeetingOrContactMethodModalSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToShortTimeString();
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToString("t", Global.Culture);
|
||||||
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";
|
||||||
@@ -1228,12 +1393,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;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1480,6 +1645,8 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void PrepareForCodecIncomingCall();
|
void PrepareForCodecIncomingCall();
|
||||||
|
|
||||||
|
uint CallListOrMeetingInfoPopoverVisibilityJoin { get; }
|
||||||
|
|
||||||
SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
|
SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
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;
|
||||||
@@ -14,6 +15,7 @@ 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
|
||||||
@@ -83,6 +85,9 @@ 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;
|
||||||
@@ -123,23 +128,18 @@ 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)
|
/* if (CodecHasFavorites || codec is IHasZoomRoomLayouts) //Checking for Zoom Room...picked a ZoomRoom specific interface to check for
|
||||||
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)
|
if(Codec is IHasCallHistory)
|
||||||
@@ -153,7 +153,8 @@ 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(() =>
|
||||||
{
|
{
|
||||||
if (KeypadMode == eKeypadMode.Dial)
|
// Format the number feedback if in dial mode and the codec is not IHasStartMeeting (ZoomRoom)
|
||||||
|
if (KeypadMode == eKeypadMode.Dial && !(Codec is IHasStartMeeting))
|
||||||
return GetFormattedDialString(DialStringBuilder.ToString());
|
return GetFormattedDialString(DialStringBuilder.ToString());
|
||||||
else
|
else
|
||||||
return DialStringBuilder.ToString();
|
return DialStringBuilder.ToString();
|
||||||
@@ -180,8 +181,22 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
});
|
});
|
||||||
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
||||||
|
|
||||||
SetupDirectoryList();
|
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();
|
||||||
|
|
||||||
SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0);
|
SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0);
|
||||||
SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]);
|
SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]);
|
||||||
@@ -199,6 +214,18 @@ 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)
|
||||||
{
|
{
|
||||||
@@ -294,24 +321,20 @@ 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);
|
||||||
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
OnCallConnected();
|
||||||
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);
|
||||||
@@ -327,7 +350,10 @@ 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;
|
||||||
@@ -348,12 +374,23 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
ShowIncomingModal(call);
|
ShowIncomingModal(call);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
|
||||||
|
|
||||||
uint stageJoin;
|
if (meetingInfoSender != null && Codec.IsInCall)
|
||||||
|
{
|
||||||
|
var meetingInfo = meetingInfoSender.MeetingInfo;
|
||||||
|
|
||||||
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue =
|
||||||
|
(ushort) (meetingInfo.IsSharingMeeting ? 2 : 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue =
|
||||||
|
(ushort) (Codec.IsInCall ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint stageJoin;
|
||||||
if (Codec.IsInCall)
|
if (Codec.IsInCall)
|
||||||
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
||||||
else
|
else
|
||||||
@@ -374,6 +411,36 @@ 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>
|
||||||
@@ -397,8 +464,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 == UIBoolJoin.HeaderActiveCallsListVisible)
|
if (!Codec.IsInCall && Parent.PopupInterlock.CurrentJoin == Parent.CallListOrMeetingInfoPopoverVisibilityJoin)
|
||||||
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
Parent.PopupInterlock.ShowInterlockedWithToggle(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -489,20 +556,67 @@ 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(UIBoolJoin.HeaderActiveCallsListVisible);
|
Parent.PopupInterlock.ShowInterlocked(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
|
||||||
|
}
|
||||||
|
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()
|
||||||
@@ -984,7 +1098,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.ToShortTimeString();
|
timeText = c.StartTime.ToString("t", Global.Culture);
|
||||||
else if (c.StartTime == DateTime.MinValue)
|
else if (c.StartTime == DateTime.MinValue)
|
||||||
timeText = "";
|
timeText = "";
|
||||||
else
|
else
|
||||||
@@ -1328,7 +1442,21 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void RevealKeyboard()
|
void RevealKeyboard()
|
||||||
{
|
{
|
||||||
if (VCControlsInterlock.CurrentJoin == UIBoolJoin.VCKeypadWithFavoritesVisible && KeypadMode == eKeypadMode.Dial)
|
if (_passwordPromptDialogVisible)
|
||||||
|
{
|
||||||
|
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;
|
||||||
@@ -1350,6 +1478,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
SearchStringKeypadCheckEnables();
|
SearchStringKeypadCheckEnables();
|
||||||
kb.Show();
|
kb.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1405,6 +1534,32 @@ 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>
|
||||||
@@ -1418,6 +1573,11 @@ 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>
|
||||||
@@ -1495,6 +1655,22 @@ 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>
|
||||||
@@ -1505,6 +1681,16 @@ 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>
|
||||||
@@ -1671,6 +1857,40 @@ 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
|
||||||
@@ -1716,5 +1936,62 @@ 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes the functionality required to prompt a user to enter a password
|
||||||
|
/// </summary>
|
||||||
|
public interface IPasswordPrompt
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Notifies when a password is required or is entered incorrectly
|
||||||
|
/// </summary>
|
||||||
|
event EventHandler<PasswordPromptEventArgs> PasswordRequired;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Submits the password
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="password"></param>
|
||||||
|
void SubmitPassword(string password);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PasswordPromptEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the last submitted password was incorrect
|
||||||
|
/// </summary>
|
||||||
|
public bool LastAttemptWasIncorrect { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the login attempt has failed
|
||||||
|
/// </summary>
|
||||||
|
public bool LoginAttemptFailed { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the process was cancelled and the prompt should be dismissed
|
||||||
|
/// </summary>
|
||||||
|
public bool LoginAttemptCancelled { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A message to be displayed to the user
|
||||||
|
/// </summary>
|
||||||
|
public string Message { get; private set; }
|
||||||
|
|
||||||
|
public PasswordPromptEventArgs(bool lastAttemptIncorrect, bool loginFailed, bool loginCancelled, string message)
|
||||||
|
{
|
||||||
|
LastAttemptWasIncorrect = lastAttemptIncorrect;
|
||||||
|
LoginAttemptFailed = loginFailed;
|
||||||
|
LoginAttemptCancelled = loginCancelled;
|
||||||
|
Message = message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -60,7 +60,6 @@ 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
|
||||||
@@ -70,12 +69,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device {1} PreActivation failure: {0}", e.Message, d.Key);
|
Debug.Console(0, d, "ERROR: Device PreActivation failure:\r{0}", e);
|
||||||
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)
|
||||||
@@ -87,14 +83,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device {1} Activation failure: {0}", e.Message, d.Key);
|
Debug.Console(0, d, "ERROR: Device Activation failure:\r{0}", e);
|
||||||
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)
|
||||||
{
|
{
|
||||||
@@ -105,13 +97,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, d, "ERROR: Device {1} PostActivation failure: {0}", e.Message, d.Key);
|
Debug.Console(0, d, "ERROR: Device PostActivation failure:\r{0}", e);
|
||||||
Debug.Console(1, d, "Stack Trace: {0}", e.StackTrace);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, "****PostActivation complete****");
|
|
||||||
|
|
||||||
OnAllDevicesActivated();
|
OnAllDevicesActivated();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|||||||
@@ -19,34 +19,13 @@ namespace PepperDash.Essentials.Core
|
|||||||
protected EssentialsDevice(string key)
|
protected EssentialsDevice(string key)
|
||||||
: base(key)
|
: base(key)
|
||||||
{
|
{
|
||||||
SubscribeToActivateComplete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected EssentialsDevice(string key, string name)
|
protected EssentialsDevice(string key, string name)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
SubscribeToActivateComplete();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SubscribeToActivateComplete()
|
|
||||||
{
|
|
||||||
DeviceManager.AllDevicesActivated += DeviceManagerOnAllDevicesActivated;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DeviceManagerOnAllDevicesActivated(object sender, EventArgs eventArgs)
|
|
||||||
{
|
|
||||||
CrestronInvoke.BeginInvoke((o) =>
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Initialize();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Exception initializing device: {0}", ex.Message);
|
|
||||||
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,11 +62,6 @@ 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,12 +51,6 @@ 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,10 +52,7 @@ 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,19 +119,7 @@ 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-{1:X2}.json", InitialParametersClass.ProgramIDTag, _ipId);
|
string.Format(@"{0}-FusionGuids.json", InitialParametersClass.ProgramIDTag);
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
@@ -161,7 +149,19 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AddPostActivationAction(() => PostActivate(guidFilePath));
|
AddPostActivationAction(() =>
|
||||||
|
{
|
||||||
|
CreateSymbolAndBasicSigs(_ipId);
|
||||||
|
SetUpSources();
|
||||||
|
SetUpCommunitcationMonitors();
|
||||||
|
SetUpDisplay();
|
||||||
|
SetUpError();
|
||||||
|
ExecuteCustomSteps();
|
||||||
|
|
||||||
|
FusionRVI.GenerateFileForAllFusionDevices();
|
||||||
|
|
||||||
|
GenerateGuidFile(guidFilePath);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -169,20 +169,6 @@ 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; }
|
||||||
@@ -328,7 +314,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} and IP-ID {1:X2}", RoomGuid, ipId);
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Creating Fusion Room symbol with GUID: {0}", RoomGuid);
|
||||||
|
|
||||||
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,5 +1,6 @@
|
|||||||
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;
|
||||||
@@ -28,6 +29,10 @@ 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>
|
||||||
|
|||||||
@@ -88,6 +88,11 @@ namespace PepperDash.Essentials.Core.Privacy
|
|||||||
else
|
else
|
||||||
Debug.Console(0, this, "Unable to add Red LED device");
|
Debug.Console(0, this, "Unable to add Red LED device");
|
||||||
|
|
||||||
|
DeviceManager.AllDevicesActivated += (o, a) =>
|
||||||
|
{
|
||||||
|
CheckPrivacyMode();
|
||||||
|
};
|
||||||
|
|
||||||
AddPostActivationAction(() => {
|
AddPostActivationAction(() => {
|
||||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
||||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
||||||
@@ -98,15 +103,6 @@ namespace PepperDash.Essentials.Core.Privacy
|
|||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Overrides of Device
|
|
||||||
|
|
||||||
public override void Initialize()
|
|
||||||
{
|
|
||||||
CheckPrivacyMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
||||||
{
|
{
|
||||||
PrivacyDevice = privacyDevice;
|
PrivacyDevice = privacyDevice;
|
||||||
|
|||||||
@@ -1,149 +0,0 @@
|
|||||||
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, IPartitionStateProvider
|
public class GlsPartitionSensorController : CrestronGenericBridgeableBaseDevice
|
||||||
{
|
{
|
||||||
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 PartitionPresentFeedback { get; private set; }
|
public BoolFeedback PartitionSensedFeedback { 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(() => InTestMode ? TestEnableFeedback : _partitionSensor.EnableFeedback.BoolValue);
|
EnableFeedback = new BoolFeedback(() => _partitionSensor.EnableFeedback.BoolValue);
|
||||||
PartitionPresentFeedback = new BoolFeedback(() => InTestMode ? TestPartitionSensedFeedback : _partitionSensor.PartitionSensedFeedback.BoolValue);
|
PartitionSensedFeedback = new BoolFeedback(() => _partitionSensor.PartitionSensedFeedback.BoolValue);
|
||||||
PartitionNotSensedFeedback = new BoolFeedback(() => InTestMode ? !TestPartitionSensedFeedback : _partitionSensor.PartitionNotSensedFeedback.BoolValue);
|
PartitionNotSensedFeedback = new BoolFeedback(() => _partitionSensor.PartitionNotSensedFeedback.BoolValue);
|
||||||
SensitivityFeedback = new IntFeedback(() => InTestMode ? TestSensitivityFeedback : _partitionSensor.SensitivityFeedback.UShortValue);
|
SensitivityFeedback = new IntFeedback(() => _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):
|
||||||
{
|
{
|
||||||
PartitionPresentFeedback.FireUpdate();
|
PartitionSensedFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (GlsPartCn.PartitionNotSensedFeedbackEventId):
|
case (GlsPartCn.PartitionNotSensedFeedbackEventId):
|
||||||
@@ -93,9 +93,6 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -108,10 +105,6 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -124,8 +117,6 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -135,6 +126,7 @@ 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;
|
||||||
|
|
||||||
@@ -143,6 +135,7 @@ 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;
|
||||||
|
|
||||||
@@ -151,6 +144,7 @@ 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;
|
||||||
|
|
||||||
@@ -159,6 +153,7 @@ 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;
|
||||||
|
|
||||||
@@ -186,8 +181,7 @@ 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.SetSigTrueAction(joinMap.Enable.JoinNumber, () => SetEnableState(true));
|
trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState);
|
||||||
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);
|
||||||
@@ -195,7 +189,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]);
|
||||||
PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]);
|
PartitionSensedFeedback.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]);
|
||||||
|
|
||||||
@@ -225,7 +219,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
IsOnline.FireUpdate();
|
IsOnline.FireUpdate();
|
||||||
NameFeedback.FireUpdate();
|
NameFeedback.FireUpdate();
|
||||||
EnableFeedback.FireUpdate();
|
EnableFeedback.FireUpdate();
|
||||||
PartitionPresentFeedback.FireUpdate();
|
PartitionSensedFeedback.FireUpdate();
|
||||||
PartitionNotSensedFeedback.FireUpdate();
|
PartitionNotSensedFeedback.FireUpdate();
|
||||||
SensitivityFeedback.FireUpdate();
|
SensitivityFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
@@ -266,7 +260,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 GlsPartitionSensorController Device");
|
Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
|
||||||
|
|
||||||
return new GlsPartitionSensorController(dc.Key, GetGlsPartCnDevice, dc);
|
return new GlsPartitionSensorController(dc.Key, GetGlsPartCnDevice, dc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
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,6 +203,7 @@
|
|||||||
<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" />
|
||||||
@@ -234,8 +235,6 @@
|
|||||||
<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" />
|
||||||
@@ -291,10 +290,6 @@
|
|||||||
<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, 1.1.0)"/>
|
<dependency id="PepperDashCore" version="[1.0.45, 2.0.0)"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|||||||
@@ -1,264 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
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; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
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
|
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute
|
||||||
{
|
{
|
||||||
BoolFeedback OnFeedback { get; }
|
BoolFeedback OnFeedback { get; }
|
||||||
|
|
||||||
@@ -56,7 +56,6 @@ 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();
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ using PepperDash.Essentials.Core;
|
|||||||
using PepperDash.Essentials.Core.Bridges;
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
using PepperDash.Essentials.DM.Config;
|
using PepperDash.Essentials.DM.Config;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM {
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||||
///
|
///
|
||||||
@@ -76,10 +75,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
|
/// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static DmBladeChassisController GetDmChassisController(string key, string name,
|
public static DmBladeChassisController GetDmChassisController(string key, string name,
|
||||||
string type, DMChassisPropertiesConfig properties)
|
string type, DMChassisPropertiesConfig properties) {
|
||||||
{
|
try {
|
||||||
try
|
|
||||||
{
|
|
||||||
type = type.ToLower();
|
type = type.ToLower();
|
||||||
uint ipid = properties.Control.IpIdInt;
|
uint ipid = properties.Control.IpIdInt;
|
||||||
|
|
||||||
@@ -88,8 +85,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
else if (type == "dmmd128x128") { chassis = new DmMd128x128(ipid, Global.ControlSystem); }
|
else if (type == "dmmd128x128") { chassis = new DmMd128x128(ipid, Global.ControlSystem); }
|
||||||
|
|
||||||
|
|
||||||
if (chassis == null)
|
if (chassis == null) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,13 +93,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
// add the cards and port names
|
// add the cards and port names
|
||||||
foreach (var kvp in properties.InputSlots)
|
foreach (var kvp in properties.InputSlots)
|
||||||
controller.AddInputBlade(kvp.Value, kvp.Key);
|
controller.AddInputBlade(kvp.Value, kvp.Key);
|
||||||
foreach (var kvp in properties.OutputSlots)
|
foreach (var kvp in properties.OutputSlots) {
|
||||||
{
|
|
||||||
controller.AddOutputBlade(kvp.Value, kvp.Key);
|
controller.AddOutputBlade(kvp.Value, kvp.Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var kvp in properties.VolumeControls)
|
foreach (var kvp in properties.VolumeControls) {
|
||||||
{
|
|
||||||
// get the card
|
// get the card
|
||||||
// check it for an audio-compatible type
|
// check it for an audio-compatible type
|
||||||
// make a something-something that will make it work
|
// make a something-something that will make it work
|
||||||
@@ -129,8 +123,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
controller.PropertiesConfig = properties;
|
controller.PropertiesConfig = properties;
|
||||||
return controller;
|
return controller;
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e) {
|
||||||
{
|
|
||||||
Debug.Console(0, "Error creating DM chassis:\r{0}", e);
|
Debug.Console(0, "Error creating DM chassis:\r{0}", e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -144,8 +137,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="chassis"></param>
|
/// <param name="chassis"></param>
|
||||||
public DmBladeChassisController(string key, string name, BladeSwitch chassis)
|
public DmBladeChassisController(string key, string name, BladeSwitch chassis)
|
||||||
: base(key, name, chassis)
|
: base(key, name, chassis) {
|
||||||
{
|
|
||||||
Chassis = chassis;
|
Chassis = chassis;
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||||
@@ -169,87 +161,68 @@ namespace PepperDash.Essentials.DM
|
|||||||
InputCardHdcpCapabilityFeedbacks = new Dictionary<uint, IntFeedback>();
|
InputCardHdcpCapabilityFeedbacks = new Dictionary<uint, IntFeedback>();
|
||||||
InputCardHdcpCapabilityTypes = new Dictionary<uint, eHdcpCapabilityType>();
|
InputCardHdcpCapabilityTypes = new Dictionary<uint, eHdcpCapabilityType>();
|
||||||
|
|
||||||
for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
|
for (uint x = 1; x <= Chassis.NumberOfOutputs; x++) {
|
||||||
{
|
|
||||||
var tempX = x;
|
var tempX = x;
|
||||||
|
|
||||||
if (Chassis.Outputs[tempX] != null)
|
if (Chassis.Outputs[tempX] != null) {
|
||||||
{
|
VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
|
||||||
VideoOutputFeedbacks[tempX] = new IntFeedback(() =>
|
|
||||||
{
|
|
||||||
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; }
|
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; }
|
||||||
else { return 0; };
|
else { return 0; };
|
||||||
});
|
});
|
||||||
|
|
||||||
OutputNameFeedbacks[tempX] = new StringFeedback(() =>
|
OutputNameFeedbacks[tempX] = new StringFeedback(() => {
|
||||||
{
|
if (Chassis.Outputs[tempX].NameFeedback != null) {
|
||||||
if (Chassis.Outputs[tempX].NameFeedback != null)
|
|
||||||
{
|
|
||||||
return Chassis.Outputs[tempX].NameFeedback.StringValue;
|
return Chassis.Outputs[tempX].NameFeedback.StringValue;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() =>
|
OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => {
|
||||||
{
|
if (Chassis.Outputs[tempX].VideoOutFeedback != null) {
|
||||||
if (Chassis.Outputs[tempX].VideoOutFeedback != null)
|
|
||||||
{
|
|
||||||
return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
|
return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
|
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => {
|
||||||
{
|
|
||||||
//if (Chassis.Outputs[tempX].Endpoint != null)
|
//if (Chassis.Outputs[tempX].Endpoint != null)
|
||||||
// return Chassis.Outputs[tempX].Endpoint.IsOnline;
|
// return Chassis.Outputs[tempX].Endpoint.IsOnline;
|
||||||
//else
|
//else
|
||||||
return Chassis.Outputs[tempX].EndpointOnlineFeedback;
|
return Chassis.Outputs[tempX].EndpointOnlineFeedback;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Chassis.Inputs[tempX] != null)
|
if (Chassis.Inputs[tempX] != null) {
|
||||||
{
|
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => {
|
||||||
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() =>
|
|
||||||
{
|
|
||||||
if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
|
if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
|
||||||
else { return 0; };
|
else { return 0; };
|
||||||
});
|
});
|
||||||
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() =>
|
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
|
||||||
{
|
|
||||||
if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
|
if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
|
||||||
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
|
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
InputNameFeedbacks[tempX] = new StringFeedback(() =>
|
InputNameFeedbacks[tempX] = new StringFeedback(() => {
|
||||||
{
|
if (Chassis.Inputs[tempX].NameFeedback != null) {
|
||||||
if (Chassis.Inputs[tempX].NameFeedback != null)
|
|
||||||
{
|
|
||||||
return Chassis.Inputs[tempX].NameFeedback.StringValue;
|
return Chassis.Inputs[tempX].NameFeedback.StringValue;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
|
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => {
|
||||||
{
|
|
||||||
return Chassis.Inputs[tempX].EndpointOnlineFeedback;
|
return Chassis.Inputs[tempX].EndpointOnlineFeedback;
|
||||||
});
|
});
|
||||||
|
|
||||||
InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() =>
|
InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() => {
|
||||||
{
|
|
||||||
var inputCard = Chassis.Inputs[tempX];
|
var inputCard = Chassis.Inputs[tempX];
|
||||||
|
|
||||||
if (inputCard.Card is DmHdmi4kInputBladeCard)
|
if (inputCard.Card is DmHdmi4kInputBladeCard) {
|
||||||
{
|
|
||||||
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
|
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
if ((inputCard.Card as DmHdmi4kInputBladeCard).Hdmi4kInput.HdcpSupportOnFeedback.BoolValue)
|
if ((inputCard.Card as DmHdmi4kInputBladeCard).Hdmi4kInput.HdcpSupportOnFeedback.BoolValue)
|
||||||
@@ -258,8 +231,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputCard.Card is DmC4kInputBladeCard)
|
if (inputCard.Card is DmC4kInputBladeCard) {
|
||||||
{
|
|
||||||
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
|
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
|
||||||
|
|
||||||
if ((inputCard.Card as DmC4kInputBladeCard).DmInput.HdcpCapabilityFeedback.Equals(eHdcpCapabilityType.HdcpSupportOff))
|
if ((inputCard.Card as DmC4kInputBladeCard).DmInput.HdcpCapabilityFeedback.Equals(eHdcpCapabilityType.HdcpSupportOff))
|
||||||
@@ -280,56 +252,45 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
/// <param name="number"></param>
|
/// <param name="number"></param>
|
||||||
public void AddInputBlade(string type, uint number)
|
public void AddInputBlade(string type, uint number) {
|
||||||
{
|
|
||||||
Debug.Console(2, this, "Adding input blade '{0}', slot {1}", type, number);
|
Debug.Console(2, this, "Adding input blade '{0}', slot {1}", type, number);
|
||||||
|
|
||||||
type = type.ToLower();
|
type = type.ToLower();
|
||||||
|
|
||||||
if (type == "dmb4kihd")
|
if (type == "dmb4kihd") {
|
||||||
{
|
|
||||||
var inputBlade = new Dmb4kIHd(number, this.Chassis);
|
var inputBlade = new Dmb4kIHd(number, this.Chassis);
|
||||||
foreach (var item in inputBlade.Inputs)
|
foreach (var item in inputBlade.Inputs) {
|
||||||
{
|
|
||||||
var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput;
|
var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput;
|
||||||
var cecPort = card as ICec;
|
var cecPort = card as ICec;
|
||||||
AddHdmiInBladePorts(item.Number, cecPort);
|
AddHdmiInBladePorts(item.Number, cecPort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (type == "dmb4kihddnt")
|
else if (type == "dmb4kihddnt") {
|
||||||
{
|
|
||||||
var inputBlade = new Dmb4kIHd(number, this.Chassis);
|
var inputBlade = new Dmb4kIHd(number, this.Chassis);
|
||||||
foreach (var item in inputBlade.Inputs)
|
foreach (var item in inputBlade.Inputs) {
|
||||||
{
|
|
||||||
var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput;
|
var card = (item.Card as DmHdmi4kInputBladeCard).Hdmi4kInput;
|
||||||
var cecPort = card as ICec;
|
var cecPort = card as ICec;
|
||||||
AddHdmiInBladePorts(item.Number, cecPort);
|
AddHdmiInBladePorts(item.Number, cecPort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (type == "dmb4kic")
|
else if (type == "dmb4kic") {
|
||||||
{
|
|
||||||
var inputBlade = new Dmb4kIC(number, this.Chassis);
|
var inputBlade = new Dmb4kIC(number, this.Chassis);
|
||||||
foreach (var item in inputBlade.Inputs)
|
foreach (var item in inputBlade.Inputs) {
|
||||||
{
|
|
||||||
AddDmInBladePorts(item.Number);
|
AddDmInBladePorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (type == "dmbis")
|
else if (type == "dmbis") {
|
||||||
{
|
|
||||||
var inputBlade = new DmbIS(number, this.Chassis);
|
var inputBlade = new DmbIS(number, this.Chassis);
|
||||||
foreach (var item in inputBlade.Inputs)
|
foreach (var item in inputBlade.Inputs) {
|
||||||
{
|
|
||||||
AddDmInMmFiberPorts(item.Number);
|
AddDmInMmFiberPorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == "dmbis2")
|
else if (type == "dmbis2") {
|
||||||
{
|
|
||||||
var inputBlade = new DmbIS2(number, this.Chassis);
|
var inputBlade = new DmbIS2(number, this.Chassis);
|
||||||
foreach (var item in inputBlade.Inputs)
|
foreach (var item in inputBlade.Inputs) {
|
||||||
{
|
|
||||||
AddDmInSmFiberPorts(item.Number);
|
AddDmInSmFiberPorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -346,23 +307,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddHdmiInBladePorts(uint number, ICec cecPort)
|
void AddHdmiInBladePorts(uint number, ICec cecPort) {
|
||||||
{
|
|
||||||
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
|
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDmInBladePorts(uint number)
|
void AddDmInBladePorts(uint number) {
|
||||||
{
|
|
||||||
AddInputPortWithDebug(number, "dmCIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
|
AddInputPortWithDebug(number, "dmCIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDmInMmFiberPorts(uint number)
|
void AddDmInMmFiberPorts(uint number) {
|
||||||
{
|
|
||||||
AddInputPortWithDebug(number, "dmMmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
AddInputPortWithDebug(number, "dmMmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDmInSmFiberPorts(uint number)
|
void AddDmInSmFiberPorts(uint number) {
|
||||||
{
|
|
||||||
AddInputPortWithDebug(number, "dmSmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
AddInputPortWithDebug(number, "dmSmIn", eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,81 +328,64 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
/// <param name="number"></param>
|
/// <param name="number"></param>
|
||||||
public void AddOutputBlade(string type, uint number)
|
public void AddOutputBlade(string type, uint number) {
|
||||||
{
|
|
||||||
type = type.ToLower();
|
type = type.ToLower();
|
||||||
|
|
||||||
Debug.Console(2, this, "Adding output blade '{0}', slot {1}", type, number);
|
Debug.Console(2, this, "Adding output blade '{0}', slot {1}", type, number);
|
||||||
if (type == "dmb4kohd")
|
if (type == "dmb4kohd") {
|
||||||
{
|
|
||||||
var outputBlade = new Dmb4KOHD(number, Chassis);
|
var outputBlade = new Dmb4KOHD(number, Chassis);
|
||||||
foreach (var item in outputBlade.Outputs)
|
foreach (var item in outputBlade.Outputs) {
|
||||||
{
|
|
||||||
AddHdmiOutBladePorts(item.Number);
|
AddHdmiOutBladePorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (type == "dmb4kohddnt")
|
else if (type == "dmb4kohddnt") {
|
||||||
{
|
|
||||||
var outputBlade = new Dmb4KOHD(number, Chassis);
|
var outputBlade = new Dmb4KOHD(number, Chassis);
|
||||||
foreach (var item in outputBlade.Outputs)
|
foreach (var item in outputBlade.Outputs) {
|
||||||
{
|
|
||||||
AddHdmiOutBladePorts(item.Number);
|
AddHdmiOutBladePorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (type == "dmb4koc")
|
else if (type == "dmb4koc") {
|
||||||
{
|
|
||||||
var outputBlade = new Dmb4KOC(number, Chassis);
|
var outputBlade = new Dmb4KOC(number, Chassis);
|
||||||
foreach (var item in outputBlade.Outputs)
|
foreach (var item in outputBlade.Outputs) {
|
||||||
{
|
|
||||||
AddDmOutBladePorts(item.Number);
|
AddDmOutBladePorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == "dmb4koc")
|
else if (type == "dmb4koc") {
|
||||||
{
|
|
||||||
var outputBlade = new Dmb4KOC(number, Chassis);
|
var outputBlade = new Dmb4KOC(number, Chassis);
|
||||||
foreach (var item in outputBlade.Outputs)
|
foreach (var item in outputBlade.Outputs) {
|
||||||
{
|
|
||||||
AddDmOutBladePorts(item.Number);
|
AddDmOutBladePorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == "dmbos")
|
else if (type == "dmbos") {
|
||||||
{
|
|
||||||
var outputBlade = new DmbOS(number, Chassis);
|
var outputBlade = new DmbOS(number, Chassis);
|
||||||
foreach (var item in outputBlade.Outputs)
|
foreach (var item in outputBlade.Outputs) {
|
||||||
{
|
|
||||||
AddDmOutMmFiberBladePorts(item.Number);
|
AddDmOutMmFiberBladePorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == "dmbos2")
|
else if (type == "dmbos2") {
|
||||||
{
|
|
||||||
var outputBlade = new DmbOS2(number, Chassis);
|
var outputBlade = new DmbOS2(number, Chassis);
|
||||||
foreach (var item in outputBlade.Outputs)
|
foreach (var item in outputBlade.Outputs) {
|
||||||
{
|
|
||||||
AddDmOutSmFiberBladePorts(item.Number);
|
AddDmOutSmFiberBladePorts(item.Number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddHdmiOutBladePorts(uint number)
|
void AddHdmiOutBladePorts(uint number) {
|
||||||
{
|
AddOutputPortWithDebug(String.Format("outputBlade{0}", (number / 8 > 0 ? 1 : number / 8)), String.Format("hdmiOut{0}", number) , eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, Chassis.Outputs[number]);
|
||||||
AddOutputPortWithDebug(number, "hdmiOut", eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, Chassis.Outputs[number]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDmOutBladePorts(uint number)
|
void AddDmOutBladePorts(uint number) {
|
||||||
{
|
AddOutputPortWithDebug(String.Format("outputBlade{0}", (number / 8 > 0 ? 1 : number / 8)), String.Format("dmOut{0}", number), eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, Chassis.Outputs[number]);
|
||||||
AddOutputPortWithDebug(number, "dmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, Chassis.Outputs[number]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDmOutMmFiberBladePorts(uint number)
|
void AddDmOutMmFiberBladePorts(uint number) {
|
||||||
{
|
AddOutputPortWithDebug(String.Format("outputBlade{0}", (number / 8 > 0 ? 1 : number / 8)), String.Format("dmOut{0}", number), eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[number]);
|
||||||
AddOutputPortWithDebug(number, "dmMmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[number]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDmOutSmFiberBladePorts(uint number)
|
void AddDmOutSmFiberBladePorts(uint number) {
|
||||||
{
|
AddOutputPortWithDebug(String.Format("outputBlade{0}", (number / 8 > 0 ? 1 : number / 8)), String.Format("dmOut{0}", number), eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[number]);
|
||||||
AddOutputPortWithDebug(number, "dmSmOut", eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[number]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -477,44 +417,23 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
/*void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) {
|
/// Adds OutputPort
|
||||||
|
/// </summary>
|
||||||
|
void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) {
|
||||||
var portKey = string.Format("{0}--{1}", cardName, portName);
|
var portKey = string.Format("{0}--{1}", cardName, portName);
|
||||||
Debug.Console(2, this, "Adding output port '{0}'", portKey);
|
Debug.Console(2, this, "Adding output port '{0}'", portKey);
|
||||||
OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this)
|
OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this)
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = Chassis.Outputs[(uint)selector]
|
FeedbackMatchObject = Chassis.Outputs[(uint)selector]
|
||||||
});
|
});
|
||||||
}*/
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Adds OutputPort
|
|
||||||
/// </summary>
|
|
||||||
void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var portKey = string.Format("outputCard{0}--{1}", cardNum, portName);
|
|
||||||
Debug.Console(2, this, "Adding output port '{0}'", portKey);
|
|
||||||
var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this)
|
|
||||||
{
|
|
||||||
FeedbackMatchObject = Chassis.Outputs[cardNum]
|
|
||||||
};
|
|
||||||
OutputPorts.Add(outputPort);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "Exception : {0}", ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void AddVolumeControl(uint number, Audio.Output audio)
|
void AddVolumeControl(uint number, Audio.Output audio) {
|
||||||
{
|
|
||||||
VolumeControls.Add(number, new DmCardAudioOutputController(audio));
|
VolumeControls.Add(number, new DmCardAudioOutputController(audio));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -524,43 +443,35 @@ namespace PepperDash.Essentials.DM
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
void Chassis_DMInputChange(Switch device, DMInputEventArgs args) {
|
||||||
{
|
|
||||||
|
|
||||||
switch (args.EventId)
|
switch (args.EventId) {
|
||||||
{
|
case DMInputEventIds.EndpointOnlineEventId: {
|
||||||
case DMInputEventIds.EndpointOnlineEventId:
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
||||||
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMInputEventIds.OnlineFeedbackEventId:
|
case DMInputEventIds.OnlineFeedbackEventId: {
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
|
||||||
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMInputEventIds.VideoDetectedEventId:
|
case DMInputEventIds.VideoDetectedEventId: {
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
|
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
|
||||||
VideoInputSyncFeedbacks[args.Number].FireUpdate();
|
VideoInputSyncFeedbacks[args.Number].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMInputEventIds.InputNameEventId:
|
case DMInputEventIds.InputNameEventId: {
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
|
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
|
||||||
InputNameFeedbacks[args.Number].FireUpdate();
|
InputNameFeedbacks[args.Number].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMInputEventIds.HdcpCapabilityFeedbackEventId:
|
case DMInputEventIds.HdcpCapabilityFeedbackEventId: {
|
||||||
{
|
|
||||||
Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
|
Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
|
||||||
InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate();
|
InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate();
|
||||||
break;
|
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);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -576,74 +487,74 @@ namespace PepperDash.Essentials.DM
|
|||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case DMOutputEventIds.VolumeEventId:
|
case DMOutputEventIds.VolumeEventId:
|
||||||
|
{
|
||||||
|
if (VolumeControls.ContainsKey(output))
|
||||||
{
|
{
|
||||||
if (VolumeControls.ContainsKey(output))
|
VolumeControls[args.Number].VolumeEventFromChassis();
|
||||||
{
|
|
||||||
VolumeControls[args.Number].VolumeEventFromChassis();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DMOutputEventIds.EndpointOnlineEventId:
|
case DMOutputEventIds.EndpointOnlineEventId:
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this,
|
||||||
|
"Output {0} DMOutputEventIds.EndpointOnlineEventId fired. EndpointOnlineFeedback State: {1}",
|
||||||
|
args.Number, Chassis.Outputs[output].EndpointOnlineFeedback);
|
||||||
|
if (Chassis.Outputs[output].Endpoint != null)
|
||||||
Debug.Console(2, this,
|
Debug.Console(2, this,
|
||||||
"Output {0} DMOutputEventIds.EndpointOnlineEventId fired. EndpointOnlineFeedback State: {1}",
|
"Output {0} DMOutputEventIds.EndpointOnlineEventId fired. Endpoint.IsOnline State: {1}",
|
||||||
args.Number, Chassis.Outputs[output].EndpointOnlineFeedback);
|
args.Number, Chassis.Outputs[output].Endpoint.IsOnline);
|
||||||
if (Chassis.Outputs[output].Endpoint != null)
|
|
||||||
Debug.Console(2, this,
|
|
||||||
"Output {0} DMOutputEventIds.EndpointOnlineEventId fired. Endpoint.IsOnline State: {1}",
|
|
||||||
args.Number, Chassis.Outputs[output].Endpoint.IsOnline);
|
|
||||||
|
|
||||||
OutputEndpointOnlineFeedbacks[output].FireUpdate();
|
OutputEndpointOnlineFeedbacks[output].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMOutputEventIds.OnlineFeedbackEventId:
|
case DMOutputEventIds.OnlineFeedbackEventId:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}",
|
Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}",
|
||||||
args.Number, Chassis.Outputs[output].EndpointOnlineFeedback);
|
args.Number, Chassis.Outputs[output].EndpointOnlineFeedback);
|
||||||
OutputEndpointOnlineFeedbacks[output].FireUpdate();
|
OutputEndpointOnlineFeedbacks[output].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMOutputEventIds.VideoOutEventId:
|
case DMOutputEventIds.VideoOutEventId:
|
||||||
|
{
|
||||||
|
|
||||||
|
var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.Outputs[output].VideoOutFeedback.Number;
|
||||||
|
|
||||||
|
Debug.Console(2, this, "DMSwitchAudioVideo:{0} Routed Input:{1} Output:{2}'", this.Name,
|
||||||
|
inputNumber, output);
|
||||||
|
|
||||||
|
if (VideoOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
|
var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].VideoOutFeedback);
|
||||||
var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.Outputs[output].VideoOutFeedback.Number;
|
var localOutputPort =
|
||||||
|
OutputPorts.FirstOrDefault(p => (DMOutput) p.FeedbackMatchObject == Chassis.Outputs[output]);
|
||||||
Debug.Console(2, this, "DMSwitchAudioVideo:{0} Routed Input:{1} Output:{2}'", this.Name,
|
|
||||||
inputNumber, output);
|
|
||||||
|
|
||||||
if (VideoOutputFeedbacks.ContainsKey(output))
|
|
||||||
{
|
|
||||||
var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == Chassis.Outputs[output].VideoOutFeedback);
|
|
||||||
var localOutputPort =
|
|
||||||
OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == Chassis.Outputs[output]);
|
|
||||||
|
|
||||||
|
|
||||||
VideoOutputFeedbacks[output].FireUpdate();
|
VideoOutputFeedbacks[output].FireUpdate();
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(output,
|
OnSwitchChange(new RoutingNumericEventArgs(output,
|
||||||
inputNumber,
|
inputNumber,
|
||||||
localOutputPort,
|
localOutputPort,
|
||||||
localInputPort,
|
localInputPort,
|
||||||
eRoutingSignalType.AudioVideo));
|
eRoutingSignalType.AudioVideo));
|
||||||
|
|
||||||
}
|
|
||||||
if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
|
|
||||||
{
|
|
||||||
OutputVideoRouteNameFeedbacks[output].FireUpdate();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
|
||||||
|
{
|
||||||
|
OutputVideoRouteNameFeedbacks[output].FireUpdate();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DMOutputEventIds.OutputNameEventId:
|
case DMOutputEventIds.OutputNameEventId:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
|
Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
|
||||||
OutputNameFeedbacks[output].FireUpdate();
|
OutputNameFeedbacks[output].FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}",
|
Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}",
|
||||||
args.Number, args.EventId);
|
args.Number, args.EventId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -653,8 +564,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pnt"></param>
|
/// <param name="pnt"></param>
|
||||||
void StartOffTimer(PortNumberType pnt)
|
void StartOffTimer(PortNumberType pnt) {
|
||||||
{
|
|
||||||
if (RouteOffTimers.ContainsKey(pnt))
|
if (RouteOffTimers.ContainsKey(pnt))
|
||||||
return;
|
return;
|
||||||
RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime);
|
RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime);
|
||||||
@@ -662,10 +572,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
|
|
||||||
// Send out sigs when coming online
|
// Send out sigs when coming online
|
||||||
void IsOnline_OutputChange(object sender, EventArgs e)
|
void IsOnline_OutputChange(object sender, EventArgs e) {
|
||||||
{
|
if (IsOnline.BoolValue) {
|
||||||
if (IsOnline.BoolValue)
|
|
||||||
{
|
|
||||||
Chassis.EnableUSBBreakaway.BoolValue = true;
|
Chassis.EnableUSBBreakaway.BoolValue = true;
|
||||||
|
|
||||||
if (InputNames != null)
|
if (InputNames != null)
|
||||||
@@ -679,8 +587,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
#region IRouting Members
|
#region IRouting Members
|
||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType) {
|
||||||
{
|
|
||||||
Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType);
|
Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType);
|
||||||
|
|
||||||
var input = inputSelector as DMInput; // Cast can sometimes fail
|
var input = inputSelector as DMInput; // Cast can sometimes fail
|
||||||
@@ -698,14 +605,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
// Check to see if there's an off timer waiting on this and if so, cancel
|
// Check to see if there's an off timer waiting on this and if so, cancel
|
||||||
var key = new PortNumberType(output, sigType);
|
var key = new PortNumberType(output, sigType);
|
||||||
|
|
||||||
if (input == null)
|
if (input == null) {
|
||||||
{
|
|
||||||
StartOffTimer(key);
|
StartOffTimer(key);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
if (RouteOffTimers.ContainsKey(key)) {
|
||||||
if (RouteOffTimers.ContainsKey(key))
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "{0} cancelling route off due to new source", output);
|
Debug.Console(2, this, "{0} cancelling route off due to new source", output);
|
||||||
RouteOffTimers[key].Stop();
|
RouteOffTimers[key].Stop();
|
||||||
RouteOffTimers.Remove(key);
|
RouteOffTimers.Remove(key);
|
||||||
@@ -767,7 +671,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var ioSlotJoin = ioSlot - 1;
|
var ioSlotJoin = ioSlot - 1;
|
||||||
|
|
||||||
// Control
|
// Control
|
||||||
trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteNumericSwitch(o, (ushort)ioSlot, eRoutingSignalType.Video));
|
trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin, o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Video));
|
||||||
|
|
||||||
if (TxDictionary.ContainsKey(ioSlot))
|
if (TxDictionary.ContainsKey(ioSlot))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ 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;
|
||||||
@@ -482,6 +483,24 @@ 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>
|
||||||
@@ -497,166 +516,189 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
case "dmchd":
|
case "dmchd":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcHd(number, this.Chassis);
|
var inputCard = new DmcHd(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmchddsp":
|
case "dmchddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcHdDsp(number, this.Chassis);
|
var inputCard = new DmcHdDsp(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4khd":
|
case "dmc4khd":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kHd(number, this.Chassis);
|
var inputCard = new Dmc4kHd(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4khddsp":
|
case "dmc4khddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kHdDsp(number, this.Chassis);
|
var inputCard = new Dmc4kHdDsp(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmc4kzhd":
|
case "dmc4kzhd":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzHd(number, this.Chassis);
|
var inputCard = new Dmc4kzHd(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmc4kzhddsp":
|
case "dmc4kzhddsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
|
var inputCard = new Dmc4kzHdDsp(number, Chassis);
|
||||||
var cecPort = inputCard.HdmiInput as ICec;
|
AddHdmiInCardPorts(number, inputCard.HdmiInput, inputCard.HdmiInput);
|
||||||
AddHdmiInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcc":
|
case "dmcc":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcC(number, this.Chassis);
|
var inputCard = new DmcC(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
||||||
AddDmInCardPorts(number, cecPort);
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dmccdsp":
|
case "dmccdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new DmcCDsp(number, this.Chassis);
|
var inputCard = new DmcCDsp(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
//DmInput doesn't implement ICec...cast was resulting in null anyway
|
||||||
AddDmInCardPorts(number, cecPort);
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kc":
|
case "dmc4kc":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kC(number, this.Chassis);
|
var inputCard = new Dmc4kC(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kcdsp":
|
case "dmc4kcdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kCDsp(number, this.Chassis);
|
var inputCard = new Dmc4kCDsp(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kzc":
|
case "dmc4kzc":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzC(number, this.Chassis);
|
var inputCard = new Dmc4kzC(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput,inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "dmc4kzcdsp":
|
case "dmc4kzcdsp":
|
||||||
{
|
{
|
||||||
var inputCard = new Dmc4kzCDsp(number, this.Chassis);
|
var inputCard = new Dmc4kzCDsp(number, Chassis);
|
||||||
var cecPort = inputCard.DmInput as ICec;
|
AddDmInCardPorts(number, inputCard.DmInput, inputCard.DmInput);
|
||||||
AddDmInCardPorts(number, cecPort);
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case "dmccat":
|
case "dmccat":
|
||||||
new DmcCat(number, this.Chassis);
|
{
|
||||||
AddDmInCardPorts(number);
|
var inputCard = new DmcCat(number, Chassis);
|
||||||
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmccatdsp":
|
case "dmccatdsp":
|
||||||
new DmcCatDsp(number, this.Chassis);
|
{
|
||||||
AddDmInCardPorts(number);
|
var inputCard = new DmcCatDsp(number, Chassis);
|
||||||
|
AddDmInCardPorts(number, null, inputCard.DmInput);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "dmcs":
|
case "dmcs":
|
||||||
new DmcS(number, Chassis);
|
{
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
var inputCard = new DmcS(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
|
var inputCard = new DmcSDsp(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
var inputCard = new DmcS2(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
|
var inputCard = new DmcS2Dsp(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
|
var inputCard = new DmcSdi(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
|
var inputCard = new DmcDvi(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
|
var inputCard = new DmcVga(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
var inputCard = new DmcVidBnc(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
var inputCard = new DmcVidRcaA(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
|
var inputCard = new DmcVidRcaD(number, Chassis);
|
||||||
|
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);
|
{
|
||||||
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
|
var inputCard = new DmcStr(number, Chassis);
|
||||||
|
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, null, inputCard.Source);
|
||||||
AddInCardHdmiAndAudioLoopPorts(number);
|
AddInCardHdmiAndAudioLoopPorts(number);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,12 +714,24 @@ 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,
|
||||||
@@ -816,20 +870,55 @@ 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)
|
||||||
{
|
{
|
||||||
AddInputPortWithDebug(cardNum, portName, sigType, portType, null);
|
//Cast is necessary here to determine the correct overload
|
||||||
|
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
|
/// Adds InputPort and sets Port as ICec object. If videoAttributesBasic is defined, RoutingPort will be RoutingInputPortWithVideoStatuses
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
|
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort, IVideoAttributesBasic videoAttributesBasic)
|
||||||
{
|
{
|
||||||
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)
|
||||||
{
|
{
|
||||||
FeedbackMatchObject = Chassis.Inputs[cardNum]
|
Debug.Console(1, this, "card {0} supports IVideoAttributesBasic", 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;
|
||||||
@@ -989,6 +1078,23 @@ 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);
|
||||||
@@ -1050,7 +1156,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}'", this.Name, inputNumber, output);
|
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output);
|
||||||
|
|
||||||
if (VideoOutputFeedbacks.ContainsKey(output))
|
if (VideoOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
@@ -1077,7 +1183,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}'", this.Name, inputNumber, output);
|
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", Name, inputNumber, output);
|
||||||
|
|
||||||
if (AudioOutputFeedbacks.ContainsKey(output))
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
@@ -1388,6 +1494,16 @@ 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)
|
||||||
@@ -1428,6 +1544,13 @@ 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)
|
||||||
@@ -1564,10 +1687,19 @@ 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;
|
||||||
@@ -1581,7 +1713,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
if (txRoutingInputs == null) return;
|
if (txRoutingInputs == null) return;
|
||||||
|
|
||||||
var inputPorts = txRoutingInputs.InputPorts.Where((p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
|
var inputPorts =
|
||||||
|
txRoutingInputs.InputPorts.Where(
|
||||||
|
(p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
|
||||||
|
|
||||||
if (inputPorts.Count == 0)
|
if (inputPorts.Count == 0)
|
||||||
{
|
{
|
||||||
@@ -1614,6 +1748,19 @@ 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,
|
||||||
@@ -1896,15 +2043,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject
|
var props = JsonConvert.DeserializeObject
|
||||||
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||||
return PepperDash.Essentials.DM.DmChassisController.
|
return 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
|
||||||
<PepperDash.Essentials.DM.Config.DMChassisPropertiesConfig>(dc.Properties.ToString());
|
<DMChassisPropertiesConfig>(dc.Properties.ToString());
|
||||||
return PepperDash.Essentials.DM.DmBladeChassisController.
|
return DmBladeChassisController.
|
||||||
GetDmChassisController(dc.Key, dc.Name, type, props);
|
GetDmChassisController(dc.Key, dc.Name, type, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
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;
|
||||||
@@ -15,421 +16,489 @@ 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 FeedbackCollection<StringFeedback> DeviceNameFeedback { get; private set; }
|
public StringFeedback DeviceNameFeedback { get; private set; }
|
||||||
public FeedbackCollection<BoolFeedback> AutoRouteFeedback { get; private set; }
|
public 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;
|
||||||
var _props = props;
|
Name = name;
|
||||||
|
|
||||||
InputNames = props.Inputs;
|
if (props == null)
|
||||||
OutputNames = props.Outputs;
|
{
|
||||||
|
Debug.Console(1, this, "HdMdNx4keBridgeableController properties are null, failed to build the device");
|
||||||
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
return;
|
||||||
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
}
|
||||||
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
|
||||||
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
|
||||||
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
if (props.Inputs != null)
|
||||||
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
{
|
||||||
DeviceNameFeedback = new FeedbackCollection<StringFeedback>();
|
foreach (var kvp in props.Inputs)
|
||||||
AutoRouteFeedback = new FeedbackCollection<BoolFeedback>();
|
{
|
||||||
|
Debug.Console(1, this, "props.Inputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
}
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
InputNames = props.Inputs;
|
||||||
|
}
|
||||||
DeviceNameFeedback.Add(new StringFeedback(this.Name, () => this.Name));
|
if (props.Outputs != null)
|
||||||
|
{
|
||||||
if (_Chassis.NumberOfInputs == 1)
|
foreach (var kvp in props.Outputs)
|
||||||
{
|
{
|
||||||
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
Debug.Console(1, this, "props.Outputs: {0}-{1}", kvp.Key, kvp.Value);
|
||||||
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;
|
|
||||||
var inputName = InputNames[index];
|
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
||||||
_Chassis.Inputs[index].Name.StringValue = inputName;
|
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
||||||
|
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
eRoutingPortConnectionType.Hdmi, index, this)
|
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||||
{
|
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
||||||
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
|
||||||
});
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||||
InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].Name.StringValue));
|
|
||||||
InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[index].HdmiInputPort.HdcpSupportOnFeedback.BoolValue));
|
if (_Chassis.NumberOfInputs == 1)
|
||||||
}
|
{
|
||||||
|
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
AutoRouteFeedback = new BoolFeedback(() => _Chassis4x1.AutoModeOnFeedback.BoolValue);
|
||||||
{
|
}
|
||||||
var index = i;
|
|
||||||
var outputName = OutputNames[index];
|
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||||
_Chassis.Outputs[i].Name.StringValue = outputName;
|
{
|
||||||
|
var index = i;
|
||||||
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
var inputName = InputNames[index];
|
||||||
eRoutingPortConnectionType.Hdmi, index, this)
|
//_Chassis.Inputs[index].Name.StringValue = inputName;
|
||||||
{
|
_Chassis.HdmiInputs[index].Name.StringValue = inputName;
|
||||||
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
|
||||||
});
|
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
||||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiInputs[index], this)
|
||||||
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].Name.StringValue));
|
{
|
||||||
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue));
|
FeedbackMatchObject = _Chassis.HdmiInputs[index]
|
||||||
}
|
});
|
||||||
|
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[index].VideoDetectedFeedback.BoolValue));
|
||||||
_Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
|
//InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[index].NameFeedback.StringValue));
|
||||||
_Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
|
InputNameFeedbacks.Add(new StringFeedback(inputName, () => InputNames[index]));
|
||||||
|
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;
|
||||||
#region Methods
|
var outputName = OutputNames[index];
|
||||||
|
//_Chassis.Outputs[index].Name.StringValue = outputName;
|
||||||
/// <summary>
|
//_Chassis.HdmiOutputs[index].Name.StringValue = outputName;
|
||||||
/// Raise an event when the status of a switch object changes.
|
|
||||||
/// </summary>
|
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
||||||
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
eRoutingPortConnectionType.Hdmi, _Chassis.HdmiOutputs[index], this)
|
||||||
private void OnSwitchChange(RoutingNumericEventArgs e)
|
{
|
||||||
{
|
FeedbackMatchObject = _Chassis.HdmiOutputs[index]
|
||||||
var newEvent = NumericSwitchChange;
|
});
|
||||||
if (newEvent != null) newEvent(this, e);
|
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback == null ? 0 : (int)_Chassis.Outputs[index].VideoOutFeedback.Number));
|
||||||
}
|
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => OutputNames[index]));
|
||||||
|
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[index].VideoOutFeedback.NameFeedback.StringValue));
|
||||||
public void EnableHdcp(uint port)
|
}
|
||||||
{
|
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
_Chassis.DMInputChange += Chassis_DMInputChange;
|
||||||
if (port <= 0) return;
|
_Chassis.DMOutputChange += Chassis_DMOutputChange;
|
||||||
|
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
AddPostActivationAction(AddFeedbackCollections);
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
}
|
||||||
}
|
|
||||||
|
#endregion
|
||||||
public void DisableHdcp(uint port)
|
|
||||||
{
|
#region Methods
|
||||||
if (port > _Chassis.NumberOfInputs) return;
|
|
||||||
if (port <= 0) return;
|
/// <summary>
|
||||||
|
/// Raise an event when the status of a switch object changes.
|
||||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
/// </summary>
|
||||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
/// <param name="e">Arguments defined as IKeyName sender, output, input, and eRoutingSignalType</param>
|
||||||
}
|
private void OnSwitchChange(RoutingNumericEventArgs e)
|
||||||
|
{
|
||||||
public void EnableAutoRoute()
|
var newEvent = NumericSwitchChange;
|
||||||
{
|
if (newEvent != null) newEvent(this, e);
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
}
|
||||||
|
|
||||||
if (_Chassis4x1 == null) return;
|
public void EnableHdcp(uint port)
|
||||||
|
{
|
||||||
_Chassis4x1.AutoModeOn();
|
if (port > _Chassis.NumberOfInputs) return;
|
||||||
}
|
if (port <= 0) return;
|
||||||
|
|
||||||
public void DisableAutoRoute()
|
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
||||||
{
|
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||||
if (_Chassis.NumberOfInputs != 1) return;
|
}
|
||||||
|
|
||||||
if (_Chassis4x1 == null) return;
|
public void DisableHdcp(uint port)
|
||||||
|
{
|
||||||
_Chassis4x1.AutoModeOff();
|
if (port > _Chassis.NumberOfInputs) return;
|
||||||
}
|
if (port <= 0) return;
|
||||||
|
|
||||||
#region PostActivate
|
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
||||||
|
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||||
public void AddFeedbackCollections()
|
}
|
||||||
{
|
|
||||||
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
public void EnableAutoRoute()
|
||||||
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
{
|
||||||
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks, DeviceNameFeedback);
|
if (_Chassis.NumberOfInputs != 1) return;
|
||||||
}
|
|
||||||
|
if (_Chassis4x1 == null) return;
|
||||||
#endregion
|
|
||||||
|
_Chassis4x1.AutoModeOn();
|
||||||
#region FeedbackCollection Methods
|
}
|
||||||
|
|
||||||
//Add arrays of collections
|
public void DisableAutoRoute()
|
||||||
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 AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
public void AddFeedbackCollections()
|
||||||
{
|
{
|
||||||
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
AddFeedbackToList(DeviceNameFeedback);
|
||||||
{
|
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
||||||
foreach (var item in newFbs)
|
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
||||||
{
|
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks);
|
||||||
AddCollectionToList(item);
|
}
|
||||||
}
|
|
||||||
}
|
#endregion
|
||||||
}
|
|
||||||
|
#region FeedbackCollection Methods
|
||||||
public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs)
|
|
||||||
{
|
//Add arrays of collections
|
||||||
foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs)
|
public void AddCollectionsToList(params FeedbackCollection<BoolFeedback>[] newFbs)
|
||||||
{
|
{
|
||||||
foreach (var item in newFbs)
|
foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs)
|
||||||
{
|
{
|
||||||
AddCollectionToList(item);
|
foreach (var item in newFbs)
|
||||||
}
|
{
|
||||||
}
|
AddCollectionToList(item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//Add Collections
|
}
|
||||||
public void AddCollectionToList(FeedbackCollection<BoolFeedback> newFbs)
|
public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
||||||
{
|
{
|
||||||
foreach (var f in newFbs)
|
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
||||||
{
|
{
|
||||||
if (f == null) continue;
|
foreach (var item in newFbs)
|
||||||
|
{
|
||||||
AddFeedbackToList(f);
|
AddCollectionToList(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
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)
|
}
|
||||||
{
|
|
||||||
foreach (var f in newFbs)
|
//Add Collections
|
||||||
{
|
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)
|
}
|
||||||
{
|
|
||||||
if (newFb == null) return;
|
public void AddCollectionToList(FeedbackCollection<IntFeedback> newFbs)
|
||||||
|
{
|
||||||
if (!Feedbacks.Contains(newFb))
|
foreach (var f in newFbs)
|
||||||
{
|
{
|
||||||
Feedbacks.Add(newFb);
|
if (f == null) continue;
|
||||||
}
|
|
||||||
}
|
AddFeedbackToList(f);
|
||||||
|
}
|
||||||
#endregion
|
}
|
||||||
|
|
||||||
#region IRouting Members
|
public void AddCollectionToList(FeedbackCollection<StringFeedback> newFbs)
|
||||||
|
{
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
foreach (var f in newFbs)
|
||||||
{
|
{
|
||||||
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
if (f == null) continue;
|
||||||
var current = _Chassis.HdmiOutputs[(uint)outputSelector].VideoOut;
|
|
||||||
if (current != _Chassis.HdmiInputs[(uint)inputSelector])
|
AddFeedbackToList(f);
|
||||||
_Chassis.HdmiOutputs[(uint)outputSelector].VideoOut = _Chassis.HdmiInputs[(uint)inputSelector];
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
//Add Individual Feedbacks
|
||||||
|
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 Bridge Linking
|
#region IRouting Members
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
var input = inputSelector as HdMdNxMHdmiInput; //changed from HdMdNxM4kzEHdmiInput;
|
||||||
|
var output = outputSelector as HdMdNxMHdmiOutput;
|
||||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
Debug.Console(2, this, "ExecuteSwitch: input={0} output={1}", input, output);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
if (output == null)
|
||||||
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
{
|
||||||
|
Debug.Console(0, this, "Unable to make switch. output selector is not HdMdNxMHdmiOutput");
|
||||||
if (bridge != null)
|
return;
|
||||||
{
|
}
|
||||||
bridge.AddJoinMap(Key, joinMap);
|
|
||||||
}
|
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
||||||
else
|
var current = output.VideoOut;
|
||||||
{
|
if (current != input)
|
||||||
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
output.VideoOut = input;
|
||||||
}
|
}
|
||||||
|
|
||||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
#endregion
|
||||||
DeviceNameFeedback[this.Name].LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
|
||||||
|
#region IRoutingNumeric Members
|
||||||
if (_Chassis4x1 != null)
|
|
||||||
{
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
||||||
trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn());
|
{
|
||||||
trilist.SetSigFalseAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOff());
|
var input = inputSelector == 0 ? null : _Chassis.HdmiInputs[inputSelector];
|
||||||
AutoRouteFeedback[this.Name + "-" + InputNames[1]].LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
var output = _Chassis.HdmiOutputs[outputSelector];
|
||||||
}
|
|
||||||
|
Debug.Console(2, this, "ExecuteNumericSwitch: input={0} output={1}", input, output);
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
|
||||||
{
|
ExecuteSwitch(input, output, signalType);
|
||||||
var joinIndex = i - 1;
|
}
|
||||||
//Digital
|
|
||||||
VideoInputSyncFeedbacks[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
#endregion
|
||||||
InputHdcpEnableFeedback[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
|
||||||
InputHdcpEnableFeedback[InputNames[i]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
#endregion
|
||||||
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(i));
|
|
||||||
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(i));
|
#region Bridge Linking
|
||||||
|
|
||||||
//Serial
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
InputNameFeedbacks[InputNames[i]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
{
|
||||||
}
|
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
||||||
|
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
{
|
|
||||||
var joinIndex = i - 1;
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
//Analog
|
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
||||||
VideoOutputRouteFeedbacks[OutputNames[i]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
|
||||||
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteSwitch(a, i, eRoutingSignalType.AudioVideo));
|
if (bridge != null)
|
||||||
|
{
|
||||||
//Serial
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
OutputNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
}
|
||||||
OutputRouteNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
else
|
||||||
}
|
{
|
||||||
|
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
_Chassis.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler(Chassis_OnlineStatusChange);
|
}
|
||||||
|
|
||||||
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||||
{
|
DeviceNameFeedback.LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
||||||
if (args.DeviceOnLine)
|
|
||||||
{
|
if (_Chassis4x1 != null)
|
||||||
foreach (var feedback in Feedbacks)
|
{
|
||||||
{
|
trilist.SetSigTrueAction(joinMap.EnableAutoRoute.JoinNumber, () => _Chassis4x1.AutoModeOn());
|
||||||
feedback.FireUpdate();
|
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;
|
||||||
#endregion
|
var input = i;
|
||||||
|
//Digital
|
||||||
#region Events
|
VideoInputSyncFeedbacks[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
||||||
|
InputHdcpEnableFeedback[InputNames[input]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
||||||
void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args)
|
InputHdcpEnableFeedback[InputNames[input]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
||||||
{
|
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(input));
|
||||||
if (!args.DeviceOnLine) return;
|
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(input));
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
|
||||||
{
|
//Serial
|
||||||
_Chassis.Inputs[i].Name.StringValue = InputNames[i];
|
InputNameFeedbacks[InputNames[input]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
||||||
}
|
}
|
||||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
|
||||||
{
|
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||||
_Chassis.Outputs[i].Name.StringValue = OutputNames[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)
|
foreach (var feedback in Feedbacks)
|
||||||
{
|
{
|
||||||
feedback.FireUpdate();
|
feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
if (_Chassis4x1 != null)
|
||||||
{
|
AutoRouteFeedback.FireUpdate();
|
||||||
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
}
|
||||||
|
|
||||||
for (var i = 0; i < VideoOutputRouteFeedbacks.Count; i++)
|
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
{
|
{
|
||||||
var index = i;
|
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
||||||
var localInputPort = InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1].VideoOutFeedback);
|
|
||||||
var localOutputPort =
|
|
||||||
OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == _Chassis.HdmiOutputs[(uint)index + 1]);
|
|
||||||
|
|
||||||
|
var output = args.Number;
|
||||||
|
|
||||||
VideoOutputRouteFeedbacks[i].FireUpdate();
|
var inputNumber = _Chassis.HdmiOutputs[output].VideoOutFeedback == null
|
||||||
OnSwitchChange(new RoutingNumericEventArgs((ushort)i, VideoOutputRouteFeedbacks[i].UShortValue, localOutputPort, localInputPort, eRoutingSignalType.AudioVideo));
|
? 0
|
||||||
}
|
: _Chassis.HdmiOutputs[output].VideoOutFeedback.Number;
|
||||||
}
|
|
||||||
|
|
||||||
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
var outputName = OutputNames[output];
|
||||||
{
|
|
||||||
if (args.EventId != DMInputEventIds.VideoDetectedEventId) return;
|
|
||||||
foreach (var item in VideoInputSyncFeedbacks)
|
|
||||||
{
|
|
||||||
item.FireUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
var feedback = VideoOutputRouteFeedbacks[outputName];
|
||||||
|
|
||||||
#region Factory
|
if (feedback == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var inPort =
|
||||||
|
InputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output].VideoOutFeedback);
|
||||||
|
var outPort = OutputPorts.FirstOrDefault(p => p.FeedbackMatchObject == _Chassis.HdmiOutputs[output]);
|
||||||
|
|
||||||
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
feedback.FireUpdate();
|
||||||
{
|
OnSwitchChange(new RoutingNumericEventArgs(output, inputNumber, outPort, inPort, eRoutingSignalType.AudioVideo));
|
||||||
public HdMdNxM4kEControllerFactory()
|
}
|
||||||
{
|
|
||||||
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device");
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case DMInputEventIds.VideoDetectedEventId:
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Event ID {0}: Updating VideoInputSyncFeedbacks", args.EventId);
|
||||||
|
foreach (var item in VideoInputSyncFeedbacks)
|
||||||
|
{
|
||||||
|
item.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject<HdMdNxM4kEBridgeablePropertiesConfig>(dc.Properties.ToString());
|
#endregion
|
||||||
|
|
||||||
var type = dc.Type.ToLower();
|
#region Factory
|
||||||
var control = props.Control;
|
|
||||||
var ipid = control.IpIdInt;
|
|
||||||
var address = control.TcpSshProperties.Address;
|
|
||||||
|
|
||||||
switch (type)
|
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
||||||
{
|
{
|
||||||
case ("hdmd4x14ke-bridgeable"):
|
public HdMdNxM4kEControllerFactory()
|
||||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props);
|
{
|
||||||
case ("hdmd4x24ke"):
|
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
||||||
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
|
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,6 +2,7 @@
|
|||||||
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;
|
||||||
@@ -13,6 +14,7 @@ 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; }
|
||||||
@@ -31,6 +33,7 @@ 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
|
||||||
@@ -47,10 +50,15 @@ 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)
|
||||||
{
|
{
|
||||||
// strip "hdmiIn"
|
// get numnbers from key and convert to int
|
||||||
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 => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
||||||
|
|
||||||
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 => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback);
|
||||||
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 => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
||||||
|
|
||||||
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 => (eAst)p.Selector == Tx.AudioSourceFeedback);
|
var localInputAudioPort = InputPorts.FirstOrDefault(p => (eVst)p.Selector == Tx.VideoSourceFeedback);
|
||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
Debug.Console(2, this, " Audio Source: {0}", Tx.VideoSourceFeedback);
|
||||||
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,10 +11,9 @@ 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
|
public interface IHasAudioCodec:IHasInCallFeedback
|
||||||
{
|
{
|
||||||
AudioCodecBase AudioCodec { get; }
|
AudioCodecBase AudioCodec { get; }
|
||||||
BoolFeedback InCallFeedback { get; }
|
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// Make this more specific
|
///// Make this more specific
|
||||||
|
|||||||
@@ -216,10 +216,20 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
|||||||
var presetsCamera = cameraDevice as IHasCameraPresets;
|
var presetsCamera = cameraDevice as IHasCameraPresets;
|
||||||
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>((o, a) =>
|
presetsCamera.PresetsListHasChanged += new EventHandler<EventArgs>((o, a) =>
|
||||||
{
|
{
|
||||||
SendCameraPresetNamesToApi(presetsCamera, joinMap, trilist);
|
for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++)
|
||||||
});
|
{
|
||||||
|
int tempNum = i - 1;
|
||||||
|
|
||||||
SendCameraPresetNamesToApi(presetsCamera, joinMap, trilist);
|
string label = "";
|
||||||
|
|
||||||
|
var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i));
|
||||||
|
|
||||||
|
if (preset != null)
|
||||||
|
label = preset.Description;
|
||||||
|
|
||||||
|
trilist.SetString((ushort) (joinMap.PresetLabelStart.JoinNumber + tempNum), label);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
|
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
|
||||||
{
|
{
|
||||||
@@ -236,35 +246,10 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
|||||||
presetsCamera.PresetStore(tempNum, label);
|
presetsCamera.PresetStore(tempNum, label);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
trilist.OnlineStatusChange += (sender, args) =>
|
|
||||||
{
|
|
||||||
if (!args.DeviceOnLine)
|
|
||||||
{ return; }
|
|
||||||
|
|
||||||
SendCameraPresetNamesToApi(presetsCamera, joinMap, trilist);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void SendCameraPresetNamesToApi(IHasCameraPresets presetsCamera, CameraControllerJoinMap joinMap, BasicTriList trilist)
|
|
||||||
{
|
|
||||||
for (int i = 1; i <= joinMap.NumberOfPresets.JoinNumber; i++)
|
|
||||||
{
|
|
||||||
int tempNum = i - 1;
|
|
||||||
|
|
||||||
string label = "";
|
|
||||||
|
|
||||||
var preset = presetsCamera.Presets.FirstOrDefault(p => p.ID.Equals(i));
|
|
||||||
|
|
||||||
if (preset != null)
|
|
||||||
label = preset.Description;
|
|
||||||
|
|
||||||
trilist.SetString((ushort)(joinMap.PresetLabelStart.JoinNumber + tempNum), label);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class CameraPreset : PresetBase
|
public class CameraPreset : PresetBase
|
||||||
{
|
{
|
||||||
public CameraPreset(int id, string description, bool isDefined, bool isDefinable)
|
public CameraPreset(int id, string description, bool isDefined, bool isDefinable)
|
||||||
|
|||||||
@@ -525,15 +525,6 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
|||||||
|
|
||||||
public event EventHandler<EventArgs> PresetsListHasChanged;
|
public event EventHandler<EventArgs> PresetsListHasChanged;
|
||||||
|
|
||||||
protected void OnPresetsListHasChanged()
|
|
||||||
{
|
|
||||||
var handler = PresetsListHasChanged;
|
|
||||||
if (handler == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
handler.Invoke(this, EventArgs.Empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<CameraPreset> Presets { get; private set; }
|
public List<CameraPreset> Presets { get; private set; }
|
||||||
|
|
||||||
public void PresetSelect(int preset)
|
public void PresetSelect(int preset)
|
||||||
@@ -546,7 +537,6 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
|||||||
SavePreset(preset);
|
SavePreset(preset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IHasCameraFocusControl Members
|
#region IHasCameraFocusControl Members
|
||||||
|
|||||||
@@ -160,7 +160,19 @@ 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>
|
||||||
@@ -209,8 +221,6 @@ 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,6 +235,15 @@ 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,9 +120,12 @@
|
|||||||
<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\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" />
|
||||||
|
|||||||
@@ -551,13 +551,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Overrides of Device
|
|
||||||
|
|
||||||
public override void Initialize()
|
|
||||||
{
|
|
||||||
var socket = Communication as ISocketStatus;
|
var socket = Communication as ISocketStatus;
|
||||||
if (socket != null)
|
if (socket != null)
|
||||||
{
|
{
|
||||||
@@ -566,9 +559,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
Communication.Connect();
|
Communication.Connect();
|
||||||
|
|
||||||
CommunicationMonitor.Start();
|
CommunicationMonitor.Start();
|
||||||
|
|
||||||
const string prefix = "xFeedback register ";
|
string prefix = "xFeedback register ";
|
||||||
|
|
||||||
CliFeedbackRegistrationExpression =
|
CliFeedbackRegistrationExpression =
|
||||||
prefix + "/Configuration" + Delimiter +
|
prefix + "/Configuration" + Delimiter +
|
||||||
@@ -586,10 +579,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
prefix + "/Event/CallDisconnect" + Delimiter +
|
||||||
prefix + "/Event/Bookings" + Delimiter +
|
prefix + "/Event/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
||||||
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
return base.CustomActivate();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
||||||
@@ -743,6 +736,10 @@ 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)
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public SpeakerTrack()
|
public SpeakerTrack()
|
||||||
{
|
{
|
||||||
Status = new Status2();
|
Status = new Status2();
|
||||||
|
Availability = new Availability();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
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,100 +1,112 @@
|
|||||||
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>
|
||||||
/// Describes the ability to mute and unmute a participant's video in a meeting
|
/// Describes the ability to mute and unmute a participant's video in a meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasParticipantVideoMute:IHasParticipants
|
public interface IHasParticipantVideoMute : IHasParticipants
|
||||||
{
|
{
|
||||||
void MuteVideoForParticipant(int userId);
|
void MuteVideoForParticipant(int userId);
|
||||||
void UnmuteVideoForParticipant(int userId);
|
void UnmuteVideoForParticipant(int userId);
|
||||||
void ToggleVideoForParticipant(int userId);
|
void ToggleVideoForParticipant(int userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes the ability to mute and unmute a participant's audio in a meeting
|
/// Describes the ability to mute and unmute a participant's audio in a meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
|
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
|
||||||
{
|
{
|
||||||
void MuteAudioForParticipant(int userId);
|
void MuteAudioForParticipant(int userId);
|
||||||
void UnmuteAudioForParticipant(int userId);
|
void UnmuteAudioForParticipant(int userId);
|
||||||
void ToggleAudioForParticipant(int userId);
|
void ToggleAudioForParticipant(int userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes the ability to pin and unpin a participant in a meeting
|
/// Describes the ability to pin and unpin a participant in a meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasParticipantPinUnpin : IHasParticipants
|
public interface IHasParticipantPinUnpin : IHasParticipants
|
||||||
{
|
{
|
||||||
IntFeedback NumberOfScreensFeedback { get; }
|
IntFeedback NumberOfScreensFeedback { get; }
|
||||||
int ScreenIndexToPinUserTo { get; }
|
int ScreenIndexToPinUserTo { get; }
|
||||||
|
|
||||||
void PinParticipant(int userId, int screenIndex);
|
void PinParticipant(int userId, int screenIndex);
|
||||||
void UnPinParticipant(int userId);
|
void UnPinParticipant(int userId);
|
||||||
void ToggleParticipantPinState(int userId, int screenIndex);
|
void ToggleParticipantPinState(int userId, int screenIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CodecParticipants
|
public class CodecParticipants
|
||||||
{
|
{
|
||||||
private List<Participant> _currentParticipants;
|
private List<Participant> _currentParticipants;
|
||||||
|
|
||||||
public List<Participant> CurrentParticipants {
|
public List<Participant> CurrentParticipants
|
||||||
get { return _currentParticipants; }
|
{
|
||||||
set
|
get { return _currentParticipants; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_currentParticipants = value;
|
||||||
|
OnParticipantsChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Participant Host
|
||||||
|
{
|
||||||
|
get
|
||||||
{
|
{
|
||||||
_currentParticipants = value;
|
return _currentParticipants.FirstOrDefault(p => p.IsHost);
|
||||||
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 string Name { get; set; }
|
public bool IsMyself { get; set; }
|
||||||
public bool CanMuteVideo { get; set; }
|
public string Name { get; set; }
|
||||||
public bool CanUnmuteVideo { get; set; }
|
public bool CanMuteVideo { get; set; }
|
||||||
public bool VideoMuteFb { get; set; }
|
public bool CanUnmuteVideo { get; set; }
|
||||||
public bool AudioMuteFb { get; set; }
|
public bool VideoMuteFb { get; set; }
|
||||||
public bool HandIsRaisedFb { get; set; }
|
public bool AudioMuteFb { get; set; }
|
||||||
public bool IsPinnedFb { get; set; }
|
public bool HandIsRaisedFb { get; set; }
|
||||||
public int ScreenIndexIsPinnedToFb { get; set; }
|
public bool IsPinnedFb { 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
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,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
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,10 +11,9 @@ 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
|
public interface IHasVideoCodec:IHasInCallFeedback,IPrivacy
|
||||||
{
|
{
|
||||||
VideoCodecBase VideoCodec { get; }
|
VideoCodecBase VideoCodec { get; }
|
||||||
BoolFeedback InCallFeedback { get; }
|
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// Make this more specific
|
///// Make this more specific
|
||||||
@@ -26,11 +25,6 @@ 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,6 +78,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
SetupCameras();
|
SetupCameras();
|
||||||
|
|
||||||
|
CreateOsdSource();
|
||||||
|
|
||||||
SetIsReady();
|
SetIsReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,6 +119,19 @@ 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!
|
||||||
@@ -567,6 +582,10 @@ 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);
|
||||||
|
|||||||
@@ -836,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.ToShortDateString());
|
tokenArray[stringIndex + 2] = new XSigSerialToken(stringIndex + 3, meeting.StartTime.ToString("t", Global.Culture));
|
||||||
tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, meeting.StartTime.ToShortTimeString());
|
tokenArray[stringIndex + 3] = new XSigSerialToken(stringIndex + 4, meeting.StartTime.ToString("t", Global.Culture));
|
||||||
tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, meeting.EndTime.ToShortDateString());
|
tokenArray[stringIndex + 4] = new XSigSerialToken(stringIndex + 5, meeting.EndTime.ToString("t", Global.Culture));
|
||||||
tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, meeting.EndTime.ToShortTimeString());
|
tokenArray[stringIndex + 5] = new XSigSerialToken(stringIndex + 6, meeting.EndTime.ToString("t", Global.Culture));
|
||||||
tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, meeting.Id);
|
tokenArray[stringIndex + 6] = new XSigSerialToken(stringIndex + 7, meeting.Id);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ 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()
|
||||||
{
|
{
|
||||||
@@ -76,6 +77,7 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,14 +238,6 @@ 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")]
|
||||||
@@ -302,7 +296,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
foreach (Contact c in zoomContacts)
|
foreach (Contact c in zoomContacts)
|
||||||
{
|
{
|
||||||
var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
var contact = new InvitableDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
||||||
|
|
||||||
contact.ContactMethods.Add(new ContactMethod() { Number = c.Jid, Device = eContactMethodDevice.Video, CallType = eContactMethodCallType.Video, ContactMethodId = c.Jid });
|
contact.ContactMethods.Add(new ContactMethod() { Number = c.Jid, Device = eContactMethodDevice.Video, CallType = eContactMethodCallType.Video, ContactMethodId = c.Jid });
|
||||||
|
|
||||||
@@ -439,6 +433,10 @@ 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>
|
||||||
@@ -460,11 +458,51 @@ 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 isSharingBlackMagic { get; set; }
|
public bool isDirectPresentationConnected
|
||||||
|
{
|
||||||
|
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>
|
||||||
@@ -720,6 +758,10 @@ 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; }
|
||||||
@@ -787,7 +829,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
private bool _paused;
|
private bool _paused;
|
||||||
private eSharingState _state;
|
private eSharingState _state;
|
||||||
|
|
||||||
public bool IsSharing;
|
public bool IsSharing { get; private set; }
|
||||||
|
|
||||||
[JsonProperty("paused")]
|
[JsonProperty("paused")]
|
||||||
public bool Paused
|
public bool Paused
|
||||||
@@ -927,6 +969,15 @@ 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>
|
||||||
@@ -1426,6 +1477,10 @@ 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,
|
||||||
@@ -1444,6 +1499,7 @@ 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
@@ -25,5 +25,7 @@ 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.0.48" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
<package id="PepperDashCore" version="1.0.47" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user