wip: update XML comments

This commit is contained in:
Erik Meyer
2026-01-28 16:41:33 -05:00
parent e0ee5b0474
commit fed60eba29
14 changed files with 340 additions and 136 deletions

View File

@@ -14,8 +14,19 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public class SecondsCountdownTimer: IKeyed public class SecondsCountdownTimer: IKeyed
{ {
/// <summary>
/// Event fired when the timer starts
/// </summary>
public event EventHandler<EventArgs> HasStarted; public event EventHandler<EventArgs> HasStarted;
/// <summary>
/// Event fired when the timer finishes
/// </summary>
public event EventHandler<EventArgs> HasFinished; public event EventHandler<EventArgs> HasFinished;
/// <summary>
/// Event fired when the timer is cancelled
/// </summary>
public event EventHandler<EventArgs> WasCancelled; public event EventHandler<EventArgs> WasCancelled;
/// <summary> /// <summary>
@@ -33,6 +44,7 @@ namespace PepperDash.Essentials.Core
/// Gets or sets the PercentFeedback /// Gets or sets the PercentFeedback
/// </summary> /// </summary>
public IntFeedback PercentFeedback { get; private set; } public IntFeedback PercentFeedback { get; private set; }
/// <summary> /// <summary>
/// Gets or sets the TimeRemainingFeedback /// Gets or sets the TimeRemainingFeedback
/// </summary> /// </summary>

View File

@@ -27,6 +27,11 @@ namespace PepperDash.Essentials.Core.Timers
private CTimer _timer; private CTimer _timer;
private long _timerIntervalMs; private long _timerIntervalMs;
/// <summary>
/// Constructor
/// </summary>
/// <param name="key">key of the timer</param>
/// <param name="config">configuration for the timer</param>
public RetriggerableTimer(string key, DeviceConfig config) public RetriggerableTimer(string key, DeviceConfig config)
: base(key, config.Name) : base(key, config.Name)
{ {
@@ -98,7 +103,7 @@ namespace PepperDash.Essentials.Core.Timers
/// <summary> /// <summary>
/// Executes the Elapsed action from confing when the timer elapses /// Executes the Elapsed action from confing when the timer elapses
/// </summary> /// </summary>
/// <param name="o"></param> /// <param name="action">action to be executed</param>
private void TimerElapsedCallback(object action) private void TimerElapsedCallback(object action)
{ {
Debug.LogMessage(LogEventLevel.Debug, this, "Timer Elapsed. Executing Action"); Debug.LogMessage(LogEventLevel.Debug, this, "Timer Elapsed. Executing Action");
@@ -144,15 +149,27 @@ namespace PepperDash.Essentials.Core.Timers
/// </summary> /// </summary>
public class RetriggerableTimerPropertiesConfig public class RetriggerableTimerPropertiesConfig
{ {
/// <summary>
/// Start the timer on device activation
/// </summary>
[JsonProperty("startTimerOnActivation")] [JsonProperty("startTimerOnActivation")]
public bool StartTimerOnActivation { get; set; } public bool StartTimerOnActivation { get; set; }
/// <summary>
/// Timer interval in milliseconds
/// </summary>
[JsonProperty("timerIntervalMs")] [JsonProperty("timerIntervalMs")]
public long TimerIntervalMs { get; set; } public long TimerIntervalMs { get; set; }
/// <summary>
/// Events and their associated actions
/// </summary>
[JsonProperty("events")] [JsonProperty("events")]
public Dictionary<eRetriggerableTimerEvents, DeviceActionWrapper> Events { get; set; } public Dictionary<eRetriggerableTimerEvents, DeviceActionWrapper> Events { get; set; }
/// <summary>
/// Constructor
/// </summary>
public RetriggerableTimerPropertiesConfig() public RetriggerableTimerPropertiesConfig()
{ {
Events = new Dictionary<eRetriggerableTimerEvents, DeviceActionWrapper>(); Events = new Dictionary<eRetriggerableTimerEvents, DeviceActionWrapper>();
@@ -164,7 +181,14 @@ namespace PepperDash.Essentials.Core.Timers
/// </summary> /// </summary>
public enum eRetriggerableTimerEvents public enum eRetriggerableTimerEvents
{ {
/// <summary>
/// Elapsed event
/// </summary>
Elapsed, Elapsed,
/// <summary>
/// Stopped event
/// </summary>
Stopped, Stopped,
} }
@@ -173,11 +197,19 @@ namespace PepperDash.Essentials.Core.Timers
/// </summary> /// </summary>
public class RetriggerableTimerFactory : EssentialsDeviceFactory<RetriggerableTimer> public class RetriggerableTimerFactory : EssentialsDeviceFactory<RetriggerableTimer>
{ {
/// <summary>
/// Constructor
/// </summary>
public RetriggerableTimerFactory() public RetriggerableTimerFactory()
{ {
TypeNames = new List<string>() { "retriggerabletimer" }; TypeNames = new List<string>() { "retriggerabletimer" };
} }
/// <summary>
/// BuildDevice method
/// </summary>
/// <param name="dc">device config</param>
/// <returns></returns>
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)
{ {
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new RetriggerableTimer Device"); Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new RetriggerableTimer Device");

View File

@@ -7,72 +7,93 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public class CrestronTouchpanelPropertiesConfig public class CrestronTouchpanelPropertiesConfig
{ {
[JsonProperty("control")]
/// <summary> /// <summary>
/// Gets or sets the ControlProperties /// Gets or sets the ControlProperties
/// </summary> /// </summary>
[JsonProperty("control")]
public EssentialsControlPropertiesConfig ControlProperties { get; set; } public EssentialsControlPropertiesConfig ControlProperties { get; set; }
[JsonProperty("ipId", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the IpId /// Gets or sets the IpId
/// </summary> /// </summary>
[JsonProperty("ipId", NullValueHandling = NullValueHandling.Ignore)]
public string IpId { get; set; } public string IpId { get; set; }
[JsonProperty("defaultRoomKey", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the DefaultRoomKey /// Gets or sets the DefaultRoomKey
/// </summary> /// </summary>
[JsonProperty("defaultRoomKey", NullValueHandling = NullValueHandling.Ignore)]
public string DefaultRoomKey { get; set; } public string DefaultRoomKey { get; set; }
[JsonProperty("roomListKey", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the RoomListKey /// Gets or sets the RoomListKey
/// </summary> /// </summary>
[JsonProperty("roomListKey", NullValueHandling = NullValueHandling.Ignore)]
public string RoomListKey { get; set; } public string RoomListKey { get; set; }
[JsonProperty("sgdFile", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the SgdFile /// Gets or sets the SgdFile
/// </summary> /// </summary>
[JsonProperty("sgdFile", NullValueHandling = NullValueHandling.Ignore)]
public string SgdFile { get; set; } public string SgdFile { get; set; }
[JsonProperty("projectName", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the ProjectName /// Gets or sets the ProjectName
/// </summary> /// </summary>
[JsonProperty("projectName", NullValueHandling = NullValueHandling.Ignore)]
public string ProjectName { get; set; } public string ProjectName { get; set; }
/// <summary>
/// Gets or sets the ShowVolumeGauge
/// </summary>
[JsonProperty("showVolumeGauge", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("showVolumeGauge", NullValueHandling = NullValueHandling.Ignore)]
public bool? ShowVolumeGauge { get; set; } public bool? ShowVolumeGauge { get; set; }
/// <summary>
/// Gets or sets the UsesSplashPage
/// </summary>
[JsonProperty("usesSplashPage", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("usesSplashPage", NullValueHandling = NullValueHandling.Ignore)]
public bool? UsesSplashPage { get; set; } public bool? UsesSplashPage { get; set; }
/// <summary>
/// Gets or sets the ShowDate
/// </summary>
[JsonProperty("showDate", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("showDate", NullValueHandling = NullValueHandling.Ignore)]
public bool? ShowDate { get; set; } public bool? ShowDate { get; set; }
/// <summary>
/// Gets or sets the ShowTime
/// </summary>
[JsonProperty("showTime", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("showTime", NullValueHandling = NullValueHandling.Ignore)]
public bool? ShowTime { get; set; } public bool? ShowTime { get; set; }
[JsonProperty("setup", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the Setup /// Gets or sets the Setup
/// </summary> /// </summary>
[JsonProperty("setup", NullValueHandling = NullValueHandling.Ignore)]
public UiSetupPropertiesConfig Setup { get; set; } public UiSetupPropertiesConfig Setup { get; set; }
[JsonProperty("headerStyle", NullValueHandling = NullValueHandling.Ignore)]
/// <summary> /// <summary>
/// Gets or sets the HeaderStyle /// Gets or sets the HeaderStyle
/// </summary> /// </summary>
[JsonProperty("headerStyle", NullValueHandling = NullValueHandling.Ignore)]
public string HeaderStyle { get; set; } public string HeaderStyle { get; set; }
/// <summary>
/// Gets or sets the IncludeInFusionRoomHealth
/// </summary>
[JsonProperty("includeInFusionRoomHealth", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("includeInFusionRoomHealth", NullValueHandling = NullValueHandling.Ignore)]
public bool? IncludeInFusionRoomHealth { get; set; } public bool? IncludeInFusionRoomHealth { get; set; }
/// <summary>
/// Gets or sets the ScreenSaverTimeoutMin
/// </summary>
[JsonProperty("screenSaverTimeoutMin", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("screenSaverTimeoutMin", NullValueHandling = NullValueHandling.Ignore)]
public uint? ScreenSaverTimeoutMin { get; set; } public uint? ScreenSaverTimeoutMin { get; set; }
/// <summary>
/// Gets or sets the ScreenSaverMovePositionIntervalMs
/// </summary>
[JsonProperty("screenSaverMovePositionIntervalMs", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("screenSaverMovePositionIntervalMs", NullValueHandling = NullValueHandling.Ignore)]
public uint? ScreenSaverMovePositionIntervalMs { get; set; } public uint? ScreenSaverMovePositionIntervalMs { get; set; }
@@ -84,8 +105,15 @@ namespace PepperDash.Essentials.Core
[JsonProperty("sourcesOverflowCount", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("sourcesOverflowCount", NullValueHandling = NullValueHandling.Ignore)]
public int? SourcesOverflowCount { get; set; } public int? SourcesOverflowCount { get; set; }
/// <summary>
/// Constructor
/// </summary>
public CrestronTouchpanelPropertiesConfig() : this(false) { } public CrestronTouchpanelPropertiesConfig() : this(false) { }
/// <summary>
/// Constructor
/// </summary>
/// <param name="setDefaultValues">set values to default if true</param>
public CrestronTouchpanelPropertiesConfig(bool setDefaultValues = false) public CrestronTouchpanelPropertiesConfig(bool setDefaultValues = false)
{ {
if(!setDefaultValues) { return; } if(!setDefaultValues) { return; }
@@ -112,6 +140,9 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public class UiSetupPropertiesConfig public class UiSetupPropertiesConfig
{ {
/// <summary>
/// Gets or sets the IsVisible
/// </summary>
[JsonProperty("isVisible", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("isVisible", NullValueHandling = NullValueHandling.Ignore)]
public bool IsVisible { get; set; } public bool IsVisible { get; set; }
} }

View File

@@ -12,6 +12,9 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public interface IHasBasicTriListWithSmartObject public interface IHasBasicTriListWithSmartObject
{ {
/// <summary>
/// Gets the Panel
/// </summary>
BasicTriListWithSmartObject Panel { get; } BasicTriListWithSmartObject Panel { get; }
} }
} }

View File

@@ -27,8 +27,14 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards
/// </summary> /// </summary>
public StringFeedback OutputFeedback { get; private set; } public StringFeedback OutputFeedback { get; private set; }
/// <summary>
/// Gets or sets the IsVisible
/// </summary>
public bool IsVisible { get; private set; } public bool IsVisible { get; private set; }
/// <summary>
/// Gets or sets the DotComButtonString
/// </summary>
public string DotComButtonString { get; set; } public string DotComButtonString { get; set; }
/// <summary> /// <summary>
@@ -441,21 +447,33 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards
} }
/// <summary> /// <summary>
/// /// Event args for keyboard key presses
/// </summary> /// </summary>
public class KeyboardControllerPressEventArgs : EventArgs public class KeyboardControllerPressEventArgs : EventArgs
{ {
/// <summary>
/// Gets or sets the Text
/// </summary>
public string Text { get; private set; } public string Text { get; private set; }
/// <summary> /// <summary>
/// Gets or sets the SpecialKey /// Gets or sets the SpecialKey
/// </summary> /// </summary>
public KeyboardSpecialKey SpecialKey { get; private set; } public KeyboardSpecialKey SpecialKey { get; private set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="text"></param>
public KeyboardControllerPressEventArgs(string text) public KeyboardControllerPressEventArgs(string text)
{ {
Text = text; Text = text;
} }
/// <summary>
/// Constructor
/// </summary>
/// <param name="key">special keyboard key</param>
public KeyboardControllerPressEventArgs(KeyboardSpecialKey key) public KeyboardControllerPressEventArgs(KeyboardSpecialKey key)
{ {
SpecialKey = key; SpecialKey = key;
@@ -467,6 +485,29 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards
/// </summary> /// </summary>
public enum KeyboardSpecialKey public enum KeyboardSpecialKey
{ {
None = 0, Backspace, Clear, GoButton, SecondaryButton /// <summary>
/// None
/// </summary>
None = 0,
/// <summary>
/// Backspace
/// </summary>
Backspace,
/// <summary>
/// Clear
/// </summary>
Clear,
/// <summary>
/// GoButton
/// </summary>
GoButton,
/// <summary>
/// SecondaryButton
/// </summary>
SecondaryButton
} }
} }

View File

@@ -113,8 +113,13 @@ namespace PepperDash.Essentials.Core
/// Shows the dialog /// Shows the dialog
/// </summary> /// </summary>
/// <param name="numberOfButtons">Number of buttons to show. 0, 1, 2</param> /// <param name="numberOfButtons">Number of buttons to show. 0, 1, 2</param>
/// <param name="timeMs">The amount of time to show the dialog. Use 0 for no timeout.</param> /// <param name="title">Title text</param>
/// <param name="decreasingGauge">If the progress bar gauge needs to count down instead of up</param> /// <param name="iconName">Icon name</param>
/// <param name="message">Message text</param>
/// <param name="button1Text">Button 1 text</param>
/// <param name="button2Text">Button 2 text</param>
/// <param name="showGauge">True to show the gauge</param>
/// <param name="showCancel">True to show the cancel "X" button</param>
/// <param name="completeAction">The action to run when the dialog is dismissed. Parameter will be 1 or 2 if button pressed, or 0 if dialog times out</param> /// <param name="completeAction">The action to run when the dialog is dismissed. Parameter will be 1 or 2 if button pressed, or 0 if dialog times out</param>
/// <returns>True when modal is created.</returns> /// <returns>True when modal is created.</returns>
public bool PresentModalDialog(uint numberOfButtons, string title, string iconName, public bool PresentModalDialog(uint numberOfButtons, string title, string iconName,

View File

@@ -19,6 +19,13 @@ namespace PepperDash.Essentials.Core.Touchpanels
readonly Dictionary<string, KeypadButton> _buttons; readonly Dictionary<string, KeypadButton> _buttons;
/// <summary>
/// Constructor
/// </summary>
/// <param name="key">device key</param>
/// <param name="name">device name</param>
/// <param name="processor">control system processor</param>
/// <param name="buttons">dictionary of keypad buttons</param>
public Mpc3TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary<string, KeypadButton> buttons) public Mpc3TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary<string, KeypadButton> buttons)
: base(key, name) : base(key, name)
{ {
@@ -348,12 +355,21 @@ namespace PepperDash.Essentials.Core.Touchpanels
/// </summary> /// </summary>
public class KeypadButton public class KeypadButton
{ {
/// <summary>
/// Gets or sets the EventTypes
/// </summary>
[JsonProperty("eventTypes")] [JsonProperty("eventTypes")]
public Dictionary<string, DeviceActionWrapper[]> EventTypes { get; set; } public Dictionary<string, DeviceActionWrapper[]> EventTypes { get; set; }
/// <summary>
/// Gets or sets the Feedback
/// </summary>
[JsonProperty("feedback")] [JsonProperty("feedback")]
public KeypadButtonFeedback Feedback { get; set; } public KeypadButtonFeedback Feedback { get; set; }
/// <summary>
/// Constructor
/// </summary>
public KeypadButton() public KeypadButton()
{ {
EventTypes = new Dictionary<string, DeviceActionWrapper[]>(); EventTypes = new Dictionary<string, DeviceActionWrapper[]>();
@@ -361,17 +377,20 @@ namespace PepperDash.Essentials.Core.Touchpanels
} }
} }
/// <summary> /// <summary>
/// Represents a KeypadButtonFeedback /// Represents a KeypadButtonFeedback
/// </summary> /// </summary>
public class KeypadButtonFeedback public class KeypadButtonFeedback
{ {
/// <summary>
/// Gets or sets the DeviceKey
/// </summary>
[JsonProperty("deviceKey")] [JsonProperty("deviceKey")]
/// <summary>
/// Gets or sets the DeviceKey
/// </summary>
public string DeviceKey { get; set; } public string DeviceKey { get; set; }
/// <summary>
/// Gets or sets the FeedbackName
/// </summary>
[JsonProperty("feedbackName")] [JsonProperty("feedbackName")]
public string FeedbackName { get; set; } public string FeedbackName { get; set; }
} }

View File

@@ -44,6 +44,13 @@ namespace PepperDash.Essentials.Core
return tl.BooleanOutput[sigNum].SetBoolSigAction(a); return tl.BooleanOutput[sigNum].SetBoolSigAction(a);
} }
/// <summary>
/// Attaches a void Action to a TriList's output sig's UserObject, to be run on press
/// </summary>
/// <param name="tl">trilist</param>
/// <param name="sigNum">number of the signal</param>
/// <param name="a">action to run when the signal is true (pressed)</param>
/// <returns></returns>
public static BoolOutputSig SetSigTrueAction(this BasicTriList tl, uint sigNum, Action a) public static BoolOutputSig SetSigTrueAction(this BasicTriList tl, uint sigNum, Action a)
{ {
return tl.BooleanOutput[sigNum].SetBoolSigAction(b => { if(b) a(); }); return tl.BooleanOutput[sigNum].SetBoolSigAction(b => { if(b) a(); });
@@ -53,9 +60,6 @@ namespace PepperDash.Essentials.Core
/// Attaches a void Action to a TriList's output sig's UserObject, to be run on release /// Attaches a void Action to a TriList's output sig's UserObject, to be run on release
/// </summary> /// </summary>
/// <returns>The sig</returns> /// <returns>The sig</returns>
/// <summary>
/// SetSigFalseAction method
/// </summary>
public static BoolOutputSig SetSigFalseAction(this BasicTriList tl, uint sigNum, Action a) public static BoolOutputSig SetSigFalseAction(this BasicTriList tl, uint sigNum, Action a)
{ {
return tl.BooleanOutput[sigNum].SetBoolSigAction(b => { if (!b) a(); }); return tl.BooleanOutput[sigNum].SetBoolSigAction(b => { if (!b) a(); });
@@ -143,43 +147,35 @@ namespace PepperDash.Essentials.Core
} }
/// <summary> /// <summary>
/// /// SetUShortSigAction method
/// </summary> /// </summary>
/// <param name="sig"></param> /// <param name="sig"></param>
/// <param name="a"></param> /// <param name="a"></param>
/// <returns>The Sig</returns> /// <returns>The Sig</returns>
/// <summary> public static UShortOutputSig SetUShortSigAction(this UShortOutputSig sig, Action<ushort> a)
/// SetUShortSigAction method
/// </summary>
public static UShortOutputSig SetUShortSigAction(this UShortOutputSig sig, Action<ushort> a)
{ {
sig.UserObject = a; sig.UserObject = a;
return sig; return sig;
} }
/// <summary> /// <summary>
/// /// SetUShortSigAction method
/// </summary> /// </summary>
/// <param name="tl"></param> /// <param name="tl"></param>
/// <param name="sigNum"></param> /// <param name="sigNum"></param>
/// <param name="a"></param> /// <param name="a"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// SetUShortSigAction method
/// </summary>
public static UShortOutputSig SetUShortSigAction(this BasicTriList tl, uint sigNum, Action<ushort> a) public static UShortOutputSig SetUShortSigAction(this BasicTriList tl, uint sigNum, Action<ushort> a)
{ {
return tl.UShortOutput[sigNum].SetUShortSigAction(a); return tl.UShortOutput[sigNum].SetUShortSigAction(a);
} }
/// <summary> /// <summary>
/// /// SetStringSigAction method
/// </summary> /// </summary>
/// <param name="sig"></param> /// <param name="sig"></param>
/// <param name="a"></param> /// <param name="a"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// SetStringSigAction method
/// </summary>
public static StringOutputSig SetStringSigAction(this StringOutputSig sig, Action<string> a) public static StringOutputSig SetStringSigAction(this StringOutputSig sig, Action<string> a)
{ {
sig.UserObject = a; sig.UserObject = a;
@@ -187,50 +183,50 @@ namespace PepperDash.Essentials.Core
} }
/// <summary> /// <summary>
/// /// SetStringSigAction method
/// </summary> /// </summary>
/// <param name="tl"></param> /// <param name="tl"></param>
/// <param name="sigNum"></param> /// <param name="sigNum"></param>
/// <param name="a"></param> /// <param name="a"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// SetStringSigAction method
/// </summary>
public static StringOutputSig SetStringSigAction(this BasicTriList tl, uint sigNum, Action<string> a) public static StringOutputSig SetStringSigAction(this BasicTriList tl, uint sigNum, Action<string> a)
{ {
return tl.StringOutput[sigNum].SetStringSigAction(a); return tl.StringOutput[sigNum].SetStringSigAction(a);
} }
/// <summary> /// <summary>
/// /// ClearSigAction method
/// </summary> /// </summary>
/// <param name="sig"></param> /// <param name="sig"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// ClearSigAction method
/// </summary>
public static Sig ClearSigAction(this Sig sig) public static Sig ClearSigAction(this Sig sig)
{ {
sig.UserObject = null; sig.UserObject = null;
return sig; return sig;
} }
/// <summary>
/// ClearBoolSigAction method
/// </summary>
/// <param name="tl">trilist</param>
/// <param name="sigNum">signal number to clear</param>
/// <returns></returns>
public static BoolOutputSig ClearBoolSigAction(this BasicTriList tl, uint sigNum) public static BoolOutputSig ClearBoolSigAction(this BasicTriList tl, uint sigNum)
{ {
return ClearSigAction(tl.BooleanOutput[sigNum]) as BoolOutputSig; return ClearSigAction(tl.BooleanOutput[sigNum]) as BoolOutputSig;
} }
/// <summary> /// <summary>
/// ClearUShortSigAction method /// ClearUShortSigAction method
/// </summary> /// </summary>
public static UShortOutputSig ClearUShortSigAction(this BasicTriList tl, uint sigNum) public static UShortOutputSig ClearUShortSigAction(this BasicTriList tl, uint sigNum)
{ {
return ClearSigAction(tl.UShortOutput[sigNum]) as UShortOutputSig; return ClearSigAction(tl.UShortOutput[sigNum]) as UShortOutputSig;
} }
/// <summary> /// <summary>
/// ClearStringSigAction method /// ClearStringSigAction method
/// </summary> /// </summary>
public static StringOutputSig ClearStringSigAction(this BasicTriList tl, uint sigNum) public static StringOutputSig ClearStringSigAction(this BasicTriList tl, uint sigNum)
{ {
return ClearSigAction(tl.StringOutput[sigNum]) as StringOutputSig; return ClearSigAction(tl.StringOutput[sigNum]) as StringOutputSig;
@@ -270,9 +266,6 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
/// <param name="tl"></param> /// <param name="tl"></param>
/// <param name="sigNum"></param> /// <param name="sigNum"></param>
/// <summary>
/// PulseBool method
/// </summary>
public static void PulseBool(this BasicTriList tl, uint sigNum) public static void PulseBool(this BasicTriList tl, uint sigNum)
{ {
tl.BooleanInput[sigNum].Pulse(); tl.BooleanInput[sigNum].Pulse();
@@ -284,9 +277,6 @@ namespace PepperDash.Essentials.Core
/// <param name="tl"></param> /// <param name="tl"></param>
/// <param name="sigNum"></param> /// <param name="sigNum"></param>
/// <param name="ms"></param> /// <param name="ms"></param>
/// <summary>
/// PulseBool method
/// </summary>
public static void PulseBool(this BasicTriList tl, uint sigNum, int ms) public static void PulseBool(this BasicTriList tl, uint sigNum, int ms)
{ {
tl.BooleanInput[sigNum].Pulse(ms); tl.BooleanInput[sigNum].Pulse(ms);
@@ -308,6 +298,13 @@ namespace PepperDash.Essentials.Core
tl.StringInput[sigNum].StringValue = value; tl.StringInput[sigNum].StringValue = value;
} }
/// <summary>
/// Helper method to set the value of a string Sig on TriList with encoding
/// </summary>
/// <param name="tl">trilist</param>
/// <param name="sigNum">signal number to set</param>
/// <param name="value">string value to set</param>
/// <param name="encoding">string encoding to use</param>
public static void SetString(this BasicTriList tl, uint sigNum, string value, eStringEncoding encoding) public static void SetString(this BasicTriList tl, uint sigNum, string value, eStringEncoding encoding)
{ {
tl.StringInput[sigNum].StringEncoding = encoding; tl.StringInput[sigNum].StringEncoding = encoding;
@@ -320,9 +317,6 @@ namespace PepperDash.Essentials.Core
/// <param name="tl"></param> /// <param name="tl"></param>
/// <param name="sigNum"></param> /// <param name="sigNum"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// GetBool method
/// </summary>
public static bool GetBool(this BasicTriList tl, uint sigNum) public static bool GetBool(this BasicTriList tl, uint sigNum)
{ {
return tl.BooleanOutput[sigNum].BoolValue; return tl.BooleanOutput[sigNum].BoolValue;
@@ -334,9 +328,6 @@ namespace PepperDash.Essentials.Core
/// <param name="tl"></param> /// <param name="tl"></param>
/// <param name="sigNum"></param> /// <param name="sigNum"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// GetUshort method
/// </summary>
public static ushort GetUshort(this BasicTriList tl, uint sigNum) public static ushort GetUshort(this BasicTriList tl, uint sigNum)
{ {
return tl.UShortOutput[sigNum].UShortValue; return tl.UShortOutput[sigNum].UShortValue;
@@ -348,9 +339,6 @@ namespace PepperDash.Essentials.Core
/// <param name="tl"></param> /// <param name="tl"></param>
/// <param name="sigNum"></param> /// <param name="sigNum"></param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// GetString method
/// </summary>
public static string GetString(this BasicTriList tl, uint sigNum) public static string GetString(this BasicTriList tl, uint sigNum)
{ {
return tl.StringOutput[sigNum].StringValue; return tl.StringOutput[sigNum].StringValue;

View File

@@ -9,6 +9,9 @@ using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.Core namespace PepperDash.Essentials.Core
{ {
/// <summary>
/// Abstract base class for TriList handler bridges
/// </summary>
public abstract class HandlerBridge public abstract class HandlerBridge
{ {
/// <summary> /// <summary>

View File

@@ -10,6 +10,11 @@ namespace PepperDash.Essentials.Core.PageManagers
{ {
IDiscPlayerControls Player; IDiscPlayerControls Player;
/// <summary>
/// Constructor
/// </summary>
/// <param name="player">player controls object</param>
/// <param name="trilist">trilist object</param>
public DiscPlayerMediumPageManager(IDiscPlayerControls player, BasicTriListWithSmartObject trilist) public DiscPlayerMediumPageManager(IDiscPlayerControls player, BasicTriListWithSmartObject trilist)
: base(player.DisplayUiType) : base(player.DisplayUiType)
{ {
@@ -17,10 +22,10 @@ namespace PepperDash.Essentials.Core.PageManagers
TriList = trilist; TriList = trilist;
} }
/// <summary> /// <summary>
/// Show method /// Show method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Show() public override void Show()
{ {
uint offset = GetOffsetJoin(); uint offset = GetOffsetJoin();
@@ -40,10 +45,10 @@ namespace PepperDash.Essentials.Core.PageManagers
} }
} }
/// <summary> /// <summary>
/// Hide method /// Hide method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Hide() public override void Hide()
{ {
TriList.BooleanInput[BackingPageJoin].BoolValue = false; TriList.BooleanInput[BackingPageJoin].BoolValue = false;

View File

@@ -10,10 +10,19 @@ namespace PepperDash.Essentials.Core.PageManagers
/// </summary> /// </summary>
public abstract class PageManager public abstract class PageManager
{ {
/// <summary>
/// ActiveJoins list
/// </summary>
protected List<uint> ActiveJoins = new List<uint>(); protected List<uint> ActiveJoins = new List<uint>();
/// <summary>
/// Show method
/// </summary>
public abstract void Show(); public abstract void Show();
/// <summary>
/// Hide method
/// </summary>
public abstract void Hide(); public abstract void Hide();
/// <summary> /// <summary>
@@ -21,9 +30,6 @@ namespace PepperDash.Essentials.Core.PageManagers
/// </summary> /// </summary>
/// <param name="deviceType">1 through 49, as defined in some constants somewhere!</param> /// <param name="deviceType">1 through 49, as defined in some constants somewhere!</param>
/// <returns></returns> /// <returns></returns>
/// <summary>
/// GetOffsetJoin method
/// </summary>
public uint GetOffsetJoin(uint deviceType) public uint GetOffsetJoin(uint deviceType)
{ {
return 10000 + (deviceType * 100); return 10000 + (deviceType * 100);
@@ -38,30 +44,40 @@ namespace PepperDash.Essentials.Core.PageManagers
BasicTriList TriList; BasicTriList TriList;
uint BackingPageJoin; uint BackingPageJoin;
/// <summary>
/// Constructor
/// </summary>
/// <param name="device">device</param>
/// <param name="trilist">trilist object</param>
public DefaultPageManager(IUiDisplayInfo device, BasicTriList trilist) public DefaultPageManager(IUiDisplayInfo device, BasicTriList trilist)
{ {
TriList = trilist; TriList = trilist;
BackingPageJoin = GetOffsetJoin(device.DisplayUiType) + 1; BackingPageJoin = GetOffsetJoin(device.DisplayUiType) + 1;
} }
/// <summary>
/// Constructor
/// </summary>
/// <param name="join">back page join</param>
/// <param name="trilist">trilist object</param>
public DefaultPageManager(uint join, BasicTriList trilist) public DefaultPageManager(uint join, BasicTriList trilist)
{ {
TriList = trilist; TriList = trilist;
BackingPageJoin = join; BackingPageJoin = join;
} }
/// <summary> /// <summary>
/// Show method /// Show method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Show() public override void Show()
{ {
TriList.BooleanInput[BackingPageJoin].BoolValue = true; TriList.BooleanInput[BackingPageJoin].BoolValue = true;
} }
/// <summary> /// <summary>
/// Hide method /// Hide method
/// </summary> /// </summary>
public override void Hide() public override void Hide()
{ {
TriList.BooleanInput[BackingPageJoin].BoolValue = false; TriList.BooleanInput[BackingPageJoin].BoolValue = false;
@@ -73,17 +89,44 @@ namespace PepperDash.Essentials.Core.PageManagers
/// </summary> /// </summary>
public abstract class MediumLeftSwitchablePageManager : PageManager public abstract class MediumLeftSwitchablePageManager : PageManager
{ {
/// <summary>
/// TriList object
/// </summary>
protected BasicTriListWithSmartObject TriList; protected BasicTriListWithSmartObject TriList;
/// <summary>
/// Left subpage join
/// </summary>
protected uint LeftSubpageJoin; protected uint LeftSubpageJoin;
/// <summary>
/// Backing page join
/// </summary>
protected uint BackingPageJoin; protected uint BackingPageJoin;
/// <summary>
/// All left subpages
/// </summary>
protected uint[] AllLeftSubpages; protected uint[] AllLeftSubpages;
/// <summary>
/// Display UI Type
/// </summary>
protected uint DisplayUiType; protected uint DisplayUiType;
/// <summary>
/// Constructor
/// </summary>
/// <param name="displayUiType">UI type</param>
protected MediumLeftSwitchablePageManager(uint displayUiType) protected MediumLeftSwitchablePageManager(uint displayUiType)
{ {
DisplayUiType = displayUiType; DisplayUiType = displayUiType;
} }
/// <summary>
/// Interlock left subpage
/// </summary>
/// <param name="join"></param>
protected void InterlockLeftSubpage(uint join) protected void InterlockLeftSubpage(uint join)
{ {
join = join + GetOffsetJoin(); join = join + GetOffsetJoin();
@@ -92,12 +135,19 @@ namespace PepperDash.Essentials.Core.PageManagers
LeftSubpageJoin = join; LeftSubpageJoin = join;
} }
/// <summary>
/// Clear left interlock
/// </summary>
protected void ClearLeftInterlock() protected void ClearLeftInterlock()
{ {
foreach (var p in AllLeftSubpages) foreach (var p in AllLeftSubpages)
TriList.BooleanInput[GetOffsetJoin() + p].BoolValue = false; TriList.BooleanInput[GetOffsetJoin() + p].BoolValue = false;
} }
/// <summary>
/// Get offset join
/// </summary>
/// <returns></returns>
protected uint GetOffsetJoin() protected uint GetOffsetJoin()
{ {
return GetOffsetJoin(DisplayUiType); return GetOffsetJoin(DisplayUiType);

View File

@@ -9,16 +9,19 @@ using Serilog.Events;
namespace PepperDash.Essentials.Core.PageManagers namespace PepperDash.Essentials.Core.PageManagers
{ {
/// <summary> /// <summary>
/// Represents a ThreePanelPlusOnePageManager /// Represents a ThreePanelPlusOnePageManager
/// </summary> /// </summary>
public class ThreePanelPlusOnePageManager : PageManager public class ThreePanelPlusOnePageManager : PageManager
{ {
/// <summary>
/// The trilist
/// </summary>
protected BasicTriListWithSmartObject TriList; protected BasicTriListWithSmartObject TriList;
/// <summary> /// <summary>
/// Gets or sets the Position5TabsId /// Gets or sets the Position5TabsId
/// </summary> /// </summary>
public uint Position5TabsId { get; set; } public uint Position5TabsId { get; set; }
/// <summary> /// <summary>
@@ -32,12 +35,12 @@ namespace PepperDash.Essentials.Core.PageManagers
protected uint[] FixedVisibilityJoins; protected uint[] FixedVisibilityJoins;
/// <summary> /// <summary>
/// /// Gets or sets the current visible item in position 5
/// </summary> /// </summary>
protected uint CurrentVisiblePosition5Item; protected uint CurrentVisiblePosition5Item;
/// <summary> /// <summary>
/// /// Constructor
/// </summary> /// </summary>
/// <param name="trilist"></param> /// <param name="trilist"></param>
public ThreePanelPlusOnePageManager(BasicTriListWithSmartObject trilist) public ThreePanelPlusOnePageManager(BasicTriListWithSmartObject trilist)
@@ -85,10 +88,10 @@ namespace PepperDash.Essentials.Core.PageManagers
(uo as Action<bool>)(args.Sig.BoolValue); (uo as Action<bool>)(args.Sig.BoolValue);
} }
/// <summary> /// <summary>
/// Hide method /// Hide method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Hide() public override void Hide()
{ {
var fixedSigs = FixedVisibilityJoins.Select(u => TriList.BooleanInput[u]).ToList(); var fixedSigs = FixedVisibilityJoins.Select(u => TriList.BooleanInput[u]).ToList();
@@ -119,25 +122,27 @@ namespace PepperDash.Essentials.Core.PageManagers
/// <summary> /// <summary>
/// Represents a SetTopBoxThreePanelPageManager /// Represents a SetTopBoxThreePanelPageManager
/// </summary> /// </summary>
public class SetTopBoxThreePanelPageManager : ThreePanelPlusOnePageManager public class SetTopBoxThreePanelPageManager : ThreePanelPlusOnePageManager
{ {
ISetTopBoxControls SetTopBox; ISetTopBoxControls SetTopBox;
DevicePresetsView PresetsView; DevicePresetsView PresetsView;
/// <summary> /// <summary>
/// Gets or sets the DpadSmartObjectId /// Gets or sets the DpadSmartObjectId
/// </summary> /// </summary>
public uint DpadSmartObjectId { get; set; } public uint DpadSmartObjectId { get; set; }
/// <summary>
/// Gets or sets the NumberPadSmartObjectId /// <summary>
/// </summary> /// Gets or sets the NumberPadSmartObjectId
/// </summary>
public uint NumberPadSmartObjectId { get; set; } public uint NumberPadSmartObjectId { get; set; }
/// <summary>
/// Gets or sets the PresetsSmartObjectId /// <summary>
/// </summary> /// Gets or sets the PresetsSmartObjectId
/// </summary>
public uint PresetsSmartObjectId { get; set; } public uint PresetsSmartObjectId { get; set; }
/// <summary> /// <summary>
@@ -198,10 +203,10 @@ namespace PepperDash.Essentials.Core.PageManagers
} }
} }
/// <summary> /// <summary>
/// Show method /// Show method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Show() public override void Show()
{ {
if(PresetsView != null) if(PresetsView != null)
@@ -209,10 +214,10 @@ namespace PepperDash.Essentials.Core.PageManagers
base.Show(); base.Show();
} }
/// <summary> /// <summary>
/// Hide method /// Hide method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Hide() public override void Hide()
{ {
if (PresetsView != null) if (PresetsView != null)

View File

@@ -4,14 +4,19 @@ using PepperDash.Essentials.Core.Presets;
namespace PepperDash.Essentials.Core.PageManagers namespace PepperDash.Essentials.Core.PageManagers
{ {
/// <summary> /// <summary>
/// Represents a SetTopBoxMediumPageManager /// Represents a SetTopBoxMediumPageManager
/// </summary> /// </summary>
public class SetTopBoxMediumPageManager : MediumLeftSwitchablePageManager public class SetTopBoxMediumPageManager : MediumLeftSwitchablePageManager
{ {
ISetTopBoxControls SetTopBox; ISetTopBoxControls SetTopBox;
DevicePresetsView PresetsView; DevicePresetsView PresetsView;
/// <summary>
/// Constructor
/// </summary>
/// <param name="stb">set top box controls device</param>
/// <param name="trilist">trilist device</param>
public SetTopBoxMediumPageManager(ISetTopBoxControls stb, BasicTriListWithSmartObject trilist) public SetTopBoxMediumPageManager(ISetTopBoxControls stb, BasicTriListWithSmartObject trilist)
: base(stb.DisplayUiType) : base(stb.DisplayUiType)
{ {
@@ -21,10 +26,10 @@ namespace PepperDash.Essentials.Core.PageManagers
PresetsView = new DevicePresetsView(trilist, stb.TvPresets); PresetsView = new DevicePresetsView(trilist, stb.TvPresets);
} }
/// <summary> /// <summary>
/// Show method /// Show method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Show() public override void Show()
{ {
if(PresetsView != null) if(PresetsView != null)
@@ -54,10 +59,10 @@ namespace PepperDash.Essentials.Core.PageManagers
} }
} }
/// <summary> /// <summary>
/// Hide method /// Hide method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Hide() public override void Hide()
{ {
TriList.BooleanInput[BackingPageJoin].BoolValue = false; TriList.BooleanInput[BackingPageJoin].BoolValue = false;

View File

@@ -4,32 +4,37 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.PageManagers namespace PepperDash.Essentials.Core.PageManagers
{ {
/// <summary> /// <summary>
/// Represents a SinglePageManager /// Represents a SinglePageManager
/// </summary> /// </summary>
public class SinglePageManager : PageManager public class SinglePageManager : PageManager
{ {
BasicTriList TriList; BasicTriList TriList;
uint BackingPageJoin; uint BackingPageJoin;
/// <summary>
/// Constructor
/// </summary>
/// <param name="pageJoin">join for thepage</param>
/// <param name="trilist">trilist</param>
public SinglePageManager(uint pageJoin, BasicTriList trilist) public SinglePageManager(uint pageJoin, BasicTriList trilist)
{ {
TriList = trilist; TriList = trilist;
BackingPageJoin = pageJoin; BackingPageJoin = pageJoin;
} }
/// <summary> /// <summary>
/// Show method /// Show method
/// </summary> /// </summary>
/// <inheritdoc /> /// <inheritdoc />
public override void Show() public override void Show()
{ {
TriList.BooleanInput[BackingPageJoin].BoolValue = true; TriList.BooleanInput[BackingPageJoin].BoolValue = true;
} }
/// <summary> /// <summary>
/// Hide method /// Hide method
/// </summary> /// </summary>
public override void Hide() public override void Hide()
{ {
TriList.BooleanInput[BackingPageJoin].BoolValue = false; TriList.BooleanInput[BackingPageJoin].BoolValue = false;