diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PduInterfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PduInterfaces.cs index 0f3b3fbf..94aa71ac 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PduInterfaces.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PduInterfaces.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using Crestron.SimplSharp; using PepperDash.Core; using PepperDash.Essentials.Core; @@ -8,6 +9,7 @@ namespace PepperDash_Essentials_Core.Devices /// /// Interface for any device that is able to control it'spower and has a configurable reboot time /// + [Obsolete("PepperDash_Essentials_Core.Devices is Deprecated - use PepperDash.Essentials.Core")] public interface IHasPowerCycle : IKeyName, IHasPowerControlWithFeedback { /// @@ -24,6 +26,7 @@ namespace PepperDash_Essentials_Core.Devices /// /// Interface for any device that contains a collection of IHasPowerReboot Devices /// + [Obsolete("PepperDash_Essentials_Core.Devices is Deprecated - use PepperDash.Essentials.Core")] public interface IHasControlledPowerOutlets : IKeyName { /// diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PowerInterfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PowerInterfaces.cs new file mode 100644 index 00000000..1fc6672a --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/PowerInterfaces.cs @@ -0,0 +1,87 @@ +using Crestron.SimplSharp; +using PepperDash.Core; + +namespace PepperDash.Essentials.Core +{ + /// + /// Interface for any device that has a battery that can be monitored + /// + public interface IHasBatteryStats : IKeyName + { + int BatteryPercentage { get; } + int BatteryCautionThresholdPercentage { get; } + int BatteryWarningThresholdPercentage { get; } + BoolFeedback BatteryIsWarningFeedback { get; } + BoolFeedback BatteryIsCautionFeedback { get; } + BoolFeedback BatteryIsOkFeedback { get; } + IntFeedback BatteryPercentageFeedback { get; } + } + + /// + /// Interface for any device that has a battery that can be monitored and the ability to charge and discharge + /// + public interface IHasBatteryCharging : IHasBatteryStats + { + BoolFeedback BatteryIsCharging { get; } + } + + /// + /// Interface for any device that has multiple batteries that can be monitored + /// + public interface IHasBatteries : IKeyName + { + ReadOnlyDictionary Batteries { get; } + } + + public interface IHasBatteryStatsExtended : IHasBatteryStats + { + int InputVoltage { get; } + int OutputVoltage { get; } + int InptuCurrent { get; } + int OutputCurrent { get; } + + IntFeedback InputVoltageFeedback { get; } + IntFeedback OutputVoltageFeedback { get; } + IntFeedback InputCurrentFeedback { get; } + IntFeedback OutputCurrentFeedback { get; } + } + + /// + /// Interface for any device that is able to control its power, has a configurable reboot time, and has batteries that can be monitored + /// + public interface IHasPowerCycleWithBattery : IHasPowerCycle, IHasBatteryStats + { + + } + + /// + /// Interface for any device that is able to control it's power and has a configurable reboot time + /// + public interface IHasPowerCycle : IKeyName, IHasPowerControlWithFeedback + { + /// + /// Delay between power off and power on for reboot + /// + int PowerCycleTimeMs { get; } + + /// + /// Reboot outlet + /// + void PowerCycle(); + } + + /// + /// Interface for any device that contains a collection of IHasPowerReboot Devices + /// + public interface IHasControlledPowerOutlets : IKeyName + { + /// + /// Collection of IPduOutlets + /// + ReadOnlyDictionary PduOutlets { get; } + + } + + + +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index e0859077..7930f49e 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -200,6 +200,7 @@ +