mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: add interfaces for VLAN and PoE management in network switches
This commit is contained in:
parent
305a466b1b
commit
8817d70f07
1 changed files with 48 additions and 0 deletions
|
|
@ -0,0 +1,48 @@
|
||||||
|
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
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue