Merge remote-tracking branch 'origin/bugfix/ecs-541' into bugfix/ecs-535

This commit is contained in:
Heath Volmer
2017-10-18 08:22:09 -06:00
11 changed files with 1809 additions and 1714 deletions

View File

@@ -18,6 +18,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
public interface IHasScheduleAwareness public interface IHasScheduleAwareness
{ {
CodecScheduleAwareness CodecSchedule { get; } CodecScheduleAwareness CodecSchedule { get; }
void GetSchedule();
} }
public class CodecScheduleAwareness public class CodecScheduleAwareness

View File

@@ -21,8 +21,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{ {
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration }; enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory, public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfview IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfview, ICommunicationMonitor
{ {
public event EventHandler<DirectoryEventArgs> DirectoryResultReturned; public event EventHandler<DirectoryEventArgs> DirectoryResultReturned;
@@ -762,11 +762,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
} }
private void GetCallHistory() public void GetCallHistory()
{ {
SendText("xCommand CallHistory Recents Limit: 20 Order: OccurrenceTime"); SendText("xCommand CallHistory Recents Limit: 20 Order: OccurrenceTime");
} }
/// <summary>
/// Required for IHasScheduleAwareness
/// </summary>
public void GetSchedule()
{
GetBookings(null);
}
/// <summary> /// <summary>
/// Gets the bookings for today /// Gets the bookings for today
/// </summary> /// </summary>
@@ -953,7 +961,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
else else
sendingMode = "LocalOnly"; sendingMode = "LocalOnly";
SendText(string.Format("xCommand Presentation Start PresentationSource: {0}", PresentationSource)); SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode));
} }
public override void StopSharing() public override void StopSharing()

View File

