wip: update XML comments

This commit is contained in:
Erik Meyer
2026-01-28 16:13:11 -05:00
parent ca77506108
commit e0ee5b0474
14 changed files with 330 additions and 101 deletions

View File

@@ -22,6 +22,10 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public string Description { get; private set; } public string Description { get; private set; }
/// <summary>
/// Constructor for CrestronGlobalSecretsProvider
/// </summary>
/// <param name="key">The key for the secret provider</param>
public CrestronGlobalSecretsProvider(string key) public CrestronGlobalSecretsProvider(string key)
{ {
Key = key; Key = key;

View File

@@ -23,7 +23,10 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public string Description { get; private set; } public string Description { get; private set; }
/// <summary>
/// Constructor for CrestronLocalSecretsProvider
/// </summary>
/// <param name="key">The key for the secret provider</param>
public CrestronLocalSecretsProvider(string key) public CrestronLocalSecretsProvider(string key)
{ {
Key = key; Key = key;

View File

@@ -11,11 +11,27 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public class CrestronSecret : ISecret public class CrestronSecret : ISecret
{ {
/// <summary>
/// Gets the Provider
/// </summary>
public ISecretProvider Provider { get; private set; } public ISecretProvider Provider { get; private set; }
/// <summary>
/// Gets the Key
/// </summary>
public string Key { get; private set; } public string Key { get; private set; }
/// <summary>
/// Gets the Value
/// </summary>
public object Value { get; private set; } public object Value { get; private set; }
/// <summary>
/// Constructor for CrestronSecret
/// </summary>
/// <param name="key">key for the secret</param>
/// <param name="value">value of the secret</param>
/// <param name="provider">provider of the secret</param>
public CrestronSecret(string key, string value, ISecretProvider provider) public CrestronSecret(string key, string value, ISecretProvider provider)
{ {
Key = key; Key = key;

View File

@@ -7,8 +7,14 @@ using Serilog.Events;
namespace PepperDash.Essentials.Core namespace PepperDash.Essentials.Core
{ {
/// <summary>
/// SecretsManager static class
/// </summary>
public static class SecretsManager public static class SecretsManager
{ {
/// <summary>
/// Gets the Secrets dictionary
/// </summary>
public static Dictionary<string, ISecretProvider> Secrets { get; private set; } public static Dictionary<string, ISecretProvider> Secrets { get; private set; }
/// <summary> /// <summary>

View File

@@ -14,8 +14,15 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public class SecretsPropertiesConfig public class SecretsPropertiesConfig
{ {
/// <summary>
/// Gets or sets the Provider
/// </summary>
[JsonProperty("provider")] [JsonProperty("provider")]
public string Provider { get; set; } public string Provider { get; set; }
/// <summary>
/// Gets or sets the Key
/// </summary>
[JsonProperty("key")] [JsonProperty("key")]
public string Key { get; set; } public string Key { get; set; }
} }

View File

@@ -8,6 +8,9 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShades public interface IShades
{ {
/// <summary>
/// List of shades controlled by this device
/// </summary>
List<IShadesOpenCloseStop> Shades { get; } List<IShadesOpenCloseStop> Shades { get; }
} }
@@ -16,17 +19,47 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShadesOpenCloseStop public interface IShadesOpenCloseStop
{ {
/// <summary>
/// Opens the shade
/// </summary>
void Open(); void Open();
/// <summary>
/// Closes the shade
/// </summary>
void Close(); void Close();
/// <summary>
/// Stops the shade
/// </summary>
void Stop(); void Stop();
} }
/// <summary>
/// Requirements for a device that implements Open/Close/Stop shade control with presets
/// </summary>
public interface IShadesOpenClosePreset : IShadesOpenCloseStop public interface IShadesOpenClosePreset : IShadesOpenCloseStop
{ {
/// <summary>
/// Recalls the preset
/// </summary>
/// <param name="presetNumber">preset number to recall</param>
void RecallPreset(uint presetNumber); void RecallPreset(uint presetNumber);
/// <summary>
/// Saves the preset
/// </summary>
/// <param name="presetNumber">preset number to save</param>
void SavePreset(uint presetNumber); void SavePreset(uint presetNumber);
/// <summary>
/// Label for the preset button
/// </summary>
string StopOrPresetButtonLabel { get; } string StopOrPresetButtonLabel { get; }
/// <summary>
/// Event raised when a preset is recalled
/// </summary>
event EventHandler PresetSaved; event EventHandler PresetSaved;
} }
@@ -36,7 +69,14 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShadesRaiseLowerFeedback public interface IShadesRaiseLowerFeedback
{ {
/// <summary>
/// Feedback to indicate if the shade is lowering
/// </summary>
BoolFeedback ShadeIsLoweringFeedback { get; } BoolFeedback ShadeIsLoweringFeedback { get; }
/// <summary>
/// Feedback to indicate if the shade is raising
/// </summary>
BoolFeedback ShadeIsRaisingFeedback { get; } BoolFeedback ShadeIsRaisingFeedback { get; }
} }
@@ -45,7 +85,14 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShadesOpenClosedFeedback: IShadesOpenCloseStop public interface IShadesOpenClosedFeedback: IShadesOpenCloseStop
{ {
/// <summary>
/// Feedback to indicate if the shade is open
/// </summary>
BoolFeedback ShadeIsOpenFeedback { get; } BoolFeedback ShadeIsOpenFeedback { get; }
/// <summary>
/// Feedback to indicate if the shade is closed
/// </summary>
BoolFeedback ShadeIsClosedFeedback { get; } BoolFeedback ShadeIsClosedFeedback { get; }
} }
@@ -54,8 +101,19 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShadesStopOrMove public interface IShadesStopOrMove
{ {
/// <summary>
/// Raises the shade or stops it if it's already moving
/// </summary>
void OpenOrStop(); void OpenOrStop();
/// <summary>
/// Lowers the shade or stops it if it's already moving
/// </summary>
void CloseOrStop(); void CloseOrStop();
/// <summary>
/// Opens, closes, or stops the shade depending on current state
/// </summary>
void OpenCloseOrStop(); void OpenCloseOrStop();
} }
@@ -64,6 +122,9 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShadesStopFeedback : IShadesOpenCloseStop public interface IShadesStopFeedback : IShadesOpenCloseStop
{ {
/// <summary>
/// Feedback to indicate if the shade is stopped
/// </summary>
BoolFeedback IsStoppedFeedback { get; } BoolFeedback IsStoppedFeedback { get; }
} }
@@ -72,6 +133,10 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShadesPosition public interface IShadesPosition
{ {
/// <summary>
/// Gets the current position of the shade
/// </summary>
/// <param name="value">value of the position to set</param>
void SetPosition(ushort value); void SetPosition(ushort value);
} }
@@ -80,18 +145,31 @@ namespace PepperDash.Essentials.Core.Shades
/// </summary> /// </summary>
public interface IShadesFeedback: IShadesPosition, IShadesStopFeedback public interface IShadesFeedback: IShadesPosition, IShadesStopFeedback
{ {
/// <summary>
/// Feedback to indicate the current position of the shade
/// </summary>
IntFeedback PositionFeedback { get; } IntFeedback PositionFeedback { get; }
} }
/// <summary> /// <summary>
/// /// Feedback for scenes
/// </summary> /// </summary>
public interface ISceneFeedback public interface ISceneFeedback
{ {
/// <summary>
/// Runs the scene
/// </summary>
void Run(); void Run();
/// <summary>
/// Feedback to indicate if all shades are at the scene position
/// </summary>
BoolFeedback AllAreAtSceneFeedback { get; } BoolFeedback AllAreAtSceneFeedback { get; }
} }
/// <summary>
/// Combines basic shade interfaces for Crestron Basic shades
/// </summary>
public interface ICrestronBasicShade : IShadesOpenClosedFeedback, public interface ICrestronBasicShade : IShadesOpenClosedFeedback,
IShadesStopOrMove, IShadesFeedback, IShadesRaiseLowerFeedback IShadesStopOrMove, IShadesFeedback, IShadesRaiseLowerFeedback
{ {

View File

@@ -9,10 +9,17 @@ using PepperDash.Essentials.Core.CrestronIO;
namespace PepperDash.Essentials.Core.Shades namespace PepperDash.Essentials.Core.Shades
{ {
/// <summary>
/// Base class for shades
/// </summary>
[Obsolete("Please use PepperDash.Essentials.Devices.Common, this will be removed in 2.1")] [Obsolete("Please use PepperDash.Essentials.Devices.Common, this will be removed in 2.1")]
public abstract class ShadeBase : EssentialsDevice, IShadesOpenCloseStop public abstract class ShadeBase : EssentialsDevice, IShadesOpenCloseStop
{ {
/// <summary>
/// Constructor
/// </summary>
/// <param name="key">key of the shade device</param>
/// <param name="name">name of the shade device</param>
public ShadeBase(string key, string name) public ShadeBase(string key, string name)
: base(key, name) : base(key, name)
{ {
@@ -21,8 +28,19 @@ namespace PepperDash.Essentials.Core.Shades
#region iShadesOpenClose Members #region iShadesOpenClose Members
/// <summary>
/// Opens the shade
/// </summary>
public abstract void Open(); public abstract void Open();
/// <summary>
/// Stops the shade
/// </summary>
public abstract void Stop(); public abstract void Stop();
/// <summary>
/// Closes the shade
/// </summary>
public abstract void Close(); public abstract void Close();
#endregion #endregion

View File

@@ -17,7 +17,8 @@ namespace PepperDash.Essentials.Core
/// <summary> /// <summary>
/// Runs action when Sig is pressed /// Runs action when Sig is pressed
/// </summary> /// </summary>
/// <param name="sig"></param> /// <param name="sig">signal pressed</param>
/// <param name="act">action to run</param>
public static void Pressed(Sig sig, Action act) { if (sig.BoolValue) act(); } public static void Pressed(Sig sig, Action act) { if (sig.BoolValue) act(); }
/// <summary> /// <summary>

View File

@@ -17,23 +17,32 @@ namespace PepperDash.Essentials.Core.SmartObjects
/// Gets or sets the SigUp /// Gets or sets the SigUp
/// </summary> /// </summary>
public BoolOutputSig SigUp { get { return GetBoolOutputNamed("Up"); } } public BoolOutputSig SigUp { get { return GetBoolOutputNamed("Up"); } }
/// <summary> /// <summary>
/// Gets or sets the SigDown /// Gets or sets the SigDown
/// </summary> /// </summary>
public BoolOutputSig SigDown { get { return GetBoolOutputNamed("Down"); } } public BoolOutputSig SigDown { get { return GetBoolOutputNamed("Down"); } }
/// <summary> /// <summary>
/// Gets or sets the SigLeft /// Gets or sets the SigLeft
/// </summary> /// </summary>
public BoolOutputSig SigLeft { get { return GetBoolOutputNamed("Left"); } } public BoolOutputSig SigLeft { get { return GetBoolOutputNamed("Left"); } }
/// <summary> /// <summary>
/// Gets or sets the SigRight /// Gets or sets the SigRight
/// </summary> /// </summary>
public BoolOutputSig SigRight { get { return GetBoolOutputNamed("Right"); } } public BoolOutputSig SigRight { get { return GetBoolOutputNamed("Right"); } }
/// <summary> /// <summary>
/// Gets or sets the SigCenter /// Gets or sets the SigCenter
/// </summary> /// </summary>
public BoolOutputSig SigCenter { get { return GetBoolOutputNamed("Center"); } } public BoolOutputSig SigCenter { get { return GetBoolOutputNamed("Center"); } }
/// <summary>
/// Constructor
/// </summary>
/// <param name="so">smart object</param>
/// <param name="useUserObjectHandler">use user object handler if true</param>
public SmartObjectDPad(SmartObject so, bool useUserObjectHandler) public SmartObjectDPad(SmartObject so, bool useUserObjectHandler)
: base(so, useUserObjectHandler) : base(so, useUserObjectHandler)
{ {

View File

@@ -17,7 +17,14 @@ namespace PepperDash.Essentials.Core.SmartObjects
/// </summary> /// </summary>
public class SmartObjectDynamicList : SmartObjectHelperBase public class SmartObjectDynamicList : SmartObjectHelperBase
{ {
/// <summary>
/// Sig name for Scroll To Item
/// </summary>
public const string SigNameScrollToItem = "Scroll To Item"; public const string SigNameScrollToItem = "Scroll To Item";
/// <summary>
/// Sig name for Set Number of Items
/// </summary>
public const string SigNameSetNumberOfItems = "Set Number of Items"; public const string SigNameSetNumberOfItems = "Set Number of Items";
/// <summary> /// <summary>
@@ -25,6 +32,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
/// </summary> /// </summary>
public uint NameSigOffset { get; private set; } public uint NameSigOffset { get; private set; }
/// <summary>
/// Gets or sets the Count
/// </summary>
public ushort Count public ushort Count
{ {
get get

View File

@@ -26,6 +26,11 @@ namespace PepperDash.Essentials.Core.SmartObjects
/// </summary> /// </summary>
public bool Validated { get; protected set; } public bool Validated { get; protected set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="so">smart object</param>
/// <param name="useUserObjectHandler">use the user object hadnler if true</param>
public SmartObjectHelperBase(SmartObject so, bool useUserObjectHandler) public SmartObjectHelperBase(SmartObject so, bool useUserObjectHandler)
{ {
SmartObject = so; SmartObject = so;
@@ -37,6 +42,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
} }
} }
/// <summary>
/// Destructor
/// </summary>
~SmartObjectHelperBase() ~SmartObjectHelperBase()
{ {
SmartObject.SigChange -= this.SmartObject_SigChange; SmartObject.SigChange -= this.SmartObject_SigChange;
@@ -47,9 +55,6 @@ namespace PepperDash.Essentials.Core.SmartObjects
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// GetBoolOutputNamed method
/// </summary>
public BoolOutputSig GetBoolOutputNamed(string name) public BoolOutputSig GetBoolOutputNamed(string name)
{ {
if (SmartObject.BooleanOutput.Contains(name)) if (SmartObject.BooleanOutput.Contains(name))

View File

@@ -17,39 +17,77 @@ namespace PepperDash.Essentials.Core.SmartObjects
/// Gets or sets the Misc1SigName /// Gets or sets the Misc1SigName
/// </summary> /// </summary>
public string Misc1SigName { get; set; } public string Misc1SigName { get; set; }
/// <summary> /// <summary>
/// Gets or sets the Misc2SigName /// Gets or sets the Misc2SigName
/// </summary> /// </summary>
public string Misc2SigName { get; set; } public string Misc2SigName { get; set; }
/// <summary>
/// Gets or sets the Digit1
/// </summary>
public BoolOutputSig Digit1 { get { return GetBoolOutputNamed("1"); } } public BoolOutputSig Digit1 { get { return GetBoolOutputNamed("1"); } }
/// <summary>
/// Gets or sets the Digit2
/// </summary>
public BoolOutputSig Digit2 { get { return GetBoolOutputNamed("2"); } } public BoolOutputSig Digit2 { get { return GetBoolOutputNamed("2"); } }
/// <summary>
/// Gets or sets the Digit3
/// </summary>
public BoolOutputSig Digit3 { get { return GetBoolOutputNamed("3"); } } public BoolOutputSig Digit3 { get { return GetBoolOutputNamed("3"); } }
/// <summary>
/// Gets or sets the Digit4
/// </summary>
public BoolOutputSig Digit4 { get { return GetBoolOutputNamed("4"); } } public BoolOutputSig Digit4 { get { return GetBoolOutputNamed("4"); } }
/// <summary> /// <summary>
/// Gets or sets the Digit5 /// Gets or sets the Digit5
/// </summary> /// </summary>
public BoolOutputSig Digit5 { get { return GetBoolOutputNamed("5"); } } public BoolOutputSig Digit5 { get { return GetBoolOutputNamed("5"); } }
/// <summary>
/// Gets or sets the Digit6
/// </summary>
public BoolOutputSig Digit6 { get { return GetBoolOutputNamed("6"); } } public BoolOutputSig Digit6 { get { return GetBoolOutputNamed("6"); } }
/// <summary>
/// Gets or sets the Digit7
/// </summary>
public BoolOutputSig Digit7 { get { return GetBoolOutputNamed("7"); } } public BoolOutputSig Digit7 { get { return GetBoolOutputNamed("7"); } }
/// <summary>
/// Gets or sets the Digit8
/// </summary>
public BoolOutputSig Digit8 { get { return GetBoolOutputNamed("8"); } } public BoolOutputSig Digit8 { get { return GetBoolOutputNamed("8"); } }
/// <summary> /// <summary>
/// Gets or sets the Digit9 /// Gets or sets the Digit9
/// </summary> /// </summary>
public BoolOutputSig Digit9 { get { return GetBoolOutputNamed("9"); } } public BoolOutputSig Digit9 { get { return GetBoolOutputNamed("9"); } }
/// <summary> /// <summary>
/// Gets or sets the Digit0 /// Gets or sets the Digit0
/// </summary> /// </summary>
public BoolOutputSig Digit0 { get { return GetBoolOutputNamed("0"); } } public BoolOutputSig Digit0 { get { return GetBoolOutputNamed("0"); } }
/// <summary> /// <summary>
/// Gets or sets the Misc1 /// Gets or sets the Misc1
/// </summary> /// </summary>
public BoolOutputSig Misc1 { get { return GetBoolOutputNamed(Misc1SigName); } } public BoolOutputSig Misc1 { get { return GetBoolOutputNamed(Misc1SigName); } }
/// <summary> /// <summary>
/// Gets or sets the Misc2 /// Gets or sets the Misc2
/// </summary> /// </summary>
public BoolOutputSig Misc2 { get { return GetBoolOutputNamed(Misc2SigName); } } public BoolOutputSig Misc2 { get { return GetBoolOutputNamed(Misc2SigName); } }
/// <summary>
/// Constructor
/// </summary>
/// <param name="so">smart object</param>
/// <param name="useUserObjectHandler">use user handler if true</param>
public SmartObjectNumeric(SmartObject so, bool useUserObjectHandler) : base(so, useUserObjectHandler) public SmartObjectNumeric(SmartObject so, bool useUserObjectHandler) : base(so, useUserObjectHandler)
{ {
Misc1SigName = "Misc_1"; Misc1SigName = "Misc_1";

View File

@@ -30,35 +30,60 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public class SubpageReferenceList public class SubpageReferenceList
{ {
/// <summary>
/// Gets or sets the Count
/// </summary>
public ushort Count public ushort Count
{ {
get { return SetNumberOfItemsSig.UShortValue; } get { return SetNumberOfItemsSig.UShortValue; }
set { SetNumberOfItemsSig.UShortValue = value; } set { SetNumberOfItemsSig.UShortValue = value; }
} }
/// <summary>
/// Gets or sets the MaxDefinedItems
/// </summary>
public ushort MaxDefinedItems { get; private set; } public ushort MaxDefinedItems { get; private set; }
/// <summary> /// <summary>
/// Gets or sets the ScrollToItemSig /// Gets or sets the ScrollToItemSig
/// </summary> /// </summary>
public UShortInputSig ScrollToItemSig { get; private set; } public UShortInputSig ScrollToItemSig { get; private set; }
UShortInputSig SetNumberOfItemsSig; UShortInputSig SetNumberOfItemsSig;
/// <summary> /// <summary>
/// Gets or sets the BoolIncrement /// Gets or sets the BoolIncrement
/// </summary> /// </summary>
public uint BoolIncrement { get; protected set; } public uint BoolIncrement { get; protected set; }
/// <summary> /// <summary>
/// Gets or sets the UShortIncrement /// Gets or sets the UShortIncrement
/// </summary> /// </summary>
public uint UShortIncrement { get; protected set; } public uint UShortIncrement { get; protected set; }
/// <summary> /// <summary>
/// Gets or sets the StringIncrement /// Gets or sets the StringIncrement
/// </summary> /// </summary>
public uint StringIncrement { get; protected set; } public uint StringIncrement { get; protected set; }
/// <summary>
/// Gets or sets the SRL
/// </summary>
protected readonly SmartObject SRL; protected readonly SmartObject SRL;
/// <summary>
/// Gets the list of items in the SRL
/// </summary>
protected readonly List<SubpageReferenceListItem> Items = new List<SubpageReferenceListItem>(); protected readonly List<SubpageReferenceListItem> Items = new List<SubpageReferenceListItem>();
/// <summary>
/// Constructor
/// </summary>
/// <param name="triList">trilist for the smart object</param>
/// <param name="smartObjectId">smart object ID</param>
/// <param name="boolIncrement"></param>
/// <param name="ushortIncrement"></param>
/// <param name="stringIncrement"></param>
public SubpageReferenceList(BasicTriListWithSmartObject triList, uint smartObjectId, public SubpageReferenceList(BasicTriListWithSmartObject triList, uint smartObjectId,
uint boolIncrement, uint ushortIncrement, uint stringIncrement) uint boolIncrement, uint ushortIncrement, uint stringIncrement)
{ {

View File

@@ -17,8 +17,17 @@ namespace PepperDash.Essentials.Core
/// The list that this lives in /// The list that this lives in
/// </summary> /// </summary>
protected SubpageReferenceList Owner; protected SubpageReferenceList Owner;
/// <summary>
/// The index of this item
/// </summary>
protected uint Index; protected uint Index;
/// <summary>
/// Constructor
/// </summary>
/// <param name="index">index of the item</param>
/// <param name="owner">owner of the item</param>
public SubpageReferenceListItem(uint index, SubpageReferenceList owner) public SubpageReferenceListItem(uint index, SubpageReferenceList owner)
{ {
Index = index; Index = index;