mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
wip: update XML comments
This commit is contained in:
@@ -11,15 +11,54 @@ namespace PepperDash.Essentials.Core.Devices.DeviceTypeInterfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDisplayBasic
|
public interface IDisplayBasic
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to HDMI 1
|
||||||
|
/// </summary>
|
||||||
void InputHdmi1();
|
void InputHdmi1();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to HDMI 2
|
||||||
|
/// </summary>
|
||||||
void InputHdmi2();
|
void InputHdmi2();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to HDMI 3
|
||||||
|
/// </summary>
|
||||||
void InputHdmi3();
|
void InputHdmi3();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to HDMI 4
|
||||||
|
/// </summary>
|
||||||
void InputHdmi4();
|
void InputHdmi4();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to DisplayPort 1
|
||||||
|
/// </summary>
|
||||||
void InputDisplayPort1();
|
void InputDisplayPort1();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to DVI 1
|
||||||
|
/// </summary>
|
||||||
void InputDvi1();
|
void InputDvi1();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to Video 1
|
||||||
|
/// </summary>
|
||||||
void InputVideo1();
|
void InputVideo1();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to VGA 1
|
||||||
|
/// </summary>
|
||||||
void InputVga1();
|
void InputVga1();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to VGA 2
|
||||||
|
/// </summary>
|
||||||
void InputVga2();
|
void InputVga2();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the input to RGB 1
|
||||||
|
/// </summary>
|
||||||
void InputRgb1();
|
void InputRgb1();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,15 +7,15 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Base class for audio control list items
|
||||||
|
/// </summary>
|
||||||
public abstract class AudioControlListItemBase
|
public abstract class AudioControlListItemBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Key of the parent device in the DeviceManager
|
/// Key of the parent device in the DeviceManager
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("parentDeviceKey")]
|
[JsonProperty("parentDeviceKey")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the ParentDeviceKey
|
|
||||||
/// </summary>
|
|
||||||
public string ParentDeviceKey { get; set; }
|
public string ParentDeviceKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -14,7 +14,15 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum AudioChangeType
|
public enum AudioChangeType
|
||||||
{
|
{
|
||||||
Mute, Volume
|
/// <summary>
|
||||||
|
/// Mute change
|
||||||
|
/// </summary>
|
||||||
|
Mute,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Volume change
|
||||||
|
/// </summary>
|
||||||
|
Volume
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -26,11 +34,17 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// Gets or sets the ChangeType
|
/// Gets or sets the ChangeType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AudioChangeType ChangeType { get; private set; }
|
public AudioChangeType ChangeType { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the AudioDevice
|
/// Gets or sets the AudioDevice
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IBasicVolumeControls AudioDevice { get; private set; }
|
public IBasicVolumeControls AudioDevice { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="device">device that changed</param>
|
||||||
|
/// <param name="changeType">type of change</param>
|
||||||
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
|
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
|
||||||
{
|
{
|
||||||
ChangeType = changeType;
|
ChangeType = changeType;
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class CameraListItem
|
public class CameraListItem
|
||||||
{
|
{
|
||||||
[JsonProperty("deviceKey")]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the DeviceKey
|
/// Key of the camera device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("deviceKey")]
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -52,9 +52,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// A name that will override the source's name on the UI
|
/// A name that will override the source's name on the UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the Name
|
|
||||||
/// </summary>
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,36 @@ namespace PepperDash.Essentials.Core
|
|||||||
public interface IReceiveVolume
|
public interface IReceiveVolume
|
||||||
{
|
{
|
||||||
// Break this out into 3 interfaces
|
// Break this out into 3 interfaces
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the receive volume level
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="level">volume level to set</param>
|
||||||
void SetReceiveVolume(ushort level);
|
void SetReceiveVolume(ushort level);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mutes the receive audio
|
||||||
|
/// </summary>
|
||||||
void ReceiveMuteOn();
|
void ReceiveMuteOn();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unmutes the receive audio
|
||||||
|
/// </summary>
|
||||||
void ReceiveMuteOff();
|
void ReceiveMuteOff();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toggles the receive mute state
|
||||||
|
/// </summary>
|
||||||
void ReceiveMuteToggle();
|
void ReceiveMuteToggle();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Feedback for the receive volume level
|
||||||
|
/// </summary>
|
||||||
IntFeedback ReceiveLevelFeedback { get; }
|
IntFeedback ReceiveLevelFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Feedback for the receive mute state
|
||||||
|
/// </summary>
|
||||||
BoolFeedback ReceiveMuteIsOnFeedback { get; }
|
BoolFeedback ReceiveMuteIsOnFeedback { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,11 +50,35 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ITransmitVolume
|
public interface ITransmitVolume
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the transmit volume level
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="level">volume level to set</param>
|
||||||
void SetTransmitVolume(ushort level);
|
void SetTransmitVolume(ushort level);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mutes the transmit audio
|
||||||
|
/// </summary>
|
||||||
void TransmitMuteOn();
|
void TransmitMuteOn();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unmutes the transmit audio
|
||||||
|
/// </summary>
|
||||||
void TransmitMuteOff();
|
void TransmitMuteOff();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toggles the transmit mute state
|
||||||
|
/// </summary>
|
||||||
void TransmitMuteToggle();
|
void TransmitMuteToggle();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Feedback for the transmit volume level
|
||||||
|
/// </summary>
|
||||||
IntFeedback TransmitLevelFeedback { get; }
|
IntFeedback TransmitLevelFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Feedback for the transmit mute state
|
||||||
|
/// </summary>
|
||||||
BoolFeedback TransmitMuteIsOnFeedback { get; }
|
BoolFeedback TransmitMuteIsOnFeedback { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,9 +87,24 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPrivacy
|
public interface IPrivacy
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enables privacy mode
|
||||||
|
/// </summary>
|
||||||
void PrivacyModeOn();
|
void PrivacyModeOn();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Disables privacy mode
|
||||||
|
/// </summary>
|
||||||
void PrivacyModeOff();
|
void PrivacyModeOff();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toggles privacy mode
|
||||||
|
/// </summary>
|
||||||
void PrivacyModeToggle();
|
void PrivacyModeToggle();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Feedback for the privacy mode state
|
||||||
|
/// </summary>
|
||||||
BoolFeedback PrivacyModeIsOnFeedback { get; }
|
BoolFeedback PrivacyModeIsOnFeedback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,10 +15,20 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class CrestronProcessor : Device, ISwitchedOutputCollection
|
public class CrestronProcessor : Device, ISwitchedOutputCollection
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Collection of switched outputs (relays) on the processor
|
||||||
|
/// </summary>
|
||||||
public Dictionary<uint, ISwitchedOutput> SwitchedOutputs { get; private set; }
|
public Dictionary<uint, ISwitchedOutput> SwitchedOutputs { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The underlying CrestronControlSystem processor
|
||||||
|
/// </summary>
|
||||||
public Crestron.SimplSharpPro.CrestronControlSystem Processor { get; private set; }
|
public Crestron.SimplSharpPro.CrestronControlSystem Processor { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">key for the processor</param>
|
||||||
public CrestronProcessor(string key)
|
public CrestronProcessor(string key)
|
||||||
: base(key)
|
: base(key)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,14 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class DeviceApiBase
|
public abstract class DeviceApiBase
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Action API dictionary
|
||||||
|
/// </summary>
|
||||||
public Dictionary<string, Object> ActionApi { get; protected set; }
|
public Dictionary<string, Object> ActionApi { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Feedback API dictionary
|
||||||
|
/// </summary>
|
||||||
public Dictionary<string, Feedback> FeedbackApi { get; protected set; }
|
public Dictionary<string, Feedback> FeedbackApi { get; protected set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,18 +8,18 @@ using PepperDash.Core;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// DeviceFeedbackExtensions class
|
||||||
|
/// </summary>
|
||||||
public static class DeviceFeedbackExtensions
|
public static class DeviceFeedbackExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to get and return a feedback property from a device by name.
|
/// Attempts to get and return a feedback property from a device by name.
|
||||||
/// If unsuccessful, returns null.
|
/// If unsuccessful, returns null.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="device"></param>
|
/// <param name="device">device to get feedback from</param>
|
||||||
/// <param name="propertyName"></param>
|
/// <param name="propertyName">name of the feedback property</param>
|
||||||
/// <returns></returns>
|
/// <returns>Feedback property if found, otherwise null</returns>
|
||||||
/// <summary>
|
|
||||||
/// GetFeedbackProperty method
|
|
||||||
/// </summary>
|
|
||||||
public static Feedback GetFeedbackProperty(this Device device, string propertyName)
|
public static Feedback GetFeedbackProperty(this Device device, string propertyName)
|
||||||
{
|
{
|
||||||
var feedback = DeviceJsonApi.GetPropertyByName(device.Key, propertyName) as Feedback;
|
var feedback = DeviceJsonApi.GetPropertyByName(device.Key, propertyName) as Feedback;
|
||||||
|
|||||||
@@ -16,13 +16,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class DeviceJsonApi
|
public class DeviceJsonApi
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="json"></param>
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DoDeviceActionWithJson method
|
/// DoDeviceActionWithJson method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="json">json method</param>
|
||||||
public static void DoDeviceActionWithJson(string json)
|
public static void DoDeviceActionWithJson(string json)
|
||||||
{
|
{
|
||||||
if (String.IsNullOrEmpty(json))
|
if (String.IsNullOrEmpty(json))
|
||||||
@@ -45,13 +42,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="action"></param>
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DoDeviceAction method
|
/// DoDeviceAction method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="action">action method</param>
|
||||||
public static void DoDeviceAction(DeviceActionWrapper action)
|
public static void DoDeviceAction(DeviceActionWrapper action)
|
||||||
{
|
{
|
||||||
var key = action.DeviceKey;
|
var key = action.DeviceKey;
|
||||||
@@ -111,6 +105,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DoDeviceActionAsync method
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="action">action method</param>
|
||||||
public static async Task DoDeviceActionAsync(DeviceActionWrapper action)
|
public static async Task DoDeviceActionAsync(DeviceActionWrapper action)
|
||||||
{
|
{
|
||||||
var key = action.DeviceKey;
|
var key = action.DeviceKey;
|
||||||
@@ -194,11 +192,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the properties on a device
|
/// Gets the properties on a device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
/// <param name="deviceObjectPath">The path to the device object</param>
|
||||||
/// <returns></returns>
|
/// <returns>A JSON string representing the properties of the device</returns>
|
||||||
/// <summary>
|
|
||||||
/// GetProperties method
|
|
||||||
/// </summary>
|
|
||||||
public static string GetProperties(string deviceObjectPath)
|
public static string GetProperties(string deviceObjectPath)
|
||||||
{
|
{
|
||||||
var obj = FindObjectOnPath(deviceObjectPath);
|
var obj = FindObjectOnPath(deviceObjectPath);
|
||||||
@@ -214,12 +209,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a property from a device path by name
|
/// Gets a property from a device path by name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="deviceObjectPath"></param>
|
/// <param name="deviceObjectPath">The path to the device object</param>
|
||||||
/// <param name="propertyName"></param>
|
/// <param name="propertyName">The name of the property to get</param>
|
||||||
/// <returns></returns>
|
/// <returns>The value of the property</returns>
|
||||||
/// <summary>
|
|
||||||
/// GetPropertyByName method
|
|
||||||
/// </summary>
|
|
||||||
public static object GetPropertyByName(string deviceObjectPath, string propertyName)
|
public static object GetPropertyByName(string deviceObjectPath, string propertyName)
|
||||||
{
|
{
|
||||||
var dev = FindObjectOnPath(deviceObjectPath);
|
var dev = FindObjectOnPath(deviceObjectPath);
|
||||||
@@ -243,11 +235,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the methods on a device
|
/// Gets the methods on a device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
/// <param name="deviceObjectPath">The path to the device object</param>
|
||||||
/// <returns></returns>
|
/// <returns>A JSON string representing the methods of the device</returns>
|
||||||
/// <summary>
|
|
||||||
/// GetMethods method
|
|
||||||
/// </summary>
|
|
||||||
public static string GetMethods(string deviceObjectPath)
|
public static string GetMethods(string deviceObjectPath)
|
||||||
{
|
{
|
||||||
var obj = FindObjectOnPath(deviceObjectPath);
|
var obj = FindObjectOnPath(deviceObjectPath);
|
||||||
@@ -263,8 +252,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// GetApiMethods method
|
/// Gets the API methods on a device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="deviceObjectPath">The path to the device object</param>
|
||||||
|
/// <returns>A JSON string representing the API methods of the device</returns>
|
||||||
public static string GetApiMethods(string deviceObjectPath)
|
public static string GetApiMethods(string deviceObjectPath)
|
||||||
{
|
{
|
||||||
var obj = FindObjectOnPath(deviceObjectPath);
|
var obj = FindObjectOnPath(deviceObjectPath);
|
||||||
@@ -284,6 +275,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// FindObjectOnPath method
|
/// FindObjectOnPath method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="deviceObjectPath">The path to the device object</param>
|
||||||
|
/// <returns>The object found at the specified path</returns>
|
||||||
public static object FindObjectOnPath(string deviceObjectPath)
|
public static object FindObjectOnPath(string deviceObjectPath)
|
||||||
{
|
{
|
||||||
var path = deviceObjectPath.Split('.');
|
var path = deviceObjectPath.Split('.');
|
||||||
@@ -369,11 +362,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets a property on an object.
|
/// Sets a property on an object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="deviceObjectPath"></param>
|
/// <param name="deviceObjectPath">The path to the device object</param>
|
||||||
/// <returns></returns>
|
/// <returns>A JSON string representing the result of setting the property</returns>
|
||||||
/// <summary>
|
|
||||||
/// SetProperty method
|
|
||||||
/// </summary>
|
|
||||||
public static string SetProperty(string deviceObjectPath)
|
public static string SetProperty(string deviceObjectPath)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("This could be really useful. Finish it please");
|
throw new NotImplementedException("This could be really useful. Finish it please");
|
||||||
@@ -393,13 +383,21 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a DeviceActionWrapper
|
||||||
|
/// </summary>
|
||||||
public class DeviceActionWrapper
|
public class DeviceActionWrapper
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the DeviceKey
|
||||||
|
/// </summary>
|
||||||
public string DeviceKey { get; set; }
|
public string DeviceKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the MethodName
|
/// Gets or sets the MethodName
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string MethodName { get; set; }
|
public string MethodName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Params
|
/// Gets or sets the Params
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -413,19 +411,25 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
private object Parent;
|
private object Parent;
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the PropInfo
|
/// Gets or sets the PropInfo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
public PropertyInfo PropInfo { get; private set; }
|
public PropertyInfo PropInfo { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Name
|
/// Gets or sets the Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get { return PropInfo.Name; } }
|
public string Name { get { return PropInfo.Name; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Type
|
/// Gets or sets the Type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Type { get { return PropInfo.PropertyType.Name; } }
|
public string Type { get { return PropInfo.PropertyType.Name; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Value
|
||||||
|
/// </summary>
|
||||||
public string Value
|
public string Value
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -450,12 +454,17 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// Gets or sets the CanRead
|
/// Gets or sets the CanRead
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool CanRead { get { return PropInfo.CanRead; } }
|
public bool CanRead { get { return PropInfo.CanRead; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the CanWrite
|
/// Gets or sets the CanWrite
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool CanWrite { get { return PropInfo.CanWrite; } }
|
public bool CanWrite { get { return PropInfo.CanWrite; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PropertyNameType constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="info">property info</param>
|
||||||
|
/// <param name="parent">parent object</param>
|
||||||
public PropertyNameType(PropertyInfo info, object parent)
|
public PropertyNameType(PropertyInfo info, object parent)
|
||||||
{
|
{
|
||||||
PropInfo = info;
|
PropInfo = info;
|
||||||
@@ -468,16 +477,20 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class MethodNameParams
|
public class MethodNameParams
|
||||||
{
|
{
|
||||||
[JsonIgnore]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the MethodInfo
|
/// Gets or sets the MethodInfo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
public MethodInfo MethodInfo { get; private set; }
|
public MethodInfo MethodInfo { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Name
|
/// Gets or sets the Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get { return MethodInfo.Name; } }
|
public string Name { get { return MethodInfo.Name; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Params
|
||||||
|
/// </summary>
|
||||||
public IEnumerable<NameType> Params
|
public IEnumerable<NameType> Params
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -487,6 +500,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MethodNameParams constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="info">method info</param>
|
||||||
public MethodNameParams(MethodInfo info)
|
public MethodNameParams(MethodInfo info)
|
||||||
{
|
{
|
||||||
MethodInfo = info;
|
MethodInfo = info;
|
||||||
@@ -508,10 +525,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.All)]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a ApiAttribute
|
/// Represents a ApiAttribute
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[AttributeUsage(AttributeTargets.All)]
|
||||||
public class ApiAttribute : Attribute
|
public class ApiAttribute : Attribute
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -13,16 +13,54 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class DisplayUiConstants
|
public class DisplayUiConstants
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// TypeRadio constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeRadio = 1;
|
public const uint TypeRadio = 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeTv constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeDirecTv = 9;
|
public const uint TypeDirecTv = 9;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeBluray constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeBluray = 13;
|
public const uint TypeBluray = 13;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeStreamingDevice constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeChromeTv = 15;
|
public const uint TypeChromeTv = 15;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeStreamingDevice constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeFireTv = 16;
|
public const uint TypeFireTv = 16;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeStreamingDevice constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeAppleTv = 17;
|
public const uint TypeAppleTv = 17;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeStreamingDevice constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeRoku = 18;
|
public const uint TypeRoku = 18;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeLaptop constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeLaptop = 31;
|
public const uint TypeLaptop = 31;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypePc constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypePc = 32;
|
public const uint TypePc = 32;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TypeNoControls constant
|
||||||
|
/// </summary>
|
||||||
public const uint TypeNoControls = 49;
|
public const uint TypeNoControls = 49;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,10 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// EssentialsPluginDevelopmentDeviceFactory class
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
public abstract class EssentialsPluginDevelopmentDeviceFactory<T> : EssentialsDeviceFactory<T>, IPluginDevelopmentDeviceFactory where T : EssentialsDevice
|
public abstract class EssentialsPluginDevelopmentDeviceFactory<T> : EssentialsDeviceFactory<T>, IPluginDevelopmentDeviceFactory where T : EssentialsDevice
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string[] IrCommands {get { return _port.IrFileCommands; }}
|
public string[] IrCommands {get { return _port.IrFileCommands; }}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">key for the device</param>
|
||||||
|
/// <param name="name">name of the device</param>
|
||||||
|
/// <param name="irPort">IR output port controller</param>
|
||||||
public GenericIrController(string key, string name, IrOutputPortController irPort) : base(key, name)
|
public GenericIrController(string key, string name, IrOutputPortController irPort) : base(key, name)
|
||||||
{
|
{
|
||||||
_port = irPort;
|
_port = irPort;
|
||||||
@@ -105,9 +111,9 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
var joinNumber = bridgeJoin.Value.Value.JoinNumber;
|
var joinNumber = bridgeJoin.Value.Value.JoinNumber;
|
||||||
|
|
||||||
Debug.LogMessage(LogEventLevel.Verbose, this, @"bridgeJoin: Key-'{0}'
|
Debug.LogMessage(LogEventLevel.Verbose, this, @"bridgeJoin: Key-'{0}'
|
||||||
Value.Key-'{1}'
|
Value.Key-'{1}'
|
||||||
Value.JoinNumber-'{2}'
|
Value.JoinNumber-'{2}'
|
||||||
Value.Metadata.Description-'{3}'",
|
Value.Metadata.Description-'{3}'",
|
||||||
key,
|
key,
|
||||||
joinDataKey,
|
joinDataKey,
|
||||||
joinNumber,
|
joinNumber,
|
||||||
@@ -172,6 +178,9 @@ Value.Metadata.Description-'{3}'",
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class GenericIrControllerFactory : EssentialsDeviceFactory<GenericIrController>
|
public class GenericIrControllerFactory : EssentialsDeviceFactory<GenericIrController>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
public GenericIrControllerFactory()
|
public GenericIrControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string> {"genericIrController"};
|
TypeNames = new List<string> {"genericIrController"};
|
||||||
|
|||||||
@@ -22,6 +22,16 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">key of the device</param>
|
||||||
|
/// <param name="name">name of the device</param>
|
||||||
|
/// <param name="comm">communication client</param>
|
||||||
|
/// <param name="pollString">poll string</param>
|
||||||
|
/// <param name="pollTime">poll time</param>
|
||||||
|
/// <param name="warningTime">warning time</param>
|
||||||
|
/// <param name="errorTime">error time</param>
|
||||||
public GenericCommunicationMonitoredDevice(string key, string name, IBasicCommunication comm, string pollString,
|
public GenericCommunicationMonitoredDevice(string key, string name, IBasicCommunication comm, string pollString,
|
||||||
long pollTime, long warningTime, long errorTime)
|
long pollTime, long warningTime, long errorTime)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
@@ -37,6 +47,13 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor with default times
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">key of the device</param>
|
||||||
|
/// <param name="name">name of the device</param>
|
||||||
|
/// <param name="comm">communication client</param>
|
||||||
|
/// <param name="pollString">poll string</param>
|
||||||
public GenericCommunicationMonitoredDevice(string key, string name, IBasicCommunication comm, string pollString)
|
public GenericCommunicationMonitoredDevice(string key, string name, IBasicCommunication comm, string pollString)
|
||||||
: this(key, name, comm, pollString, 30000, 120000, 300000)
|
: this(key, name, comm, pollString, 30000, 120000, 300000)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ using Crestron.SimplSharp;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// IAttachVideoStatusExtensions class
|
||||||
|
/// </summary>
|
||||||
public static class IAttachVideoStatusExtensions
|
public static class IAttachVideoStatusExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the VideoStatusOutputs for the device
|
/// Gets the VideoStatusOutputs for the device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="attachDev"></param>
|
/// <param name="attachedDev"></param>
|
||||||
/// <returns>Attached VideoStatusOutputs or the default if none attached</returns>
|
/// <returns>Attached VideoStatusOutputs or the default if none attached</returns>
|
||||||
/// <summary>
|
|
||||||
/// GetVideoStatuses method
|
|
||||||
/// </summary>
|
|
||||||
public static VideoStatusOutputs GetVideoStatuses(this IAttachVideoStatus attachedDev)
|
public static VideoStatusOutputs GetVideoStatuses(this IAttachVideoStatus attachedDev)
|
||||||
{
|
{
|
||||||
// See if this device is connected to a status-providing port
|
// See if this device is connected to a status-providing port
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDisplayUsage
|
public interface IDisplayUsage
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the LampHours
|
||||||
|
/// </summary>
|
||||||
IntFeedback LampHours { get; }
|
IntFeedback LampHours { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,8 +8,15 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDspPresets
|
public interface IDspPresets
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the Presets
|
||||||
|
/// </summary>
|
||||||
Dictionary<string, IKeyName> Presets { get; }
|
Dictionary<string, IKeyName> Presets { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recalls the preset by key
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">key of preset to recall</param>
|
||||||
void RecallPreset(string key);
|
void RecallPreset(string key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IBasicVideoMute
|
public interface IBasicVideoMute
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Toggles the video mute
|
||||||
|
/// </summary>
|
||||||
void VideoMuteToggle();
|
void VideoMuteToggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,9 +22,19 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IBasicVideoMuteWithFeedback : IBasicVideoMute
|
public interface IBasicVideoMuteWithFeedback : IBasicVideoMute
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the VideoMuteIsOn feedback
|
||||||
|
/// </summary>
|
||||||
BoolFeedback VideoMuteIsOn { get; }
|
BoolFeedback VideoMuteIsOn { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the video mute on
|
||||||
|
/// </summary>
|
||||||
void VideoMuteOn();
|
void VideoMuteOn();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the video mute off
|
||||||
|
/// </summary>
|
||||||
void VideoMuteOff();
|
void VideoMuteOff();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,20 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IReconfigurableDevice
|
public interface IReconfigurableDevice
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Event fired when the configuration changes
|
||||||
|
/// </summary>
|
||||||
event EventHandler<EventArgs> ConfigChanged;
|
event EventHandler<EventArgs> ConfigChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current DeviceConfig
|
||||||
|
/// </summary>
|
||||||
DeviceConfig Config { get; }
|
DeviceConfig Config { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the DeviceConfig
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="config">config to set</param>
|
||||||
void SetConfig(DeviceConfig config);
|
void SetConfig(DeviceConfig config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IUsageTracking
|
public interface IUsageTracking
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the UsageTracker
|
||||||
|
/// </summary>
|
||||||
UsageTracking UsageTracker { get; set; }
|
UsageTracking UsageTracker { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,6 +32,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class UsageTracking
|
public class UsageTracking
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Event fired when device usage ends
|
||||||
|
/// </summary>
|
||||||
public event EventHandler<DeviceUsageEventArgs> DeviceUsageEnded;
|
public event EventHandler<DeviceUsageEventArgs> DeviceUsageEnded;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -59,6 +65,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Device Parent { get; private set; }
|
public Device Parent { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for UsageTracking class
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parent">The parent device</param>
|
||||||
public UsageTracking(Device parent)
|
public UsageTracking(Device parent)
|
||||||
{
|
{
|
||||||
Parent = parent;
|
Parent = parent;
|
||||||
|
|||||||
@@ -26,10 +26,24 @@ namespace PepperDash.Essentials.Core
|
|||||||
uint IrPortUid;
|
uint IrPortUid;
|
||||||
IROutputPort IrPort;
|
IROutputPort IrPort;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the DriverLoaded feedback
|
||||||
|
/// </summary>
|
||||||
public BoolFeedback DriverLoaded { get; private set; }
|
public BoolFeedback DriverLoaded { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the StandardIrPulseTime
|
||||||
|
/// </summary>
|
||||||
public ushort StandardIrPulseTime { get; set; }
|
public ushort StandardIrPulseTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the DriverFilepath
|
||||||
|
/// </summary>
|
||||||
public string DriverFilepath { get; private set; }
|
public string DriverFilepath { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the DriverIsLoaded
|
||||||
|
/// </summary>
|
||||||
public bool DriverIsLoaded { get; private set; }
|
public bool DriverIsLoaded { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -61,6 +75,12 @@ namespace PepperDash.Essentials.Core
|
|||||||
LoadDriver(irDriverFilepath);
|
LoadDriver(irDriverFilepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for IrDevice base class using post activation function to get port
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">key of the device</param>
|
||||||
|
/// <param name="postActivationFunc">function to call post activation</param>
|
||||||
|
/// <param name="config">config of the device</param>
|
||||||
public IrOutputPortController(string key, Func<DeviceConfig, IROutputPort> postActivationFunc,
|
public IrOutputPortController(string key, Func<DeviceConfig, IROutputPort> postActivationFunc,
|
||||||
DeviceConfig config)
|
DeviceConfig config)
|
||||||
: base(key)
|
: base(key)
|
||||||
@@ -121,10 +141,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads the IR driver at path
|
/// Loads the IR driver at path
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path"></param>
|
/// <param name="path">path of the IR driver file</param>
|
||||||
/// <summary>
|
|
||||||
/// LoadDriver method
|
|
||||||
/// </summary>
|
|
||||||
public void LoadDriver(string path)
|
public void LoadDriver(string path)
|
||||||
{
|
{
|
||||||
Debug.LogMessage(LogEventLevel.Verbose, this, "***Loading IR File***");
|
Debug.LogMessage(LogEventLevel.Verbose, this, "***Loading IR File***");
|
||||||
@@ -151,6 +168,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// PressRelease method
|
/// PressRelease method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="command">IR command to send</param>
|
||||||
|
/// <param name="state">true to press, false to release</param>
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public virtual void PressRelease(string command, bool state)
|
public virtual void PressRelease(string command, bool state)
|
||||||
{
|
{
|
||||||
@@ -179,6 +198,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pulse method
|
/// Pulse method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="command">IR command to send</param>
|
||||||
|
/// <param name="time">time to pulse the command</param>
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public virtual void Pulse(string command, ushort time)
|
public virtual void Pulse(string command, ushort time)
|
||||||
{
|
{
|
||||||
@@ -201,6 +222,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Notifies the console when a bad command is used.
|
/// Notifies the console when a bad command is used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="command">command that was not found</param>
|
||||||
protected void NoIrCommandError(string command)
|
protected void NoIrCommandError(string command)
|
||||||
{
|
{
|
||||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Device {0}: IR Driver {1} does not contain command {2}",
|
Debug.LogMessage(LogEventLevel.Verbose, this, "Device {0}: IR Driver {1} does not contain command {2}",
|
||||||
|
|||||||
@@ -8,12 +8,39 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasBatteryStats : IKeyName
|
public interface IHasBatteryStats : IKeyName
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryPercentage
|
||||||
|
/// </summary>
|
||||||
int BatteryPercentage { get; }
|
int BatteryPercentage { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryCautionThresholdPercentage
|
||||||
|
/// </summary>
|
||||||
int BatteryCautionThresholdPercentage { get; }
|
int BatteryCautionThresholdPercentage { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryWarningThresholdPercentage
|
||||||
|
/// </summary>
|
||||||
int BatteryWarningThresholdPercentage { get; }
|
int BatteryWarningThresholdPercentage { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryIsWarningFeedback
|
||||||
|
/// </summary>
|
||||||
BoolFeedback BatteryIsWarningFeedback { get; }
|
BoolFeedback BatteryIsWarningFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryIsCautionFeedback
|
||||||
|
/// </summary>
|
||||||
BoolFeedback BatteryIsCautionFeedback { get; }
|
BoolFeedback BatteryIsCautionFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryIsOkFeedback
|
||||||
|
/// </summary>
|
||||||
BoolFeedback BatteryIsOkFeedback { get; }
|
BoolFeedback BatteryIsOkFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryPercentageFeedback
|
||||||
|
/// </summary>
|
||||||
IntFeedback BatteryPercentageFeedback { get; }
|
IntFeedback BatteryPercentageFeedback { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,6 +49,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasBatteryCharging : IHasBatteryStats
|
public interface IHasBatteryCharging : IHasBatteryStats
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the BatteryIsCharging
|
||||||
|
/// </summary>
|
||||||
BoolFeedback BatteryIsCharging { get; }
|
BoolFeedback BatteryIsCharging { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,19 +60,55 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasBatteries : IKeyName
|
public interface IHasBatteries : IKeyName
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Collection of batteries
|
||||||
|
/// </summary>
|
||||||
ReadOnlyDictionary<string, IHasBatteryStats> Batteries { get; }
|
ReadOnlyDictionary<string, IHasBatteryStats> Batteries { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the contract for IHasBatteryStatsExtended
|
||||||
|
/// </summary>
|
||||||
public interface IHasBatteryStatsExtended : IHasBatteryStats
|
public interface IHasBatteryStatsExtended : IHasBatteryStats
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the InputVoltage in millivolts
|
||||||
|
/// </summary>
|
||||||
int InputVoltage { get; }
|
int InputVoltage { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the OutputVoltage in millivolts
|
||||||
|
/// </summary>
|
||||||
int OutputVoltage { get; }
|
int OutputVoltage { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the InputCurrent in milliamps
|
||||||
|
/// </summary>
|
||||||
int InptuCurrent { get; }
|
int InptuCurrent { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the OutputCurrent in milliamps
|
||||||
|
/// </summary>
|
||||||
int OutputCurrent { get; }
|
int OutputCurrent { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the InputVoltageFeedback
|
||||||
|
/// </summary>
|
||||||
IntFeedback InputVoltageFeedback { get; }
|
IntFeedback InputVoltageFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the OutputVoltageFeedback
|
||||||
|
/// </summary>
|
||||||
IntFeedback OutputVoltageFeedback { get; }
|
IntFeedback OutputVoltageFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the InputCurrentFeedback
|
||||||
|
/// </summary>
|
||||||
IntFeedback InputCurrentFeedback { get; }
|
IntFeedback InputCurrentFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the OutputCurrentFeedback
|
||||||
|
/// </summary>
|
||||||
IntFeedback OutputCurrentFeedback { get; }
|
IntFeedback OutputCurrentFeedback { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,34 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum PresentationSourceType
|
public enum PresentationSourceType
|
||||||
{
|
{
|
||||||
None, Dvd, Laptop, PC, SetTopBox, VCR
|
/// <summary>
|
||||||
|
/// No source type assigned
|
||||||
|
/// </summary>
|
||||||
|
None,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DVD source type
|
||||||
|
/// </summary>
|
||||||
|
Dvd,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Document Camera source type
|
||||||
|
/// </summary>
|
||||||
|
Laptop,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PC source type
|
||||||
|
/// </summary>
|
||||||
|
PC,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set Top Box source type
|
||||||
|
/// </summary>
|
||||||
|
SetTopBox,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VCR source type
|
||||||
|
/// </summary>
|
||||||
|
VCR
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class PresetListItem : AudioControlListItemBase
|
public class PresetListItem : AudioControlListItemBase
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the preset associated with this list item
|
||||||
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public IKeyName Preset
|
public IKeyName Preset
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,10 +19,20 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class ReconfigurableDevice : EssentialsDevice, IReconfigurableDevice
|
public abstract class ReconfigurableDevice : EssentialsDevice, IReconfigurableDevice
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Event fired when the configuration changes
|
||||||
|
/// </summary>
|
||||||
public event EventHandler<EventArgs> ConfigChanged;
|
public event EventHandler<EventArgs> ConfigChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current DeviceConfig
|
||||||
|
/// </summary>
|
||||||
public DeviceConfig Config { get; private set; }
|
public DeviceConfig Config { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="config">config of the device</param>
|
||||||
protected ReconfigurableDevice(DeviceConfig config)
|
protected ReconfigurableDevice(DeviceConfig config)
|
||||||
: base(config.Key)
|
: base(config.Key)
|
||||||
{
|
{
|
||||||
@@ -64,19 +74,33 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used by the extending class to allow for any custom actions to be taken (tell the ConfigWriter to write config, etc)
|
/// Used by the extending class to allow for any custom actions to be taken (tell the ConfigWriter to write config, etc)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config">config of the device</param>
|
||||||
protected virtual void CustomSetConfig(DeviceConfig config)
|
protected virtual void CustomSetConfig(DeviceConfig config)
|
||||||
{
|
{
|
||||||
ConfigWriter.UpdateDeviceConfig(config);
|
ConfigWriter.UpdateDeviceConfig(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A ReconfigurableDevice that is also bridgeable
|
||||||
|
/// </summary>
|
||||||
public abstract class ReconfigurableBridgableDevice : ReconfigurableDevice, IBridgeAdvanced
|
public abstract class ReconfigurableBridgableDevice : ReconfigurableDevice, IBridgeAdvanced
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="config">config of the device</param>
|
||||||
protected ReconfigurableBridgableDevice(DeviceConfig config) : base(config)
|
protected ReconfigurableBridgableDevice(DeviceConfig config) : base(config)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LinkToApi method
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trilist">trilist to link</param>
|
||||||
|
/// <param name="joinStart">the join to start at</param>
|
||||||
|
/// <param name="joinMapKey">key to the join map</param>
|
||||||
|
/// <param name="bridge">the bridge to use</param>
|
||||||
public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
|
public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,9 +6,19 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class SmartObjectJoinOffsets
|
public class SmartObjectJoinOffsets
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Dpad Join Offset
|
||||||
|
/// </summary>
|
||||||
public const ushort Dpad = 1;
|
public const ushort Dpad = 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Numpad Join Offset
|
||||||
|
/// </summary>
|
||||||
public const ushort Numpad = 2;
|
public const ushort Numpad = 2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PresetList Join Offset
|
||||||
|
/// </summary>
|
||||||
public const ushort PresetList = 6;
|
public const ushort PresetList = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,10 +14,27 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class VolumeDeviceChangeEventArgs : EventArgs
|
public class VolumeDeviceChangeEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The old device
|
||||||
|
/// </summary>
|
||||||
public IBasicVolumeControls OldDev { get; private set; }
|
public IBasicVolumeControls OldDev { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The new device
|
||||||
|
/// </summary>
|
||||||
public IBasicVolumeControls NewDev { get; private set; }
|
public IBasicVolumeControls NewDev { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The type of change
|
||||||
|
/// </summary>
|
||||||
public ChangeType Type { get; private set; }
|
public ChangeType Type { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oldDev">the old device</param>
|
||||||
|
/// <param name="newDev">the new device</param>
|
||||||
|
/// <param name="type">the type of change</param>
|
||||||
public VolumeDeviceChangeEventArgs(IBasicVolumeControls oldDev, IBasicVolumeControls newDev, ChangeType type)
|
public VolumeDeviceChangeEventArgs(IBasicVolumeControls oldDev, IBasicVolumeControls newDev, ChangeType type)
|
||||||
{
|
{
|
||||||
OldDev = oldDev;
|
OldDev = oldDev;
|
||||||
@@ -31,6 +48,14 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum ChangeType
|
public enum ChangeType
|
||||||
{
|
{
|
||||||
WillChange, DidChange
|
/// <summary>
|
||||||
|
/// Will change
|
||||||
|
/// </summary>
|
||||||
|
WillChange,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Did change
|
||||||
|
/// </summary>
|
||||||
|
DidChange
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user