mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
Merge 35167d77f9 into 2a76e2b3f9
This commit is contained in:
@@ -24,6 +24,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
CrestronConsole.AddNewConsoleCommand(ClearEventsFromGroup, "ClearAllEvents", "Clears all scheduled events for this group", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(ClearEventsFromGroup, "ClearAllEvents", "Clears all scheduled events for this group", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(ListAllEventGroups, "ListAllEventGroups", "Lists all the event groups by key", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(ListAllEventGroups, "ListAllEventGroups", "Lists all the event groups by key", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
CrestronConsole.AddNewConsoleCommand(ListAllEventsForGroup, "ListEventsForGroup",
|
||||||
|
"Lists all events for the given group", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -32,12 +36,26 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <param name="groupName"></param>
|
/// <param name="groupName"></param>
|
||||||
static void ClearEventsFromGroup(string groupName)
|
static void ClearEventsFromGroup(string groupName)
|
||||||
{
|
{
|
||||||
|
if (!EventGroups.ContainsKey(groupName))
|
||||||
|
{
|
||||||
|
Debug.Console(0,
|
||||||
|
"[Scheduler]: Unable to delete events from group '{0}'. Group not found in EventGroups dictionary.",
|
||||||
|
groupName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var group = EventGroups[groupName];
|
var group = EventGroups[groupName];
|
||||||
|
|
||||||
if (group != null)
|
if (group != null)
|
||||||
|
{
|
||||||
group.ClearAllEvents();
|
group.ClearAllEvents();
|
||||||
|
|
||||||
|
Debug.Console(0, "[Scheduler]: All events deleted from group '{0}'", groupName);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Debug.Console(0, "[Scheduler]: Unable to delete events from group '{0}'. Group not found in EventGroups dictionary.", groupName);
|
Debug.Console(0,
|
||||||
|
"[Scheduler]: Unable to delete events from group '{0}'. Group not found in EventGroups dictionary.",
|
||||||
|
groupName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ListAllEventGroups(string command)
|
static void ListAllEventGroups(string command)
|
||||||
@@ -49,6 +67,33 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ListAllEventsForGroup(string args)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "Getting events for group {0}...", args);
|
||||||
|
|
||||||
|
ScheduledEventGroup group;
|
||||||
|
|
||||||
|
if (!EventGroups.TryGetValue(args, out group))
|
||||||
|
{
|
||||||
|
Debug.Console(0, "Unabled to get event group for key {0}", args);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var evt in group.ScheduledEvents)
|
||||||
|
{
|
||||||
|
Debug.Console(0,
|
||||||
|
@"
|
||||||
|
****Event key {0}****
|
||||||
|
Event date/time: {1}
|
||||||
|
Persistent: {2}
|
||||||
|
Acknowlegable: {3}
|
||||||
|
Recurrence: {4}
|
||||||
|
Recurrence Days: {5}
|
||||||
|
********************", evt.Key, evt.Value.DateAndTime, evt.Value.Persistent, evt.Value.Acknowledgeable,
|
||||||
|
evt.Value.Recurrence.Recurrence, evt.Value.Recurrence.RecurrenceDays);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds the event group to the global list
|
/// Adds the event group to the global list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -169,10 +169,15 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
void FeatureEventGroup_UserGroupCallBack(ScheduledEvent SchEvent, ScheduledEventCommon.eCallbackReason type)
|
void FeatureEventGroup_UserGroupCallBack(ScheduledEvent SchEvent, ScheduledEventCommon.eCallbackReason type)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "{0}:{1} @ {2}", SchEvent.Name, type, DateTime.Now);
|
||||||
|
|
||||||
if (type == ScheduledEventCommon.eCallbackReason.NormalExpiration)
|
if (type == ScheduledEventCommon.eCallbackReason.NormalExpiration)
|
||||||
{
|
{
|
||||||
|
SchEvent.Acknowledge();
|
||||||
|
|
||||||
if (SchEvent.Name == FeatureEnableEventName)
|
if (SchEvent.Name == FeatureEnableEventName)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (PropertiesConfig.EnableRoomOnWhenOccupied)
|
if (PropertiesConfig.EnableRoomOnWhenOccupied)
|
||||||
FeatureEnabled = true;
|
FeatureEnabled = true;
|
||||||
|
|
||||||
@@ -248,9 +253,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
schEvent = new ScheduledEvent(name, FeatureEventGroup);
|
schEvent = new ScheduledEvent(name, FeatureEventGroup);
|
||||||
|
|
||||||
// Set up its initial properties
|
// Set up its initial properties
|
||||||
|
|
||||||
if(!schEvent.Acknowledgeable)
|
schEvent.Acknowledgeable = false;
|
||||||
schEvent.Acknowledgeable = true;
|
|
||||||
|
|
||||||
if(!schEvent.Persistent)
|
if(!schEvent.Persistent)
|
||||||
schEvent.Persistent = true;
|
schEvent.Persistent = true;
|
||||||
@@ -287,7 +291,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
Debug.Console(1, this, "Event '{0}' Absolute time set to {1}", schEvent.Name, schEvent.DateAndTime.ToString());
|
Debug.Console(1, this, "Event '{0}' Absolute time set to {1}", schEvent.Name, schEvent.DateAndTime.ToString());
|
||||||
|
|
||||||
CalculateAndSetAcknowledgeExpirationTimeout(schEvent, FeatureEnabledTime, FeatureDisabledTime);
|
//CalculateAndSetAcknowledgeExpirationTimeout(schEvent, FeatureEnabledTime, FeatureDisabledTime);
|
||||||
|
|
||||||
schEvent.Recurrence.Weekly(eventRecurrennce);
|
schEvent.Recurrence.Weekly(eventRecurrennce);
|
||||||
|
|
||||||
|
|||||||
@@ -368,21 +368,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CodecSchedule = new CodecScheduleAwareness();
|
CodecSchedule = new CodecScheduleAwareness();
|
||||||
|
|
||||||
//Set Feedback Actions
|
//Set Feedback Actions
|
||||||
CodecStatus.Status.Audio.Volume.ValueChangedAction = VolumeLevelFeedback.FireUpdate;
|
SetFeedbackActions();
|
||||||
CodecStatus.Status.Audio.VolumeMute.ValueChangedAction = MuteFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.Audio.Microphones.Mute.ValueChangedAction = PrivacyModeIsOnFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.Standby.State.ValueChangedAction = StandbyIsOnFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
|
||||||
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
|
||||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = SharingContentIsOnFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
|
||||||
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
|
||||||
|
|
||||||
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
||||||
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this);
|
eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this);
|
||||||
@@ -418,7 +406,36 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
_brandingUrl = props.UiBranding.BrandingUrl;
|
_brandingUrl = props.UiBranding.BrandingUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
private void SetFeedbackActions()
|
||||||
|
{
|
||||||
|
CodecStatus.Status.Audio.Volume.ValueChangedAction = VolumeLevelFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Audio.VolumeMute.ValueChangedAction = MuteFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Audio.Microphones.Mute.ValueChangedAction = PrivacyModeIsOnFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Standby.State.ValueChangedAction = StandbyIsOnFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
||||||
|
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
||||||
|
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = SharingContentIsOnFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Error setting MainVideuMute Action: {0}", ex);
|
||||||
|
|
||||||
|
if (ex.InnerException != null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Error setting MainVideuMute Action: {0}", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
/// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input
|
/// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input
|
||||||
/// to enable routing
|
/// to enable routing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Newtonsoft.Json;
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
{
|
{
|
||||||
@@ -1680,6 +1681,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public MainVideoSource MainVideoSource { get; set; }
|
public MainVideoSource MainVideoSource { get; set; }
|
||||||
public MainVideoMute MainVideoMute { get; set; }
|
public MainVideoMute MainVideoMute { get; set; }
|
||||||
public List<Source> Source { get; set; }
|
public List<Source> Source { get; set; }
|
||||||
|
|
||||||
|
public Input2()
|
||||||
|
{
|
||||||
|
MainVideoMute = new MainVideoMute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Local : ValueProperty
|
public class Local : ValueProperty
|
||||||
@@ -1875,6 +1881,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
Selfview = new Selfview();
|
Selfview = new Selfview();
|
||||||
Layout = new Layout();
|
Layout = new Layout();
|
||||||
|
Input = new Input2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user