@@ -339,6 +339,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
#region IHasScheduleAwareness Members #region IHasScheduleAwareness Members
public void GetSchedule()
{
}
public CodecScheduleAwareness CodecSchedule public CodecScheduleAwareness CodecSchedule
{ {
get { get {

View File

@@ -189,7 +189,7 @@ namespace PepperDash.Essentials
DeviceManager.AddDevice(room); DeviceManager.AddDevice(room);
Debug.Console(1, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion"); Debug.Console(1, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemController((EssentialsHuddleSpaceRoom)room, 0xf1)); DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemControllerBase((EssentialsHuddleSpaceRoom)room, 0xf1));
var cotija = DeviceManager.GetDeviceForKey("cotijaServer") as CotijaSystemController; var cotija = DeviceManager.GetDeviceForKey("cotijaServer") as CotijaSystemController;

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.Devices.Common.Occupancy;
namespace PepperDash.Essentials.Fusion
{
public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase
{
public EssentialsHuddleVtc1FusionController(EssentialsHuddleSpaceRoom room, uint ipId)
: base(room, ipId)
{
}
}
}

View File

@@ -134,11 +134,12 @@
<Compile Include="Devices\DiscPlayer\OppoExtendedBdp.cs" /> <Compile Include="Devices\DiscPlayer\OppoExtendedBdp.cs" />
<Compile Include="Devices\NUMERIC AppleTV.cs" /> <Compile Include="Devices\NUMERIC AppleTV.cs" />
<Compile Include="ControlSystem.cs" /> <Compile Include="ControlSystem.cs" />
<Compile Include="OTHER\Fusion\EssentialsHuddleVtc1FusionController.cs" />
<Compile Include="OTHER\Fusion\FusionEventHandlers.cs" /> <Compile Include="OTHER\Fusion\FusionEventHandlers.cs" />
<Compile Include="OTHER\Fusion\FusionProcessorQueries.cs" /> <Compile Include="OTHER\Fusion\FusionProcessorQueries.cs" />
<Compile Include="OTHER\Fusion\FusionRviDataClasses.cs" /> <Compile Include="OTHER\Fusion\FusionRviDataClasses.cs" />
<Compile Include="REMOVE EssentialsApp.cs" /> <Compile Include="REMOVE EssentialsApp.cs" />
<Compile Include="OTHER\Fusion\EssentialsHuddleSpaceFusionSystemController.cs" /> <Compile Include="OTHER\Fusion\EssentialsHuddleSpaceFusionSystemControllerBase.cs" />
<Compile Include="HttpApiHandler.cs" /> <Compile Include="HttpApiHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" /> <Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />

View File

@@ -1,186 +1,188 @@
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 Newtonsoft.Json; using Newtonsoft.Json;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials; using PepperDash.Essentials;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Room.Config namespace PepperDash.Essentials.Room.Config
{ {
public class EssentialsRoomConfig : DeviceConfig public class EssentialsRoomConfig : DeviceConfig
{ {
/// <summary> /// <summary>
/// Returns a room object from this config data /// Returns a room object from this config data
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public Device GetRoomObject() public Device GetRoomObject()
{ {
var typeName = Type.ToLower(); var typeName = Type.ToLower();
if (typeName == "huddle") if (typeName == "huddle")
{ {
var props = JsonConvert.DeserializeObject<EssentialsHuddleRoomPropertiesConfig> var props = JsonConvert.DeserializeObject<EssentialsHuddleRoomPropertiesConfig>
(this.Properties.ToString()); (this.Properties.ToString());
var disp = DeviceManager.GetDeviceForKey(props.DefaultDisplayKey) as IRoutingSinkWithSwitching; var disp = DeviceManager.GetDeviceForKey(props.DefaultDisplayKey) as IRoutingSinkWithSwitching;
var audio = DeviceManager.GetDeviceForKey(props.DefaultAudioKey) as IRoutingSinkNoSwitching; var audio = DeviceManager.GetDeviceForKey(props.DefaultAudioKey) as IRoutingSinkNoSwitching;
var huddle = new EssentialsHuddleSpaceRoom(Key, Name, disp, audio, props); var huddle = new EssentialsHuddleSpaceRoom(Key, Name, disp, audio, props);
huddle.LogoUrl = props.Logo.GetUrl(); huddle.LogoUrl = props.Logo.GetUrl();
huddle.SourceListKey = props.SourceListKey; huddle.SourceListKey = props.SourceListKey;
huddle.DefaultSourceItem = props.DefaultSourceItem; huddle.DefaultSourceItem = props.DefaultSourceItem;
huddle.DefaultVolume = (ushort)(props.Volumes.Master.Level * 65535 / 100); huddle.DefaultVolume = (ushort)(props.Volumes.Master.Level * 65535 / 100);
return huddle; return huddle;
} }
else if (typeName == "presentation") else if (typeName == "presentation")
{ {
var props = JsonConvert.DeserializeObject<EssentialsPresentationRoomPropertiesConfig> var props = JsonConvert.DeserializeObject<EssentialsPresentationRoomPropertiesConfig>
(this.Properties.ToString()); (this.Properties.ToString());
var displaysDict = new Dictionary<uint, IRoutingSinkNoSwitching>(); var displaysDict = new Dictionary<uint, IRoutingSinkNoSwitching>();
uint i = 1; uint i = 1;
foreach (var dispKey in props.DisplayKeys) // read in the ordered displays list foreach (var dispKey in props.DisplayKeys) // read in the ordered displays list
{ {
var disp = DeviceManager.GetDeviceForKey(dispKey) as IRoutingSinkWithSwitching; var disp = DeviceManager.GetDeviceForKey(dispKey) as IRoutingSinkWithSwitching;
displaysDict.Add(i++, disp); displaysDict.Add(i++, disp);
} }
// Get the master volume control // Get the master volume control
IBasicVolumeWithFeedback masterVolumeControlDev = props.Volumes.Master.GetDevice(); IBasicVolumeWithFeedback masterVolumeControlDev = props.Volumes.Master.GetDevice();
var presRoom = new EssentialsPresentationRoom(Key, Name, displaysDict, masterVolumeControlDev, props); var presRoom = new EssentialsPresentationRoom(Key, Name, displaysDict, masterVolumeControlDev, props);
return presRoom; return presRoom;
} }
else if (typeName == "huddlevtc1") else if (typeName == "huddlevtc1")
{ {
var props = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig> var props = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>
(this.Properties.ToString()); (this.Properties.ToString());
var disp = DeviceManager.GetDeviceForKey(props.DefaultDisplayKey) as IRoutingSinkWithSwitching; var disp = DeviceManager.GetDeviceForKey(props.DefaultDisplayKey) as IRoutingSinkWithSwitching;
var codec = DeviceManager.GetDeviceForKey(props.VideoCodecKey) as var codec = DeviceManager.GetDeviceForKey(props.VideoCodecKey) as
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase; PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
var rm = new EssentialsHuddleVtc1Room(Key, Name, disp, codec, codec, props); var rm = new EssentialsHuddleVtc1Room(Key, Name, disp, codec, codec, props);
// Add Occupancy object from config // Add Occupancy object from config
#warning Add in occupancy object from config if found and link up device to occupancy feedback
rm.LogoUrl = props.Logo.GetUrl(); if (props.Occupancy != null)
rm.SourceListKey = props.SourceListKey; rm.SetRoomOccupancy(DeviceManager.GetDeviceForKey(props.Occupancy.DeviceKey) as PepperDash.Essentials.Devices.Common.Occupancy.IOccupancyStatusProvider);
rm.DefaultSourceItem = props.DefaultSourceItem; rm.LogoUrl = props.Logo.GetUrl();
rm.DefaultVolume = (ushort)(props.Volumes.Master.Level * 65535 / 100); rm.SourceListKey = props.SourceListKey;
rm.DefaultSourceItem = props.DefaultSourceItem;
rm.Emergency = GetEmergency(props, rm); // Get emergency object, if any rm.DefaultVolume = (ushort)(props.Volumes.Master.Level * 65535 / 100);
return rm; rm.Emergency = GetEmergency(props, rm); // Get emergency object, if any
}
return rm;
return null; }
}
return null;
/// <summary> }
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
/// Returns null if there is no emergency defined /// <summary>
/// </summary> /// Gets and operating, standalone emergegncy object that can be plugged into a room.
EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, EssentialsRoomBase room) /// Returns null if there is no emergency defined
{ /// </summary>
// This emergency EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, EssentialsRoomBase room)
var emergency = props.Emergency; {
if (emergency != null) // This emergency
{ var emergency = props.Emergency;
//switch on emergency type here. Right now only contact and shutdown if (emergency != null)
var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room); {
DeviceManager.AddDevice(e); //switch on emergency type here. Right now only contact and shutdown
} var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
return null; DeviceManager.AddDevice(e);
} }
} return null;
}
/// <summary> }
///
/// </summary> /// <summary>
public class EssentialsRoomPropertiesConfig ///
{ /// </summary>
public EssentialsRoomEmergencyConfig Emergency { get; set; } public class EssentialsRoomPropertiesConfig
public string HelpMessage { get; set; } {
public string Description { get; set; } public EssentialsRoomEmergencyConfig Emergency { get; set; }
public int ShutdownVacancySeconds { get; set; } public string HelpMessage { get; set; }
public int ShutdownPromptSeconds { get; set; } public string Description { get; set; }
public EssentialsHelpPropertiesConfig Help { get; set; } public int ShutdownVacancySeconds { get; set; }
public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; } public int ShutdownPromptSeconds { get; set; }
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; } public EssentialsHelpPropertiesConfig Help { get; set; }
public EssentialsRoomOccSensorConfig Occupancy { get; set; } public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; }
public EssentialsLogoPropertiesConfig Logo { get; set; } public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
public EssentialsRoomTechConfig Tech { get; set; } public EssentialsRoomOccSensorConfig Occupancy { get; set; }
public EssentialsRoomVolumesConfig Volumes { get; set; } public EssentialsLogoPropertiesConfig Logo { get; set; }
} public EssentialsRoomTechConfig Tech { get; set; }
public EssentialsRoomVolumesConfig Volumes { get; set; }
/// <summary> }
/// Properties for the help text box
/// </summary> /// <summary>
public class EssentialsHelpPropertiesConfig /// Properties for the help text box
{ /// </summary>
public string Message { get; set; } public class EssentialsHelpPropertiesConfig
public bool ShowCallButton { get; set; } {
/// <summary> public string Message { get; set; }
/// Defaults to "Call Help Desk" public bool ShowCallButton { get; set; }
/// </summary> /// <summary>
public string CallButtonText { get; set; } /// Defaults to "Call Help Desk"
/// </summary>
public EssentialsHelpPropertiesConfig() public string CallButtonText { get; set; }
{
CallButtonText = "Call Help Desk"; public EssentialsHelpPropertiesConfig()
} {
} CallButtonText = "Call Help Desk";
}
/// <summary> }
///
/// </summary> /// <summary>
public class EssentialsOneButtonMeetingPropertiesConfig ///
{ /// </summary>
public bool Enable { get; set; } public class EssentialsOneButtonMeetingPropertiesConfig
} {
public bool Enable { get; set; }
public class EssentialsRoomAddressPropertiesConfig }
{
public string PhoneNumber { get; set; } public class EssentialsRoomAddressPropertiesConfig
public string SipAddress { get; set; } {
} public string PhoneNumber { get; set; }
public string SipAddress { get; set; }
}
/// <summary>
/// Properties for the room's logo on panels
/// </summary> /// <summary>
public class EssentialsLogoPropertiesConfig /// Properties for the room's logo on panels
{ /// </summary>
public string Type { get; set; } public class EssentialsLogoPropertiesConfig
public string Url { get; set; } {
/// <summary> public string Type { get; set; }
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo public string Url { get; set; }
/// </summary> /// <summary>
public string GetUrl() /// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
{ /// </summary>
if (Type == "url") public string GetUrl()
return Url; {
if (Type == "system") if (Type == "url")
return string.Format("http://{0}:8080/logo.png", return Url;
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0)); if (Type == "system")
return null; return string.Format("http://{0}:8080/logo.png",
} CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
} return null;
}
/// <summary> }
/// Represents occupancy sensor(s) setup for a room
/// </summary> /// <summary>
public class EssentialsRoomOccSensorConfig /// Represents occupancy sensor(s) setup for a room
{ /// </summary>
public string DeviceKey { get; set; } public class EssentialsRoomOccSensorConfig
} {
public string DeviceKey { get; set; }
public class EssentialsRoomTechConfig }
{
public string Password { get; set; } public class EssentialsRoomTechConfig
} {
public string Password { get; set; }
}
} }

View File

@@ -1,54 +1,56 @@
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 PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.Occupancy; using PepperDash.Essentials.Devices.Common.Occupancy;
namespace PepperDash.Essentials namespace PepperDash.Essentials
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public interface IHasCurrentSourceInfoChange public interface IHasCurrentSourceInfoChange
{ {
event SourceInfoChangeHandler CurrentSingleSourceChange; event SourceInfoChangeHandler CurrentSingleSourceChange;
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public abstract class EssentialsRoomBase : Device public abstract class EssentialsRoomBase : Device
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public BoolFeedback OnFeedback { get; private set; } public BoolFeedback OnFeedback { get; private set; }
public BoolFeedback IsWarmingUpFeedback { get; private set; } public BoolFeedback IsWarmingUpFeedback { get; private set; }
public BoolFeedback IsCoolingDownFeedback { get; private set; } public BoolFeedback IsCoolingDownFeedback { get; private set; }
public IOccupancyStatusProvider RoomOccupancy { get; private set; } public IOccupancyStatusProvider RoomOccupancy { get; private set; }
protected abstract Func<bool> IsWarmingFeedbackFunc { get; } public bool OccupancyStatusProviderIsRemote { get; private set; }
protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
protected abstract Func<bool> IsWarmingFeedbackFunc { get; }
/// <summary> protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
/// Timer used for informing the UIs of a shutdown
/// </summary> /// <summary>
public SecondsCountdownTimer ShutdownPromptTimer { get; private set; } /// Timer used for informing the UIs of a shutdown
/// </summary>
/// <summary> public SecondsCountdownTimer ShutdownPromptTimer { get; private set; }
///
/// </summary> /// <summary>
public int ShutdownPromptSeconds { get; set; } ///
public int ShutdownVacancySeconds { get; set; } /// </summary>
public eShutdownType ShutdownType { get; private set; } public int ShutdownPromptSeconds { get; set; }
public int ShutdownVacancySeconds { get; set; }
public PepperDash.Essentials.Room.EssentialsRoomEmergencyBase Emergency { get; set; } public eShutdownType ShutdownType { get; private set; }
public PepperDash.Essentials.Room.EssentialsRoomEmergencyBase Emergency { get; set; }
public string LogoUrl { get; set; } public string LogoUrl { get; set; }
protected SecondsCountdownTimer RoomVacancyShutdownTimer { get; private set; } protected SecondsCountdownTimer RoomVacancyShutdownTimer { get; private set; }
@@ -63,49 +65,49 @@ namespace PepperDash.Essentials
/// <summary> /// <summary>
/// Seconds after vacancy detected until prompt is displayed /// Seconds after vacancy detected until prompt is displayed
/// </summary> /// </summary>
protected int RoomVacancyShutdownPromptSeconds; protected int RoomVacancyShutdownPromptSeconds;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
protected abstract Func<bool> OnFeedbackFunc { get; } protected abstract Func<bool> OnFeedbackFunc { get; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="key"></param> /// <param name="key"></param>
/// <param name="name"></param> /// <param name="name"></param>
public EssentialsRoomBase(string key, string name) : base(key, name) public EssentialsRoomBase(string key, string name) : base(key, name)
{ {
// Setup the ShutdownPromptTimer // Setup the ShutdownPromptTimer
ShutdownPromptTimer = new SecondsCountdownTimer(Key + "-offTimer"); ShutdownPromptTimer = new SecondsCountdownTimer(Key + "-offTimer");
ShutdownPromptTimer.IsRunningFeedback.OutputChange += (o, a) => ShutdownPromptTimer.IsRunningFeedback.OutputChange += (o, a) =>
{ {
if (!ShutdownPromptTimer.IsRunningFeedback.BoolValue) if (!ShutdownPromptTimer.IsRunningFeedback.BoolValue)
ShutdownType = eShutdownType.None; ShutdownType = eShutdownType.None;
}; };
ShutdownPromptTimer.HasFinished += (o, a) => Shutdown(); // Shutdown is triggered ShutdownPromptTimer.HasFinished += (o, a) => Shutdown(); // Shutdown is triggered
ShutdownPromptSeconds = 60; ShutdownPromptSeconds = 60;
ShutdownVacancySeconds = 120; ShutdownVacancySeconds = 120;
ShutdownType = eShutdownType.None; ShutdownType = eShutdownType.None;
RoomVacancyShutdownTimer = new SecondsCountdownTimer(Key + "-vacancyOffTimer"); RoomVacancyShutdownTimer = new SecondsCountdownTimer(Key + "-vacancyOffTimer");
//RoomVacancyShutdownTimer.IsRunningFeedback.OutputChange += (o, a) => //RoomVacancyShutdownTimer.IsRunningFeedback.OutputChange += (o, a) =>
//{ //{
// if (!RoomVacancyShutdownTimer.IsRunningFeedback.BoolValue) // if (!RoomVacancyShutdownTimer.IsRunningFeedback.BoolValue)
// ShutdownType = ShutdownType.Vacancy; // ShutdownType = ShutdownType.Vacancy;
//}; //};
RoomVacancyShutdownTimer.HasFinished += new EventHandler<EventArgs>(RoomVacancyShutdownPromptTimer_HasFinished); // Shutdown is triggered RoomVacancyShutdownTimer.HasFinished += new EventHandler<EventArgs>(RoomVacancyShutdownPromptTimer_HasFinished); // Shutdown is triggered
RoomVacancyShutdownPromptSeconds = 1500; // 25 min to prompt warning RoomVacancyShutdownPromptSeconds = 1500; // 25 min to prompt warning
RoomVacancyShutdownSeconds = 240; // 4 min after prompt will trigger shutdown prompt RoomVacancyShutdownSeconds = 240; // 4 min after prompt will trigger shutdown prompt
VacancyMode = eVacancyMode.None; VacancyMode = eVacancyMode.None;
OnFeedback = new BoolFeedback(OnFeedbackFunc); OnFeedback = new BoolFeedback(OnFeedbackFunc);
IsWarmingUpFeedback = new BoolFeedback(IsWarmingFeedbackFunc); IsWarmingUpFeedback = new BoolFeedback(IsWarmingFeedbackFunc);
IsCoolingDownFeedback = new BoolFeedback(IsCoolingFeedbackFunc); IsCoolingDownFeedback = new BoolFeedback(IsCoolingFeedbackFunc);
} }
void RoomVacancyShutdownPromptTimer_HasFinished(object sender, EventArgs e) void RoomVacancyShutdownPromptTimer_HasFinished(object sender, EventArgs e)
@@ -124,22 +126,22 @@ namespace PepperDash.Essentials
default: default:
break; break;
} }
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="type"></param> /// <param name="type"></param>
public void StartShutdown(eShutdownType type) public void StartShutdown(eShutdownType type)
{ {
// Check for shutdowns running. Manual should override other shutdowns // Check for shutdowns running. Manual should override other shutdowns
if (type == eShutdownType.Manual) if (type == eShutdownType.Manual)
ShutdownPromptTimer.SecondsToCount = ShutdownPromptSeconds; ShutdownPromptTimer.SecondsToCount = ShutdownPromptSeconds;
else if (type == eShutdownType.Vacancy) else if (type == eShutdownType.Vacancy)
ShutdownPromptTimer.SecondsToCount = ShutdownVacancySeconds; ShutdownPromptTimer.SecondsToCount = ShutdownVacancySeconds;
ShutdownType = type; ShutdownType = type;
ShutdownPromptTimer.Start(); ShutdownPromptTimer.Start();
} }
public void StartRoomVacancyTimer(eVacancyMode mode) public void StartRoomVacancyTimer(eVacancyMode mode)
@@ -150,11 +152,11 @@ namespace PepperDash.Essentials
RoomVacancyShutdownTimer.SecondsToCount = RoomVacancyShutdownSeconds; RoomVacancyShutdownTimer.SecondsToCount = RoomVacancyShutdownSeconds;
VacancyMode = mode; VacancyMode = mode;
RoomVacancyShutdownTimer.Start(); RoomVacancyShutdownTimer.Start();
} }
/// <summary> /// <summary>
/// Resets the vacancy mode and shutsdwon the room /// Resets the vacancy mode and shutsdwon the room
/// </summary> /// </summary>
public void Shutdown() public void Shutdown()
{ {
VacancyMode = eVacancyMode.None; VacancyMode = eVacancyMode.None;
@@ -166,11 +168,11 @@ namespace PepperDash.Essentials
/// requirements but should not be called directly. It is called by Shutdown() /// requirements but should not be called directly. It is called by Shutdown()
/// </summary> /// </summary>
protected abstract void EndShutdown(); protected abstract void EndShutdown();
/// <summary> /// <summary>
/// Override this to implement a default volume level(s) method /// Override this to implement a default volume level(s) method
/// </summary> /// </summary>
public abstract void SetDefaultLevels(); public abstract void SetDefaultLevels();
/// <summary> /// <summary>
@@ -179,6 +181,10 @@ namespace PepperDash.Essentials
/// <param name="statusProvider"></param> /// <param name="statusProvider"></param>
public void SetRoomOccupancy(IOccupancyStatusProvider statusProvider) public void SetRoomOccupancy(IOccupancyStatusProvider statusProvider)
{ {
// If status provider is fusion, set flag to remote
if (statusProvider is PepperDash.Essentials.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
OccupancyStatusProviderIsRemote = true;
RoomOccupancy = statusProvider; RoomOccupancy = statusProvider;
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += new EventHandler<EventArgs>(RoomIsOccupiedFeedback_OutputChange); RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += new EventHandler<EventArgs>(RoomIsOccupiedFeedback_OutputChange);
@@ -203,18 +209,18 @@ namespace PepperDash.Essentials
/// Executes when RoomVacancyShutdownTimer expires. Used to trigger specific room actions as needed. Must nullify the timer object when executed /// Executes when RoomVacancyShutdownTimer expires. Used to trigger specific room actions as needed. Must nullify the timer object when executed
/// </summary> /// </summary>
/// <param name="o"></param> /// <param name="o"></param>
public abstract void RoomVacatedForTimeoutPeriod(object o); public abstract void RoomVacatedForTimeoutPeriod(object o);
} }
/// <summary> /// <summary>
/// To describe the various ways a room may be shutting down /// To describe the various ways a room may be shutting down
/// </summary> /// </summary>
public enum eShutdownType public enum eShutdownType
{ {
None = 0, None = 0,
External, External,
Manual, Manual,
Vacancy Vacancy
} }
public enum eVacancyMode public enum eVacancyMode
@@ -222,15 +228,15 @@ namespace PepperDash.Essentials
None = 0, None = 0,
InInitialVacancy, InInitialVacancy,
InShutdownWarning InShutdownWarning
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public enum eWarmingCoolingMode public enum eWarmingCoolingMode
{ {
None, None,
Warming, Warming,
Cooling Cooling
} }
} }

View File

@@ -1023,6 +1023,9 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void RefreshMeetingsList() void RefreshMeetingsList()
{ {
// See if this is helpful or if the callback response in the codec class maybe doesn't come it time?
CurrentRoom.ScheduleSource.GetSchedule();
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar"); TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar");
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings"); TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings");

View File

@@ -680,10 +680,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// </summary> /// </summary>
void SetupSelfViewControls() void SetupSelfViewControls()
{ {
TriList.SetSigFalseAction(UIBoolJoin.VCStagingSelfViewLayoutPress, this.ShowSelfViewLayout); TriList.SetSigFalseAction(UIBoolJoin.VCStagingSelfViewLayoutPress, this.ShowSelfViewLayout);
var svc = Codec as IHasCodecSelfview; var svc = Codec as IHasCodecSelfview;
if (svc != null) if (svc != null)
{ {
// Default Selfview to off
svc.SelfviewModeOff();
TriList.SetSigFalseAction(UIBoolJoin.VCSelfViewTogglePress, svc.SelfviewModeToggle); TriList.SetSigFalseAction(UIBoolJoin.VCSelfViewTogglePress, svc.SelfviewModeToggle);
svc.SelfviewIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCSelfViewTogglePress]); svc.SelfviewIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCSelfViewTogglePress]);