Merge pull request #1285 from PepperDash/feature/add-isMic-support

feat: Update .gitignore and enhance routing-related classes
This commit is contained in:
Neil Dorin
2025-07-08 10:55:05 -06:00
committed by GitHub
4 changed files with 154 additions and 4 deletions

1
.gitignore vendored
View File

@@ -394,3 +394,4 @@ essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Pepp
.vscode/settings.json
_site/
api/
*.DS_Store

View File

@@ -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
{
@@ -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,
}
}

View File

@@ -10,7 +10,18 @@ namespace PepperDash.Essentials.Core
/// </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 +29,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 +131,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 +166,56 @@ namespace PepperDash.Essentials.Core
[JsonProperty("disableSimpleRouting")]
public bool DisableSimpleRouting { 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></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 +225,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,
}
}

View File

@@ -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>