mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-09 01:35:02 +00:00
docs: complete XML documentation for all projects with inheritdoc tags
Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Key of the parent device in the DeviceManager
|
||||
/// </summary>
|
||||
[JsonProperty("parentDeviceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the ParentDeviceKey
|
||||
/// </summary>
|
||||
public string ParentDeviceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,14 +9,26 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration of AudioChangeType values
|
||||
/// </summary>
|
||||
public enum AudioChangeType
|
||||
{
|
||||
Mute, Volume
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a AudioChangeEventArgs
|
||||
/// </summary>
|
||||
public class AudioChangeEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the ChangeType
|
||||
/// </summary>
|
||||
public AudioChangeType ChangeType { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the AudioDevice
|
||||
/// </summary>
|
||||
public IBasicVolumeControls AudioDevice { get; private set; }
|
||||
|
||||
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
|
||||
|
||||
@@ -3,9 +3,15 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a CameraListItem
|
||||
/// </summary>
|
||||
public class CameraListItem
|
||||
{
|
||||
[JsonProperty("deviceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DeviceKey
|
||||
/// </summary>
|
||||
public string DeviceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -46,6 +52,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// A name that will override the source's name on the UI
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds control of codec transmit volume
|
||||
/// Defines the contract for ITransmitVolume
|
||||
/// </summary>
|
||||
public interface ITransmitVolume
|
||||
{
|
||||
@@ -34,7 +34,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds control of codec privacy function (microphone mute)
|
||||
/// Defines the contract for IPrivacy
|
||||
/// </summary>
|
||||
public interface IPrivacy
|
||||
{
|
||||
|
||||
@@ -52,6 +52,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// If set, this name will be used as the PreferredName instead of the device name.
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -17,6 +17,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// <param name="device"></param>
|
||||
/// <param name="propertyName"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetFeedbackProperty method
|
||||
/// </summary>
|
||||
public static Feedback GetFeedbackProperty(this Device device, string propertyName)
|
||||
{
|
||||
var feedback = DeviceJsonApi.GetPropertyByName(device.Key, propertyName) as Feedback;
|
||||
|
||||
@@ -11,12 +11,18 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DeviceJsonApi
|
||||
/// </summary>
|
||||
public class DeviceJsonApi
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="json"></param>
|
||||
/// <summary>
|
||||
/// DoDeviceActionWithJson method
|
||||
/// </summary>
|
||||
public static void DoDeviceActionWithJson(string json)
|
||||
{
|
||||
if (String.IsNullOrEmpty(json))
|
||||
@@ -43,6 +49,9 @@ namespace PepperDash.Essentials.Core
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
/// <summary>
|
||||
/// DoDeviceAction method
|
||||
/// </summary>
|
||||
public static void DoDeviceAction(DeviceActionWrapper action)
|
||||
{
|
||||
var key = action.DeviceKey;
|
||||
@@ -187,6 +196,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetProperties method
|
||||
/// </summary>
|
||||
public static string GetProperties(string deviceObjectPath)
|
||||
{
|
||||
var obj = FindObjectOnPath(deviceObjectPath);
|
||||
@@ -205,6 +217,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// <param name="deviceObjectPath"></param>
|
||||
/// <param name="propertyName"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetPropertyByName method
|
||||
/// </summary>
|
||||
public static object GetPropertyByName(string deviceObjectPath, string propertyName)
|
||||
{
|
||||
var dev = FindObjectOnPath(deviceObjectPath);
|
||||
@@ -230,6 +245,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetMethods method
|
||||
/// </summary>
|
||||
public static string GetMethods(string deviceObjectPath)
|
||||
{
|
||||
var obj = FindObjectOnPath(deviceObjectPath);
|
||||
@@ -244,6 +262,9 @@ namespace PepperDash.Essentials.Core
|
||||
return JsonConvert.SerializeObject(methods, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetApiMethods method
|
||||
/// </summary>
|
||||
public static string GetApiMethods(string deviceObjectPath)
|
||||
{
|
||||
var obj = FindObjectOnPath(deviceObjectPath);
|
||||
@@ -261,8 +282,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Walks down a dotted object path, starting with a Device, and returns the object
|
||||
/// at the end of the path
|
||||
/// FindObjectOnPath method
|
||||
/// </summary>
|
||||
public static object FindObjectOnPath(string deviceObjectPath)
|
||||
{
|
||||
@@ -351,6 +371,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
/// <param name="deviceObjectPath"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// SetProperty method
|
||||
/// </summary>
|
||||
public static string SetProperty(string deviceObjectPath)
|
||||
{
|
||||
throw new NotImplementedException("This could be really useful. Finish it please");
|
||||
@@ -373,17 +396,35 @@ namespace PepperDash.Essentials.Core
|
||||
public class DeviceActionWrapper
|
||||
{
|
||||
public string DeviceKey { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the MethodName
|
||||
/// </summary>
|
||||
public string MethodName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the Params
|
||||
/// </summary>
|
||||
public object[] Params { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a PropertyNameType
|
||||
/// </summary>
|
||||
public class PropertyNameType
|
||||
{
|
||||
private object Parent;
|
||||
|
||||
[JsonIgnore]
|
||||
/// <summary>
|
||||
/// Gets or sets the PropInfo
|
||||
/// </summary>
|
||||
public PropertyInfo PropInfo { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get { return PropInfo.Name; } }
|
||||
/// <summary>
|
||||
/// Gets or sets the Type
|
||||
/// </summary>
|
||||
public string Type { get { return PropInfo.PropertyType.Name; } }
|
||||
public string Value
|
||||
{
|
||||
@@ -405,7 +446,13 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the CanRead
|
||||
/// </summary>
|
||||
public bool CanRead { get { return PropInfo.CanRead; } }
|
||||
/// <summary>
|
||||
/// Gets or sets the CanWrite
|
||||
/// </summary>
|
||||
public bool CanWrite { get { return PropInfo.CanWrite; } }
|
||||
|
||||
|
||||
@@ -416,11 +463,20 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a MethodNameParams
|
||||
/// </summary>
|
||||
public class MethodNameParams
|
||||
{
|
||||
[JsonIgnore]
|
||||
/// <summary>
|
||||
/// Gets or sets the MethodInfo
|
||||
/// </summary>
|
||||
public MethodInfo MethodInfo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get { return MethodInfo.Name; } }
|
||||
public IEnumerable<NameType> Params
|
||||
{
|
||||
@@ -437,13 +493,25 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a NameType
|
||||
/// </summary>
|
||||
public class NameType
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the Type
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
/// <summary>
|
||||
/// Represents a ApiAttribute
|
||||
/// </summary>
|
||||
public class ApiAttribute : Attribute
|
||||
{
|
||||
|
||||
|
||||
@@ -25,12 +25,18 @@ namespace PepperDash.Essentials.Core
|
||||
private static readonly Dictionary<string, IKeyed> Devices = new Dictionary<string, IKeyed>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a copy of all the devices in a list
|
||||
/// Gets or sets the AllDevices
|
||||
/// </summary>
|
||||
public static List<IKeyed> AllDevices { get { return new List<IKeyed>(Devices.Values); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the AddDeviceEnabled
|
||||
/// </summary>
|
||||
public static bool AddDeviceEnabled;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize method
|
||||
/// </summary>
|
||||
public static void Initialize(CrestronControlSystem cs)
|
||||
{
|
||||
AddDeviceEnabled = true;
|
||||
@@ -53,7 +59,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calls activate steps on all Device class items
|
||||
/// ActivateAll method
|
||||
/// </summary>
|
||||
public static void ActivateAll()
|
||||
{
|
||||
@@ -164,7 +170,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calls activate on all Device class items
|
||||
/// DeactivateAll method
|
||||
/// </summary>
|
||||
public static void DeactivateAll()
|
||||
{
|
||||
@@ -258,6 +264,9 @@ namespace PepperDash.Essentials.Core
|
||||
// Debug.LogMessage(LogEventLevel.Information, "Not yet implemented. Stay tuned");
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// AddDevice method
|
||||
/// </summary>
|
||||
public static void AddDevice(IKeyed newDev)
|
||||
{
|
||||
try
|
||||
@@ -296,6 +305,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// AddDevice method
|
||||
/// </summary>
|
||||
public static void AddDevice(IEnumerable<IKeyed> devicesToAdd)
|
||||
{
|
||||
try
|
||||
@@ -332,6 +344,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// RemoveDevice method
|
||||
/// </summary>
|
||||
public static void RemoveDevice(IKeyed newDev)
|
||||
{
|
||||
try
|
||||
@@ -352,18 +367,27 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetDeviceKeys method
|
||||
/// </summary>
|
||||
public static IEnumerable<string> GetDeviceKeys()
|
||||
{
|
||||
//return _Devices.Select(d => d.Key).ToList();
|
||||
return Devices.Keys;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetDevices method
|
||||
/// </summary>
|
||||
public static IEnumerable<IKeyed> GetDevices()
|
||||
{
|
||||
//return _Devices.Select(d => d.Key).ToList();
|
||||
return Devices.Values;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetDeviceForKey method
|
||||
/// </summary>
|
||||
public static IKeyed GetDeviceForKey(string key)
|
||||
{
|
||||
//return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
|
||||
@@ -377,6 +401,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Console handler that simulates com port data receive
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <summary>
|
||||
/// SimulateComReceiveOnDevice method
|
||||
/// </summary>
|
||||
public static void SimulateComReceiveOnDevice(string s)
|
||||
{
|
||||
// devcomsim:1 xyzabc
|
||||
@@ -400,6 +427,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Prints a list of routing inputs and outputs by device key.
|
||||
/// </summary>
|
||||
/// <param name="s">Device key from which to report data</param>
|
||||
/// <summary>
|
||||
/// GetRoutingPorts method
|
||||
/// </summary>
|
||||
public static void GetRoutingPorts(string s)
|
||||
{
|
||||
var device = GetDeviceForKey(s);
|
||||
@@ -427,6 +457,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Attempts to set the debug level of a device
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <summary>
|
||||
/// SetDeviceStreamDebugging method
|
||||
/// </summary>
|
||||
public static void SetDeviceStreamDebugging(string s)
|
||||
{
|
||||
if (String.IsNullOrEmpty(s) || s.Contains("?"))
|
||||
@@ -492,7 +525,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets stream debugging settings to off for all devices
|
||||
/// DisableAllDeviceStreamDebugging method
|
||||
/// </summary>
|
||||
public static void DisableAllDeviceStreamDebugging()
|
||||
{
|
||||
|
||||
@@ -71,6 +71,10 @@ namespace PepperDash.Essentials.Core
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CustomActivate method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
CreateMobileControlMessengers();
|
||||
@@ -105,6 +109,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
|
||||
/// <summary>
|
||||
/// Represents a ConfigSnippetAttribute
|
||||
/// </summary>
|
||||
public class ConfigSnippetAttribute : Attribute
|
||||
{
|
||||
private string _ConfigSnippet;
|
||||
@@ -134,7 +141,7 @@ namespace PepperDash.Essentials.Core
|
||||
public List<string> TypeNames { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Loads an item to the DeviceFactory.FactoryMethods dictionary for each entry in the TypeNames list
|
||||
/// LoadTypeFactories method
|
||||
/// </summary>
|
||||
public void LoadTypeFactories()
|
||||
{
|
||||
@@ -163,12 +170,12 @@ namespace PepperDash.Essentials.Core
|
||||
#region IProcessorExtensionDeviceFactory Members
|
||||
|
||||
/// <summary>
|
||||
/// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device
|
||||
/// Gets or sets the TypeNames
|
||||
/// </summary>
|
||||
public List<string> TypeNames { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Loads an item to the ProcessorExtensionDeviceFactory.ProcessorExtensionFactoryMethods dictionary for each entry in the TypeNames list
|
||||
/// LoadFactories method
|
||||
/// </summary>
|
||||
public void LoadFactories()
|
||||
{
|
||||
@@ -211,6 +218,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public string MinimumEssentialsFrameworkVersion { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DevelopmentEssentialsFrameworkVersions
|
||||
/// </summary>
|
||||
public List<string> DevelopmentEssentialsFrameworkVersions { get; protected set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IOnline
|
||||
/// </summary>
|
||||
public interface IOnline
|
||||
{
|
||||
BoolFeedback IsOnline { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a device that can have a video sync providing device attached to it
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for IAttachVideoStatus
|
||||
/// </summary>
|
||||
public interface IAttachVideoStatus : IKeyed
|
||||
{
|
||||
// Extension methods will depend on this
|
||||
|
||||
@@ -13,6 +13,9 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Devices
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a GenericIrController
|
||||
/// </summary>
|
||||
public class GenericIrController: EssentialsBridgeableDevice
|
||||
{
|
||||
//data storage for bridging
|
||||
@@ -23,6 +26,9 @@ namespace PepperDash.Essentials.Core.Devices
|
||||
|
||||
private readonly IrOutputPortController _port;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IrCommands
|
||||
/// </summary>
|
||||
public string[] IrCommands {get { return _port.IrFileCommands; }}
|
||||
|
||||
public GenericIrController(string key, string name, IrOutputPortController irPort) : base(key, name)
|
||||
@@ -55,6 +61,10 @@ namespace PepperDash.Essentials.Core.Devices
|
||||
|
||||
#region Overrides of EssentialsBridgeableDevice
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
//if driver isn't loaded yet, store the variables until it is loaded, then call the LinkToApi method again
|
||||
@@ -148,12 +158,18 @@ Value.Metadata.Description-'{3}'",
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Press method
|
||||
/// </summary>
|
||||
public void Press(string command, bool pressRelease)
|
||||
{
|
||||
_port.PressRelease(command, pressRelease);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a GenericIrControllerFactory
|
||||
/// </summary>
|
||||
public class GenericIrControllerFactory : EssentialsDeviceFactory<GenericIrController>
|
||||
{
|
||||
public GenericIrControllerFactory()
|
||||
@@ -162,6 +178,10 @@ Value.Metadata.Description-'{3}'",
|
||||
}
|
||||
#region Overrides of EssentialsDeviceFactory<GenericIRController>
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic IR Controller Device");
|
||||
|
||||
@@ -10,10 +10,16 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Devices
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a GenericCommunicationMonitoredDevice
|
||||
/// </summary>
|
||||
public class GenericCommunicationMonitoredDevice : Device, ICommunicationMonitor
|
||||
{
|
||||
IBasicCommunication Client;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the CommunicationMonitor
|
||||
/// </summary>
|
||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||
|
||||
public GenericCommunicationMonitoredDevice(string key, string name, IBasicCommunication comm, string pollString,
|
||||
@@ -36,12 +42,19 @@ namespace PepperDash.Essentials.Core.Devices
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CustomActivate method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
CommunicationMonitor.Start();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deactivate method
|
||||
/// </summary>
|
||||
public override bool Deactivate()
|
||||
{
|
||||
CommunicationMonitor.Stop();
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
/// <param name="attachDev"></param>
|
||||
/// <returns>Attached VideoStatusOutputs or the default if none attached</returns>
|
||||
/// <summary>
|
||||
/// GetVideoStatuses method
|
||||
/// </summary>
|
||||
public static VideoStatusOutputs GetVideoStatuses(this IAttachVideoStatus attachedDev)
|
||||
{
|
||||
// See if this device is connected to a status-providing port
|
||||
@@ -29,6 +32,9 @@ namespace PepperDash.Essentials.Core
|
||||
return VideoStatusOutputs.NoStatus;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// HasVideoStatuses method
|
||||
/// </summary>
|
||||
public static bool HasVideoStatuses(this IAttachVideoStatus attachedDev)
|
||||
{
|
||||
return TieLineCollection.Default.FirstOrDefault(t =>
|
||||
|
||||
@@ -3,6 +3,9 @@ using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IDspPresets
|
||||
/// </summary>
|
||||
public interface IDspPresets
|
||||
{
|
||||
Dictionary<string, IKeyName> Presets { get; }
|
||||
|
||||
@@ -6,6 +6,9 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IHasFeedback
|
||||
/// </summary>
|
||||
public interface IHasFeedback : IKeyed
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,11 +6,17 @@ using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IBasicVideoMute
|
||||
/// </summary>
|
||||
public interface IBasicVideoMute
|
||||
{
|
||||
void VideoMuteToggle();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the contract for IBasicVideoMuteWithFeedback
|
||||
/// </summary>
|
||||
public interface IBasicVideoMuteWithFeedback : IBasicVideoMute
|
||||
{
|
||||
BoolFeedback VideoMuteIsOn { get; }
|
||||
|
||||
@@ -8,6 +8,9 @@ using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Devices
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IReconfigurableDevice
|
||||
/// </summary>
|
||||
public interface IReconfigurableDevice
|
||||
{
|
||||
event EventHandler<EventArgs> ConfigChanged;
|
||||
|
||||
@@ -8,6 +8,9 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IUsageTracking
|
||||
/// </summary>
|
||||
public interface IUsageTracking
|
||||
{
|
||||
UsageTracking UsageTracker { get; set; }
|
||||
@@ -21,18 +24,39 @@ namespace PepperDash.Essentials.Core
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a UsageTracking
|
||||
/// </summary>
|
||||
public class UsageTracking
|
||||
{
|
||||
public event EventHandler<DeviceUsageEventArgs> DeviceUsageEnded;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the InUseTracker
|
||||
/// </summary>
|
||||
public InUseTracking InUseTracker { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the UsageIsTracked
|
||||
/// </summary>
|
||||
public bool UsageIsTracked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the UsageTrackingStarted
|
||||
/// </summary>
|
||||
public bool UsageTrackingStarted { get; protected set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the UsageStartTime
|
||||
/// </summary>
|
||||
public DateTime UsageStartTime { get; protected set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the UsageEndTime
|
||||
/// </summary>
|
||||
public DateTime UsageEndTime { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Parent
|
||||
/// </summary>
|
||||
public Device Parent { get; private set; }
|
||||
|
||||
public UsageTracking(Device parent)
|
||||
@@ -58,7 +82,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Stores the usage start time
|
||||
/// StartDeviceUsage method
|
||||
/// </summary>
|
||||
public void StartDeviceUsage()
|
||||
{
|
||||
@@ -97,9 +121,18 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a DeviceUsageEventArgs
|
||||
/// </summary>
|
||||
public class DeviceUsageEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the UsageEndTime
|
||||
/// </summary>
|
||||
public DateTime UsageEndTime { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the MinutesUsed
|
||||
/// </summary>
|
||||
public int MinutesUsed { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines basic volume control methods
|
||||
/// Defines the contract for IHasVolumeControl
|
||||
/// </summary>
|
||||
public interface IHasVolumeControl
|
||||
{
|
||||
@@ -52,9 +52,9 @@ namespace PepperDash.Essentials.Core
|
||||
void MuteOff();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds feedback and direct volume level set to IBasicVolumeControls
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for IBasicVolumeWithFeedback
|
||||
/// </summary>
|
||||
public interface IBasicVolumeWithFeedback : IBasicVolumeControls
|
||||
{
|
||||
BoolFeedback MuteFeedback { get; }
|
||||
@@ -64,9 +64,9 @@ namespace PepperDash.Essentials.Core
|
||||
IntFeedback VolumeLevelFeedback { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the ability to display a raw volume level and the units of that level
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for IBasicVolumeWithFeedbackAdvanced
|
||||
/// </summary>
|
||||
public interface IBasicVolumeWithFeedbackAdvanced : IBasicVolumeWithFeedback
|
||||
{
|
||||
int RawVolumeLevel { get; }
|
||||
@@ -83,8 +83,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A class that implements this contains a reference to a current IBasicVolumeControls device.
|
||||
/// The class may have multiple IBasicVolumeControls.
|
||||
/// Defines the contract for IHasCurrentVolumeControls
|
||||
/// </summary>
|
||||
public interface IHasCurrentVolumeControls
|
||||
{
|
||||
@@ -97,9 +96,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for IFullAudioSettings
|
||||
/// </summary>
|
||||
public interface IFullAudioSettings : IBasicVolumeWithFeedback
|
||||
{
|
||||
void SetBalance(ushort level);
|
||||
@@ -136,11 +135,9 @@ namespace PepperDash.Essentials.Core
|
||||
IntFeedback DefaultVolumeFeedback { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A class that implements this, contains a reference to an IBasicVolumeControls device.
|
||||
/// For example, speakers attached to an audio zone. The speakers can provide reference
|
||||
/// to their linked volume control.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for IHasVolumeDevice
|
||||
/// </summary>
|
||||
public interface IHasVolumeDevice
|
||||
{
|
||||
IBasicVolumeControls VolumeDevice { get; }
|
||||
|
||||
@@ -32,8 +32,14 @@ namespace PepperDash.Essentials.Core
|
||||
public string DriverFilepath { get; private set; }
|
||||
public bool DriverIsLoaded { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IrFileCommands
|
||||
/// </summary>
|
||||
public string[] IrFileCommands { get { return IrPort.AvailableStandardIRCmds(IrPortUid); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the UseBridgeJoinMap
|
||||
/// </summary>
|
||||
public bool UseBridgeJoinMap { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -99,6 +105,9 @@ namespace PepperDash.Essentials.Core
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PrintAvailableCommands method
|
||||
/// </summary>
|
||||
public void PrintAvailableCommands()
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Available IR Commands in IR File {0}", IrPortUid);
|
||||
@@ -113,6 +122,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Loads the IR driver at path
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <summary>
|
||||
/// LoadDriver method
|
||||
/// </summary>
|
||||
public void LoadDriver(string path)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "***Loading IR File***");
|
||||
@@ -136,9 +148,10 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Starts and stops IR command on driver. Safe for missing commands
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// PressRelease method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public virtual void PressRelease(string command, bool state)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "IR:'{0}'={1}", command, state);
|
||||
@@ -163,9 +176,10 @@ namespace PepperDash.Essentials.Core
|
||||
IrPort.Release();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pulses a command on driver. Safe for missing commands
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Pulse method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public virtual void Pulse(string command, ushort time)
|
||||
{
|
||||
if (IrPort == null)
|
||||
|
||||
@@ -74,6 +74,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
/// <summary>
|
||||
/// Gets or sets the Type
|
||||
/// </summary>
|
||||
public eLevelControlType Type { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using PepperDash.Core;
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for any device that has a battery that can be monitored
|
||||
/// Defines the contract for IHasBatteryStats
|
||||
/// </summary>
|
||||
public interface IHasBatteryStats : IKeyName
|
||||
{
|
||||
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Interface for any device that has a battery that can be monitored and the ability to charge and discharge
|
||||
/// Defines the contract for IHasBatteryCharging
|
||||
/// </summary>
|
||||
public interface IHasBatteryCharging : IHasBatteryStats
|
||||
{
|
||||
@@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Interface for any device that is able to control its power, has a configurable reboot time, and has batteries that can be monitored
|
||||
/// Defines the contract for IHasPowerCycleWithBattery
|
||||
/// </summary>
|
||||
public interface IHasPowerCycleWithBattery : IHasPowerCycle, IHasBatteryStats
|
||||
{
|
||||
|
||||
@@ -9,6 +9,9 @@ using Crestron.SimplSharpPro.UI;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of PresentationSourceType values
|
||||
/// </summary>
|
||||
public enum PresentationSourceType
|
||||
{
|
||||
None, Dvd, Laptop, PC, SetTopBox, VCR
|
||||
|
||||
@@ -9,6 +9,9 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a PresetListItem
|
||||
/// </summary>
|
||||
public class PresetListItem : AudioControlListItemBase
|
||||
{
|
||||
[JsonIgnore]
|
||||
|
||||
@@ -35,6 +35,9 @@ namespace PepperDash.Essentials.Core.Devices
|
||||
/// Sets the Config, calls CustomSetConfig and fires the ConfigChanged event
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <summary>
|
||||
/// SetConfig method
|
||||
/// </summary>
|
||||
public void SetConfig(DeviceConfig config)
|
||||
{
|
||||
Config = config;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectJoinOffsets
|
||||
/// </summary>
|
||||
public class SmartObjectJoinOffsets
|
||||
{
|
||||
public const ushort Dpad = 1;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents an item in a source list - can be deserialized into.
|
||||
/// Represents a SourceListItem
|
||||
/// </summary>
|
||||
public class SourceListItem
|
||||
{
|
||||
@@ -76,6 +76,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// A name that will override the source's name on the UI
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Enumeration of ChangeType values
|
||||
/// </summary>
|
||||
public enum ChangeType
|
||||
{
|
||||
WillChange, DidChange
|
||||
|
||||
Reference in New Issue
Block a user