mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-22 16:15:08 +00:00
Compare commits
6 Commits
v2.24.1-ge
...
v2.20.7-wo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b6f1907c6 | ||
|
|
54da30a650 | ||
|
|
475c16b9c2 | ||
|
|
81aab0b8c1 | ||
|
|
770d7fa0ea | ||
|
|
5f292cacd9 |
@@ -10,7 +10,8 @@ jobs:
|
|||||||
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
|
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
build-4Series:
|
build-4Series:
|
||||||
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-4Series-builds.yml@main
|
# uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-4Series-builds.yml@main
|
||||||
|
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-4Series-builds.yml@reorder-steps
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
needs: getVersion
|
needs: getVersion
|
||||||
if: needs.getVersion.outputs.newVersion == 'true'
|
if: needs.getVersion.outputs.newVersion == 'true'
|
||||||
|
|||||||
@@ -77,6 +77,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// A name that will override the source's name on the UI
|
/// A name that will override the source's name on the UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Name
|
||||||
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -14,14 +14,13 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Timers;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Fusion
|
namespace PepperDash.Essentials.Core.Fusion
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a EssentialsHuddleSpaceFusionSystemControllerBase
|
/// Represents a EssentialsHuddleSpaceFusionSystemControllerBase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class IEssentialsRoomFusionController : EssentialsDevice, IOccupancyStatusProvider, IFusionHelpRequest, IHasFeedback
|
public class IEssentialsRoomFusionController : EssentialsDevice, IOccupancyStatusProvider, IFusionHelpRequest
|
||||||
{
|
{
|
||||||
private IEssentialsRoomFusionControllerPropertiesConfig _config;
|
private IEssentialsRoomFusionControllerPropertiesConfig _config;
|
||||||
|
|
||||||
@@ -88,17 +87,15 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public StringFeedback HelpRequestStatusFeedback { get; private set; }
|
public StringFeedback HelpRequestStatusFeedback { get; private set; }
|
||||||
|
|
||||||
private Timer _helpRequestTimeoutTimer;
|
|
||||||
|
|
||||||
/// <summary>
|
#region System Info Sigs
|
||||||
/// Gets the DefaultHelpRequestTimeoutMs
|
|
||||||
/// </summary>
|
|
||||||
public int HelpRequestTimeoutMs => _config.HelpRequestTimeoutMs;
|
|
||||||
|
|
||||||
/// <summary>
|
//StringSigData SystemName;
|
||||||
/// Gets whether to use a timer for help requests
|
//StringSigData Model;
|
||||||
/// </summary>
|
//StringSigData SerialNumber;
|
||||||
public bool UseHelpRequestTimer => _config.UseTimeoutForHelpRequests;
|
//StringSigData Uptime;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Processor Info Sigs
|
#region Processor Info Sigs
|
||||||
|
|
||||||
@@ -243,19 +240,6 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
this.LogDebug("Occupancy setup complete");
|
this.LogDebug("Occupancy setup complete");
|
||||||
|
|
||||||
HelpRequestResponseFeedback = new StringFeedback("HelpRequestResponse", () => FusionRoom.Help.OutputSig.StringValue);
|
|
||||||
|
|
||||||
HelpRequestSentFeedback = new BoolFeedback("HelpRequestSent", () => _helpRequestSent);
|
|
||||||
HelpRequestStatusFeedback = new StringFeedback("HelpRequestStatus", () => _helpRequestStatus.ToString());
|
|
||||||
|
|
||||||
Feedbacks.Add(HelpRequestResponseFeedback);
|
|
||||||
Feedbacks.Add(HelpRequestSentFeedback);
|
|
||||||
Feedbacks.Add(HelpRequestStatusFeedback);
|
|
||||||
if (RoomOccupancyRemoteStringFeedback != null)
|
|
||||||
Feedbacks.Add(RoomOccupancyRemoteStringFeedback);
|
|
||||||
if (RoomIsOccupiedFeedback != null)
|
|
||||||
Feedbacks.Add(RoomIsOccupiedFeedback);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -319,6 +303,10 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
FusionRVI.GenerateFileForAllFusionDevices();
|
FusionRVI.GenerateFileForAllFusionDevices();
|
||||||
|
|
||||||
|
HelpRequestResponseFeedback = new StringFeedback("HelpRequestResponse", () => FusionRoom.Help.OutputSig.StringValue);
|
||||||
|
|
||||||
|
HelpRequestSentFeedback = new BoolFeedback("HelpRequestSent", () => _helpRequestSent);
|
||||||
|
HelpRequestStatusFeedback = new StringFeedback("HelpRequestStatus", () => _helpRequestStatus.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -351,11 +339,6 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public FeedbackCollection<Feedback> Feedbacks { get; private set; } = new FeedbackCollection<Feedback>();
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ScheduleChange event
|
/// ScheduleChange event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1789,7 +1772,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
{
|
{
|
||||||
if (args.EventId == FusionEventIds.HelpMessageReceivedEventId)
|
if (args.EventId == FusionEventIds.HelpMessageReceivedEventId)
|
||||||
{
|
{
|
||||||
this.LogInformation("Help message received from Fusion for room '{0}'",
|
this.LogInformation( "Help message received from Fusion for room '{0}'",
|
||||||
Room.Name);
|
Room.Name);
|
||||||
|
|
||||||
this.LogDebug("Help message content: {0}", FusionRoom.Help.OutputSig.StringValue);
|
this.LogDebug("Help message content: {0}", FusionRoom.Help.OutputSig.StringValue);
|
||||||
@@ -1808,7 +1791,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
break;
|
break;
|
||||||
case "Please call the helpdesk.":
|
case "Please call the helpdesk.":
|
||||||
// this.LogInformation("Please call the helpdesk.");
|
// this.LogInformation("Please call the helpdesk.");
|
||||||
_helpRequestStatus = eFusionHelpResponse.CallHelpDesk;
|
// _helpRequestStatus = eFusionHelpResponse.CallHelpDesk;
|
||||||
break;
|
break;
|
||||||
case "Please wait, I will reschedule your meeting to a different room.":
|
case "Please wait, I will reschedule your meeting to a different room.":
|
||||||
// this.LogInformation("Please wait, I will reschedule your meeting to a different room.",
|
// this.LogInformation("Please wait, I will reschedule your meeting to a different room.",
|
||||||
@@ -1835,21 +1818,13 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
_helpRequestStatus = eFusionHelpResponse.None;
|
_helpRequestStatus = eFusionHelpResponse.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_helpRequestStatus == eFusionHelpResponse.None)
|
if(_helpRequestStatus == eFusionHelpResponse.None)
|
||||||
{
|
{
|
||||||
_helpRequestSent = false;
|
_helpRequestSent = false;
|
||||||
HelpRequestSentFeedback.FireUpdate();
|
HelpRequestSentFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
HelpRequestStatusFeedback.FireUpdate();
|
HelpRequestStatusFeedback.FireUpdate();
|
||||||
|
|
||||||
if (_helpRequestTimeoutTimer != null)
|
|
||||||
{
|
|
||||||
_helpRequestTimeoutTimer.Stop();
|
|
||||||
_helpRequestTimeoutTimer.Elapsed -= OnTimedEvent;
|
|
||||||
_helpRequestTimeoutTimer.Dispose();
|
|
||||||
_helpRequestTimeoutTimer = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1920,34 +1895,10 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
_helpRequestSent = true;
|
_helpRequestSent = true;
|
||||||
HelpRequestSentFeedback.FireUpdate();
|
HelpRequestSentFeedback.FireUpdate();
|
||||||
|
|
||||||
if (UseHelpRequestTimer)
|
|
||||||
{
|
|
||||||
if (_helpRequestTimeoutTimer == null)
|
|
||||||
{
|
|
||||||
_helpRequestTimeoutTimer = new Timer(HelpRequestTimeoutMs);
|
|
||||||
_helpRequestTimeoutTimer.AutoReset = false;
|
|
||||||
_helpRequestTimeoutTimer.Enabled = true;
|
|
||||||
|
|
||||||
_helpRequestTimeoutTimer.Elapsed += OnTimedEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
_helpRequestTimeoutTimer.Interval = HelpRequestTimeoutMs;
|
|
||||||
_helpRequestTimeoutTimer.Start();
|
|
||||||
|
|
||||||
this.LogDebug("Help request timeout timer started for room '{0}' with timeout of {1} ms.",
|
|
||||||
Room.Name, HelpRequestTimeoutMs);
|
|
||||||
}
|
|
||||||
|
|
||||||
_helpRequestStatus = eFusionHelpResponse.HelpRequested;
|
_helpRequestStatus = eFusionHelpResponse.HelpRequested;
|
||||||
HelpRequestStatusFeedback.FireUpdate();
|
HelpRequestStatusFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTimedEvent(object source, ElapsedEventArgs e)
|
|
||||||
{
|
|
||||||
this.LogInformation("Help request timeout reached for room '{0}'. Cancelling help request.", Room.Name);
|
|
||||||
CancelHelpRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void CancelHelpRequest()
|
public void CancelHelpRequest()
|
||||||
{
|
{
|
||||||
@@ -1958,16 +1909,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
HelpRequestSentFeedback.FireUpdate();
|
HelpRequestSentFeedback.FireUpdate();
|
||||||
_helpRequestStatus = eFusionHelpResponse.None;
|
_helpRequestStatus = eFusionHelpResponse.None;
|
||||||
HelpRequestStatusFeedback.FireUpdate();
|
HelpRequestStatusFeedback.FireUpdate();
|
||||||
Debug.LogMessage(LogEventLevel.Information, this, "Help request cancelled for room '{0}'", Room.Name);
|
Debug.LogMessage(LogEventLevel.Information, this, "Help request cancelled in Fusion for room '{0}'", Room.Name);
|
||||||
}
|
|
||||||
|
|
||||||
if (_helpRequestTimeoutTimer != null)
|
|
||||||
{
|
|
||||||
_helpRequestTimeoutTimer.Stop();
|
|
||||||
_helpRequestTimeoutTimer.Elapsed -= OnTimedEvent;
|
|
||||||
_helpRequestTimeoutTimer.Dispose();
|
|
||||||
_helpRequestTimeoutTimer = null;
|
|
||||||
this.LogDebug("Help request timeout timer stopped for room '{0}'.", Room.Name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,16 +56,4 @@ public class IEssentialsRoomFusionControllerPropertiesConfig
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("use24HourTimeFormat")]
|
[JsonProperty("use24HourTimeFormat")]
|
||||||
public bool Use24HourTimeFormat { get; set; } = false;
|
public bool Use24HourTimeFormat { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets whether to use a timeout for help requests
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("useTimeoutForHelpRequests")]
|
|
||||||
public bool UseTimeoutForHelpRequests { get; set; } = false;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the timeout duration for help requests in milliseconds
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("helpRequestTimeoutMs")]
|
|
||||||
public int HelpRequestTimeoutMs { get; set; } = 30000;
|
|
||||||
}
|
}
|
||||||
@@ -105,21 +105,12 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomPropertiesConfig
|
public class EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the Addresses
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("addresses")]
|
[JsonProperty("addresses")]
|
||||||
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the Description
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the Emergency
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("emergency")]
|
[JsonProperty("emergency")]
|
||||||
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
public EssentialsRoomEmergencyConfig Emergency { get; set; }
|
||||||
|
|
||||||
@@ -235,11 +226,11 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// Indicates if this room represents a combination of other rooms
|
/// Indicates if this room represents a combination of other rooms
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("isRoomCombinationScenario")]
|
[JsonProperty("isRoomCombinationScenario")]
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the IsRoomCombinationScenario
|
||||||
|
/// </summary>
|
||||||
public bool IsRoomCombinationScenario { get; set; }
|
public bool IsRoomCombinationScenario { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Constructor
|
|
||||||
/// </summary>
|
|
||||||
public EssentialsRoomPropertiesConfig()
|
public EssentialsRoomPropertiesConfig()
|
||||||
{
|
{
|
||||||
LogoLight = new EssentialsLogoPropertiesConfig();
|
LogoLight = new EssentialsLogoPropertiesConfig();
|
||||||
@@ -252,10 +243,10 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomUiBehaviorConfig
|
public class EssentialsRoomUiBehaviorConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("disableActivityButtonsWhileWarmingCooling")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DisableActivityButtonsWhileWarmingCooling
|
/// Gets or sets the DisableActivityButtonsWhileWarmingCooling
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("disableActivityButtonsWhileWarmingCooling")]
|
|
||||||
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
|
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,86 +255,74 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("defaultAudioKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DefaultAudioKey
|
/// Gets or sets the DefaultAudioKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("defaultAudioKey")]
|
|
||||||
public string DefaultAudioKey { get; set; }
|
public string DefaultAudioKey { get; set; }
|
||||||
|
[JsonProperty("sourceListKey")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the DefaultOnDspPresetKey
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("defaultOnDspPresetKey")]
|
|
||||||
public string DefaultOnDspPresetKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the DefaultOffDspPresetKey
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("defaultOffDspPresetKey")]
|
|
||||||
public string DefaultOffDspPresetKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the SourceListKey
|
/// Gets or sets the SourceListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("sourceListKey")]
|
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
|
[JsonProperty("destinationListKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DestinationListKey
|
/// Gets or sets the DestinationListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("destinationListKey")]
|
|
||||||
public string DestinationListKey { get; set; }
|
public string DestinationListKey { get; set; }
|
||||||
|
[JsonProperty("audioControlPointListKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the AudioControlPointListKey
|
/// Gets or sets the AudioControlPointListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("audioControlPointListKey")]
|
|
||||||
public string AudioControlPointListKey { get; set; }
|
public string AudioControlPointListKey { get; set; }
|
||||||
|
[JsonProperty("cameraListKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the CameraListKey
|
/// Gets or sets the CameraListKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("cameraListKey")]
|
|
||||||
public string CameraListKey { get; set; }
|
public string CameraListKey { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[JsonProperty("defaultSourceItem")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DefaultSourceItem
|
/// Gets or sets the DefaultSourceItem
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("defaultSourceItem")]
|
|
||||||
public string DefaultSourceItem { get; set; }
|
public string DefaultSourceItem { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if the room supports advanced sharing
|
/// Indicates if the room supports advanced sharing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("supportsAdvancedSharing")]
|
[JsonProperty("supportsAdvancedSharing")]
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the SupportsAdvancedSharing
|
||||||
|
/// </summary>
|
||||||
public bool SupportsAdvancedSharing { get; set; }
|
public bool SupportsAdvancedSharing { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if non-tech users can change the share mode
|
/// Indicates if non-tech users can change the share mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("userCanChangeShareMode")]
|
[JsonProperty("userCanChangeShareMode")]
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the UserCanChangeShareMode
|
||||||
|
/// </summary>
|
||||||
public bool UserCanChangeShareMode { get; set; }
|
public bool UserCanChangeShareMode { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the MatrixRoutingKey
|
/// Gets or sets the MatrixRoutingKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)]
|
|
||||||
public string MatrixRoutingKey { get; set; }
|
public string MatrixRoutingKey { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents a EssentialsConferenceRoomPropertiesConfig
|
|
||||||
/// </summary>
|
|
||||||
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("videoCodecKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the VideoCodecKey
|
/// Gets or sets the VideoCodecKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("videoCodecKey")]
|
|
||||||
public string VideoCodecKey { get; set; }
|
public string VideoCodecKey { get; set; }
|
||||||
|
[JsonProperty("audioCodecKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the AudioCodecKey
|
/// Gets or sets the AudioCodecKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("audioCodecKey")]
|
|
||||||
public string AudioCodecKey { get; set; }
|
public string AudioCodecKey { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -358,15 +337,12 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("deviceKeys")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DeviceKeys
|
/// Gets or sets the DeviceKeys
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("deviceKeys")]
|
|
||||||
public List<string> DeviceKeys { get; set; }
|
public List<string> DeviceKeys { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Constructor
|
|
||||||
/// </summary>
|
|
||||||
public EssentialsEnvironmentPropertiesConfig()
|
public EssentialsEnvironmentPropertiesConfig()
|
||||||
{
|
{
|
||||||
DeviceKeys = new List<string>();
|
DeviceKeys = new List<string>();
|
||||||
@@ -379,9 +355,6 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomFusionConfig
|
public class EssentialsRoomFusionConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets the the IpId as a UInt16
|
|
||||||
/// </summary>
|
|
||||||
public uint IpIdInt
|
public uint IpIdInt
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -398,16 +371,16 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonProperty("ipId")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the IpId
|
/// Gets or sets the IpId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("ipId")]
|
|
||||||
public string IpId { get; set; }
|
public string IpId { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("joinMapKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the JoinMapKey
|
/// Gets or sets the JoinMapKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("joinMapKey")]
|
|
||||||
public string JoinMapKey { get; set; }
|
public string JoinMapKey { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -417,16 +390,16 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomMicrophonePrivacyConfig
|
public class EssentialsRoomMicrophonePrivacyConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("deviceKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DeviceKey
|
/// Gets or sets the DeviceKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("deviceKey")]
|
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("behaviour")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Behaviour
|
/// Gets or sets the Behaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("behaviour")]
|
|
||||||
public string Behaviour { get; set; }
|
public string Behaviour { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,15 +408,12 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsHelpPropertiesConfig
|
public class EssentialsHelpPropertiesConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("message")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Message
|
/// Gets or sets the Message
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("message")]
|
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the ShowCallButton
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("showCallButton")]
|
[JsonProperty("showCallButton")]
|
||||||
public bool ShowCallButton { get; set; }
|
public bool ShowCallButton { get; set; }
|
||||||
|
|
||||||
@@ -451,11 +421,11 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// Defaults to "Call Help Desk"
|
/// Defaults to "Call Help Desk"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("callButtonText")]
|
[JsonProperty("callButtonText")]
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the CallButtonText
|
||||||
|
/// </summary>
|
||||||
public string CallButtonText { get; set; }
|
public string CallButtonText { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Constructor
|
|
||||||
/// </summary>
|
|
||||||
public EssentialsHelpPropertiesConfig()
|
public EssentialsHelpPropertiesConfig()
|
||||||
{
|
{
|
||||||
CallButtonText = "Call Help Desk";
|
CallButtonText = "Call Help Desk";
|
||||||
@@ -467,28 +437,22 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsOneButtonMeetingPropertiesConfig
|
public class EssentialsOneButtonMeetingPropertiesConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("enable")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Enable
|
/// Gets or sets the Enable
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("enable")]
|
|
||||||
public bool Enable { get; set; }
|
public bool Enable { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents a EssentialsRoomAddressPropertiesConfig
|
|
||||||
/// </summary>
|
|
||||||
public class EssentialsRoomAddressPropertiesConfig
|
public class EssentialsRoomAddressPropertiesConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the PhoneNumber
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("phoneNumber")]
|
[JsonProperty("phoneNumber")]
|
||||||
public string PhoneNumber { get; set; }
|
public string PhoneNumber { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("sipAddress")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the SipAddress
|
/// Gets or sets the SipAddress
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("sipAddress")]
|
|
||||||
public string SipAddress { get; set; }
|
public string SipAddress { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,18 +462,14 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsLogoPropertiesConfig
|
public class EssentialsLogoPropertiesConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("type")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Type
|
/// Gets or sets the Type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("type")]
|
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the Url
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("url")]
|
[JsonProperty("url")]
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// GetLogoUrlLight method
|
/// GetLogoUrlLight method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -542,28 +502,22 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsRoomOccSensorConfig
|
public class EssentialsRoomOccSensorConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("deviceKey")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DeviceKey
|
/// Gets or sets the DeviceKey
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("deviceKey")]
|
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the TimeoutMinutes
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("timeoutMinutes")]
|
[JsonProperty("timeoutMinutes")]
|
||||||
public int TimeoutMinutes { get; set; }
|
public int TimeoutMinutes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Represents a EssentialsRoomTechConfig
|
|
||||||
/// </summary>
|
|
||||||
public class EssentialsRoomTechConfig
|
public class EssentialsRoomTechConfig
|
||||||
{
|
{
|
||||||
|
[JsonProperty("password")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Password
|
/// Gets or sets the Password
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("password")]
|
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using Crestron.SimplSharpPro.Keypads;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using Crestron.SimplSharpPro.Keypads;
|
|
||||||
using PepperDash.Essentials.Core.Queues;
|
using PepperDash.Essentials.Core.Queues;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using Debug = PepperDash.Core.Debug;
|
using Debug = PepperDash.Core.Debug;
|
||||||
|
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
public static (RouteDescriptor, RouteDescriptor) GetRouteToSource(this IRoutingInputs destination, IRoutingOutputs source, eRoutingSignalType signalType, RoutingInputPort destinationPort, RoutingOutputPort sourcePort)
|
public static (RouteDescriptor, RouteDescriptor) GetRouteToSource(this IRoutingInputs destination, IRoutingOutputs source, eRoutingSignalType signalType, RoutingInputPort destinationPort, RoutingOutputPort sourcePort)
|
||||||
{
|
{
|
||||||
// if it's a single signal type, find the route
|
// if it's a single signal type, find the route
|
||||||
if (!signalType.HasFlag(eRoutingSignalType.AudioVideo) &&
|
if (!signalType.HasFlag(eRoutingSignalType.AudioVideo) &&
|
||||||
!(signalType.HasFlag(eRoutingSignalType.Video) && signalType.HasFlag(eRoutingSignalType.SecondaryAudio)))
|
!(signalType.HasFlag(eRoutingSignalType.Video) && signalType.HasFlag(eRoutingSignalType.SecondaryAudio)))
|
||||||
{
|
{
|
||||||
var singleTypeRouteDescriptor = new RouteDescriptor(source, destination, destinationPort, signalType);
|
var singleTypeRouteDescriptor = new RouteDescriptor(source, destination, destinationPort, signalType);
|
||||||
@@ -134,15 +134,14 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
// otherwise, audioVideo needs to be handled as two steps.
|
// otherwise, audioVideo needs to be handled as two steps.
|
||||||
|
|
||||||
Debug.LogMessage(LogEventLevel.Debug, "Attempting to build source route from {sourceKey} of type {type}", destination, source.Key, signalType);
|
Debug.LogMessage(LogEventLevel.Debug, "Attempting to build source route from {sourceKey} of type {type}", destination, source.Key);
|
||||||
|
|
||||||
RouteDescriptor audioRouteDescriptor;
|
RouteDescriptor audioRouteDescriptor;
|
||||||
|
|
||||||
if (signalType.HasFlag(eRoutingSignalType.SecondaryAudio))
|
if (signalType.HasFlag(eRoutingSignalType.SecondaryAudio))
|
||||||
{
|
{
|
||||||
audioRouteDescriptor = new RouteDescriptor(source, destination, destinationPort, eRoutingSignalType.SecondaryAudio);
|
audioRouteDescriptor = new RouteDescriptor(source, destination, destinationPort, eRoutingSignalType.SecondaryAudio);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
audioRouteDescriptor = new RouteDescriptor(source, destination, destinationPort, eRoutingSignalType.Audio);
|
audioRouteDescriptor = new RouteDescriptor(source, destination, destinationPort, eRoutingSignalType.Audio);
|
||||||
}
|
}
|
||||||
@@ -200,13 +199,13 @@ namespace PepperDash.Essentials.Core
|
|||||||
Source = source,
|
Source = source,
|
||||||
SourcePort = sourcePort,
|
SourcePort = sourcePort,
|
||||||
SignalType = signalType
|
SignalType = signalType
|
||||||
};
|
};
|
||||||
|
|
||||||
var coolingDevice = destination as IWarmingCooling;
|
var coolingDevice = destination as IWarmingCooling;
|
||||||
|
|
||||||
//We already have a route request for this device, and it's a cooling device and is cooling
|
//We already have a route request for this device, and it's a cooling device and is cooling
|
||||||
if (RouteRequests.TryGetValue(destination.Key, out RouteRequest existingRouteRequest) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
|
if (RouteRequests.TryGetValue(destination.Key, out RouteRequest existingRouteRequest) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
|
||||||
{
|
{
|
||||||
coolingDevice.IsCoolingDownFeedback.OutputChange -= existingRouteRequest.HandleCooldown;
|
coolingDevice.IsCoolingDownFeedback.OutputChange -= existingRouteRequest.HandleCooldown;
|
||||||
|
|
||||||
coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown;
|
coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown;
|
||||||
@@ -220,7 +219,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
//New Request
|
//New Request
|
||||||
if (coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
|
if (coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
|
||||||
{
|
{
|
||||||
coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown;
|
coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown;
|
||||||
|
|
||||||
RouteRequests.Add(destination.Key, routeRequest);
|
RouteRequests.Add(destination.Key, routeRequest);
|
||||||
@@ -240,9 +239,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
Debug.LogMessage(LogEventLevel.Information, "Device: {destination} is NOT cooling down. Removing stored route request and routing to source key: {sourceKey}", null, destination.Key, routeRequest.Source.Key);
|
Debug.LogMessage(LogEventLevel.Information, "Device: {destination} is NOT cooling down. Removing stored route request and routing to source key: {sourceKey}", null, destination.Key, routeRequest.Source.Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
routeRequestQueue.Enqueue(new ReleaseRouteQueueItem(ReleaseRouteInternal, destination, destinationPort?.Key ?? string.Empty, false));
|
routeRequestQueue.Enqueue(new ReleaseRouteQueueItem(ReleaseRouteInternal, destination,destinationPort?.Key ?? string.Empty, false));
|
||||||
|
|
||||||
routeRequestQueue.Enqueue(new RouteRequestQueueItem(RunRouteRequest, routeRequest));
|
routeRequestQueue.Enqueue(new RouteRequestQueueItem(RunRouteRequest, routeRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -273,8 +272,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
audioOrSingleRoute.ExecuteRoutes();
|
audioOrSingleRoute.ExecuteRoutes();
|
||||||
videoRoute?.ExecuteRoutes();
|
videoRoute?.ExecuteRoutes();
|
||||||
}
|
} catch(Exception ex)
|
||||||
catch (Exception ex)
|
|
||||||
{
|
{
|
||||||
Debug.LogMessage(ex, "Exception Running Route Request {request}", null, request);
|
Debug.LogMessage(ex, "Exception Running Route Request {request}", null, request);
|
||||||
}
|
}
|
||||||
@@ -307,10 +305,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
Debug.LogMessage(LogEventLevel.Information, "Releasing current route: {0}", destination, current.Source.Key);
|
Debug.LogMessage(LogEventLevel.Information, "Releasing current route: {0}", destination, current.Source.Key);
|
||||||
current.ReleaseRoutes(clearRoute);
|
current.ReleaseRoutes(clearRoute);
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception ex)
|
||||||
catch (Exception ex)
|
|
||||||
{
|
{
|
||||||
Debug.LogMessage(ex, "Exception releasing route for '{destination}':'{inputPortKey}'", null, destination?.Key ?? null, string.IsNullOrEmpty(inputPortKey) ? "auto" : inputPortKey);
|
Debug.LogMessage(ex, "Exception releasing route for '{destination}':'{inputPortKey}'",null, destination?.Key ?? null, string.IsNullOrEmpty(inputPortKey) ? "auto" : inputPortKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Core.Logging;
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.Generic
|
namespace PepperDash.Essentials.Devices.Common.Generic
|
||||||
@@ -12,17 +9,8 @@ namespace PepperDash.Essentials.Devices.Common.Generic
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a GenericSink
|
/// Represents a GenericSink
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GenericSink : EssentialsDevice, IRoutingSinkWithSwitchingWithInputPort, ICurrentSources
|
public class GenericSink : EssentialsDevice, IRoutingSinkWithSwitchingWithInputPort
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
|
||||||
public Dictionary<eRoutingSignalType, SourceListItem> CurrentSources { get; private set; }
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public Dictionary<eRoutingSignalType, string> CurrentSourceKeys { get; private set; }
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public event EventHandler CurrentSourcesChanged;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the GenericSink class
|
/// Initializes a new instance of the GenericSink class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -35,65 +23,6 @@ namespace PepperDash.Essentials.Devices.Common.Generic
|
|||||||
var inputPort = new RoutingInputPort(RoutingPortNames.AnyVideoIn, eRoutingSignalType.AudioVideo | eRoutingSignalType.SecondaryAudio, eRoutingPortConnectionType.Hdmi, null, this);
|
var inputPort = new RoutingInputPort(RoutingPortNames.AnyVideoIn, eRoutingSignalType.AudioVideo | eRoutingSignalType.SecondaryAudio, eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
|
|
||||||
InputPorts.Add(inputPort);
|
InputPorts.Add(inputPort);
|
||||||
|
|
||||||
CurrentSources = new Dictionary<eRoutingSignalType, SourceListItem>
|
|
||||||
{
|
|
||||||
{ eRoutingSignalType.Audio, null },
|
|
||||||
{ eRoutingSignalType.Video, null },
|
|
||||||
};
|
|
||||||
|
|
||||||
CurrentSourceKeys = new Dictionary<eRoutingSignalType, string>
|
|
||||||
{
|
|
||||||
{ eRoutingSignalType.Audio, string.Empty },
|
|
||||||
{ eRoutingSignalType.Video, string.Empty },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public void SetCurrentSource(eRoutingSignalType signalType, string sourceListKey, SourceListItem sourceListItem)
|
|
||||||
{
|
|
||||||
foreach (eRoutingSignalType type in Enum.GetValues(typeof(eRoutingSignalType)))
|
|
||||||
{
|
|
||||||
var flagValue = Convert.ToInt32(type);
|
|
||||||
// Skip if flagValue is 0 or not a power of two (i.e., not a single-bit flag).
|
|
||||||
// (flagValue & (flagValue - 1)) != 0 checks if more than one bit is set.
|
|
||||||
if (flagValue == 0 || (flagValue & (flagValue - 1)) != 0)
|
|
||||||
{
|
|
||||||
this.LogDebug("Skipping {type}", type);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.LogDebug("setting {type}", type);
|
|
||||||
|
|
||||||
if (signalType.HasFlag(type))
|
|
||||||
{
|
|
||||||
UpdateCurrentSources(type, sourceListKey, sourceListItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Raise the CurrentSourcesChanged event
|
|
||||||
CurrentSourcesChanged?.Invoke(this, EventArgs.Empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateCurrentSources(eRoutingSignalType signalType, string sourceListKey, SourceListItem sourceListItem)
|
|
||||||
{
|
|
||||||
if (CurrentSources.ContainsKey(signalType))
|
|
||||||
{
|
|
||||||
CurrentSources[signalType] = sourceListItem;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CurrentSources.Add(signalType, sourceListItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the current source key for the specified signal type
|
|
||||||
if (CurrentSourceKeys.ContainsKey(signalType))
|
|
||||||
{
|
|
||||||
CurrentSourceKeys[signalType] = sourceListKey;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CurrentSourceKeys.Add(signalType, sourceListKey);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -144,7 +73,7 @@ namespace PepperDash.Essentials.Devices.Common.Generic
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void ExecuteSwitch(object inputSelector)
|
public void ExecuteSwitch(object inputSelector)
|
||||||
{
|
{
|
||||||
this.LogDebug("GenericSink Executing Switch to: {inputSelector}", inputSelector);
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user