mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-29 20:34:51 +00:00
Compare commits
11 Commits
v2.7.3-com
...
v2.8.1-met
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddbcc13c50 | ||
|
|
2a70fc678e | ||
|
|
056614cba1 | ||
|
|
5ff587a8c9 | ||
|
|
26c1baa1f8 | ||
|
|
2b15c2a56f | ||
|
|
a076d531bc | ||
|
|
5e880f0111 | ||
|
|
8f1fb86d37 | ||
|
|
471d5b701b | ||
|
|
2fa297a204 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -393,4 +393,5 @@ essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Pepp
|
||||
/._PepperDash.Essentials.sln
|
||||
.vscode/settings.json
|
||||
_site/
|
||||
api/
|
||||
api/
|
||||
*.DS_Store
|
||||
|
||||
9
.vscode/extensions.json
vendored
Normal file
9
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"ms-dotnettools.vscode-dotnet-runtime",
|
||||
"ms-dotnettools.csharp",
|
||||
"ms-dotnettools.csdevkit",
|
||||
"vivaxy.vscode-conventional-commits",
|
||||
"mhutchie.git-graph"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Interface for devices that provide audio meter feedback.
|
||||
/// This interface is used to standardize access to meter feedback across different devices.
|
||||
/// </summary>
|
||||
public interface IMeterFeedback
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the meter feedback for the device.
|
||||
/// This property provides an IntFeedback that represents the current audio level or meter value.
|
||||
/// </summary>
|
||||
IntFeedback MeterFeedback { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
using Crestron.SimplSharpPro.DM.Streaming;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of network port information and provides notifications when the information changes.
|
||||
/// </summary>
|
||||
/// <remarks>This interface is designed to provide access to a list of network port details and to notify
|
||||
/// subscribers when the port information is updated. Implementations of this interface should ensure that the <see
|
||||
/// cref="PortInformationChanged"/> event is raised whenever the <see cref="NetworkPorts"/> collection
|
||||
/// changes.</remarks>
|
||||
public interface INvxNetworkPortInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when the port information changes.
|
||||
/// </summary>
|
||||
/// <remarks>This event is triggered whenever there is a change in the port information, such as
|
||||
/// updates to port settings or status. Subscribers can handle this event to respond to such changes.</remarks>
|
||||
event EventHandler PortInformationChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of network port information associated with the current instance.
|
||||
/// </summary>
|
||||
/// <remarks>The collection provides information about the network ports, such as their status,
|
||||
/// configuration, or other relevant details. The returned list is read-only and cannot be modified
|
||||
/// directly.</remarks>
|
||||
List<NvxNetworkPortInformation> NetworkPorts { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents information about a network port, including its configuration and associated system details.
|
||||
/// </summary>
|
||||
/// <remarks>This class provides properties to describe various attributes of a network port, such as its
|
||||
/// name, description, VLAN configuration, and management IP address. It is typically used to store and retrieve
|
||||
/// metadata about network ports in a managed environment.</remarks>
|
||||
public class NvxNetworkPortInformation
|
||||
{
|
||||
private readonly DmNvxBaseClass.DmNvx35xNetwork.DmNvxNetworkLldpPort port;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index of the device port.
|
||||
/// </summary>
|
||||
public uint DevicePortIndex { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the port used for communication.
|
||||
/// </summary>
|
||||
public string PortName => port.PortNameFeedback.StringValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the description of the port.
|
||||
/// </summary>
|
||||
public string PortDescription => port.PortNameDescriptionFeedback.StringValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the VLAN (Virtual Local Area Network).
|
||||
/// </summary>
|
||||
public string VlanName => port.VlanNameFeedback.StringValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the IP management address associated with the port.
|
||||
/// </summary>
|
||||
public string IpManagementAddress => port.IpManagementAddressFeedback.StringValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the system as reported by the associated port.
|
||||
/// </summary>
|
||||
public string SystemName => port.SystemNameFeedback.StringValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the description of the system name.
|
||||
/// </summary>
|
||||
public string SystemNameDescription => port.SystemNameDescriptionFeedback.StringValue;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NvxNetworkPortInformation"/> class with the specified network port
|
||||
/// and device port index.
|
||||
/// </summary>
|
||||
/// <param name="port">The network port associated with the device. Cannot be <see langword="null"/>.</param>
|
||||
/// <param name="devicePortIndex">The index of the device port.</param>
|
||||
/// <exception cref="ArgumentNullException">Thrown if <paramref name="port"/> is <see langword="null"/>.</exception>
|
||||
public NvxNetworkPortInformation(DmNvxBaseClass.DmNvx35xNetwork.DmNvxNetworkLldpPort port, uint devicePortIndex)
|
||||
{
|
||||
this.port = port ?? throw new ArgumentNullException(nameof(port), "Port cannot be null");
|
||||
DevicePortIndex = devicePortIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Interface for devices that provide audio meter feedback.
|
||||
/// This interface is used to standardize access to meter feedback across different devices.
|
||||
/// </summary>
|
||||
public interface IStateFeedback
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the state feedback for the device.
|
||||
/// This property provides a BoolFeedback that represents the current state (on/off) of the device.
|
||||
/// </summary>
|
||||
BoolFeedback StateFeedback { get; }
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,15 @@ using PepperDash.Essentials.Core.Devices;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a level control item in a list, which can be used to control volume or mute functionality.
|
||||
/// </summary>
|
||||
public class LevelControlListItem : AudioControlListItemBase
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A reference to the IBasicVolumeWithFeedback device for control.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public IBasicVolumeWithFeedback LevelControl
|
||||
{
|
||||
@@ -55,7 +60,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
get
|
||||
{
|
||||
if(string.IsNullOrEmpty(ItemKey)) return ParentDeviceKey;
|
||||
if (string.IsNullOrEmpty(ItemKey)) return ParentDeviceKey;
|
||||
else
|
||||
{
|
||||
return DeviceManager.AllDevices.
|
||||
@@ -70,13 +75,39 @@ namespace PepperDash.Essentials.Core
|
||||
[JsonProperty("type")]
|
||||
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public eLevelControlType Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the item is a mic or not.
|
||||
/// </summary>
|
||||
[JsonProperty("isMic", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? IsMic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the item should show the raw level in the UI.
|
||||
/// </summary>
|
||||
[JsonProperty("showRawLevel", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? ShowRawLevel { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the type of level control item.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum eLevelControlType
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the item is a level control only
|
||||
/// </summary>
|
||||
Level = 1,
|
||||
/// <summary>
|
||||
/// Indicates that the item is a mute control only
|
||||
/// </summary>
|
||||
Mute = 2,
|
||||
/// <summary>
|
||||
/// Indicates that the item is both a level and mute control
|
||||
/// </summary>
|
||||
LevelAndMute = Level | Mute,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,29 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PepperDash.Core;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// Defines the type of source list item, which can be a route, off, or other.
|
||||
/// This is used to categorize the source list items in a room.
|
||||
/// The type is serialized to JSON and can be used to determine how the item should be displayed or handled in the UI.
|
||||
/// </summary>
|
||||
public enum eSourceListItemType
|
||||
{
|
||||
Route, Off, Other, SomethingAwesomerThanThese
|
||||
/// <summary>
|
||||
/// Represents a typical route.
|
||||
/// </summary>
|
||||
Route,
|
||||
/// <summary>
|
||||
/// Represents an off route.
|
||||
/// </summary>
|
||||
Off,
|
||||
/// <summary>
|
||||
/// Represents some other type of route
|
||||
/// </summary>
|
||||
Other,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -18,6 +31,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public class SourceListItem
|
||||
{
|
||||
/// <summary>
|
||||
/// The key of the source item, which is used to identify it in the DeviceManager
|
||||
/// </summary>
|
||||
[JsonProperty("sourceKey")]
|
||||
public string SourceKey { get; set; }
|
||||
|
||||
@@ -117,6 +133,9 @@ namespace PepperDash.Essentials.Core
|
||||
[JsonProperty("disableRoutedSharing")]
|
||||
public bool DisableRoutedSharing { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonProperty("destinations")]
|
||||
public List<eSourceListItemDestinationTypes> Destinations { get; set; }
|
||||
/// <summary>
|
||||
@@ -149,31 +168,62 @@ namespace PepperDash.Essentials.Core
|
||||
[JsonProperty("disableSimpleRouting")]
|
||||
public bool DisableSimpleRouting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key of the device that provides video sync for this source item
|
||||
/// </summary>
|
||||
[JsonProperty("syncProviderDeviceKey")]
|
||||
public string SyncProviderDeviceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor for SourceListItem, initializes the Icon to "Blank"
|
||||
/// </summary>
|
||||
public SourceListItem()
|
||||
{
|
||||
Icon = "Blank";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a string representation of the SourceListItem, including the SourceKey and Name
|
||||
/// </summary>
|
||||
/// <returns> A string representation of the SourceListItem</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{SourceKey}:{Name}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a route in a source list item, which defines the source and destination keys and the type of signal being routed
|
||||
/// </summary>
|
||||
public class SourceRouteListItem
|
||||
{
|
||||
/// <summary>
|
||||
/// The key of the source device to route from
|
||||
/// </summary>
|
||||
[JsonProperty("sourceKey")]
|
||||
public string SourceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key of the source port to route from
|
||||
/// </summary>
|
||||
[JsonProperty("sourcePortKey")]
|
||||
public string SourcePortKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key of the destination device to route to
|
||||
/// </summary>
|
||||
[JsonProperty("destinationKey")]
|
||||
public string DestinationKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key of the destination port to route to
|
||||
/// </summary>
|
||||
[JsonProperty("destinationPortKey")]
|
||||
public string DestinationPortKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of signal being routed, such as audio or video
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public eRoutingSignalType Type { get; set; }
|
||||
}
|
||||
@@ -183,15 +233,85 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public enum eSourceListItemDestinationTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Default display, used for the main video output in a room
|
||||
/// </summary>
|
||||
defaultDisplay,
|
||||
/// <summary>
|
||||
/// Left display
|
||||
/// </summary>
|
||||
leftDisplay,
|
||||
/// <summary>
|
||||
/// Right display
|
||||
/// </summary>
|
||||
rightDisplay,
|
||||
/// <summary>
|
||||
/// Center display
|
||||
/// </summary>
|
||||
centerDisplay,
|
||||
/// <summary>
|
||||
/// Program audio, used for the main audio output in a room
|
||||
/// </summary>
|
||||
programAudio,
|
||||
/// <summary>
|
||||
/// Codec content, used for sharing content to the far end in a video call
|
||||
/// </summary>
|
||||
codecContent,
|
||||
/// <summary>
|
||||
/// Front left display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
frontLeftDisplay,
|
||||
/// <summary>
|
||||
/// Front right display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
frontRightDisplay,
|
||||
/// <summary>
|
||||
/// Rear left display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
rearLeftDisplay,
|
||||
/// <summary>
|
||||
/// Rear right display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
rearRightDisplay,
|
||||
/// <summary>
|
||||
/// Auxiliary display 1, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay1,
|
||||
/// <summary>
|
||||
/// Auxiliary display 2, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay2,
|
||||
/// <summary>
|
||||
/// Auxiliary display 3, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay3,
|
||||
/// <summary>
|
||||
/// Auxiliary display 4, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay4,
|
||||
/// <summary>
|
||||
/// Auxiliary display 5, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay5,
|
||||
/// <summary>
|
||||
/// Auxiliary display 6, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay6,
|
||||
/// <summary>
|
||||
/// Auxiliary display 7, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay7,
|
||||
/// <summary>
|
||||
/// Auxiliary display 8, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay8,
|
||||
/// <summary>
|
||||
/// Auxiliary display 9, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay9,
|
||||
/// <summary>
|
||||
/// Auxiliary display 10, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay10,
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,14 @@
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For fixed-source endpoint devices with an input port
|
||||
/// </summary>
|
||||
public interface IRoutingSinkWithInputPort :IRoutingSink
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current input port for this routing sink.
|
||||
/// </summary>
|
||||
RoutingInputPort CurrentInputPort { get; }
|
||||
}
|
||||
/*/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user