mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-29 12:24:59 +00:00
wip: update XML comments
This commit is contained in:
@@ -13,21 +13,29 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.License
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract base class for License Managers
|
||||
/// </summary>
|
||||
public abstract class LicenseManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the LicenseIsValid
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the LicenseIsValid
|
||||
/// </summary>
|
||||
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; }
|
||||
/// <summary>
|
||||
/// Gets or sets the LicenseLog
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the LicenseLog
|
||||
/// </summary>
|
||||
public StringFeedback LicenseLog { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
protected LicenseManager()
|
||||
{
|
||||
CrestronConsole.AddNewConsoleCommand(
|
||||
@@ -36,12 +44,15 @@ namespace PepperDash.Essentials.License
|
||||
ConsoleAccessLevelEnum.AccessOperator);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status string for console command
|
||||
/// </summary>
|
||||
protected abstract string GetStatusString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a MockEssentialsLicenseManager
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a MockEssentialsLicenseManager
|
||||
/// </summary>
|
||||
public class MockEssentialsLicenseManager : LicenseManager
|
||||
{
|
||||
/// <summary>
|
||||
@@ -91,6 +102,10 @@ namespace PepperDash.Essentials.License
|
||||
SetIsValid(isValid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status string for console command
|
||||
/// </summary>
|
||||
/// <returns>license status valid or invalid</returns>
|
||||
protected override string GetStatusString()
|
||||
{
|
||||
return string.Format("License Status: {0}", IsValid ? "Valid" : "Not Valid");
|
||||
|
||||
@@ -174,9 +174,6 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
/// <param name="assembly"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetAssemblyVersion method
|
||||
/// </summary>
|
||||
public static string GetAssemblyVersion(Assembly assembly)
|
||||
{
|
||||
var ver = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false);
|
||||
@@ -198,11 +195,8 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Checks if the filename matches an already loaded assembly file's name
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
/// <param name="name">name of loaded assembly</param>
|
||||
/// <returns>True if file already matches loaded assembly file.</returns>
|
||||
/// <summary>
|
||||
/// CheckIfAssemblyLoaded method
|
||||
/// </summary>
|
||||
public static bool CheckIfAssemblyLoaded(string 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
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <summary>
|
||||
/// ReportAssemblyVersions method
|
||||
/// </summary>
|
||||
public static void ReportAssemblyVersions(string command)
|
||||
{
|
||||
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);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
|
||||
/// </summary>
|
||||
|
||||
@@ -4,16 +4,16 @@ using Newtonsoft.Json;
|
||||
namespace PepperDash.Essentials.Room.Config
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a EssentialsHuddleVtc1PropertiesConfig
|
||||
/// </summary>
|
||||
public class EssentialsHuddleVtc1PropertiesConfig : EssentialsConferenceRoomPropertiesConfig
|
||||
{
|
||||
[JsonProperty("defaultDisplayKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DefaultDisplayKey
|
||||
/// Represents a EssentialsHuddleVtc1PropertiesConfig
|
||||
/// </summary>
|
||||
public string DefaultDisplayKey { get; set; }
|
||||
public class EssentialsHuddleVtc1PropertiesConfig : EssentialsConferenceRoomPropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DefaultDisplayKey
|
||||
/// </summary>
|
||||
[JsonProperty("defaultDisplayKey")]
|
||||
public string DefaultDisplayKey { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,13 +11,27 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// </summary>
|
||||
public class EssentialsNDisplayRoomPropertiesConfig : EssentialsConferenceRoomPropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DefaultAudioBehavior
|
||||
/// </summary>
|
||||
[JsonProperty("defaultAudioBehavior")]
|
||||
public string DefaultAudioBehavior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DefaultVideoBehavior
|
||||
/// </summary>
|
||||
[JsonProperty("defaultVideoBehavior")]
|
||||
public string DefaultVideoBehavior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Displays
|
||||
/// </summary>
|
||||
[JsonProperty("displays")]
|
||||
public Dictionary<eSourceListItemDestinationTypes, DisplayItem> Displays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public EssentialsNDisplayRoomPropertiesConfig()
|
||||
{
|
||||
Displays = new Dictionary<eSourceListItemDestinationTypes, DisplayItem>();
|
||||
@@ -34,6 +48,7 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// Gets or sets the Key
|
||||
/// </summary>
|
||||
public string Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
|
||||
@@ -11,15 +11,35 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// Gets or sets the DefaultAudioBehavior
|
||||
/// </summary>
|
||||
public string DefaultAudioBehavior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DefaultAudioKey
|
||||
/// </summary>
|
||||
public string DefaultAudioKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DefaultVideoBehavior
|
||||
/// </summary>
|
||||
public string DefaultVideoBehavior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayKeys
|
||||
/// </summary>
|
||||
public List<string> DisplayKeys { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SourceListKey
|
||||
/// </summary>
|
||||
public string SourceListKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the room has a DSP
|
||||
/// </summary>
|
||||
public bool HasDsp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public EssentialsPresentationRoomPropertiesConfig()
|
||||
{
|
||||
DisplayKeys = new List<string>();
|
||||
|
||||
@@ -25,11 +25,15 @@
|
||||
/// contact,versiport
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Input number if contact
|
||||
/// </summary>
|
||||
public int Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TriggerOnClose indicates if the trigger is on close
|
||||
/// </summary>
|
||||
public bool TriggerOnClose { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// </summary>
|
||||
public class EssentialsRoomScheduledEventsConfig
|
||||
{
|
||||
[JsonProperty("scheduledEvents")]
|
||||
/// <summary>
|
||||
/// Gets or sets the ScheduledEvents
|
||||
/// </summary>
|
||||
[JsonProperty("scheduledEvents")]
|
||||
public List<ScheduledEventConfig> ScheduledEvents;
|
||||
}
|
||||
|
||||
@@ -25,49 +25,52 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// </summary>
|
||||
public class ScheduledEventConfig
|
||||
{
|
||||
[JsonProperty("key")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Key
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
public string Key;
|
||||
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string Name;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Days
|
||||
/// </summary>
|
||||
[JsonProperty("days")]
|
||||
public ScheduledEventCommon.eWeekDays Days;
|
||||
|
||||
[JsonProperty("time")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Time
|
||||
/// </summary>
|
||||
[JsonProperty("time")]
|
||||
public string Time;
|
||||
|
||||
[JsonProperty("actions")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Actions
|
||||
/// </summary>
|
||||
[JsonProperty("actions")]
|
||||
public List<DeviceActionWrapper> Actions;
|
||||
|
||||
[JsonProperty("persistent")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Persistent
|
||||
/// </summary>
|
||||
[JsonProperty("persistent")]
|
||||
public bool Persistent;
|
||||
|
||||
[JsonProperty("acknowledgeable")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Acknowledgeable
|
||||
/// </summary>
|
||||
[JsonProperty("acknowledgeable")]
|
||||
public bool Acknowledgeable;
|
||||
|
||||
[JsonProperty("enable")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Enable
|
||||
/// </summary>
|
||||
[JsonProperty("enable")]
|
||||
public bool Enable;
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,6 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// The key of the dummy device used to enable routing
|
||||
/// </summary>
|
||||
[JsonProperty("dummySourceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DummySourceKey
|
||||
/// </summary>
|
||||
public string DummySourceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -26,7 +23,7 @@ namespace PepperDash.Essentials.Room.Config
|
||||
public List<string> Displays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The keys of the tuners assinged to this room
|
||||
/// The keys of the tuners assigned to this room
|
||||
/// </summary>
|
||||
[JsonProperty("tuners")]
|
||||
public List<string> Tuners { get; set; }
|
||||
@@ -49,19 +46,16 @@ namespace PepperDash.Essentials.Room.Config
|
||||
[JsonProperty("presetsFileName")]
|
||||
public string PresetsFileName { get; set; }
|
||||
|
||||
[JsonProperty("scheduledEvents")]
|
||||
/// <summary>
|
||||
/// Gets or sets the ScheduledEvents
|
||||
/// </summary>
|
||||
[JsonProperty("scheduledEvents")]
|
||||
public List<ScheduledEventConfig> ScheduledEvents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the room is the primary when true
|
||||
/// </summary>
|
||||
[JsonProperty("isPrimary")]
|
||||
/// <summary>
|
||||
/// Gets or sets the IsPrimary
|
||||
/// </summary>
|
||||
public bool IsPrimary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -70,21 +64,21 @@ namespace PepperDash.Essentials.Room.Config
|
||||
[JsonProperty("mirroredTuners")]
|
||||
public Dictionary<uint, string> MirroredTuners { get; set; }
|
||||
|
||||
[JsonProperty("helpMessage")]
|
||||
/// <summary>
|
||||
/// Gets or sets the HelpMessage
|
||||
/// </summary>
|
||||
[JsonProperty("helpMessage")]
|
||||
public string HelpMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the room
|
||||
/// </summary>
|
||||
[JsonProperty("isTvPresetsProvider")]
|
||||
/// <summary>
|
||||
/// Gets or sets the IsTvPresetsProvider
|
||||
/// </summary>
|
||||
[JsonProperty("isTvPresetsProvider")]
|
||||
public bool IsTvPresetsProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public EssentialsTechRoomConfig()
|
||||
{
|
||||
Displays = new List<string>();
|
||||
|
||||
@@ -12,8 +12,20 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// Gets or sets the Master
|
||||
/// </summary>
|
||||
public EssentialsVolumeLevelConfig Master { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Program
|
||||
/// </summary>
|
||||
public EssentialsVolumeLevelConfig Program { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the AudioCallRx
|
||||
/// </summary>
|
||||
public EssentialsVolumeLevelConfig AudioCallRx { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the AudioCallTx
|
||||
/// </summary>
|
||||
public EssentialsVolumeLevelConfig AudioCallTx { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -8,42 +8,46 @@ namespace PepperDash.Essentials.Room.Config
|
||||
/// </summary>
|
||||
public class SimplRoomPropertiesConfig : EssentialsHuddleVtc1PropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the RoomPhoneNumber
|
||||
/// </summary>
|
||||
[JsonProperty("roomPhoneNumber")]
|
||||
/// <summary>
|
||||
/// Gets or sets the RoomPhoneNumber
|
||||
/// </summary>
|
||||
public string RoomPhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the RoomURI
|
||||
/// </summary>
|
||||
[JsonProperty("roomURI")]
|
||||
/// <summary>
|
||||
/// Gets or sets the RoomURI
|
||||
/// </summary>
|
||||
public string RoomURI { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SpeedDials
|
||||
/// </summary>
|
||||
[JsonProperty("speedDials")]
|
||||
/// <summary>
|
||||
/// Gets or sets the SpeedDials
|
||||
/// </summary>
|
||||
public List<SimplSpeedDial> SpeedDials { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the VolumeSliderNames
|
||||
/// </summary>
|
||||
[JsonProperty("volumeSliderNames")]
|
||||
/// <summary>
|
||||
/// Gets or sets the VolumeSliderNames
|
||||
/// </summary>
|
||||
public List<string> VolumeSliderNames { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a SimplSpeedDial
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a SimplSpeedDial
|
||||
/// </summary>
|
||||
public class SimplSpeedDial
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Number
|
||||
/// </summary>
|
||||
[JsonProperty("number")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Number
|
||||
/// </summary>
|
||||
public string Number { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,11 @@ namespace PepperDash.Essentials.Core.Utilities
|
||||
|
||||
private bool _allowActionsToExecute;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="config"></param>
|
||||
public ActionSequence(string key, DeviceConfig config)
|
||||
: base(key, config.Name)
|
||||
{
|
||||
@@ -126,9 +131,15 @@ namespace PepperDash.Essentials.Core.Utilities
|
||||
/// </summary>
|
||||
public class ActionSequencePropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the ActionSequence
|
||||
/// </summary>
|
||||
[JsonProperty("actionSequence")]
|
||||
public List<SequencedDeviceActionWrapper> ActionSequence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public ActionSequencePropertiesConfig()
|
||||
{
|
||||
ActionSequence = new List<SequencedDeviceActionWrapper>();
|
||||
@@ -140,10 +151,10 @@ namespace PepperDash.Essentials.Core.Utilities
|
||||
/// </summary>
|
||||
public class SequencedDeviceActionWrapper : DeviceActionWrapper
|
||||
{
|
||||
[JsonProperty("delayMs")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DelayMs
|
||||
/// </summary>
|
||||
[JsonProperty("delayMs")]
|
||||
public int DelayMs { get; set; }
|
||||
}
|
||||
|
||||
@@ -152,11 +163,19 @@ namespace PepperDash.Essentials.Core.Utilities
|
||||
/// </summary>
|
||||
public class ActionSequenceFactory : EssentialsDeviceFactory<ActionSequence>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public ActionSequenceFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "actionsequence" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <param name="dc">device config</param>
|
||||
/// <returns></returns>
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new ActionSequence Device");
|
||||
|
||||
@@ -14,12 +14,34 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public class VideoStatusFuncsWrapper
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the HasVideoStatusFunc
|
||||
/// </summary>
|
||||
public Func<bool> HasVideoStatusFunc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HdcpActiveFeedbackFunc
|
||||
/// </summary>
|
||||
public Func<bool> HdcpActiveFeedbackFunc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HdcpStateFeedbackFunc
|
||||
/// </summary>
|
||||
public Func<string> HdcpStateFeedbackFunc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the VideoResolutionFeedbackFunc
|
||||
/// </summary>
|
||||
public Func<string> VideoResolutionFeedbackFunc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the VideoSyncFeedbackFunc
|
||||
/// </summary>
|
||||
public Func<bool> VideoSyncFeedbackFunc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public VideoStatusFuncsWrapper()
|
||||
{
|
||||
HasVideoStatusFunc = () => true;
|
||||
@@ -30,32 +52,50 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a VideoStatusOutputs
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a VideoStatusOutputs
|
||||
/// </summary>
|
||||
public class VideoStatusOutputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the HasVideoStatusFeedback
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the HasVideoStatusFeedback
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HdcpStateFeedback
|
||||
/// </summary>
|
||||
public StringFeedback HdcpStateFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the VideoResolutionFeedback
|
||||
/// </summary>
|
||||
public StringFeedback VideoResolutionFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the VideoSyncFeedback
|
||||
/// </summary>
|
||||
public BoolFeedback VideoSyncFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the NoStatus
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the NoStatus
|
||||
/// </summary>
|
||||
public static VideoStatusOutputs NoStatus { get { return _Default; } }
|
||||
|
||||
static VideoStatusOutputs _Default = new VideoStatusOutputs(new VideoStatusFuncsWrapper
|
||||
{
|
||||
HasVideoStatusFunc = () => false
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="funcs"></param>
|
||||
public VideoStatusOutputs(VideoStatusFuncsWrapper funcs)
|
||||
{
|
||||
HasVideoStatusFeedback = new BoolFeedback("HasVideoStatusFeedback", funcs.HasVideoStatusFunc);
|
||||
@@ -66,9 +106,9 @@ namespace PepperDash.Essentials.Core
|
||||
VideoSyncFeedback = new BoolFeedback("VideoSyncFeedback", funcs.VideoSyncFeedbackFunc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FireAll method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// FireAll method
|
||||
/// </summary>
|
||||
public void FireAll()
|
||||
{
|
||||
HasVideoStatusFeedback.FireUpdate();
|
||||
@@ -78,9 +118,9 @@ namespace PepperDash.Essentials.Core
|
||||
VideoSyncFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ToList method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// ToList method
|
||||
/// </summary>
|
||||
public List<Feedback> ToList()
|
||||
{
|
||||
return new List<Feedback>
|
||||
@@ -94,9 +134,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps up the common video statuses exposed on a video input port
|
||||
/// </summary>
|
||||
// /// <summary>
|
||||
// /// Wraps up the common video statuses exposed on a video input port
|
||||
// /// </summary>
|
||||
//public class BasicVideoStatus : IBasicVideoStatus
|
||||
//{
|
||||
// public event VideoStatusChangeHandler VideoStatusChange;
|
||||
|
||||
@@ -10,15 +10,18 @@ namespace PepperDash.Essentials.Core.Web
|
||||
/// </summary>
|
||||
public class EssentialsWebApiFactory : EssentialsDeviceFactory<EssentialsWebApi>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public EssentialsWebApiFactory()
|
||||
{
|
||||
TypeNames = new List<string> { "EssentialsWebApi" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Essentials Web API Server");
|
||||
|
||||
@@ -7,11 +7,14 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// EssentialsWebApiHelpers class
|
||||
/// </summary>
|
||||
public static class EssentialsWebApiHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// GetRequestBody method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// GetRequestBody method
|
||||
/// </summary>
|
||||
public static string GetRequestBody(this HttpCwsRequest request)
|
||||
{
|
||||
var bytes = new byte[request.ContentLength];
|
||||
@@ -21,9 +24,9 @@ namespace PepperDash.Essentials.Core.Web
|
||||
return Encoding.UTF8.GetString(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapToAssemblyObject method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// MapToAssemblyObject method
|
||||
/// </summary>
|
||||
public static object MapToAssemblyObject(LoadedAssembly assembly)
|
||||
{
|
||||
return new
|
||||
@@ -33,9 +36,9 @@ namespace PepperDash.Essentials.Core.Web
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapToDeviceListObject method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// MapToDeviceListObject method
|
||||
/// </summary>
|
||||
public static object MapToDeviceListObject(IKeyed device)
|
||||
{
|
||||
return new
|
||||
@@ -47,9 +50,9 @@ namespace PepperDash.Essentials.Core.Web
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapJoinToObject method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// MapJoinToObject method
|
||||
/// </summary>
|
||||
public static object MapJoinToObject(string key, JoinMapBaseAdvanced join)
|
||||
{
|
||||
var kp = new KeyValuePair<string, JoinMapBaseAdvanced>(key, join);
|
||||
@@ -57,9 +60,9 @@ namespace PepperDash.Essentials.Core.Web
|
||||
return MapJoinToObject(kp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapJoinToObject method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// MapJoinToObject method
|
||||
/// </summary>
|
||||
public static object MapJoinToObject(KeyValuePair<string, JoinMapBaseAdvanced> join)
|
||||
{
|
||||
return new
|
||||
@@ -69,9 +72,9 @@ namespace PepperDash.Essentials.Core.Web
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapJoinDataCompleteToObject method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// MapJoinDataCompleteToObject method
|
||||
/// </summary>
|
||||
public static object MapJoinDataCompleteToObject(KeyValuePair<string, JoinDataComplete> joinData)
|
||||
{
|
||||
return new
|
||||
@@ -85,9 +88,9 @@ namespace PepperDash.Essentials.Core.Web
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapDeviceTypeToObject method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// MapDeviceTypeToObject method
|
||||
/// </summary>
|
||||
public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device)
|
||||
{
|
||||
var kp = new KeyValuePair<string, DeviceFactoryWrapper>(key, device);
|
||||
@@ -95,9 +98,9 @@ namespace PepperDash.Essentials.Core.Web
|
||||
return MapDeviceTypeToObject(kp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MapDeviceTypeToObject method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// MapDeviceTypeToObject method
|
||||
/// </summary>
|
||||
public static object MapDeviceTypeToObject(KeyValuePair<string, DeviceFactoryWrapper> device)
|
||||
{
|
||||
return new
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a EssentialsWebApiPropertiesConfig
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a EssentialsWebApiPropertiesConfig
|
||||
/// </summary>
|
||||
public class EssentialsWebApiPropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the BasePath
|
||||
/// </summary>
|
||||
[JsonProperty("basePath")]
|
||||
/// <summary>
|
||||
/// Gets or sets the BasePath
|
||||
/// </summary>
|
||||
public string BasePath { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -80,16 +80,16 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a AppDebug
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a AppDebug
|
||||
/// </summary>
|
||||
public class AppDebug
|
||||
{
|
||||
[JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
/// <summary>
|
||||
/// Gets or sets the MinimumLevel
|
||||
/// </summary>
|
||||
[JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public LogEventLevel MinimumLevel { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,9 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// </summary>
|
||||
public class DebugSessionRequestHandler : WebApiBaseRequestHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public DebugSessionRequestHandler()
|
||||
: base(true)
|
||||
{
|
||||
|
||||
@@ -5,9 +5,9 @@ using PepperDash.Core.Web.RequestHandlers;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DoNotLoadConfigOnNextBootRequestHandler
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a DoNotLoadConfigOnNextBootRequestHandler
|
||||
/// </summary>
|
||||
public class DoNotLoadConfigOnNextBootRequestHandler : WebApiBaseRequestHandler
|
||||
{
|
||||
/// <summary>
|
||||
@@ -79,15 +79,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Data
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a Data
|
||||
/// </summary>
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DoNotLoadConfigOnNextBoot
|
||||
/// </summary>
|
||||
[JsonProperty("doNotLoadConfigOnNextBoot", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the DoNotLoadConfigOnNextBoot
|
||||
/// </summary>
|
||||
public bool DoNotLoadConfigOnNextBoot { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,11 +13,20 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
private HttpCwsRouteCollection routeCollection;
|
||||
private string basePath;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="routeCollection"></param>
|
||||
/// <param name="basePath"></param>
|
||||
public GetRoutesHandler(HttpCwsRouteCollection routeCollection, string basePath) {
|
||||
this.routeCollection = routeCollection;
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles GET method requests
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
protected override void HandleGet(HttpCwsContext context)
|
||||
{
|
||||
var currentIp = CrestronEthernetHelper.GetEthernetParameter(
|
||||
@@ -49,16 +58,16 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// </summary>
|
||||
public class RoutesResponseObject
|
||||
{
|
||||
[JsonProperty("url")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Url
|
||||
/// </summary>
|
||||
[JsonProperty("url")]
|
||||
public string Url { set; get; }
|
||||
|
||||
[JsonProperty("routes")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Routes
|
||||
/// </summary>
|
||||
[JsonProperty("routes")]
|
||||
public HttpCwsRouteCollection Routes { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// </summary>
|
||||
public class GetRoutingPortsHandler : WebApiBaseRequestHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public GetRoutingPortsHandler() : base(true) { }
|
||||
|
||||
/// <summary>
|
||||
/// Handles the GET request
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
protected override void HandleGet(HttpCwsContext context)
|
||||
{
|
||||
var routeData = context.Request.RouteData;
|
||||
@@ -63,17 +70,18 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
}
|
||||
}
|
||||
|
||||
internal class ReturnValue {
|
||||
[JsonProperty("inputPorts", NullValueHandling = NullValueHandling.Ignore)]
|
||||
internal class ReturnValue
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the InputPorts
|
||||
/// </summary>
|
||||
[JsonProperty("inputPorts", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public List<string> InputPorts { get; set; }
|
||||
|
||||
[JsonProperty("outputPorts", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the OutputPorts
|
||||
/// </summary>
|
||||
[JsonProperty("outputPorts", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public List<string> OutputPorts { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// </summary>
|
||||
public class GetTieLinesRequestHandler : WebApiBaseRequestHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public GetTieLinesRequestHandler() : base(true) { }
|
||||
|
||||
/// <summary>
|
||||
/// Handles the GET request
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
protected override void HandleGet(HttpCwsContext context)
|
||||
{
|
||||
var tieLineString = JsonConvert.SerializeObject(TieLineCollection.Default.Select((tl) => new
|
||||
|
||||
@@ -195,26 +195,32 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Configuration class for SetDeviceStreamDebugRequestHandler
|
||||
/// </summary>
|
||||
public class SetDeviceStreamDebugConfig
|
||||
{
|
||||
[JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)]
|
||||
/// <summary>
|
||||
/// Gets or sets the DeviceKey
|
||||
/// </summary>
|
||||
[JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)]
|
||||
public string DeviceKey { get; set; }
|
||||
|
||||
[JsonProperty("setting", NullValueHandling = NullValueHandling.Include)]
|
||||
/// <summary>
|
||||
/// Gets or sets the Setting
|
||||
/// </summary>
|
||||
[JsonProperty("setting", NullValueHandling = NullValueHandling.Include)]
|
||||
public string Setting { get; set; }
|
||||
|
||||
[JsonProperty("timeout")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Timeout
|
||||
/// </summary>
|
||||
[JsonProperty("timeout")]
|
||||
public int Timeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public SetDeviceStreamDebugConfig()
|
||||
{
|
||||
DeviceKey = null;
|
||||
|
||||
Reference in New Issue
Block a user