wip: update XML comments

This commit is contained in:
Erik Meyer
2026-01-28 17:09:45 -05:00
parent fed60eba29
commit 1bbd4f15bf
22 changed files with 308 additions and 151 deletions

View File

@@ -13,21 +13,29 @@ using Serilog.Events;
namespace PepperDash.Essentials.License namespace PepperDash.Essentials.License
{ {
/// <summary>
/// Abstract base class for License Managers
/// </summary>
public abstract class LicenseManager public abstract class LicenseManager
{ {
/// <summary> /// <summary>
/// Gets or sets the LicenseIsValid /// Gets or sets the LicenseIsValid
/// </summary> /// </summary>
public BoolFeedback LicenseIsValid { get; protected set; } public BoolFeedback LicenseIsValid { get; protected set; }
/// <summary>
/// Gets or sets the LicenseMessage /// <summary>
/// </summary> /// Gets or sets the LicenseMessage
/// </summary>
public StringFeedback LicenseMessage { get; protected set; } public StringFeedback LicenseMessage { get; protected set; }
/// <summary>
/// Gets or sets the LicenseLog /// <summary>
/// </summary> /// Gets or sets the LicenseLog
/// </summary>
public StringFeedback LicenseLog { get; protected set; } public StringFeedback LicenseLog { get; protected set; }
/// <summary>
/// Constructor
/// </summary>
protected LicenseManager() protected LicenseManager()
{ {
CrestronConsole.AddNewConsoleCommand( CrestronConsole.AddNewConsoleCommand(
@@ -36,12 +44,15 @@ namespace PepperDash.Essentials.License
ConsoleAccessLevelEnum.AccessOperator); ConsoleAccessLevelEnum.AccessOperator);
} }
/// <summary>
/// Gets the status string for console command
/// </summary>
protected abstract string GetStatusString(); protected abstract string GetStatusString();
} }
/// <summary> /// <summary>
/// Represents a MockEssentialsLicenseManager /// Represents a MockEssentialsLicenseManager
/// </summary> /// </summary>
public class MockEssentialsLicenseManager : LicenseManager public class MockEssentialsLicenseManager : LicenseManager
{ {
/// <summary> /// <summary>
@@ -91,6 +102,10 @@ namespace PepperDash.Essentials.License
SetIsValid(isValid); SetIsValid(isValid);
} }
/// <summary>
/// Gets the status string for console command
/// </summary>
/// <returns>license status valid or invalid</returns>
protected override string GetStatusString() protected override string GetStatusString()
{ {
return string.Format("License Status: {0}", IsValid ? "Valid" : "Not Valid"); return string.Format("License Status: {0}", IsValid ? "Valid" : "Not Valid");

View File

@@ -174,9 +174,6 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
/// <param name="assembly"></param> /// <param name="assembly"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// GetAssemblyVersion method
/// </summary>
public static string GetAssemblyVersion(Assembly assembly) public static string GetAssemblyVersion(Assembly assembly)
{ {
var ver = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); var ver = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false);
@@ -198,11 +195,8 @@ namespace PepperDash.Essentials
/// <summary> /// <summary>
/// Checks if the filename matches an already loaded assembly file's name /// Checks if the filename matches an already loaded assembly file's name
/// </summary> /// </summary>
/// <param name="filename"></param> /// <param name="name">name of loaded assembly</param>
/// <returns>True if file already matches loaded assembly file.</returns> /// <returns>True if file already matches loaded assembly file.</returns>
/// <summary>
/// CheckIfAssemblyLoaded method
/// </summary>
public static bool CheckIfAssemblyLoaded(string name) public static bool CheckIfAssemblyLoaded(string name)
{ {
Debug.LogMessage(LogEventLevel.Verbose, "Checking if assembly: {0} is loaded...", name); Debug.LogMessage(LogEventLevel.Verbose, "Checking if assembly: {0} is loaded...", name);
@@ -238,9 +232,6 @@ namespace PepperDash.Essentials
/// Used by console command to report the currently loaded assemblies and versions /// Used by console command to report the currently loaded assemblies and versions
/// </summary> /// </summary>
/// <param name="command"></param> /// <param name="command"></param>
/// <summary>
/// ReportAssemblyVersions method
/// </summary>
public static void ReportAssemblyVersions(string command) public static void ReportAssemblyVersions(string command)
{ {
CrestronConsole.ConsoleCommandResponse("Essentials Version: {0}" + CrestronEnvironment.NewLine, Global.AssemblyVersion); CrestronConsole.ConsoleCommandResponse("Essentials Version: {0}" + CrestronEnvironment.NewLine, Global.AssemblyVersion);
@@ -257,6 +248,7 @@ namespace PepperDash.Essentials
// CrestronConsole.ConsoleCommandResponse("{0} Version: {1}" + CrestronEnvironment.NewLine, assembly.Name, assembly.Version); // CrestronConsole.ConsoleCommandResponse("{0} Version: {1}" + CrestronEnvironment.NewLine, assembly.Name, assembly.Version);
//} //}
} }
/// <summary> /// <summary>
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder /// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
/// </summary> /// </summary>

View File

@@ -4,16 +4,16 @@ using Newtonsoft.Json;
namespace PepperDash.Essentials.Room.Config namespace PepperDash.Essentials.Room.Config
{ {
/// <summary>
/// Represents a EssentialsHuddleVtc1PropertiesConfig
/// </summary>
public class EssentialsHuddleVtc1PropertiesConfig : EssentialsConferenceRoomPropertiesConfig
{
[JsonProperty("defaultDisplayKey")]
/// <summary> /// <summary>
/// Gets or sets the DefaultDisplayKey /// Represents a EssentialsHuddleVtc1PropertiesConfig
/// </summary> /// </summary>
public string DefaultDisplayKey { get; set; } public class EssentialsHuddleVtc1PropertiesConfig : EssentialsConferenceRoomPropertiesConfig
{
/// <summary>
/// Gets or sets the DefaultDisplayKey
/// </summary>
[JsonProperty("defaultDisplayKey")]
public string DefaultDisplayKey { get; set; }
} }
} }

View File

@@ -11,13 +11,27 @@ namespace PepperDash.Essentials.Room.Config
/// </summary> /// </summary>
public class EssentialsNDisplayRoomPropertiesConfig : EssentialsConferenceRoomPropertiesConfig public class EssentialsNDisplayRoomPropertiesConfig : EssentialsConferenceRoomPropertiesConfig
{ {
/// <summary>
/// Gets or sets the DefaultAudioBehavior
/// </summary>
[JsonProperty("defaultAudioBehavior")] [JsonProperty("defaultAudioBehavior")]
public string DefaultAudioBehavior { get; set; } public string DefaultAudioBehavior { get; set; }
/// <summary>
/// Gets or sets the DefaultVideoBehavior
/// </summary>
[JsonProperty("defaultVideoBehavior")] [JsonProperty("defaultVideoBehavior")]
public string DefaultVideoBehavior { get; set; } public string DefaultVideoBehavior { get; set; }
/// <summary>
/// Gets or sets the Displays
/// </summary>
[JsonProperty("displays")] [JsonProperty("displays")]
public Dictionary<eSourceListItemDestinationTypes, DisplayItem> Displays { get; set; } public Dictionary<eSourceListItemDestinationTypes, DisplayItem> Displays { get; set; }
/// <summary>
/// Constructor
/// </summary>
public EssentialsNDisplayRoomPropertiesConfig() public EssentialsNDisplayRoomPropertiesConfig()
{ {
Displays = new Dictionary<eSourceListItemDestinationTypes, DisplayItem>(); Displays = new Dictionary<eSourceListItemDestinationTypes, DisplayItem>();
@@ -34,6 +48,7 @@ namespace PepperDash.Essentials.Room.Config
/// Gets or sets the Key /// Gets or sets the Key
/// </summary> /// </summary>
public string Key { get; set; } public string Key { get; set; }
/// <summary> /// <summary>
/// Gets or sets the Name /// Gets or sets the Name
/// </summary> /// </summary>

View File

@@ -11,15 +11,35 @@ namespace PepperDash.Essentials.Room.Config
/// Gets or sets the DefaultAudioBehavior /// Gets or sets the DefaultAudioBehavior
/// </summary> /// </summary>
public string DefaultAudioBehavior { get; set; } public string DefaultAudioBehavior { get; set; }
/// <summary> /// <summary>
/// Gets or sets the DefaultAudioKey /// Gets or sets the DefaultAudioKey
/// </summary> /// </summary>
public string DefaultAudioKey { get; set; } public string DefaultAudioKey { get; set; }
/// <summary>
/// Gets or sets the DefaultVideoBehavior
/// </summary>
public string DefaultVideoBehavior { get; set; } public string DefaultVideoBehavior { get; set; }
/// <summary>
/// Gets or sets the DisplayKeys
/// </summary>
public List<string> DisplayKeys { get; set; } public List<string> DisplayKeys { get; set; }
/// <summary>
/// Gets or sets the SourceListKey
/// </summary>
public string SourceListKey { get; set; } public string SourceListKey { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the room has a DSP
/// </summary>
public bool HasDsp { get; set; } public bool HasDsp { get; set; }
/// <summary>
/// Constructor
/// </summary>
public EssentialsPresentationRoomPropertiesConfig() public EssentialsPresentationRoomPropertiesConfig()
{ {
DisplayKeys = new List<string>(); DisplayKeys = new List<string>();

View File

@@ -25,11 +25,15 @@
/// contact,versiport /// contact,versiport
/// </summary> /// </summary>
public string Type { get; set; } public string Type { get; set; }
/// <summary> /// <summary>
/// Input number if contact /// Input number if contact
/// </summary> /// </summary>
public int Number { get; set; } public int Number { get; set; }
/// <summary>
/// TriggerOnClose indicates if the trigger is on close
/// </summary>
public bool TriggerOnClose { get; set; } public bool TriggerOnClose { get; set; }
} }

View File

@@ -13,10 +13,10 @@ namespace PepperDash.Essentials.Room.Config
/// </summary> /// </summary>
public class EssentialsRoomScheduledEventsConfig public class EssentialsRoomScheduledEventsConfig
{ {
[JsonProperty("scheduledEvents")]
/// <summary> /// <summary>
/// Gets or sets the ScheduledEvents /// Gets or sets the ScheduledEvents
/// </summary> /// </summary>
[JsonProperty("scheduledEvents")]
public List<ScheduledEventConfig> ScheduledEvents; public List<ScheduledEventConfig> ScheduledEvents;
} }
@@ -25,49 +25,52 @@ namespace PepperDash.Essentials.Room.Config
/// </summary> /// </summary>
public class ScheduledEventConfig public class ScheduledEventConfig
{ {
[JsonProperty("key")]
/// <summary> /// <summary>
/// Gets or sets the Key /// Gets or sets the Key
/// </summary> /// </summary>
[JsonProperty("key")]
public string Key; public string Key;
[JsonProperty("name")]
/// <summary> /// <summary>
/// Gets or sets the Name /// Gets or sets the Name
/// </summary> /// </summary>
[JsonProperty("name")]
public string Name; public string Name;
/// <summary>
/// Gets or sets the Days
/// </summary>
[JsonProperty("days")] [JsonProperty("days")]
public ScheduledEventCommon.eWeekDays Days; public ScheduledEventCommon.eWeekDays Days;
[JsonProperty("time")]
/// <summary> /// <summary>
/// Gets or sets the Time /// Gets or sets the Time
/// </summary> /// </summary>
[JsonProperty("time")]
public string Time; public string Time;
[JsonProperty("actions")]
/// <summary> /// <summary>
/// Gets or sets the Actions /// Gets or sets the Actions
/// </summary> /// </summary>
[JsonProperty("actions")]
public List<DeviceActionWrapper> Actions; public List<DeviceActionWrapper> Actions;
[JsonProperty("persistent")]
/// <summary> /// <summary>
/// Gets or sets the Persistent /// Gets or sets the Persistent
/// </summary> /// </summary>
[JsonProperty("persistent")]
public bool Persistent; public bool Persistent;
[JsonProperty("acknowledgeable")]
/// <summary> /// <summary>
/// Gets or sets the Acknowledgeable /// Gets or sets the Acknowledgeable
/// </summary> /// </summary>
[JsonProperty("acknowledgeable")]
public bool Acknowledgeable; public bool Acknowledgeable;
[JsonProperty("enable")]
/// <summary> /// <summary>
/// Gets or sets the Enable /// Gets or sets the Enable
/// </summary> /// </summary>
[JsonProperty("enable")]
public bool Enable; public bool Enable;
} }
} }

View File

@@ -14,9 +14,6 @@ namespace PepperDash.Essentials.Room.Config
/// The key of the dummy device used to enable routing /// The key of the dummy device used to enable routing
/// </summary> /// </summary>
[JsonProperty("dummySourceKey")] [JsonProperty("dummySourceKey")]
/// <summary>
/// Gets or sets the DummySourceKey
/// </summary>
public string DummySourceKey { get; set; } public string DummySourceKey { get; set; }
/// <summary> /// <summary>
@@ -26,7 +23,7 @@ namespace PepperDash.Essentials.Room.Config
public List<string> Displays { get; set; } public List<string> Displays { get; set; }
/// <summary> /// <summary>
/// The keys of the tuners assinged to this room /// The keys of the tuners assigned to this room
/// </summary> /// </summary>
[JsonProperty("tuners")] [JsonProperty("tuners")]
public List<string> Tuners { get; set; } public List<string> Tuners { get; set; }
@@ -49,19 +46,16 @@ namespace PepperDash.Essentials.Room.Config
[JsonProperty("presetsFileName")] [JsonProperty("presetsFileName")]
public string PresetsFileName { get; set; } public string PresetsFileName { get; set; }
[JsonProperty("scheduledEvents")]
/// <summary> /// <summary>
/// Gets or sets the ScheduledEvents /// Gets or sets the ScheduledEvents
/// </summary> /// </summary>
[JsonProperty("scheduledEvents")]
public List<ScheduledEventConfig> ScheduledEvents { get; set; } public List<ScheduledEventConfig> ScheduledEvents { get; set; }
/// <summary> /// <summary>
/// Indicates that the room is the primary when true /// Indicates that the room is the primary when true
/// </summary> /// </summary>
[JsonProperty("isPrimary")] [JsonProperty("isPrimary")]
/// <summary>
/// Gets or sets the IsPrimary
/// </summary>
public bool IsPrimary { get; set; } public bool IsPrimary { get; set; }
/// <summary> /// <summary>
@@ -70,21 +64,21 @@ namespace PepperDash.Essentials.Room.Config
[JsonProperty("mirroredTuners")] [JsonProperty("mirroredTuners")]
public Dictionary<uint, string> MirroredTuners { get; set; } public Dictionary<uint, string> MirroredTuners { get; set; }
[JsonProperty("helpMessage")]
/// <summary> /// <summary>
/// Gets or sets the HelpMessage /// Gets or sets the HelpMessage
/// </summary> /// </summary>
[JsonProperty("helpMessage")]
public string HelpMessage { get; set; } public string HelpMessage { get; set; }
/// <summary>
/// Indicates the room
/// </summary>
[JsonProperty("isTvPresetsProvider")]
/// <summary> /// <summary>
/// Gets or sets the IsTvPresetsProvider /// Gets or sets the IsTvPresetsProvider
/// </summary> /// </summary>
[JsonProperty("isTvPresetsProvider")]
public bool IsTvPresetsProvider; public bool IsTvPresetsProvider;
/// <summary>
/// Constructor
/// </summary>
public EssentialsTechRoomConfig() public EssentialsTechRoomConfig()
{ {
Displays = new List<string>(); Displays = new List<string>();

View File

@@ -12,8 +12,20 @@ namespace PepperDash.Essentials.Room.Config
/// Gets or sets the Master /// Gets or sets the Master
/// </summary> /// </summary>
public EssentialsVolumeLevelConfig Master { get; set; } public EssentialsVolumeLevelConfig Master { get; set; }
/// <summary>
/// Gets or sets the Program
/// </summary>
public EssentialsVolumeLevelConfig Program { get; set; } public EssentialsVolumeLevelConfig Program { get; set; }
/// <summary>
/// Gets or sets the AudioCallRx
/// </summary>
public EssentialsVolumeLevelConfig AudioCallRx { get; set; } public EssentialsVolumeLevelConfig AudioCallRx { get; set; }
/// <summary>
/// Gets or sets the AudioCallTx
/// </summary>
public EssentialsVolumeLevelConfig AudioCallTx { get; set; } public EssentialsVolumeLevelConfig AudioCallTx { get; set; }
} }

View File

@@ -8,42 +8,46 @@ namespace PepperDash.Essentials.Room.Config
/// </summary> /// </summary>
public class SimplRoomPropertiesConfig : EssentialsHuddleVtc1PropertiesConfig public class SimplRoomPropertiesConfig : EssentialsHuddleVtc1PropertiesConfig
{ {
/// <summary>
/// Gets or sets the RoomPhoneNumber
/// </summary>
[JsonProperty("roomPhoneNumber")] [JsonProperty("roomPhoneNumber")]
/// <summary>
/// Gets or sets the RoomPhoneNumber
/// </summary>
public string RoomPhoneNumber { get; set; } public string RoomPhoneNumber { get; set; }
/// <summary>
/// Gets or sets the RoomURI
/// </summary>
[JsonProperty("roomURI")] [JsonProperty("roomURI")]
/// <summary>
/// Gets or sets the RoomURI
/// </summary>
public string RoomURI { get; set; } public string RoomURI { get; set; }
/// <summary>
/// Gets or sets the SpeedDials
/// </summary>
[JsonProperty("speedDials")] [JsonProperty("speedDials")]
/// <summary>
/// Gets or sets the SpeedDials
/// </summary>
public List<SimplSpeedDial> SpeedDials { get; set; } public List<SimplSpeedDial> SpeedDials { get; set; }
/// <summary>
/// Gets or sets the VolumeSliderNames
/// </summary>
[JsonProperty("volumeSliderNames")] [JsonProperty("volumeSliderNames")]
/// <summary>
/// Gets or sets the VolumeSliderNames
/// </summary>
public List<string> VolumeSliderNames { get; set; } public List<string> VolumeSliderNames { get; set; }
} }
/// <summary> /// <summary>
/// Represents a SimplSpeedDial /// Represents a SimplSpeedDial
/// </summary> /// </summary>
public class SimplSpeedDial public class SimplSpeedDial
{ {
/// <summary>
/// Gets or sets the Name
/// </summary>
[JsonProperty("name")] [JsonProperty("name")]
/// <summary>
/// Gets or sets the Name
/// </summary>
public string Name { get; set; } public string Name { get; set; }
/// <summary>
/// Gets or sets the Number
/// </summary>
[JsonProperty("number")] [JsonProperty("number")]
/// <summary>
/// Gets or sets the Number
/// </summary>
public string Number { get; set; } public string Number { get; set; }
} }
} }

View File

@@ -30,6 +30,11 @@ namespace PepperDash.Essentials.Core.Utilities
private bool _allowActionsToExecute; private bool _allowActionsToExecute;
/// <summary>
/// Constructor
/// </summary>
/// <param name="key"></param>
/// <param name="config"></param>
public ActionSequence(string key, DeviceConfig config) public ActionSequence(string key, DeviceConfig config)
: base(key, config.Name) : base(key, config.Name)
{ {
@@ -126,9 +131,15 @@ namespace PepperDash.Essentials.Core.Utilities
/// </summary> /// </summary>
public class ActionSequencePropertiesConfig public class ActionSequencePropertiesConfig
{ {
/// <summary>
/// Gets or sets the ActionSequence
/// </summary>
[JsonProperty("actionSequence")] [JsonProperty("actionSequence")]
public List<SequencedDeviceActionWrapper> ActionSequence { get; set; } public List<SequencedDeviceActionWrapper> ActionSequence { get; set; }
/// <summary>
/// Constructor
/// </summary>
public ActionSequencePropertiesConfig() public ActionSequencePropertiesConfig()
{ {
ActionSequence = new List<SequencedDeviceActionWrapper>(); ActionSequence = new List<SequencedDeviceActionWrapper>();
@@ -140,10 +151,10 @@ namespace PepperDash.Essentials.Core.Utilities
/// </summary> /// </summary>
public class SequencedDeviceActionWrapper : DeviceActionWrapper public class SequencedDeviceActionWrapper : DeviceActionWrapper
{ {
[JsonProperty("delayMs")]
/// <summary> /// <summary>
/// Gets or sets the DelayMs /// Gets or sets the DelayMs
/// </summary> /// </summary>
[JsonProperty("delayMs")]
public int DelayMs { get; set; } public int DelayMs { get; set; }
} }
@@ -152,11 +163,19 @@ namespace PepperDash.Essentials.Core.Utilities
/// </summary> /// </summary>
public class ActionSequenceFactory : EssentialsDeviceFactory<ActionSequence> public class ActionSequenceFactory : EssentialsDeviceFactory<ActionSequence>
{ {
/// <summary>
/// Constructor
/// </summary>
public ActionSequenceFactory() public ActionSequenceFactory()
{ {
TypeNames = new List<string>() { "actionsequence" }; TypeNames = new List<string>() { "actionsequence" };
} }
/// <summary>
/// BuildDevice method
/// </summary>
/// <param name="dc">device config</param>
/// <returns></returns>
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)
{ {
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new ActionSequence Device"); Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new ActionSequence Device");

View File

@@ -14,12 +14,34 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public class VideoStatusFuncsWrapper public class VideoStatusFuncsWrapper
{ {
/// <summary>
/// Gets or sets the HasVideoStatusFunc
/// </summary>
public Func<bool> HasVideoStatusFunc { get; set; } public Func<bool> HasVideoStatusFunc { get; set; }
/// <summary>
/// Gets or sets the HdcpActiveFeedbackFunc
/// </summary>
public Func<bool> HdcpActiveFeedbackFunc { get; set; } public Func<bool> HdcpActiveFeedbackFunc { get; set; }
/// <summary>
/// Gets or sets the HdcpStateFeedbackFunc
/// </summary>
public Func<string> HdcpStateFeedbackFunc { get; set; } public Func<string> HdcpStateFeedbackFunc { get; set; }
/// <summary>
/// Gets or sets the VideoResolutionFeedbackFunc
/// </summary>
public Func<string> VideoResolutionFeedbackFunc { get; set; } public Func<string> VideoResolutionFeedbackFunc { get; set; }
/// <summary>
/// Gets or sets the VideoSyncFeedbackFunc
/// </summary>
public Func<bool> VideoSyncFeedbackFunc { get; set; } public Func<bool> VideoSyncFeedbackFunc { get; set; }
/// <summary>
/// Constructor
/// </summary>
public VideoStatusFuncsWrapper() public VideoStatusFuncsWrapper()
{ {
HasVideoStatusFunc = () => true; HasVideoStatusFunc = () => true;
@@ -30,32 +52,50 @@ namespace PepperDash.Essentials.Core
} }
} }
/// <summary> /// <summary>
/// Represents a VideoStatusOutputs /// Represents a VideoStatusOutputs
/// </summary> /// </summary>
public class VideoStatusOutputs public class VideoStatusOutputs
{ {
/// <summary> /// <summary>
/// Gets or sets the HasVideoStatusFeedback /// Gets or sets the HasVideoStatusFeedback
/// </summary> /// </summary>
public BoolFeedback HasVideoStatusFeedback { get; private set; } public BoolFeedback HasVideoStatusFeedback { get; private set; }
/// <summary>
/// Gets or sets the HdcpActiveFeedback /// <summary>
/// </summary> /// Gets or sets the HdcpActiveFeedback
/// </summary>
public BoolFeedback HdcpActiveFeedback { get; private set; } public BoolFeedback HdcpActiveFeedback { get; private set; }
/// <summary>
/// Gets or sets the HdcpStateFeedback
/// </summary>
public StringFeedback HdcpStateFeedback { get; private set; } public StringFeedback HdcpStateFeedback { get; private set; }
/// <summary>
/// Gets or sets the VideoResolutionFeedback
/// </summary>
public StringFeedback VideoResolutionFeedback { get; private set; } public StringFeedback VideoResolutionFeedback { get; private set; }
/// <summary>
/// Gets or sets the VideoSyncFeedback
/// </summary>
public BoolFeedback VideoSyncFeedback { get; private set; } public BoolFeedback VideoSyncFeedback { get; private set; }
/// <summary> /// <summary>
/// Gets or sets the NoStatus /// Gets or sets the NoStatus
/// </summary> /// </summary>
public static VideoStatusOutputs NoStatus { get { return _Default; } } public static VideoStatusOutputs NoStatus { get { return _Default; } }
static VideoStatusOutputs _Default = new VideoStatusOutputs(new VideoStatusFuncsWrapper static VideoStatusOutputs _Default = new VideoStatusOutputs(new VideoStatusFuncsWrapper
{ {
HasVideoStatusFunc = () => false HasVideoStatusFunc = () => false
}); });
/// <summary>
/// Constructor
/// </summary>
/// <param name="funcs"></param>
public VideoStatusOutputs(VideoStatusFuncsWrapper funcs) public VideoStatusOutputs(VideoStatusFuncsWrapper funcs)
{ {
HasVideoStatusFeedback = new BoolFeedback("HasVideoStatusFeedback", funcs.HasVideoStatusFunc); HasVideoStatusFeedback = new BoolFeedback("HasVideoStatusFeedback", funcs.HasVideoStatusFunc);
@@ -66,9 +106,9 @@ namespace PepperDash.Essentials.Core
VideoSyncFeedback = new BoolFeedback("VideoSyncFeedback", funcs.VideoSyncFeedbackFunc); VideoSyncFeedback = new BoolFeedback("VideoSyncFeedback", funcs.VideoSyncFeedbackFunc);
} }
/// <summary> /// <summary>
/// FireAll method /// FireAll method
/// </summary> /// </summary>
public void FireAll() public void FireAll()
{ {
HasVideoStatusFeedback.FireUpdate(); HasVideoStatusFeedback.FireUpdate();
@@ -78,9 +118,9 @@ namespace PepperDash.Essentials.Core
VideoSyncFeedback.FireUpdate(); VideoSyncFeedback.FireUpdate();
} }
/// <summary> /// <summary>
/// ToList method /// ToList method
/// </summary> /// </summary>
public List<Feedback> ToList() public List<Feedback> ToList()
{ {
return new List<Feedback> return new List<Feedback>
@@ -94,9 +134,9 @@ namespace PepperDash.Essentials.Core
} }
} }
/// <summary> // /// <summary>
/// Wraps up the common video statuses exposed on a video input port // /// Wraps up the common video statuses exposed on a video input port
/// </summary> // /// </summary>
//public class BasicVideoStatus : IBasicVideoStatus //public class BasicVideoStatus : IBasicVideoStatus
//{ //{
// public event VideoStatusChangeHandler VideoStatusChange; // public event VideoStatusChangeHandler VideoStatusChange;

View File

@@ -10,15 +10,18 @@ namespace PepperDash.Essentials.Core.Web
/// </summary> /// </summary>
public class EssentialsWebApiFactory : EssentialsDeviceFactory<EssentialsWebApi> public class EssentialsWebApiFactory : EssentialsDeviceFactory<EssentialsWebApi>
{ {
/// <summary>
/// Constructor
/// </summary>
public EssentialsWebApiFactory() public EssentialsWebApiFactory()
{ {
TypeNames = new List<string> { "EssentialsWebApi" }; TypeNames = new List<string> { "EssentialsWebApi" };
} }
/// <summary> /// <summary>
/// BuildDevice method /// BuildDevice method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)
{ {
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Essentials Web API Server"); Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Essentials Web API Server");

View File

@@ -7,11 +7,14 @@ using PepperDash.Core;
namespace PepperDash.Essentials.Core.Web namespace PepperDash.Essentials.Core.Web
{ {
/// <summary>
/// EssentialsWebApiHelpers class
/// </summary>
public static class EssentialsWebApiHelpers public static class EssentialsWebApiHelpers
{ {
/// <summary> /// <summary>
/// GetRequestBody method /// GetRequestBody method
/// </summary> /// </summary>
public static string GetRequestBody(this HttpCwsRequest request) public static string GetRequestBody(this HttpCwsRequest request)
{ {
var bytes = new byte[request.ContentLength]; var bytes = new byte[request.ContentLength];
@@ -21,9 +24,9 @@ namespace PepperDash.Essentials.Core.Web
return Encoding.UTF8.GetString(bytes, 0, bytes.Length); return Encoding.UTF8.GetString(bytes, 0, bytes.Length);
} }
/// <summary> /// <summary>
/// MapToAssemblyObject method /// MapToAssemblyObject method
/// </summary> /// </summary>
public static object MapToAssemblyObject(LoadedAssembly assembly) public static object MapToAssemblyObject(LoadedAssembly assembly)
{ {
return new return new
@@ -33,9 +36,9 @@ namespace PepperDash.Essentials.Core.Web
}; };
} }
/// <summary> /// <summary>
/// MapToDeviceListObject method /// MapToDeviceListObject method
/// </summary> /// </summary>
public static object MapToDeviceListObject(IKeyed device) public static object MapToDeviceListObject(IKeyed device)
{ {
return new return new
@@ -47,9 +50,9 @@ namespace PepperDash.Essentials.Core.Web
}; };
} }
/// <summary> /// <summary>
/// MapJoinToObject method /// MapJoinToObject method
/// </summary> /// </summary>
public static object MapJoinToObject(string key, JoinMapBaseAdvanced join) public static object MapJoinToObject(string key, JoinMapBaseAdvanced join)
{ {
var kp = new KeyValuePair<string, JoinMapBaseAdvanced>(key, join); var kp = new KeyValuePair<string, JoinMapBaseAdvanced>(key, join);
@@ -57,9 +60,9 @@ namespace PepperDash.Essentials.Core.Web
return MapJoinToObject(kp); return MapJoinToObject(kp);
} }
/// <summary> /// <summary>
/// MapJoinToObject method /// MapJoinToObject method
/// </summary> /// </summary>
public static object MapJoinToObject(KeyValuePair<string, JoinMapBaseAdvanced> join) public static object MapJoinToObject(KeyValuePair<string, JoinMapBaseAdvanced> join)
{ {
return new return new
@@ -69,9 +72,9 @@ namespace PepperDash.Essentials.Core.Web
}; };
} }
/// <summary> /// <summary>
/// MapJoinDataCompleteToObject method /// MapJoinDataCompleteToObject method
/// </summary> /// </summary>
public static object MapJoinDataCompleteToObject(KeyValuePair<string, JoinDataComplete> joinData) public static object MapJoinDataCompleteToObject(KeyValuePair<string, JoinDataComplete> joinData)
{ {
return new return new
@@ -85,9 +88,9 @@ namespace PepperDash.Essentials.Core.Web
}; };
} }
/// <summary> /// <summary>
/// MapDeviceTypeToObject method /// MapDeviceTypeToObject method
/// </summary> /// </summary>
public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device) public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device)
{ {
var kp = new KeyValuePair<string, DeviceFactoryWrapper>(key, device); var kp = new KeyValuePair<string, DeviceFactoryWrapper>(key, device);
@@ -95,9 +98,9 @@ namespace PepperDash.Essentials.Core.Web
return MapDeviceTypeToObject(kp); return MapDeviceTypeToObject(kp);
} }
/// <summary> /// <summary>
/// MapDeviceTypeToObject method /// MapDeviceTypeToObject method
/// </summary> /// </summary>
public static object MapDeviceTypeToObject(KeyValuePair<string, DeviceFactoryWrapper> device) public static object MapDeviceTypeToObject(KeyValuePair<string, DeviceFactoryWrapper> device)
{ {
return new return new

View File

@@ -2,15 +2,15 @@
namespace PepperDash.Essentials.Core.Web namespace PepperDash.Essentials.Core.Web
{ {
/// <summary> /// <summary>
/// Represents a EssentialsWebApiPropertiesConfig /// Represents a EssentialsWebApiPropertiesConfig
/// </summary> /// </summary>
public class EssentialsWebApiPropertiesConfig public class EssentialsWebApiPropertiesConfig
{ {
/// <summary>
/// Gets or sets the BasePath
/// </summary>
[JsonProperty("basePath")] [JsonProperty("basePath")]
/// <summary>
/// Gets or sets the BasePath
/// </summary>
public string BasePath { get; set; } public string BasePath { get; set; }
} }
} }

View File

@@ -80,16 +80,16 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
} }
} }
/// <summary> /// <summary>
/// Represents a AppDebug /// Represents a AppDebug
/// </summary> /// </summary>
public class AppDebug public class AppDebug
{ {
[JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
/// <summary> /// <summary>
/// Gets or sets the MinimumLevel /// Gets or sets the MinimumLevel
/// </summary> /// </summary>
[JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
public LogEventLevel MinimumLevel { get; set; } public LogEventLevel MinimumLevel { get; set; }
} }
} }

View File

@@ -18,6 +18,9 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary> /// </summary>
public class DebugSessionRequestHandler : WebApiBaseRequestHandler public class DebugSessionRequestHandler : WebApiBaseRequestHandler
{ {
/// <summary>
/// Constructor
/// </summary>
public DebugSessionRequestHandler() public DebugSessionRequestHandler()
: base(true) : base(true)
{ {

View File

@@ -5,9 +5,9 @@ using PepperDash.Core.Web.RequestHandlers;
namespace PepperDash.Essentials.Core.Web.RequestHandlers namespace PepperDash.Essentials.Core.Web.RequestHandlers
{ {
/// <summary> /// <summary>
/// Represents a DoNotLoadConfigOnNextBootRequestHandler /// Represents a DoNotLoadConfigOnNextBootRequestHandler
/// </summary> /// </summary>
public class DoNotLoadConfigOnNextBootRequestHandler : WebApiBaseRequestHandler public class DoNotLoadConfigOnNextBootRequestHandler : WebApiBaseRequestHandler
{ {
/// <summary> /// <summary>
@@ -79,15 +79,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
} }
} }
/// <summary> /// <summary>
/// Represents a Data /// Represents a Data
/// </summary> /// </summary>
public class Data public class Data
{ {
/// <summary>
/// Gets or sets the DoNotLoadConfigOnNextBoot
/// </summary>
[JsonProperty("doNotLoadConfigOnNextBoot", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("doNotLoadConfigOnNextBoot", NullValueHandling = NullValueHandling.Ignore)]
/// <summary>
/// Gets or sets the DoNotLoadConfigOnNextBoot
/// </summary>
public bool DoNotLoadConfigOnNextBoot { get; set; } public bool DoNotLoadConfigOnNextBoot { get; set; }
} }
} }

View File

@@ -13,11 +13,20 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
private HttpCwsRouteCollection routeCollection; private HttpCwsRouteCollection routeCollection;
private string basePath; private string basePath;
/// <summary>
/// Constructor
/// </summary>
/// <param name="routeCollection"></param>
/// <param name="basePath"></param>
public GetRoutesHandler(HttpCwsRouteCollection routeCollection, string basePath) { public GetRoutesHandler(HttpCwsRouteCollection routeCollection, string basePath) {
this.routeCollection = routeCollection; this.routeCollection = routeCollection;
this.basePath = basePath; this.basePath = basePath;
} }
/// <summary>
/// Handles GET method requests
/// </summary>
/// <param name="context"></param>
protected override void HandleGet(HttpCwsContext context) protected override void HandleGet(HttpCwsContext context)
{ {
var currentIp = CrestronEthernetHelper.GetEthernetParameter( var currentIp = CrestronEthernetHelper.GetEthernetParameter(
@@ -49,16 +58,16 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary> /// </summary>
public class RoutesResponseObject public class RoutesResponseObject
{ {
[JsonProperty("url")]
/// <summary> /// <summary>
/// Gets or sets the Url /// Gets or sets the Url
/// </summary> /// </summary>
[JsonProperty("url")]
public string Url { set; get; } public string Url { set; get; }
[JsonProperty("routes")]
/// <summary> /// <summary>
/// Gets or sets the Routes /// Gets or sets the Routes
/// </summary> /// </summary>
[JsonProperty("routes")]
public HttpCwsRouteCollection Routes { get; set; } public HttpCwsRouteCollection Routes { get; set; }
} }
} }

View File

@@ -12,8 +12,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary> /// </summary>
public class GetRoutingPortsHandler : WebApiBaseRequestHandler public class GetRoutingPortsHandler : WebApiBaseRequestHandler
{ {
/// <summary>
/// Constructor
/// </summary>
public GetRoutingPortsHandler() : base(true) { } public GetRoutingPortsHandler() : base(true) { }
/// <summary>
/// Handles the GET request
/// </summary>
/// <param name="context"></param>
protected override void HandleGet(HttpCwsContext context) protected override void HandleGet(HttpCwsContext context)
{ {
var routeData = context.Request.RouteData; var routeData = context.Request.RouteData;
@@ -63,17 +70,18 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
} }
} }
internal class ReturnValue { internal class ReturnValue
[JsonProperty("inputPorts", NullValueHandling = NullValueHandling.Ignore)] {
/// <summary> /// <summary>
/// Gets or sets the InputPorts /// Gets or sets the InputPorts
/// </summary> /// </summary>
[JsonProperty("inputPorts", NullValueHandling = NullValueHandling.Ignore)]
public List<string> InputPorts { get; set; } public List<string> InputPorts { get; set; }
[JsonProperty("outputPorts", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the OutputPorts /// Gets or sets the OutputPorts
/// </summary> /// </summary>
[JsonProperty("outputPorts", NullValueHandling = NullValueHandling.Ignore)]
public List<string> OutputPorts { get; set; } public List<string> OutputPorts { get; set; }
} }
} }

View File

@@ -11,8 +11,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary> /// </summary>
public class GetTieLinesRequestHandler : WebApiBaseRequestHandler public class GetTieLinesRequestHandler : WebApiBaseRequestHandler
{ {
/// <summary>
/// Constructor
/// </summary>
public GetTieLinesRequestHandler() : base(true) { } public GetTieLinesRequestHandler() : base(true) { }
/// <summary>
/// Handles the GET request
/// </summary>
/// <param name="context"></param>
protected override void HandleGet(HttpCwsContext context) protected override void HandleGet(HttpCwsContext context)
{ {
var tieLineString = JsonConvert.SerializeObject(TieLineCollection.Default.Select((tl) => new var tieLineString = JsonConvert.SerializeObject(TieLineCollection.Default.Select((tl) => new

View File

@@ -195,26 +195,32 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
} }
/// <summary>
/// Configuration class for SetDeviceStreamDebugRequestHandler
/// </summary>
public class SetDeviceStreamDebugConfig public class SetDeviceStreamDebugConfig
{ {
[JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)]
/// <summary> /// <summary>
/// Gets or sets the DeviceKey /// Gets or sets the DeviceKey
/// </summary> /// </summary>
[JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)]
public string DeviceKey { get; set; } public string DeviceKey { get; set; }
[JsonProperty("setting", NullValueHandling = NullValueHandling.Include)]
/// <summary> /// <summary>
/// Gets or sets the Setting /// Gets or sets the Setting
/// </summary> /// </summary>
[JsonProperty("setting", NullValueHandling = NullValueHandling.Include)]
public string Setting { get; set; } public string Setting { get; set; }
[JsonProperty("timeout")]
/// <summary> /// <summary>
/// Gets or sets the Timeout /// Gets or sets the Timeout
/// </summary> /// </summary>
[JsonProperty("timeout")]
public int Timeout { get; set; } public int Timeout { get; set; }
/// <summary>
/// Constructor
/// </summary>
public SetDeviceStreamDebugConfig() public SetDeviceStreamDebugConfig()
{ {
DeviceKey = null; DeviceKey = null;