mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-21 15:45:53 +00:00
Compare commits
40 Commits
1.9.2-hotf
...
1.9.5-hotf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dad986414c | ||
|
|
f298b5cc41 | ||
|
|
f8129fe7ae | ||
|
|
dbdaedcca3 | ||
|
|
893950d8c4 | ||
|
|
b780351bf0 | ||
|
|
6a1671aae1 | ||
|
|
9a1a23c88a | ||
|
|
2e4bb7466c | ||
|
|
36a41ac477 | ||
|
|
92f4d37cd6 | ||
|
|
b9479bab70 | ||
|
|
fd94a94ee9 | ||
|
|
3fa2954ca0 | ||
|
|
c4f6afa412 | ||
|
|
6bdda5451b | ||
|
|
3ee8c07ecd | ||
|
|
01b713e6e1 | ||
|
|
ffd0fbc57b | ||
|
|
23e8280904 | ||
|
|
6708be0d15 | ||
|
|
d193de79da | ||
|
|
87ab43c745 | ||
|
|
2a37e44d7d | ||
|
|
efa801137c | ||
|
|
4b4f1f3c3d | ||
|
|
6e7bf061cf | ||
|
|
7f6160eb44 | ||
|
|
b5004d5b1d | ||
|
|
cea1d2fcdd | ||
|
|
22aea3089d | ||
|
|
43256acfcd | ||
|
|
1696ef3ac1 | ||
|
|
19cbe480a6 | ||
|
|
49c1c61a88 | ||
|
|
0cd3c1bdc5 | ||
|
|
d64cbc639a | ||
|
|
8404e7d5a4 | ||
|
|
e4135a958c | ||
|
|
b026174cd2 |
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,26 +515,31 @@ namespace PepperDash.Essentials
|
|||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
fusionIpId += 1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void CreateMobileControlBridge(IEssentialsRoom room)
|
private static void CreateMobileControlBridge(object room)
|
||||||
{
|
{
|
||||||
var mobileControl = GetMobileControlDevice();
|
var mobileControl = GetMobileControlDevice();
|
||||||
|
|
||||||
if (mobileControl == null) return;
|
if (mobileControl == null) return;
|
||||||
|
|
||||||
mobileControl.CreateMobileControlRoomBridge(room, mobileControl);
|
var mobileControl3 = mobileControl as IMobileControl3;
|
||||||
|
|
||||||
|
if (mobileControl3 != null)
|
||||||
|
{
|
||||||
|
mobileControl3.CreateMobileControlRoomBridge(room as IEssentialsRoom, mobileControl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobileControl.CreateMobileControlRoomBridge(room as EssentialsRoomBase, mobileControl);
|
||||||
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Mobile Control Bridge Added...");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
||||||
{
|
{
|
||||||
Debug.Console(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
|
||||||
{
|
{
|
||||||
@@ -454,7 +454,8 @@ namespace PepperDash.Essentials
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "sourceListKey present but not yet implemented");
|
Debug.Console(1, this, "sourceListKey present but not yet implemented");
|
||||||
throw new NotImplementedException();
|
|
||||||
|
RunRouteAction(routeKey, new Action(() => { }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,7 +472,11 @@ namespace PepperDash.Essentials
|
|||||||
RunRouteAction(routeKey, successCallback);
|
RunRouteAction(routeKey, successCallback);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new NotImplementedException();
|
{
|
||||||
|
Debug.Console(1, this, "sourceListKey present but not yet implemented");
|
||||||
|
|
||||||
|
RunRouteAction(routeKey, successCallback);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -103,7 +103,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1202
|
/// 1202
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCStagingInactivePopoverVisible = 1202;
|
public const uint VCStagingInactivePopoverWithRecentsVisible = 1202;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -121,6 +121,11 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCRecentsVisible = 1206;
|
public const uint VCRecentsVisible = 1206;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1202
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCStagingInactivePopoverWithoutRecentsVisible = 1207;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1208
|
/// 1208
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -243,6 +248,10 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCCameraSelectBarWithoutModeVisible = 1261;
|
public const uint VCCameraSelectBarWithoutModeVisible = 1261;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1262
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCCameraAutoModeIsOnFb = 1262;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1271
|
/// 1271
|
||||||
@@ -743,10 +752,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 - Visibility for the bar containing call navigation button list
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public const uint CallStagingBarVisible = 15045;
|
//public const uint CallStagingBarVisible = 15045;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15046
|
/// 15046
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -939,5 +948,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,6 +118,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
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ namespace PepperDash.Essentials.UIDrivers
|
|||||||
void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e)
|
void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var c = sender as ICommunicationMonitor;
|
var c = sender as ICommunicationMonitor;
|
||||||
if (StatusListDeviceIndexes.ContainsKey(c))
|
if (c != null && StatusListDeviceIndexes.ContainsKey(c))
|
||||||
{
|
{
|
||||||
var i = StatusListDeviceIndexes[c];
|
var i = StatusListDeviceIndexes[c];
|
||||||
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status;
|
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status;
|
||||||
|
|||||||
@@ -173,10 +173,28 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; }
|
public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
private UiDisplayMode _currentMode;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mode showing. Presentation or call.
|
/// The mode showing. Presentation or call.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
UiDisplayMode CurrentMode = UiDisplayMode.Start;
|
UiDisplayMode CurrentMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _currentMode;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != _currentMode)
|
||||||
|
{
|
||||||
|
_currentMode = value;
|
||||||
|
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CTimer NextMeetingTimer;
|
CTimer NextMeetingTimer;
|
||||||
|
|
||||||
@@ -207,6 +225,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5);
|
MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5);
|
||||||
|
|
||||||
|
CurrentMode = UiDisplayMode.Start;
|
||||||
|
|
||||||
// buttons are added in SetCurrentRoom
|
// buttons are added in SetCurrentRoom
|
||||||
//HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
//HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
||||||
@@ -607,11 +626,24 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetActivityFooterFeedbacks()
|
void SetActivityFooterFeedbacks()
|
||||||
{
|
{
|
||||||
CallButtonSig.BoolValue = CurrentMode == UiDisplayMode.Call
|
if (CurrentRoom != null)
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
{
|
||||||
ShareButtonSig.BoolValue = CurrentMode == UiDisplayMode.Presentation
|
var startMode = CurrentMode == UiDisplayMode.Start;
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
var presentationMode = CurrentMode == UiDisplayMode.Presentation;
|
||||||
EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
var callMode = CurrentMode == UiDisplayMode.Call;
|
||||||
|
|
||||||
|
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
|
||||||
|
|
||||||
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false);
|
||||||
|
if (!presentationMode)
|
||||||
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
|
|
||||||
|
CallButtonSig.BoolValue = callMode
|
||||||
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
|
ShareButtonSig.BoolValue = presentationMode
|
||||||
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
|
EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -623,14 +655,13 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
HideLogo();
|
HideLogo();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
TriList.SetBool(StartPageVisibleJoin, false);
|
//TriList.SetBool(StartPageVisibleJoin, false);
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
//TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
//TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
if (CurrentSourcePageManager != null)
|
if (CurrentSourcePageManager != null)
|
||||||
CurrentSourcePageManager.Hide();
|
CurrentSourcePageManager.Hide();
|
||||||
PowerOnFromCall();
|
PowerOnFromCall();
|
||||||
CurrentMode = UiDisplayMode.Call;
|
CurrentMode = UiDisplayMode.Call;
|
||||||
SetActivityFooterFeedbacks();
|
|
||||||
VCDriver.Show();
|
VCDriver.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -643,29 +674,25 @@ namespace PepperDash.Essentials
|
|||||||
if (VCDriver.IsVisible)
|
if (VCDriver.IsVisible)
|
||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
TriList.SetBool(StartPageVisibleJoin, false);
|
|
||||||
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
|
||||||
// Run default source when room is off and share is pressed
|
// Run default source when room is off and share is pressed
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
// If there's no default, show UI elements
|
||||||
{
|
if (!(CurrentRoom as IRunDefaultPresentRoute).RunDefaultPresentRoute())
|
||||||
// If there's no default, show UI elements
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
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
|
else // room is on show what's active or select a source if nothing is yet active
|
||||||
{
|
{
|
||||||
if(CurrentRoom.CurrentSourceInfo == null || CurrentRoom.CurrentSourceInfoKey == CurrentRoom.DefaultCodecRouteString)
|
if(CurrentRoom.CurrentSourceInfo == null || (CurrentRoom.VideoCodec != null && CurrentRoom.CurrentSourceInfo.SourceDevice.Key == CurrentRoom.VideoCodec.OsdSource.Key))
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
else if (CurrentSourcePageManager != null)
|
else if (CurrentSourcePageManager != null)
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
CurrentSourcePageManager.Show();
|
CurrentSourcePageManager.Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CurrentMode = UiDisplayMode.Presentation;
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
SetupSourceList();
|
SetupSourceList();
|
||||||
SetActivityFooterFeedbacks();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -707,6 +734,8 @@ namespace PepperDash.Essentials
|
|||||||
if (CurrentRoom.CurrentSourceInfo == null)
|
if (CurrentRoom.CurrentSourceInfo == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
|
|
||||||
if (CurrentRoom.CurrentSourceInfo.SourceDevice == null)
|
if (CurrentRoom.CurrentSourceInfo.SourceDevice == null)
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
@@ -1105,6 +1134,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;
|
||||||
}
|
}
|
||||||
@@ -1202,12 +1255,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;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1218,9 +1271,8 @@ namespace PepperDash.Essentials
|
|||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
ShowLogo();
|
ShowLogo();
|
||||||
SetActivityFooterFeedbacks();
|
//TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
//TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
|
||||||
// Clear this so that the pesky meeting warning can resurface every minute when off
|
// Clear this so that the pesky meeting warning can resurface every minute when off
|
||||||
LastMeetingDismissedId = null;
|
LastMeetingDismissedId = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,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;
|
||||||
@@ -142,7 +145,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible);
|
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible);
|
||||||
|
|
||||||
StagingBarsInterlock = new JoinedSigInterlock(triList);
|
StagingBarsInterlock = new JoinedSigInterlock(triList);
|
||||||
StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverVisible);
|
if(Codec is IHasCallHistory)
|
||||||
|
StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverWithRecentsVisible);
|
||||||
|
else
|
||||||
|
StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverWithoutRecentsVisible);
|
||||||
|
|
||||||
StagingButtonsFeedbackInterlock = new JoinedSigInterlock(triList);
|
StagingButtonsFeedbackInterlock = new JoinedSigInterlock(triList);
|
||||||
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress);
|
||||||
@@ -177,8 +183,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 "Tap for keyboard";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
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]);
|
||||||
@@ -196,6 +216,12 @@ 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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -351,10 +377,15 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
||||||
|
|
||||||
uint stageJoin;
|
uint stageJoin;
|
||||||
if (Codec.IsInCall)
|
if (Codec.IsInCall)
|
||||||
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
stageJoin = UIBoolJoin.VCStagingActivePopoverVisible;
|
||||||
else
|
else
|
||||||
stageJoin = UIBoolJoin.VCStagingInactivePopoverVisible;
|
{
|
||||||
|
if (Codec is IHasCallHistory)
|
||||||
|
stageJoin = UIBoolJoin.VCStagingInactivePopoverWithRecentsVisible;
|
||||||
|
else
|
||||||
|
stageJoin = UIBoolJoin.VCStagingInactivePopoverWithoutRecentsVisible;
|
||||||
|
}
|
||||||
if (IsVisible)
|
if (IsVisible)
|
||||||
StagingBarsInterlock.ShowInterlocked(stageJoin);
|
StagingBarsInterlock.ShowInterlocked(stageJoin);
|
||||||
else
|
else
|
||||||
@@ -513,13 +544,18 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
var codecOffCameras = Codec as IHasCameraOff;
|
var codecOffCameras = Codec as IHasCameraOff;
|
||||||
|
|
||||||
|
var supportsCameraOffMode = Codec.SupportsCameraOff;
|
||||||
|
|
||||||
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
||||||
|
|
||||||
if (codecAutoCameras != null)
|
var supportsAutoCameraMode = Codec.SupportsCameraAutoMode;
|
||||||
|
|
||||||
|
if (codecAutoCameras != null && supportsAutoCameraMode)
|
||||||
{
|
{
|
||||||
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
||||||
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
||||||
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
||||||
|
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCCameraAutoModeIsOnFb]);
|
||||||
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 1 Pressed"].SetSigFalseAction(
|
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 1 Pressed"].SetSigFalseAction(
|
||||||
//() => codecAutoCameras.CameraAutoModeOn());
|
//() => codecAutoCameras.CameraAutoModeOn());
|
||||||
|
|
||||||
@@ -554,7 +590,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 2 Pressed"].SetSigFalseAction(
|
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 2 Pressed"].SetSigFalseAction(
|
||||||
// () => ShowCameraManualMode());
|
// () => ShowCameraManualMode());
|
||||||
|
|
||||||
if (codecOffCameras != null)
|
if (codecOffCameras != null && supportsCameraOffMode)
|
||||||
{
|
{
|
||||||
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
|
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
|
||||||
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
|
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
|
||||||
@@ -769,12 +805,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
if (camerasCodec != null && camerasCodec.SelectedCamera != null)
|
if (camerasCodec != null && camerasCodec.SelectedCamera != null)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, "Attempting to map camera actions to selected camera: '{0}'", camerasCodec.SelectedCamera.Key);
|
||||||
var dpad = CameraPtzPad;
|
var dpad = CameraPtzPad;
|
||||||
|
|
||||||
var camera = camerasCodec.SelectedCamera as IHasCameraPtzControl;
|
var camera = camerasCodec.SelectedCamera as IHasCameraPtzControl;
|
||||||
if (camera != null)
|
if (camera != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Debug.Console(2, "Selected camera is IHasCameraPtzControl");
|
||||||
if (camerasCodec.SelectedCamera.CanTilt)
|
if (camerasCodec.SelectedCamera.CanTilt)
|
||||||
{
|
{
|
||||||
dpad.SigUp.SetBoolSigAction((b) =>
|
dpad.SigUp.SetBoolSigAction((b) =>
|
||||||
@@ -839,25 +877,46 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(2, "Selected Camera is not IHasCameraPtzControl. No controls to map");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(2, "Codec does not have cameras of selected camera is null");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determines if codec is in manual camera control mode and shows feedback
|
// Determines if codec is in manual camera control mode and shows feedback
|
||||||
void ShowCameraManualMode()
|
void ShowCameraManualMode()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, "ShowCameraManualMode");
|
||||||
|
|
||||||
var inManualMode = true;
|
var inManualMode = true;
|
||||||
|
|
||||||
var codecOffCameras = Codec as IHasCameraOff;
|
var codecOffCameras = Codec as IHasCameraOff;
|
||||||
|
|
||||||
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
||||||
|
|
||||||
|
var supportsAutoCameras = codecAutoCameras != null && Codec.SupportsCameraAutoMode;
|
||||||
|
|
||||||
if (codecOffCameras != null && codecOffCameras.CameraIsOffFeedback.BoolValue)
|
if (codecOffCameras != null && codecOffCameras.CameraIsOffFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
inManualMode = false;
|
inManualMode = false;
|
||||||
|
|
||||||
|
var codecCameraMute = Codec as IHasCameraMute;
|
||||||
|
|
||||||
|
if (codecCameraMute != null)
|
||||||
|
{
|
||||||
|
codecCameraMute.CameraMuteOff();
|
||||||
|
inManualMode = true;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear auto mode
|
// Clear auto mode
|
||||||
if (codecAutoCameras != null )
|
if (supportsAutoCameras)
|
||||||
{
|
{
|
||||||
if (codecAutoCameras.CameraAutoModeIsOnFeedback.BoolValue)
|
if (codecAutoCameras.CameraAutoModeIsOnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
@@ -1005,22 +1064,21 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
void SetupDirectoryList()
|
void SetupDirectoryList()
|
||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
if (codec != null)
|
if (codec == null)
|
||||||
{
|
{
|
||||||
DirectoryList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCDirectoryList],
|
return;
|
||||||
true, 1300);
|
}
|
||||||
codec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dir_DirectoryResultReturned);
|
|
||||||
|
|
||||||
if (codec.PhonebookSyncState.InitialSyncComplete)
|
DirectoryList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCDirectoryList],
|
||||||
SetCurrentDirectoryToRoot();
|
true, 1300);
|
||||||
else
|
codec.DirectoryResultReturned += dir_DirectoryResultReturned;
|
||||||
{
|
|
||||||
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
|
||||||
}
|
|
||||||
|
|
||||||
RefreshDirectory();
|
if (codec.PhonebookSyncState.InitialSyncComplete)
|
||||||
|
SetCurrentDirectoryToRoot();
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
codec.PhonebookSyncState.InitialSyncCompleted += PhonebookSyncState_InitialSyncCompleted;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1028,11 +1086,15 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetCurrentDirectoryToRoot()
|
void SetCurrentDirectoryToRoot()
|
||||||
{
|
{
|
||||||
(Codec as IHasDirectory).SetCurrentDirectoryToRoot();
|
var hasDirectory = Codec as IHasDirectory;
|
||||||
|
|
||||||
|
if (hasDirectory == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
hasDirectory.SetCurrentDirectoryToRoot();
|
||||||
SearchKeypadClear();
|
SearchKeypadClear();
|
||||||
|
|
||||||
RefreshDirectory();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1044,10 +1106,17 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
|
|
||||||
SetCurrentDirectoryToRoot();
|
if (codec == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RefreshDirectory();
|
if (!codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetCurrentDirectoryToRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1057,8 +1126,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void dir_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
void dir_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
||||||
{
|
{
|
||||||
|
RefreshDirectory(e.Directory);
|
||||||
RefreshDirectory();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1087,16 +1155,27 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dir"></param>
|
void RefreshDirectory()
|
||||||
void RefreshDirectory()
|
|
||||||
{
|
{
|
||||||
if ((Codec as IHasDirectory).CurrentDirectoryResult.CurrentDirectoryResults.Count > 0)
|
var codec = Codec as IHasDirectory;
|
||||||
|
|
||||||
|
if (codec == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshDirectory(codec.CurrentDirectoryResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RefreshDirectory(CodecDirectory directory)
|
||||||
|
{
|
||||||
|
if (directory.CurrentDirectoryResults.Count > 0)
|
||||||
{
|
{
|
||||||
ushort i = 0;
|
ushort i = 0;
|
||||||
foreach (var r in (Codec as IHasDirectory).CurrentDirectoryResult.CurrentDirectoryResults)
|
foreach (var r in directory.CurrentDirectoryResults)
|
||||||
{
|
{
|
||||||
if (i == DirectoryList.MaxCount)
|
if (i == DirectoryList.MaxCount)
|
||||||
{
|
{
|
||||||
@@ -1116,19 +1195,33 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
// If more than one contact method, show contact method modal dialog
|
// If more than one contact method, show contact method modal dialog
|
||||||
DirectoryList.SetItemButtonAction(i, b =>
|
DirectoryList.SetItemButtonAction(i, b =>
|
||||||
{
|
{
|
||||||
if (!b)
|
if (b)
|
||||||
{
|
{
|
||||||
// Refresh the contact methods list
|
return;
|
||||||
RefreshContactMethodsModalList(dc);
|
|
||||||
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
|
||||||
}
|
}
|
||||||
|
// Refresh the contact methods list
|
||||||
|
RefreshContactMethodsModalList(dc);
|
||||||
|
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (dc.ContactMethods.Count == 1)
|
||||||
|
{
|
||||||
|
var invitableContact = dc as IInvitableContact;
|
||||||
|
|
||||||
|
if (invitableContact != null)
|
||||||
|
{
|
||||||
|
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(invitableContact); });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If only one contact method, just dial that method
|
||||||
|
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); });
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If only one contact method, just dial that method
|
Debug.Console(1, "Unable to dial contact. No availble ContactMethod(s) specified");
|
||||||
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // is DirectoryFolder
|
else // is DirectoryFolder
|
||||||
@@ -1155,8 +1248,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
DirectoryList.SetItemMainText(1, "No Results Found");
|
DirectoryList.SetItemMainText(1, "No Results Found");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void RefreshContactMethodsModalList(DirectoryContact contact)
|
void RefreshContactMethodsModalList(DirectoryContact contact)
|
||||||
{
|
{
|
||||||
@@ -1201,7 +1293,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
var lc = Codec as IHasCodecLayouts;
|
var lc = Codec as IHasCodecLayouts;
|
||||||
if (lc != null)
|
if (lc != null)
|
||||||
{
|
{
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggleSingleProminent);
|
|
||||||
lc.LocalLayoutFeedback.LinkInputSig(TriList.StringInput[UIStringJoin.VCLayoutModeText]);
|
lc.LocalLayoutFeedback.LinkInputSig(TriList.StringInput[UIStringJoin.VCLayoutModeText]);
|
||||||
lc.LocalLayoutFeedback.OutputChange += (o,a) =>
|
lc.LocalLayoutFeedback.OutputChange += (o,a) =>
|
||||||
{
|
{
|
||||||
@@ -1214,14 +1306,24 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
var cisco = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec;
|
var cisco = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec;
|
||||||
if (cisco != null)
|
if (cisco != null)
|
||||||
{
|
{
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggleSingleProminent);
|
||||||
// Cisco has min/max buttons that need special sauce
|
// Cisco has min/max buttons that need special sauce
|
||||||
cisco.SharingContentIsOnFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
cisco.SharingContentIsOnFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
||||||
//cisco.PresentationViewMaximizedFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
//cisco.PresentationViewMaximizedFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCMinMaxPress, cisco.MinMaxLayoutToggle);
|
TriList.SetSigFalseAction(UIBoolJoin.VCMinMaxPress, cisco.MinMaxLayoutToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var zoomRoom = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom;
|
||||||
|
if (zoomRoom != null)
|
||||||
|
{
|
||||||
|
TriList.BooleanInput[UIBoolJoin.VCLayoutToggleEnable].BoolValue = true;
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggle);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1249,7 +1351,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;
|
||||||
@@ -1271,6 +1387,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
SearchStringKeypadCheckEnables();
|
SearchStringKeypadCheckEnables();
|
||||||
kb.Show();
|
kb.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1326,6 +1443,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>
|
||||||
@@ -1339,6 +1482,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>
|
||||||
@@ -1592,6 +1740,40 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Parent.Keyboard.DisableGoButton();
|
Parent.Keyboard.DisableGoButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clears the Password keypad
|
||||||
|
/// </summary>
|
||||||
|
void PasswordKeypadClear()
|
||||||
|
{
|
||||||
|
PasswordStringBuilder.Remove(0, SearchStringBuilder.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
|
||||||
@@ -1637,5 +1819,58 @@ 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
|
||||||
|
PasswordStringBuilder.Remove(0, PasswordStringBuilder.Length);
|
||||||
|
|
||||||
|
_passwordPromptDialogVisible = true;
|
||||||
|
TriList.SetBool(UIBoolJoin.PasswordPromptDialogVisible, _passwordPromptDialogVisible);
|
||||||
|
RevealKeyboard();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HidePasswordPrompt()
|
||||||
|
{
|
||||||
|
_passwordPromptDialogVisible = false;
|
||||||
|
Parent.Keyboard.Hide();
|
||||||
|
TriList.SetBool(UIBoolJoin.PasswordPromptDialogVisible, _passwordPromptDialogVisible);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,11 +8,19 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMobileControl : IKeyed
|
public interface IMobileControl : IKeyed
|
||||||
{
|
{
|
||||||
void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
|
void CreateMobileControlRoomBridge(EssentialsRoomBase room, IMobileControl parent);
|
||||||
|
|
||||||
void LinkSystemMonitorToAppServer();
|
void LinkSystemMonitorToAppServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Describes a MobileSystemController that accepts IEssentialsRoom
|
||||||
|
/// </summary>
|
||||||
|
public interface IMobileControl3 : IMobileControl
|
||||||
|
{
|
||||||
|
void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes a MobileControl Room Bridge
|
/// Describes a MobileControl Room Bridge
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,90 +1,90 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.GeneralIO;
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
using PepperDash.Essentials.Core.CrestronIO;
|
||||||
using PepperDash.Essentials.Core.Touchpanels;
|
using PepperDash.Essentials.Core.Touchpanels;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
public class DeviceFactoryWrapper
|
public class DeviceFactoryWrapper
|
||||||
{
|
{
|
||||||
public CType CType { get; set; }
|
public CType CType { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public Func<DeviceConfig, IKeyed> FactoryMethod { get; set; }
|
public Func<DeviceConfig, IKeyed> FactoryMethod { get; set; }
|
||||||
|
|
||||||
public DeviceFactoryWrapper()
|
public DeviceFactoryWrapper()
|
||||||
{
|
{
|
||||||
CType = null;
|
CType = null;
|
||||||
Description = "Not Available";
|
Description = "Not Available";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DeviceFactory
|
public class DeviceFactory
|
||||||
{
|
{
|
||||||
public DeviceFactory()
|
public DeviceFactory()
|
||||||
{
|
{
|
||||||
var assy = Assembly.GetExecutingAssembly();
|
var assy = Assembly.GetExecutingAssembly();
|
||||||
PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);
|
PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy);
|
||||||
|
|
||||||
var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);
|
var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);
|
||||||
|
|
||||||
if (types != null)
|
if (types != null)
|
||||||
{
|
{
|
||||||
foreach (var type in types)
|
foreach (var type in types)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
|
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
|
||||||
factory.LoadTypeFactories();
|
factory.LoadTypeFactories();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A dictionary of factory methods, keyed by config types, added by plugins.
|
/// A dictionary of factory methods, keyed by config types, added by plugins.
|
||||||
/// These methods are looked up and called by GetDevice in this class.
|
/// These methods are looked up and called by GetDevice in this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static Dictionary<string, DeviceFactoryWrapper> FactoryMethods =
|
static Dictionary<string, DeviceFactoryWrapper> FactoryMethods =
|
||||||
new Dictionary<string, DeviceFactoryWrapper>(StringComparer.OrdinalIgnoreCase);
|
new Dictionary<string, DeviceFactoryWrapper>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a plugin factory method
|
/// Adds a plugin factory method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dc"></param>
|
/// <param name="dc"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static void AddFactoryForType(string typeName, Func<DeviceConfig, IKeyed> method)
|
public static void AddFactoryForType(string typeName, Func<DeviceConfig, IKeyed> method)
|
||||||
{
|
{
|
||||||
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
||||||
DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method});
|
DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AddFactoryForType(string typeName, string description, CType cType, Func<DeviceConfig, IKeyed> method)
|
public static void AddFactoryForType(string typeName, string description, CType cType, Func<DeviceConfig, IKeyed> method)
|
||||||
{
|
{
|
||||||
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
||||||
|
|
||||||
if(FactoryMethods.ContainsKey(typeName))
|
if(FactoryMethods.ContainsKey(typeName))
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to add type: '{0}'. Already exists in DeviceFactory", typeName);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to add type: '{0}'. Already exists in DeviceFactory", typeName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var wrapper = new DeviceFactoryWrapper() { CType = cType, Description = description, FactoryMethod = method };
|
var wrapper = new DeviceFactoryWrapper() { CType = cType, Description = description, FactoryMethod = method };
|
||||||
DeviceFactory.FactoryMethods.Add(typeName, wrapper);
|
DeviceFactory.FactoryMethods.Add(typeName, wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void CheckForSecrets(IEnumerable<JProperty> obj)
|
private static void CheckForSecrets(IEnumerable<JProperty> obj)
|
||||||
@@ -156,44 +156,53 @@ namespace PepperDash.Essentials.Core
|
|||||||
Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message);
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message);
|
||||||
|
|
||||||
Debug.Console(2, "{0}", ex.StackTrace);
|
Debug.Console(2, "{0}", ex.StackTrace);
|
||||||
|
|
||||||
|
if (ex.InnerException == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Error, "Inner exception while creating device {0}: {1}", dc.Key,
|
||||||
|
ex.InnerException.Message);
|
||||||
|
Debug.Console(2, "{0}", ex.InnerException.StackTrace);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Prints the type names and associated metadata from the FactoryMethods collection.
|
/// Prints the type names and associated metadata from the FactoryMethods collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="command"></param>
|
/// <param name="command"></param>
|
||||||
public static void GetDeviceFactoryTypes(string filter)
|
public static void GetDeviceFactoryTypes(string filter)
|
||||||
{
|
{
|
||||||
Dictionary<string, DeviceFactoryWrapper> types = new Dictionary<string, DeviceFactoryWrapper>();
|
Dictionary<string, DeviceFactoryWrapper> types = new Dictionary<string, DeviceFactoryWrapper>();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(filter))
|
if (!string.IsNullOrEmpty(filter))
|
||||||
{
|
{
|
||||||
types = FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value);
|
types = FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
types = FactoryMethods;
|
types = FactoryMethods;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, "Device Types:");
|
Debug.Console(0, "Device Types:");
|
||||||
|
|
||||||
foreach (var type in types.OrderBy(t => t.Key))
|
foreach (var type in types.OrderBy(t => t.Key))
|
||||||
{
|
{
|
||||||
var description = type.Value.Description;
|
var description = type.Value.Description;
|
||||||
var cType = "Not Specified by Plugin";
|
var cType = "Not Specified by Plugin";
|
||||||
|
|
||||||
if(type.Value.CType != null)
|
if(type.Value.CType != null)
|
||||||
{
|
{
|
||||||
cType = type.Value.CType.FullName;
|
cType = type.Value.CType.FullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0,
|
Debug.Console(0,
|
||||||
@"Type: '{0}'
|
@"Type: '{0}'
|
||||||
CType: '{1}'
|
CType: '{1}'
|
||||||
Description: {2}", type.Key, cType, description);
|
Description: {2}", type.Key, cType, description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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,21 +119,9 @@ 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 +
|
_guidFileExists = File.Exists(guidFilePath);
|
||||||
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);
|
|
||||||
|
|
||||||
// Check if file exists
|
// Check if file exists
|
||||||
if (!_guidFileExists)
|
if (!_guidFileExists)
|
||||||
@@ -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();
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -195,7 +186,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 +216,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 +257,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" />
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -69,6 +69,22 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
[JsonProperty("directoryResults")]
|
[JsonProperty("directoryResults")]
|
||||||
public List<DirectoryItem> CurrentDirectoryResults { get; private set; }
|
public List<DirectoryItem> CurrentDirectoryResults { get; private set; }
|
||||||
|
|
||||||
|
public List<DirectoryItem> Contacts
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return CurrentDirectoryResults.OfType<DirectoryContact>().Cast<DirectoryItem>().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DirectoryItem> Folders
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return CurrentDirectoryResults.OfType<DirectoryFolder>().Cast<DirectoryItem>().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to store the ID of the current folder for CurrentDirectoryResults
|
/// Used to store the ID of the current folder for CurrentDirectoryResults
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -104,6 +120,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
SortDirectory();
|
SortDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Filters the CurrentDirectoryResults by the predicate
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="predicate"></param>
|
||||||
|
public void FilterContacts(Func<DirectoryItem, bool> predicate)
|
||||||
|
{
|
||||||
|
CurrentDirectoryResults = CurrentDirectoryResults.Where(predicate).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sorts the DirectoryResults list to display all folders alphabetically, then all contacts alphabetically
|
/// Sorts the DirectoryResults list to display all folders alphabetically, then all contacts alphabetically
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Displays
|
namespace PepperDash.Essentials.Devices.Displays
|
||||||
{
|
{
|
||||||
public interface IInputHdmi1 { void InputHdmi1(); }
|
public interface IInputHdmi1 { void InputHdmi1(); }
|
||||||
public interface IInputHdmi2 { void InputHdmi2(); }
|
public interface IInputHdmi2 { void InputHdmi2(); }
|
||||||
public interface IInputHdmi3 { void InputHdmi3(); }
|
public interface IInputHdmi3 { void InputHdmi3(); }
|
||||||
public interface IInputHdmi4 { void InputHdmi4(); }
|
public interface IInputHdmi4 { void InputHdmi4(); }
|
||||||
public interface IInputDisplayPort1 { void InputDisplayPort1(); }
|
public interface IInputDisplayPort1 { void InputDisplayPort1(); }
|
||||||
public interface IInputDisplayPort2 { void InputDisplayPort2(); }
|
public interface IInputDisplayPort2 { void InputDisplayPort2(); }
|
||||||
public interface IInputVga1 { void InputVga1(); }
|
public interface IInputVga1 { void InputVga1(); }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -314,7 +314,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
FarEndIsSharingContentFeedback = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
|
FarEndIsSharingContentFeedback = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
|
||||||
CameraIsOffFeedback = new BoolFeedback(() => CodecStatus.Status.Video.Input.MainVideoMute.BoolValue);
|
CameraIsOffFeedback = new BoolFeedback(() => CodecStatus.Status.Video.Input.MainVideoMute.BoolValue);
|
||||||
CameraIsMutedFeedback = CameraIsOffFeedback;
|
CameraIsMutedFeedback = CameraIsOffFeedback;
|
||||||
|
SupportsCameraOff = true;
|
||||||
|
|
||||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
||||||
|
|
||||||
@@ -417,6 +417,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
||||||
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Cameras.SpeakerTrack.Availability.ValueChangedAction = () => { SupportsCameraAutoMode = CodecStatus.Status.Cameras.SpeakerTrack.Availability.BoolValue; };
|
||||||
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
||||||
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
||||||
@@ -550,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)
|
||||||
{
|
{
|
||||||
@@ -565,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 +
|
||||||
@@ -582,13 +576,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
prefix + "/Status/Video/Layout" + Delimiter +
|
prefix + "/Status/Video/Layout" + Delimiter +
|
||||||
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
||||||
prefix + "/Bookings" + Delimiter +
|
prefix + "/Bookings" + Delimiter +
|
||||||
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.
|
||||||
|
|||||||
@@ -277,9 +277,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public SoftwareID SoftwareID { get; set; }
|
public SoftwareID SoftwareID { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Availability
|
public class Availability : ValueProperty
|
||||||
{
|
{
|
||||||
public string Value { get; set; }
|
string _Value;
|
||||||
|
public bool BoolValue { get; private set; }
|
||||||
|
|
||||||
|
public string Value
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
// If the incoming value is "Available" it sets the BoolValue true, otherwise sets it false
|
||||||
|
_Value = value;
|
||||||
|
BoolValue = value == "Available";
|
||||||
|
OnValueChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Status2 : ValueProperty
|
public class Status2 : ValueProperty
|
||||||
@@ -311,6 +327,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public SpeakerTrack()
|
public SpeakerTrack()
|
||||||
{
|
{
|
||||||
Status = new Status2();
|
Status = new Status2();
|
||||||
|
Availability = new Availability();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,100 +1,102 @@
|
|||||||
using System;
|
using System;
|
||||||
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 {
|
|
||||||
get { return _currentParticipants; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_currentParticipants = value;
|
|
||||||
OnParticipantsChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public event EventHandler<EventArgs> ParticipantsListHasChanged;
|
public List<Participant> CurrentParticipants
|
||||||
|
{
|
||||||
|
get { return _currentParticipants; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_currentParticipants = value;
|
||||||
|
OnParticipantsChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public CodecParticipants()
|
public event EventHandler<EventArgs> ParticipantsListHasChanged;
|
||||||
{
|
|
||||||
_currentParticipants = new List<Participant>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnParticipantsChanged()
|
public CodecParticipants()
|
||||||
{
|
{
|
||||||
var handler = ParticipantsListHasChanged;
|
_currentParticipants = new List<Participant>();
|
||||||
|
}
|
||||||
|
|
||||||
if (handler == null) return;
|
public void OnParticipantsChanged()
|
||||||
|
{
|
||||||
|
var handler = ParticipantsListHasChanged;
|
||||||
|
|
||||||
handler(this, new EventArgs());
|
if (handler == null) return;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
handler(this, new EventArgs());
|
||||||
/// Represents a call participant
|
}
|
||||||
/// </summary>
|
}
|
||||||
public class Participant
|
|
||||||
{
|
|
||||||
public int UserId { get; set; }
|
|
||||||
public bool IsHost { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public bool CanMuteVideo { get; set; }
|
|
||||||
public bool CanUnmuteVideo { get; set; }
|
|
||||||
public bool VideoMuteFb { get; set; }
|
|
||||||
public bool AudioMuteFb { get; set; }
|
|
||||||
public bool HandIsRaisedFb { get; set; }
|
|
||||||
public bool IsPinnedFb { get; set; }
|
|
||||||
public int ScreenIndexIsPinnedToFb { get; set; }
|
|
||||||
|
|
||||||
public Participant()
|
/// <summary>
|
||||||
{
|
/// Represents a call participant
|
||||||
// Initialize to -1 (no screen)
|
/// </summary>
|
||||||
ScreenIndexIsPinnedToFb = -1;
|
public class Participant
|
||||||
}
|
{
|
||||||
}
|
public int UserId { get; set; }
|
||||||
|
public bool IsHost { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public bool CanMuteVideo { get; set; }
|
||||||
|
public bool CanUnmuteVideo { get; set; }
|
||||||
|
public bool VideoMuteFb { get; set; }
|
||||||
|
public bool AudioMuteFb { get; set; }
|
||||||
|
public bool HandIsRaisedFb { get; set; }
|
||||||
|
public bool IsPinnedFb { get; set; }
|
||||||
|
public int ScreenIndexIsPinnedToFb { get; set; }
|
||||||
|
|
||||||
|
public Participant()
|
||||||
|
{
|
||||||
|
// Initialize to -1 (no screen)
|
||||||
|
ScreenIndexIsPinnedToFb = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
public bool ShowSelfViewByDefault { get; protected set; }
|
public bool ShowSelfViewByDefault { get; protected set; }
|
||||||
|
|
||||||
protected bool SupportsCameraOff;
|
public bool SupportsCameraOff { get; protected set; }
|
||||||
protected bool SupportsCameraAutoMode;
|
public bool SupportsCameraAutoMode { get; protected set; }
|
||||||
|
|
||||||
public bool IsReady { get; protected set; }
|
public bool IsReady { get; protected set; }
|
||||||
|
|
||||||
|
|||||||
@@ -276,6 +276,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
if (zoomRooms.Count > 0)
|
if (zoomRooms.Count > 0)
|
||||||
{
|
{
|
||||||
// If so, setup a rooms and contacts folder and add them.
|
// If so, setup a rooms and contacts folder and add them.
|
||||||
|
|
||||||
|
directory.ResultsFolderId = "root";
|
||||||
|
|
||||||
roomFolder.Name = "Rooms";
|
roomFolder.Name = "Rooms";
|
||||||
roomFolder.ParentFolderId = "root";
|
roomFolder.ParentFolderId = "root";
|
||||||
roomFolder.FolderId = "rooms";
|
roomFolder.FolderId = "rooms";
|
||||||
@@ -292,22 +295,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (zoomContacts.Count == 0) return directory;
|
if (zoomContacts.Count == 0)
|
||||||
|
{
|
||||||
|
return directory;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Contact c in zoomContacts)
|
||||||
{
|
{
|
||||||
foreach (Contact c in zoomContacts)
|
var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
||||||
|
|
||||||
|
contact.ContactMethods.Add(new ContactMethod() { Number = c.Jid, Device = eContactMethodDevice.Video, CallType = eContactMethodCallType.Video, ContactMethodId = c.Jid });
|
||||||
|
|
||||||
|
if (folders.Count > 0)
|
||||||
{
|
{
|
||||||
var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
|
||||||
|
|
||||||
if (folders.Count > 0)
|
|
||||||
{
|
|
||||||
contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
|
|
||||||
}
|
|
||||||
|
|
||||||
contacts.Add(contact);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
directory.AddContactsToDirectory(contacts);
|
contacts.Add(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
directory.AddContactsToDirectory(contacts);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -920,6 +927,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>
|
||||||
@@ -1161,11 +1177,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value != _hideConfSelfVideo)
|
//if (value != _hideConfSelfVideo)
|
||||||
{
|
//{
|
||||||
_hideConfSelfVideo = value;
|
_hideConfSelfVideo = value;
|
||||||
NotifyPropertyChanged("HideConfSelfVideo");
|
NotifyPropertyChanged("HideConfSelfVideo");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -63,6 +63,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
ParentCodec = codec;
|
ParentCodec = codec;
|
||||||
|
|
||||||
|
Capabilities = eCameraCapabilities.Pan | eCameraCapabilities.Tilt | eCameraCapabilities.Zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -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