mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Bug fixing...
This commit is contained in:
79
Essentials Core/PepperDashEssentialsBase/Global/JobTimer.cs
Normal file
79
Essentials Core/PepperDashEssentialsBase/Global/JobTimer.cs
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
public static class JobTimer
|
||||||
|
{
|
||||||
|
static CTimer MinuteTimer;
|
||||||
|
|
||||||
|
static List<JobTimerItem> Items = new List<JobTimerItem>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="act"></param>
|
||||||
|
public static void AddAction(Action act)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="act"></param>
|
||||||
|
public static void AddJobTimerItem(JobTimerItem item)
|
||||||
|
{
|
||||||
|
var existing = Items.FirstOrDefault(i => i.Key == item.Key);
|
||||||
|
if (existing != null)
|
||||||
|
{
|
||||||
|
Items.Remove(existing);
|
||||||
|
}
|
||||||
|
Items.Add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CheckAndRunTimer()
|
||||||
|
{
|
||||||
|
if (Items.Count > 0 && MinuteTimer == null)
|
||||||
|
{
|
||||||
|
MinuteTimer = new CTimer(o => MinuteTimerCallback(), null, 60000, 60000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void MinuteTimerCallback()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class JobTimerItem
|
||||||
|
{
|
||||||
|
public string Key { get; private set; }
|
||||||
|
public Action JobAction { get; private set; }
|
||||||
|
public eJobTimerCycleTypes CycleType { get; private set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public DateTime RunNextAt { get; set; }
|
||||||
|
|
||||||
|
public JobTimerItem(string key, eJobTimerCycleTypes cycle, Action act)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum eJobTimerCycleTypes
|
||||||
|
{
|
||||||
|
RunEveryHour,
|
||||||
|
RunEveryHalfHour,
|
||||||
|
RunEveryMinute
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -105,6 +105,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Devices\CodecInterfaces.cs" />
|
<Compile Include="Devices\CodecInterfaces.cs" />
|
||||||
<Compile Include="Devices\IHasSharing.cs" />
|
<Compile Include="Devices\IHasSharing.cs" />
|
||||||
|
<Compile Include="Global\JobTimer.cs" />
|
||||||
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
||||||
<Compile Include="Comm and IR\CommFactory.cs" />
|
<Compile Include="Comm and IR\CommFactory.cs" />
|
||||||
<Compile Include="Comm and IR\CommunicationExtras.cs" />
|
<Compile Include="Comm and IR\CommunicationExtras.cs" />
|
||||||
@@ -163,7 +164,7 @@
|
|||||||
<Compile Include="Display\MockDisplay.cs" />
|
<Compile Include="Display\MockDisplay.cs" />
|
||||||
<Compile Include="Ethernet\EthernetStatistics.cs" />
|
<Compile Include="Ethernet\EthernetStatistics.cs" />
|
||||||
<Compile Include="Fusion\MOVED FusionSystemController.cs" />
|
<Compile Include="Fusion\MOVED FusionSystemController.cs" />
|
||||||
<Compile Include="Global.cs" />
|
<Compile Include="Global\Global.cs" />
|
||||||
<Compile Include="License\EssentialsLicenseManager.cs" />
|
<Compile Include="License\EssentialsLicenseManager.cs" />
|
||||||
<Compile Include="Feedbacks\BoolOutputLogicals.cs" />
|
<Compile Include="Feedbacks\BoolOutputLogicals.cs" />
|
||||||
<Compile Include="Presets\Interfaces.cs" />
|
<Compile Include="Presets\Interfaces.cs" />
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
{
|
{
|
||||||
return !(Status == eCodecCallStatus.Disconnected
|
return !(Status == eCodecCallStatus.Disconnected
|
||||||
|| Status == eCodecCallStatus.Disconnecting
|
|| Status == eCodecCallStatus.Disconnecting
|
||||||
|
|| Status == eCodecCallStatus.Idle
|
||||||
|| Status == eCodecCallStatus.Unknown);
|
|| Status == eCodecCallStatus.Unknown);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,7 +762,7 @@ 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");
|
||||||
}
|
}
|
||||||
@@ -961,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()
|
||||||
|
|||||||
@@ -43,13 +43,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
||||||
|
|
||||||
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 0, this);
|
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 0, this);
|
||||||
HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 1, this);
|
|
||||||
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2, this);
|
|
||||||
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null, this);
|
|
||||||
|
|
||||||
InputPorts.Add(CodecOsdIn);
|
InputPorts.Add(CodecOsdIn);
|
||||||
|
HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 1, this);
|
||||||
InputPorts.Add(HdmiIn1);
|
InputPorts.Add(HdmiIn1);
|
||||||
|
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2, this);
|
||||||
InputPorts.Add(HdmiIn2);
|
InputPorts.Add(HdmiIn2);
|
||||||
|
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
OutputPorts.Add(HdmiOut);
|
OutputPorts.Add(HdmiOut);
|
||||||
|
|
||||||
CallHistory = new CodecCallHistory();
|
CallHistory = new CodecCallHistory();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ using PepperDash.Essentials.Devices.Common.Codec;
|
|||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
{
|
{
|
||||||
public abstract class VideoCodecBase : Device, IRoutingInputsOutputs,
|
public abstract class VideoCodecBase : Device, IRoutingInputsOutputs,
|
||||||
IUsageTracking, IHasDialer, IHasSharing, ICodecAudio, iCodecInfo //, ICommunicationMonitor
|
IUsageTracking, IHasDialer, IHasSharing, ICodecAudio, iCodecInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fires when the status of any active, dialing, or incoming call changes or is new
|
/// Fires when the status of any active, dialing, or incoming call changes or is new
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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\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" />
|
||||||
|
|||||||
@@ -1,188 +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
|
||||||
|
|
||||||
if (props.Occupancy != null)
|
if (props.Occupancy != null)
|
||||||
rm.SetRoomOccupancy(DeviceManager.GetDeviceForKey(props.Occupancy.DeviceKey) as PepperDash.Essentials.Devices.Common.Occupancy.IOccupancyStatusProvider);
|
rm.SetRoomOccupancy(DeviceManager.GetDeviceForKey(props.Occupancy.DeviceKey) as PepperDash.Essentials.Devices.Common.Occupancy.IOccupancyStatusProvider);
|
||||||
rm.LogoUrl = props.Logo.GetUrl();
|
rm.LogoUrl = props.Logo.GetUrl();
|
||||||
rm.SourceListKey = props.SourceListKey;
|
rm.SourceListKey = props.SourceListKey;
|
||||||
rm.DefaultSourceItem = props.DefaultSourceItem;
|
rm.DefaultSourceItem = props.DefaultSourceItem;
|
||||||
rm.DefaultVolume = (ushort)(props.Volumes.Master.Level * 65535 / 100);
|
rm.DefaultVolume = (ushort)(props.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|
||||||
rm.Emergency = GetEmergency(props, rm); // Get emergency object, if any
|
rm.Emergency = GetEmergency(props, rm); // Get emergency object, if any
|
||||||
|
|
||||||
return rm;
|
return rm;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
/// Gets and operating, standalone emergegncy object that can be plugged into a room.
|
||||||
/// Returns null if there is no emergency defined
|
/// Returns null if there is no emergency defined
|
||||||
/// </summary>
|
/// </summary>
|
||||||
EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, EssentialsRoomBase room)
|
EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, EssentialsRoomBase room)
|
||||||
{
|
{
|
||||||
// This emergency
|
// This emergency
|
||||||
var emergency = props.Emergency;
|
var emergency = props.Emergency;
|
||||||
if (emergency != null)
|
if (emergency != null)
|
||||||
{
|
{
|
||||||
//switch on emergency type here. Right now only contact and shutdown
|
//switch on emergency type here. Right now only contact and shutdown
|
||||||
var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
|
var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
|
||||||
DeviceManager.AddDevice(e);
|
DeviceManager.AddDevice(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomPropertiesConfig
|
public class EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
||||||
public string HelpMessage { get; set; }
|
public string HelpMessage { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public int ShutdownVacancySeconds { get; set; }
|
public int ShutdownVacancySeconds { get; set; }
|
||||||
public int ShutdownPromptSeconds { get; set; }
|
public int ShutdownPromptSeconds { get; set; }
|
||||||
public EssentialsHelpPropertiesConfig Help { get; set; }
|
public EssentialsHelpPropertiesConfig Help { get; set; }
|
||||||
public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; }
|
public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; }
|
||||||
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
||||||
public EssentialsRoomOccSensorConfig Occupancy { get; set; }
|
public EssentialsRoomOccSensorConfig Occupancy { get; set; }
|
||||||
public EssentialsLogoPropertiesConfig Logo { get; set; }
|
public EssentialsLogoPropertiesConfig Logo { get; set; }
|
||||||
public EssentialsRoomTechConfig Tech { get; set; }
|
public EssentialsRoomTechConfig Tech { get; set; }
|
||||||
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Properties for the help text box
|
/// Properties for the help text box
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsHelpPropertiesConfig
|
public class EssentialsHelpPropertiesConfig
|
||||||
{
|
{
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
public bool ShowCallButton { get; set; }
|
public bool ShowCallButton { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to "Call Help Desk"
|
/// Defaults to "Call Help Desk"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CallButtonText { get; set; }
|
public string CallButtonText { get; set; }
|
||||||
|
|
||||||
public EssentialsHelpPropertiesConfig()
|
public EssentialsHelpPropertiesConfig()
|
||||||
{
|
{
|
||||||
CallButtonText = "Call Help Desk";
|
CallButtonText = "Call Help Desk";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsOneButtonMeetingPropertiesConfig
|
public class EssentialsOneButtonMeetingPropertiesConfig
|
||||||
{
|
{
|
||||||
public bool Enable { get; set; }
|
public bool Enable { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomAddressPropertiesConfig
|
public class EssentialsRoomAddressPropertiesConfig
|
||||||
{
|
{
|
||||||
public string PhoneNumber { get; set; }
|
public string PhoneNumber { get; set; }
|
||||||
public string SipAddress { get; set; }
|
public string SipAddress { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Properties for the room's logo on panels
|
/// Properties for the room's logo on panels
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsLogoPropertiesConfig
|
public class EssentialsLogoPropertiesConfig
|
||||||
{
|
{
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetUrl()
|
public string GetUrl()
|
||||||
{
|
{
|
||||||
if (Type == "url")
|
if (Type == "url")
|
||||||
return Url;
|
return Url;
|
||||||
if (Type == "system")
|
if (Type == "system")
|
||||||
return string.Format("http://{0}:8080/logo.png",
|
return string.Format("http://{0}:8080/logo.png",
|
||||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents occupancy sensor(s) setup for a room
|
/// Represents occupancy sensor(s) setup for a room
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomOccSensorConfig
|
public class EssentialsRoomOccSensorConfig
|
||||||
{
|
{
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsRoomTechConfig
|
public class EssentialsRoomTechConfig
|
||||||
{
|
{
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
public bool ShowDate { get; set; }
|
public bool ShowDate { get; set; }
|
||||||
public bool ShowTime { get; set; }
|
public bool ShowTime { get; set; }
|
||||||
public UiSetupPropertiesConfig Setup { get; set; }
|
public UiSetupPropertiesConfig Setup { get; set; }
|
||||||
public UiHeaderStyle HeaderStyle { get; set; }
|
public string HeaderStyle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The count of sources that will trigger the "additional" arrows to show on the SRL.
|
/// The count of sources that will trigger the "additional" arrows to show on the SRL.
|
||||||
@@ -23,8 +23,17 @@
|
|||||||
public CrestronTouchpanelPropertiesConfig()
|
public CrestronTouchpanelPropertiesConfig()
|
||||||
{
|
{
|
||||||
SourcesOverflowCount = 5;
|
SourcesOverflowCount = 5;
|
||||||
HeaderStyle = UiHeaderStyle.Habanero;
|
HeaderStyle = CrestronTouchpanelPropertiesConfig.Habanero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "habanero"
|
||||||
|
/// </summary>
|
||||||
|
public const string Habanero = "habanero";
|
||||||
|
/// <summary>
|
||||||
|
/// "verbose"
|
||||||
|
/// </summary>
|
||||||
|
public const string Verbose = "verbose";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,14 +43,4 @@
|
|||||||
{
|
{
|
||||||
public bool IsVisible { get; set; }
|
public bool IsVisible { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public enum UiHeaderStyle
|
|
||||||
{
|
|
||||||
Habanero = 0,
|
|
||||||
Verbose
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -234,25 +234,25 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
var roomConf = CurrentRoom.Config;
|
var roomConf = CurrentRoom.Config;
|
||||||
|
|
||||||
if (Config.HeaderStyle == UiHeaderStyle.Habanero)
|
TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name);
|
||||||
|
|
||||||
|
if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero)
|
||||||
{
|
{
|
||||||
TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name);
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
|
||||||
}
|
}
|
||||||
else if (Config.HeaderStyle == UiHeaderStyle.Verbose)
|
else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose)
|
||||||
{
|
{
|
||||||
// room name on join 1, concat phone and sip on join 2, no button method
|
// room name on join 1, concat phone and sip on join 2, no button method
|
||||||
TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name);
|
//var addr = roomConf.Addresses;
|
||||||
var addr = roomConf.Addresses;
|
//if (addr == null) // protect from missing values by using default empties
|
||||||
if (addr == null) // protect from missing values by using default empties
|
// addr = new EssentialsRoomAddressPropertiesConfig();
|
||||||
addr = new EssentialsRoomAddressPropertiesConfig();
|
//// empty string when either missing, pipe when both showing
|
||||||
// empty string when either missing, pipe when both showing
|
//TriList.SetString(UIStringJoin.RoomAddressPipeText,
|
||||||
TriList.SetString(UIStringJoin.RoomAddressPipeText,
|
// (string.IsNullOrEmpty(addr.PhoneNumber.Trim())
|
||||||
(string.IsNullOrEmpty(addr.PhoneNumber.Trim())
|
// || string.IsNullOrEmpty(addr.SipAddress.Trim())) ? "" : " | ");
|
||||||
|| string.IsNullOrEmpty(addr.SipAddress.Trim())) ? "" : " | ");
|
//TriList.SetString(UIStringJoin.RoomPhoneText, addr.PhoneNumber);
|
||||||
TriList.SetString(UIStringJoin.RoomPhoneText, addr.PhoneNumber);
|
//TriList.SetString(UIStringJoin.RoomSipText, addr.SipAddress);
|
||||||
TriList.SetString(UIStringJoin.RoomSipText, addr.SipAddress);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
||||||
@@ -621,16 +621,22 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowCurrentSource()
|
void ShowCurrentSource()
|
||||||
{
|
{
|
||||||
if (CurrentRoom.CurrentSourceInfo == null)
|
if (CurrentRoom.CurrentSourceInfo == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (CurrentRoom.CurrentSourceInfo.SourceDevice == null)
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var uiDev = CurrentRoom.CurrentSourceInfo.SourceDevice as IUiDisplayInfo;
|
var uiDev = CurrentRoom.CurrentSourceInfo.SourceDevice as IUiDisplayInfo;
|
||||||
PageManager pm = null;
|
PageManager pm = null;
|
||||||
// If we need a page manager, get an appropriate one
|
// If we need a page manager, get an appropriate one
|
||||||
if (uiDev != null)
|
if (uiDev != null)
|
||||||
{
|
{
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
// Got an existing page manager, get it
|
// Got an existing page manager, get it
|
||||||
if (PageManagers.ContainsKey(uiDev))
|
if (PageManagers.ContainsKey(uiDev))
|
||||||
pm = PageManagers[uiDev];
|
pm = PageManagers[uiDev];
|
||||||
// Otherwise make an apporiate one
|
// Otherwise make an apporiate one
|
||||||
@@ -1195,12 +1201,12 @@ namespace PepperDash.Essentials
|
|||||||
Parent.Show();
|
Parent.Show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (CurrentRoom.CurrentSourceInfo != null)
|
else if (routeInfo != null)
|
||||||
{
|
{
|
||||||
TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName;
|
TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName;
|
||||||
TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank"
|
TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank"
|
||||||
}
|
}
|
||||||
else
|
else // This never gets hit???!!!
|
||||||
{
|
{
|
||||||
TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "---";
|
TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "---";
|
||||||
TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Blank";
|
TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Blank";
|
||||||
|
|||||||
@@ -417,8 +417,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.SetString(textOffset + i, c.Name);
|
TriList.SetString(textOffset + i, c.Name);
|
||||||
// if it's today, show a simpler string
|
// if it's today, show a simpler string
|
||||||
string timeText = null;
|
string timeText = null;
|
||||||
if (c.StartTime.Date == DateTime.Now.Date)
|
if (c.StartTime.Date == DateTime.Now.Date)
|
||||||
timeText = c.StartTime.ToShortTimeString();
|
timeText = c.StartTime.ToShortTimeString();
|
||||||
|
else if (c.StartTime == DateTime.MinValue)
|
||||||
|
timeText = "";
|
||||||
else
|
else
|
||||||
timeText = c.StartTime.ToString();
|
timeText = c.StartTime.ToString();
|
||||||
TriList.SetString(timeTextOffset + i, timeText);
|
TriList.SetString(timeTextOffset + i, timeText);
|
||||||
@@ -678,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]);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user