-
Notifications
You must be signed in to change notification settings - Fork 84
Fix cecportcontroller null streamcec guard #1448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8817d70
feat: add interfaces for VLAN and PoE management in network switches
ndorin 76311b8
feat: add event and arguments for port state changes in network switc…
ndorin 6db7581
feat: add Unknown event type to NetworkSwitchPortEventType enum for i…
ndorin 84c730b
feat: enhance NetworkSwitchPortEventType enum with additional states …
ndorin 1b10910
fix: update GetFeedbacksForDeviceRequestHandler to return JSON respon…
ndorin d0ab42c
Merge branch 'feature/add-network-switch-poe-interfaces' into feature…
ndorin 2121734
Merge branch 'main' into feature/web-api-updates
erikdred 94c9e75
Merge branch 'main' into feature/web-api-updates
ngenovese11 6587444
fix: update routing logic and enhance logging in Extensions and MockV…
ndorin 92d13f2
fix: refine routing logic by filtering IRoutingInputs and IRoutingOut…
ndorin 74a12c9
fix: add null or empty checks for midpoint keys in RoutingFeedbackMan…
ndorin b32bab0
fix: remove impossibleRoutes cache
andrew-welker 162a06f
feat: adds interface for wireless sharing
aknous d18fca8
fix: handle null properties in DeviceMessageBase and DeviceStateMessa…
ndorin 6a4e3d5
feat: add port forwarding functionality for debug websocket in DebugS…
jkdevito a7b8392
Potential fix for pull request finding
equinoy e03e45c
Potential fix for pull request finding
equinoy b982219
Potential fix for pull request finding
equinoy a220474
Potential fix for pull request finding
equinoy 8d3edde
feat: adds config props to disable power on/off automation
aknous aa76551
fix: guard CecPortController against null StreamCec and lazily subscribe
erikdred f4cb173
Potential fix for pull request finding
erikdred fbf4c56
Potential fix for pull request finding
erikdred 36c15b8
Clarify CecPortController subscription XML comment
Copilot 14cd082
Remove redundant IRoutingInputsOutputs filtering in route mapping loops
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasWirelessSharing.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| using System; | ||
|
|
||
| namespace PepperDash.Essentials.Core.DeviceTypeInterfaces | ||
| { | ||
| /// <summary> | ||
| /// Defines the contract for a wireless presentation endpoint that reports whether a wireless | ||
| /// sharing session is currently active. Implemented by platforms such as Crestron AirMedia, | ||
| /// Mersive Solstice, Barco ClickShare, Miracast/Teams receivers, etc. Allows consumers (e.g. | ||
| /// room plugins) to react to wireless sharing activity without taking a dependency on any | ||
| /// concrete device implementation. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// This refers specifically to wireless screen/device mirroring, as distinct from in-call | ||
| /// content sharing on a video conference. | ||
| /// </remarks> | ||
| public interface IHasWirelessSharing | ||
| { | ||
| /// <summary> | ||
| /// Reports whether a wireless sharing session is currently active (content is being presented). | ||
| /// </summary> | ||
| BoolFeedback IsSharingFeedback { get; } | ||
|
|
||
| /// <summary> | ||
| /// Raised when wireless sharing starts or stops. The event args carry the new sharing state. | ||
| /// </summary> | ||
| event EventHandler<WirelessSharingEventArgs> SharingChanged; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Event arguments describing a change in wireless sharing state. | ||
| /// </summary> | ||
| public class WirelessSharingEventArgs : EventArgs | ||
| { | ||
| /// <summary> | ||
| /// True if a wireless sharing session is active (content is being presented), false otherwise. | ||
| /// </summary> | ||
| public bool IsSharing { get; private set; } | ||
|
|
||
| /// <summary> | ||
| /// Creates a new <see cref="WirelessSharingEventArgs"/>. | ||
| /// </summary> | ||
| /// <param name="isSharing">True if a wireless sharing session is active, false otherwise.</param> | ||
| public WirelessSharingEventArgs(bool isSharing) | ||
| { | ||
| IsSharing = isSharing; | ||
| } | ||
| } | ||
| } |
122 changes: 122 additions & 0 deletions
122
src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INetworkSwitchControl.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| using System; | ||
|
|
||
| namespace PepperDash.Essentials.Core.DeviceTypeInterfaces | ||
| { | ||
| /// <summary> | ||
| /// Interface for network switches that support VLAN assignment on individual ports. | ||
| /// </summary> | ||
| public interface INetworkSwitchVlanManager | ||
| { | ||
| /// <summary> | ||
| /// Returns the current access VLAN ID configured on the port. | ||
| /// Return -1 when the value is unavailable (e.g. the switch has not been polled yet | ||
| /// or the implementation does not support VLAN queries). | ||
| /// </summary> | ||
| /// <param name="port">Switch port identifier</param> | ||
| /// <returns>VLAN ID or -1 when unavailable</returns> | ||
| int GetPortCurrentVlan(string port); | ||
|
|
||
| /// <summary> | ||
| /// Changes the access VLAN of a single switch port. | ||
| /// The implementation is responsible for entering/exiting privileged/config mode. | ||
| /// </summary> | ||
| /// <param name="port">Switch port identifier (e.g. "1/0/3" for Netgear, "gi1/0/3" for Cisco)</param> | ||
| /// <param name="vlanId">Target VLAN ID (1-4093)</param> | ||
| void SetPortVlan(string port, uint vlanId); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Interface for network switches that support Power over Ethernet (PoE) control on individual ports. | ||
| /// </summary> | ||
| public interface INetworkSwitchPoeManager | ||
| { | ||
| /// <summary> | ||
| /// Enables or disables PoE power delivery on a single switch port. | ||
| /// The implementation is responsible for entering/exiting privileged/config mode. | ||
| /// </summary> | ||
| /// <param name="port">Switch port identifier</param> | ||
| /// <param name="enabled">True to enable PoE; false to disable PoE</param> | ||
| void SetPortPoeState(string port, bool enabled); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Standardized interface for network switch devices that support per-port PoE control | ||
| /// and VLAN assignment. | ||
| /// </summary> | ||
| public interface INetworkSwitchPoeVlanManager : INetworkSwitchVlanManager, INetworkSwitchPoeManager | ||
| { | ||
| /// <summary> | ||
| /// Event that is raised when the state of a switch port changes, such as a VLAN change or PoE state change. | ||
| /// </summary> | ||
| event EventHandler<NetworkSwitchPortEventArgs> PortStateChanged; | ||
|
|
||
| } | ||
|
|
||
| /// <summary> | ||
| /// Event arguments for port state changes on a network switch, such as VLAN changes or PoE state changes. | ||
| /// </summary> | ||
| public class NetworkSwitchPortEventArgs : EventArgs | ||
| { | ||
| /// <summary> | ||
| /// The identifier of the port that changed state (e.g. "1/0/3" for Netgear, "gi1/0/3" for Cisco). | ||
| /// </summary> | ||
| public string Port { get; private set; } | ||
|
|
||
| /// <summary> | ||
| /// The type of event that occurred on the port (e.g. VLAN change, PoE enabled/disabled). | ||
| /// </summary> | ||
| public NetworkSwitchPortEventType EventType { get; private set; } | ||
|
|
||
| /// <summary> | ||
| /// Constructor for NetworkSwitchPortEventArgs | ||
| /// </summary> | ||
| /// <param name="port">The identifier of the port that changed state</param> | ||
| /// <param name="eventType">The type of event that occurred on the port</param> | ||
| public NetworkSwitchPortEventArgs(string port, NetworkSwitchPortEventType eventType) | ||
| { | ||
| Port = port; | ||
| EventType = eventType; | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Enumeration of network switch port state change event types (e.g. VLAN changes or PoE state changes). | ||
| /// </summary> | ||
| public enum NetworkSwitchPortEventType | ||
| { | ||
| /// <summary> | ||
| /// Indicates that the type of event is unknown or cannot be determined. | ||
| /// </summary> | ||
| Unknown, | ||
|
|
||
| /// <summary> | ||
| /// Indicates that a VLAN change is in progress on the port, either through a call to SetPortVlan or an external change detected by polling. | ||
| /// </summary> | ||
| VlanChangeInProgress, | ||
|
|
||
| /// <summary> | ||
| /// Indicates that the access VLAN on a port has changed, either through a successful call to SetPortVlan or an external change detected by polling. | ||
| /// </summary> | ||
| VlanChanged, | ||
|
|
||
| /// <summary> | ||
| /// Indicates that PoE is being disabled on the port, either through a call to SetPortPoeState or an external change detected by polling. | ||
| /// </summary> | ||
| PoeDisableInProgress, | ||
|
|
||
| /// <summary> | ||
| /// Indicates that PoE has been disabled on the port, either through a successful call to SetPortPoeState or an external change detected by polling. | ||
| /// </summary> | ||
| PoEDisabled, | ||
|
|
||
| /// <summary> | ||
| /// Indicates that PoE is being enabled on the port, either through a call to SetPortPoeState or an external change detected by polling. | ||
| /// </summary> | ||
| PoeEnableInProgress, | ||
|
|
||
| /// <summary> | ||
| /// Indicates that PoE has been enabled on the port, either through a successful call to SetPortPoeState or an external change detected by polling. | ||
| /// </summary> | ||
| PoEEnabled | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.