mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
Merge remote-tracking branch 'origin/bugfix/ecs-541' into bugfix/ecs-535
This commit is contained in:
@@ -18,6 +18,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
public interface IHasScheduleAwareness
|
||||
{
|
||||
CodecScheduleAwareness CodecSchedule { get; }
|
||||
|
||||
void GetSchedule();
|
||||
}
|
||||
|
||||
public class CodecScheduleAwareness
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
|
||||
|
||||
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
|
||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfview
|
||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfview, ICommunicationMonitor
|
||||
{
|
||||
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");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required for IHasScheduleAwareness
|
||||
/// </summary>
|
||||
public void GetSchedule()
|
||||
{
|
||||
GetBookings(null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the bookings for today
|
||||
/// </summary>
|
||||
@@ -953,7 +961,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
else
|
||||
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()
|
||||
|
||||
@@ -339,6 +339,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
#region IHasScheduleAwareness Members
|
||||
|
||||
public void GetSchedule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CodecScheduleAwareness CodecSchedule
|
||||
{
|
||||
get {
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace PepperDash.Essentials
|
||||
DeviceManager.AddDevice(room);
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@@ -18,12 +18,13 @@ 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 EssentialsHuddleSpaceFusionSystemController : Device
|
||||
public class EssentialsHuddleSpaceFusionSystemControllerBase : Device, IOccupancyStatusProvider
|
||||
{
|
||||
public event EventHandler<ScheduleChangeEventArgs> ScheduleChange;
|
||||
//public event EventHandler<MeetingChangeEventArgs> MeetingEndWarning;
|
||||
@@ -34,8 +35,6 @@ namespace PepperDash.Essentials.Fusion
|
||||
Dictionary<Device, BoolInputSig> SourceToFeedbackSigs =
|
||||
new Dictionary<Device, BoolInputSig>();
|
||||
|
||||
//BooleanSigData OccupancyStatusSig;
|
||||
|
||||
StatusMonitorCollection ErrorMessageRollUp;
|
||||
|
||||
StringSigData CurrentRoomSourceNameSig;
|
||||
@@ -105,11 +104,25 @@ namespace PepperDash.Essentials.Fusion
|
||||
|
||||
Dictionary<int, FusionAsset> FusionStaticAssets;
|
||||
|
||||
// For use with local occ sensor devices which will relay to Fusion the current occupancy status
|
||||
FusionRemoteOccupancySensor FusionRemoteOccSensor;
|
||||
|
||||
// For use with occ sensor attached to a scheduling panel in Fusion
|
||||
FusionOccupancySensorAsset FusionOccSensor;
|
||||
|
||||
public BoolFeedback RoomIsOccupiedFeedback { get; private set; }
|
||||
|
||||
protected Func<bool> RoomIsOccupiedFeedbackFunc
|
||||
{
|
||||
get
|
||||
{
|
||||
return () => FusionRemoteOccSensor.RoomOccupied.OutputSig.BoolValue;
|
||||
}
|
||||
}
|
||||
|
||||
//ScheduleResponseEvent NextMeeting;
|
||||
|
||||
public EssentialsHuddleSpaceFusionSystemController(EssentialsHuddleSpaceRoom room, uint ipId)
|
||||
public EssentialsHuddleSpaceFusionSystemControllerBase(EssentialsHuddleSpaceRoom room, uint ipId)
|
||||
: base(room.Key + "-fusion")
|
||||
{
|
||||
|
||||
@@ -143,7 +156,16 @@ namespace PepperDash.Essentials.Fusion
|
||||
SetUpCommunitcationMonitors();
|
||||
SetUpDisplay();
|
||||
SetUpError();
|
||||
//SetUpOccupancy();
|
||||
|
||||
if(Room.RoomOccupancy != null)
|
||||
{
|
||||
if(Room.OccupancyStatusProviderIsRemote)
|
||||
SetUpRemoteOccupancy();
|
||||
else
|
||||
{
|
||||
SetUpLocalOccupancy();
|
||||
}
|
||||
}
|
||||
|
||||
// Make it so!
|
||||
FusionRVI.GenerateFileForAllFusionDevices();
|
||||
@@ -1176,7 +1198,25 @@ namespace PepperDash.Essentials.Fusion
|
||||
|
||||
}
|
||||
|
||||
void SetUpOccupancy()
|
||||
/// <summary>
|
||||
/// Sets up a local occupancy sensor, such as one attached to a Fusion Scheduling panel. The occupancy status of the room will be read from Fusion
|
||||
/// </summary>
|
||||
void SetUpLocalOccupancy()
|
||||
{
|
||||
RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc);
|
||||
|
||||
// Build Occupancy Asset?
|
||||
// Link sigs?
|
||||
|
||||
Room.SetRoomOccupancy(this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets up remote occupancy that will relay the occupancy status determined by local system devices to Fusion
|
||||
/// </summary>
|
||||
void SetUpRemoteOccupancy()
|
||||
{
|
||||
|
||||
// Need to have the room occupancy object first and somehow determine the slot number of the Occupancy asset but will not be able to use the UID from config likely.
|
||||
@@ -1203,7 +1243,7 @@ namespace PepperDash.Essentials.Fusion
|
||||
//occSensorShutdownMinutes.OutputSig.UserObject(new Action(ushort)(b => Room.OccupancyObj.SetShutdownMinutes(b));
|
||||
|
||||
|
||||
// use Room.OccObject.RoomOccupiedFeedback.LinkInputSig(occSensorAsset.InputSig);
|
||||
Room.RoomOccupancy.RoomIsOccupiedFeedback.LinkInputSig(occSensorAsset.RoomOccupied.InputSig);
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,11 +134,12 @@
|
||||
<Compile Include="Devices\DiscPlayer\OppoExtendedBdp.cs" />
|
||||
<Compile Include="Devices\NUMERIC AppleTV.cs" />
|
||||
<Compile Include="ControlSystem.cs" />
|
||||
<Compile Include="OTHER\Fusion\EssentialsHuddleVtc1FusionController.cs" />
|
||||
<Compile Include="OTHER\Fusion\FusionEventHandlers.cs" />
|
||||
<Compile Include="OTHER\Fusion\FusionProcessorQueries.cs" />
|
||||
<Compile Include="OTHER\Fusion\FusionRviDataClasses.cs" />
|
||||
<Compile Include="REMOVE EssentialsApp.cs" />
|
||||
<Compile Include="OTHER\Fusion\EssentialsHuddleSpaceFusionSystemController.cs" />
|
||||
<Compile Include="OTHER\Fusion\EssentialsHuddleSpaceFusionSystemControllerBase.cs" />
|
||||
<Compile Include="HttpApiHandler.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
||||
|
||||
@@ -65,7 +65,9 @@ namespace PepperDash.Essentials.Room.Config
|
||||
|
||||
var rm = new EssentialsHuddleVtc1Room(Key, Name, disp, codec, codec, props);
|
||||
// Add Occupancy object from config
|
||||
#warning Add in occupancy object from config if found and link up device to occupancy feedback
|
||||
|
||||
if (props.Occupancy != null)
|
||||
rm.SetRoomOccupancy(DeviceManager.GetDeviceForKey(props.Occupancy.DeviceKey) as PepperDash.Essentials.Devices.Common.Occupancy.IOccupancyStatusProvider);
|
||||
rm.LogoUrl = props.Logo.GetUrl();
|
||||
rm.SourceListKey = props.SourceListKey;
|
||||
rm.DefaultSourceItem = props.DefaultSourceItem;
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace PepperDash.Essentials
|
||||
|
||||
public IOccupancyStatusProvider RoomOccupancy { get; private set; }
|
||||
|
||||
public bool OccupancyStatusProviderIsRemote { get; private set; }
|
||||
|
||||
protected abstract Func<bool> IsWarmingFeedbackFunc { get; }
|
||||
protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
|
||||
|
||||
@@ -179,6 +181,10 @@ namespace PepperDash.Essentials
|
||||
/// <param name="statusProvider"></param>
|
||||
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.RoomIsOccupiedFeedback.OutputChange += new EventHandler<EventArgs>(RoomIsOccupiedFeedback_OutputChange);
|
||||
|
||||
@@ -1023,6 +1023,9 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
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.MeetingsOrContactMethodListTitleText, "Today's Meetings");
|
||||
|
||||
|
||||
@@ -680,10 +680,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// </summary>
|
||||
void SetupSelfViewControls()
|
||||
{
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingSelfViewLayoutPress, this.ShowSelfViewLayout);
|
||||
var svc = Codec as IHasCodecSelfview;
|
||||
if (svc != null)
|
||||
{
|
||||
// Default Selfview to off
|
||||
svc.SelfviewModeOff();
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCSelfViewTogglePress, svc.SelfviewModeToggle);
|
||||
svc.SelfviewIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCSelfViewTogglePress]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user