From 260677a37f5d1f2f7cb1e50904fd7a33d1f4658f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 22 Jul 2025 15:48:23 +0000
Subject: [PATCH] docs: add XML documentation to PepperDash.Core project
Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
---
.../Comm/CommunicationGather.cs | 3 +
.../Comm/CommunicationStreamDebugging.cs | 15 ++
.../Comm/ControlPropertiesConfig.cs | 3 +
src/PepperDash.Core/Comm/EventArgs.cs | 9 ++
.../Comm/GenericSecureTcpIpClient.cs | 36 +++++
.../GenericSecureTcpIpClient_ForServer.cs | 24 +++
.../Comm/GenericSecureTcpIpServer.cs | 48 ++++++
src/PepperDash.Core/Comm/GenericSshClient.cs | 36 +++++
.../Comm/GenericTcpIpClient.cs | 42 ++++++
.../Comm/GenericTcpIpClient_ForServer.cs | 24 +++
.../Comm/GenericTcpIpServer.cs | 48 ++++++
src/PepperDash.Core/Comm/GenericUdpServer.cs | 18 +++
.../Comm/TcpClientConfigObject.cs | 3 +
src/PepperDash.Core/CommunicationExtras.cs | 12 ++
.../Config/PortalConfigReader.cs | 3 +
src/PepperDash.Core/Conversion/Convert.cs | 9 ++
src/PepperDash.Core/Device.cs | 34 ++++-
src/PepperDash.Core/EthernetHelper.cs | 6 +
src/PepperDash.Core/EventArgs.cs | 27 ++++
.../EventArgs and Constants.cs | 6 +
.../JsonStandardObjects/JsonToSimplDevice.cs | 3 +
.../JsonToSimplDeviceConfig.cs | 30 ++++
src/PepperDash.Core/JsonToSimpl/Constants.cs | 6 +
src/PepperDash.Core/JsonToSimpl/Global.cs | 6 +
.../JsonToSimplArrayLookupChild.cs | 6 +
.../JsonToSimpl/JsonToSimplChildObjectBase.cs | 36 +++++
.../JsonToSimpl/JsonToSimplFileMaster.cs | 9 ++
.../JsonToSimpl/JsonToSimplFixedPathObject.cs | 3 +
.../JsonToSimpl/JsonToSimplGenericMaster.cs | 12 ++
.../JsonToSimpl/JsonToSimplMaster.cs | 18 +++
.../JsonToSimplPortalFileMaster.cs | 6 +
.../Logging/CrestronEnricher.cs | 6 +
src/PepperDash.Core/Logging/Debug.cs | 138 ++++++++++++++++++
.../Logging/DebugConsoleSink.cs | 9 ++
src/PepperDash.Core/Logging/DebugContext.cs | 15 ++
.../Logging/DebugCrestronLoggerSink.cs | 6 +
.../Logging/DebugErrorLogSink.cs | 6 +
.../Logging/DebugExtensions.cs | 39 +++++
src/PepperDash.Core/Logging/DebugMemory.cs | 15 ++
.../Logging/DebugWebsocketSink.cs | 21 +++
.../PasswordManagement/PasswordClient.cs | 15 ++
.../PasswordManagement/PasswordManager.cs | 9 ++
.../SystemInfo/EventArgs and Constants.cs | 12 ++
.../SystemInfo/SystemInfoToSimpl.cs | 18 +++
src/PepperDash.Core/Web/BouncyCertificate.cs | 15 ++
.../RequestHandlers/DefaultRequestHandler.cs | 3 +
.../WebApiBaseRequestAsyncHandler.cs | 3 +
.../WebApiBaseRequestHandler.cs | 3 +
src/PepperDash.Core/Web/WebApiServer.cs | 24 +++
src/PepperDash.Core/WebApi/Presets/Preset.cs | 27 ++++
src/PepperDash.Core/WebApi/Presets/User.cs | 24 +++
.../WebApi/Presets/WebApiPasscodeClient.cs | 12 ++
.../XSigUtility/Tokens/XSigAnalogToken.cs | 9 ++
.../XSigUtility/Tokens/XSigDigitalToken.cs | 9 ++
.../XSigUtility/Tokens/XSigSerialToken.cs | 6 +
.../XSigUtility/XSigHelpers.cs | 42 ++++++
.../XSigUtility/XSigTokenStreamReader.cs | 9 ++
.../XSigUtility/XSigTokenStreamWriter.cs | 18 +++
.../Factory/DeviceFactory.cs | 23 +++
59 files changed, 1072 insertions(+), 5 deletions(-)
diff --git a/src/PepperDash.Core/Comm/CommunicationGather.cs b/src/PepperDash.Core/Comm/CommunicationGather.cs
index 9ffe8262..3a03f929 100644
--- a/src/PepperDash.Core/Comm/CommunicationGather.cs
+++ b/src/PepperDash.Core/Comm/CommunicationGather.cs
@@ -88,6 +88,9 @@ namespace PepperDash.Core
/// Disconnects this gather from the Port's TextReceived event. This will not fire LineReceived
/// after the this call.
///
+ ///
+ /// Stop method
+ ///
public void Stop()
{
Port.TextReceived -= Port_TextReceived;
diff --git a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs
index 0a38d826..59d00d29 100644
--- a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs
+++ b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs
@@ -25,6 +25,9 @@ namespace PepperDash.Core
///
/// The current debug setting
///
+ ///
+ /// Gets or sets the DebugSetting
+ ///
public eStreamDebuggingSetting DebugSetting { get; private set; }
private uint _DebugTimeoutInMs;
@@ -44,6 +47,9 @@ namespace PepperDash.Core
///
/// Indicates that receive stream debugging is enabled
///
+ ///
+ /// Gets or sets the RxStreamDebuggingIsEnabled
+ ///
public bool RxStreamDebuggingIsEnabled{ get; private set; }
///
@@ -65,6 +71,9 @@ namespace PepperDash.Core
/// Sets the debugging setting and if not setting to off, assumes the default of 30 mintues
///
///
+ ///
+ /// SetDebuggingWithDefaultTimeout method
+ ///
public void SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting setting)
{
if (setting == eStreamDebuggingSetting.Off)
@@ -81,6 +90,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// SetDebuggingWithSpecificTimeout method
+ ///
public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes)
{
if (setting == eStreamDebuggingSetting.Off)
@@ -135,6 +147,9 @@ namespace PepperDash.Core
/// The available settings for stream debugging
///
[Flags]
+ ///
+ /// Enumeration of eStreamDebuggingSetting values
+ ///
public enum eStreamDebuggingSetting
{
///
diff --git a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs
index ff869f77..443e3c40 100644
--- a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs
+++ b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs
@@ -8,6 +8,9 @@ namespace PepperDash.Core
///
/// Config properties that indicate how to communicate with a device for control
///
+ ///
+ /// Represents a ControlPropertiesConfig
+ ///
public class ControlPropertiesConfig
{
///
diff --git a/src/PepperDash.Core/Comm/EventArgs.cs b/src/PepperDash.Core/Comm/EventArgs.cs
index cf76d6b3..09904f21 100644
--- a/src/PepperDash.Core/Comm/EventArgs.cs
+++ b/src/PepperDash.Core/Comm/EventArgs.cs
@@ -32,6 +32,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Gets or sets the Client
+ ///
public ISocketStatus Client { get; private set; }
///
@@ -62,6 +65,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Gets or sets the State
+ ///
public ServerState State { get; private set; }
///
@@ -156,6 +162,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Gets or sets the Text
+ ///
public string Text { get; private set; }
///
diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs
index 5ad2e29d..78c3cb0d 100644
--- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs
+++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs
@@ -81,6 +81,9 @@ namespace PepperDash.Core
///
/// Port on server
///
+ ///
+ /// Gets or sets the Port
+ ///
public int Port { get; set; }
///
@@ -151,6 +154,9 @@ namespace PepperDash.Core
///
/// bool to track if auto reconnect should be set on the socket
///
+ ///
+ /// Gets or sets the AutoReconnect
+ ///
public bool AutoReconnect { get; set; }
///
@@ -190,6 +196,9 @@ namespace PepperDash.Core
///
/// Bool to show whether the server requires a preshared key. This is used in the DynamicTCPServer class
///
+ ///
+ /// Gets or sets the SharedKeyRequired
+ ///
public bool SharedKeyRequired { get; set; }
///
@@ -209,6 +218,9 @@ namespace PepperDash.Core
///
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
///
+ ///
+ /// Gets or sets the SharedKey
+ ///
public string SharedKey { get; set; }
///
@@ -224,6 +236,9 @@ namespace PepperDash.Core
///
/// Bool showing if socket is ready for communication after shared key exchange
///
+ ///
+ /// Gets or sets the IsReadyForCommunication
+ ///
public bool IsReadyForCommunication { get; set; }
///
@@ -344,6 +359,9 @@ namespace PepperDash.Core
///
/// Just to help S+ set the key
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key)
{
Key = key;
@@ -421,6 +439,9 @@ namespace PepperDash.Core
/// Deactivate the client
///
///
+ ///
+ /// Deactivate method
+ ///
public override bool Deactivate()
{
if (_client != null)
@@ -434,6 +455,9 @@ namespace PepperDash.Core
///
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
///
+ ///
+ /// Connect method
+ ///
public void Connect()
{
ConnectionCount++;
@@ -565,6 +589,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Disconnect method
+ ///
public void Disconnect()
{
this.LogVerbose("Disconnect Called");
@@ -588,6 +615,9 @@ namespace PepperDash.Core
///
/// Does the actual disconnect business
///
+ ///
+ /// DisconnectClient method
+ ///
public void DisconnectClient()
{
if (_client == null) return;
@@ -848,6 +878,9 @@ namespace PepperDash.Core
///
/// General send method
///
+ ///
+ /// SendText method
+ ///
public void SendText(string text)
{
if (!string.IsNullOrEmpty(text))
@@ -877,6 +910,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// SendBytes method
+ ///
public void SendBytes(byte[] bytes)
{
if (bytes.Length > 0)
diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs
index 93b195ca..d2deaecc 100644
--- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs
+++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs
@@ -82,6 +82,9 @@ namespace PepperDash.Core
///
/// Port on server
///
+ ///
+ /// Gets or sets the Port
+ ///
public int Port { get; set; }
///
@@ -115,6 +118,9 @@ namespace PepperDash.Core
///
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
///
+ ///
+ /// Gets or sets the SharedKey
+ ///
public string SharedKey { get; set; }
///
@@ -125,6 +131,9 @@ namespace PepperDash.Core
///
/// Defaults to 2000
///
+ ///
+ /// Gets or sets the BufferSize
+ ///
public int BufferSize { get; set; }
///
@@ -338,6 +347,9 @@ namespace PepperDash.Core
///
/// Just to help S+ set the key
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key)
{
Key = key;
@@ -397,6 +409,9 @@ namespace PepperDash.Core
///
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
///
+ ///
+ /// Connect method
+ ///
public void Connect()
{
ConnectionCount++;
@@ -528,6 +543,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Disconnect method
+ ///
public void Disconnect()
{
this.LogVerbose("Disconnect Called");
@@ -806,6 +824,9 @@ namespace PepperDash.Core
///
/// General send method
///
+ ///
+ /// SendText method
+ ///
public void SendText(string text)
{
if (!string.IsNullOrEmpty(text))
@@ -835,6 +856,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// SendBytes method
+ ///
public void SendBytes(byte[] bytes)
{
if (bytes.Length > 0)
diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs
index e0da068f..db3ea304 100644
--- a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs
+++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs
@@ -60,6 +60,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Delegate for ServerHasChokedCallbackDelegate
+ ///
public delegate void ServerHasChokedCallbackDelegate();
#endregion
@@ -106,6 +109,9 @@ namespace PepperDash.Core
///
/// 3 by default
///
+ ///
+ /// Gets or sets the MonitorClientMaxFailureCount
+ ///
public int MonitorClientMaxFailureCount { get; set; }
///
@@ -192,6 +198,9 @@ namespace PepperDash.Core
///
/// Port Server should listen on
///
+ ///
+ /// Gets or sets the Port
+ ///
public int Port { get; set; }
///
@@ -226,6 +235,9 @@ namespace PepperDash.Core
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module.
/// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called
///
+ ///
+ /// Gets or sets the SharedKey
+ ///
public string SharedKey { get; set; }
///
@@ -250,6 +262,9 @@ namespace PepperDash.Core
///
/// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+
///
+ ///
+ /// Gets or sets the HeartbeatRequiredIntervalMs
+ ///
public int HeartbeatRequiredIntervalMs { get; set; }
///
@@ -260,6 +275,9 @@ namespace PepperDash.Core
///
/// String to Match for heartbeat. If null or empty any string will reset heartbeat timer
///
+ ///
+ /// Gets or sets the HeartbeatStringToMatch
+ ///
public string HeartbeatStringToMatch { get; set; }
//private timers for Heartbeats per client
@@ -278,6 +296,9 @@ namespace PepperDash.Core
///
/// Defaults to 2000
///
+ ///
+ /// Gets or sets the BufferSize
+ ///
public int BufferSize { get; set; }
///
@@ -341,6 +362,9 @@ namespace PepperDash.Core
///
/// Disconnects all clients and stops the server
///
+ ///
+ /// KillServer method
+ ///
public void KillServer()
{
ServerStopped = true;
@@ -356,6 +380,9 @@ namespace PepperDash.Core
/// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+
///
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key)
{
Key = key;
@@ -397,6 +424,9 @@ namespace PepperDash.Core
///
/// Start listening on the specified port
///
+ ///
+ /// Listen method
+ ///
public void Listen()
{
ServerCCSection.Enter();
@@ -455,6 +485,9 @@ namespace PepperDash.Core
///
/// Stop Listeneing
///
+ ///
+ /// StopListening method
+ ///
public void StopListening()
{
try
@@ -478,6 +511,9 @@ namespace PepperDash.Core
/// Disconnects Client
///
///
+ ///
+ /// DisconnectClient method
+ ///
public void DisconnectClient(uint client)
{
try
@@ -493,6 +529,9 @@ namespace PepperDash.Core
///
/// Disconnect All Clients
///
+ ///
+ /// DisconnectAllClientsForShutdown method
+ ///
public void DisconnectAllClientsForShutdown()
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Disconnecting All Clients");
@@ -533,6 +572,9 @@ namespace PepperDash.Core
/// Broadcast text from server to all connected clients
///
///
+ ///
+ /// BroadcastText method
+ ///
public void BroadcastText(string text)
{
CCriticalSection CCBroadcast = new CCriticalSection();
@@ -566,6 +608,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// SendTextToClient method
+ ///
public void SendTextToClient(string text, uint clientIndex)
{
try
@@ -634,6 +679,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// GetClientIPAddress method
+ ///
public string GetClientIPAddress(uint clientIndex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex);
diff --git a/src/PepperDash.Core/Comm/GenericSshClient.cs b/src/PepperDash.Core/Comm/GenericSshClient.cs
index fa5b95bb..52b88bea 100644
--- a/src/PepperDash.Core/Comm/GenericSshClient.cs
+++ b/src/PepperDash.Core/Comm/GenericSshClient.cs
@@ -44,6 +44,9 @@ namespace PepperDash.Core
///
/// Address of server
///
+ ///
+ /// Gets or sets the Hostname
+ ///
public string Hostname { get; set; }
///
@@ -54,11 +57,17 @@ namespace PepperDash.Core
///
/// Username for server
///
+ ///
+ /// Gets or sets the Username
+ ///
public string Username { get; set; }
///
/// And... Password for server. That was worth documenting!
///
+ ///
+ /// Gets or sets the Password
+ ///
public string Password { get; set; }
///
@@ -126,6 +135,9 @@ namespace PepperDash.Core
/// Millisecond value, determines the timeout period in between reconnect attempts.
/// Set to 5000 by default
///
+ ///
+ /// Gets or sets the AutoReconnectIntervalMs
+ ///
public int AutoReconnectIntervalMs { get; set; }
SshClient Client;
@@ -200,6 +212,9 @@ namespace PepperDash.Core
///
/// Connect to the server, using the provided properties.
///
+ ///
+ /// Connect method
+ ///
public void Connect()
{
// Don't go unless everything is here
@@ -327,6 +342,9 @@ namespace PepperDash.Core
///
/// Disconnect the clients and put away it's resources.
///
+ ///
+ /// Disconnect method
+ ///
public void Disconnect()
{
ConnectEnabled = false;
@@ -476,6 +494,9 @@ namespace PepperDash.Core
/// Sends text to the server
///
///
+ ///
+ /// SendText method
+ ///
public void SendText(string text)
{
try
@@ -513,6 +534,9 @@ namespace PepperDash.Core
/// Sends Bytes to the server
///
///
+ ///
+ /// SendBytes method
+ ///
public void SendBytes(byte[] bytes)
{
try
@@ -551,6 +575,9 @@ namespace PepperDash.Core
///
/// Fired when connection changes
///
+///
+/// Represents a SshConnectionChangeEventArgs
+///
public class SshConnectionChangeEventArgs : EventArgs
{
///
@@ -561,16 +588,25 @@ public class SshConnectionChangeEventArgs : EventArgs
///
/// Connection Status represented as a ushort
///
+ ///
+ /// Gets or sets the UIsConnected
+ ///
public ushort UIsConnected { get { return (ushort)(Client.IsConnected ? 1 : 0); } }
///
/// The client
///
+ ///
+ /// Gets or sets the Client
+ ///
public GenericSshClient Client { get; private set; }
///
/// Socket Status as represented by
///
+ ///
+ /// Gets or sets the Status
+ ///
public ushort Status { get { return Client.UStatus; } }
///
diff --git a/src/PepperDash.Core/Comm/GenericTcpIpClient.cs b/src/PepperDash.Core/Comm/GenericTcpIpClient.cs
index 9529aa29..ef4737be 100644
--- a/src/PepperDash.Core/Comm/GenericTcpIpClient.cs
+++ b/src/PepperDash.Core/Comm/GenericTcpIpClient.cs
@@ -61,6 +61,9 @@ namespace PepperDash.Core
///
/// Port on server
///
+ ///
+ /// Gets or sets the Port
+ ///
public int Port { get; set; }
///
@@ -138,6 +141,9 @@ namespace PepperDash.Core
///
/// bool to track if auto reconnect should be set on the socket
///
+ ///
+ /// Gets or sets the AutoReconnect
+ ///
public bool AutoReconnect { get; set; }
///
@@ -234,6 +240,9 @@ namespace PepperDash.Core
///
/// Just to help S+ set the key
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key)
{
Key = key;
@@ -255,6 +264,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Deactivate method
+ ///
public override bool Deactivate()
{
RetryTimer.Stop();
@@ -270,6 +282,9 @@ namespace PepperDash.Core
///
/// Attempts to connect to the server
///
+ ///
+ /// Connect method
+ ///
public void Connect()
{
if (string.IsNullOrEmpty(Hostname))
@@ -337,6 +352,9 @@ namespace PepperDash.Core
///
/// Attempts to disconnect the client
///
+ ///
+ /// Disconnect method
+ ///
public void Disconnect()
{
try
@@ -357,6 +375,9 @@ namespace PepperDash.Core
///
/// Does the actual disconnect business
///
+ ///
+ /// DisconnectClient method
+ ///
public void DisconnectClient()
{
if (_client != null)
@@ -449,6 +470,9 @@ namespace PepperDash.Core
///
/// General send method
///
+ ///
+ /// SendText method
+ ///
public void SendText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
@@ -462,6 +486,9 @@ namespace PepperDash.Core
///
/// This is useful from console and...?
///
+ ///
+ /// SendEscapedText method
+ ///
public void SendEscapedText(string text)
{
var unescapedText = Regex.Replace(text, @"\\x([0-9a-fA-F][0-9a-fA-F])", s =>
@@ -476,6 +503,9 @@ namespace PepperDash.Core
/// Sends Bytes to the server
///
///
+ ///
+ /// SendBytes method
+ ///
public void SendBytes(byte[] bytes)
{
if (StreamDebugging.TxStreamDebuggingIsEnabled)
@@ -511,6 +541,9 @@ namespace PepperDash.Core
///
/// Configuration properties for TCP/SSH Connections
///
+ ///
+ /// Represents a TcpSshPropertiesConfig
+ ///
public class TcpSshPropertiesConfig
{
///
@@ -532,6 +565,9 @@ namespace PepperDash.Core
///
/// Passord credential
///
+ ///
+ /// Gets or sets the Password
+ ///
public string Password { get; set; }
///
@@ -542,11 +578,17 @@ namespace PepperDash.Core
///
/// Defaults to true
///
+ ///
+ /// Gets or sets the AutoReconnect
+ ///
public bool AutoReconnect { get; set; }
///
/// Defaults to 5000ms
///
+ ///
+ /// Gets or sets the AutoReconnectIntervalMs
+ ///
public int AutoReconnectIntervalMs { get; set; }
///
diff --git a/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs b/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs
index 03a27827..437d99eb 100644
--- a/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs
+++ b/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs
@@ -71,6 +71,9 @@ namespace PepperDash.Core
///
/// Port on server
///
+ ///
+ /// Gets or sets the Port
+ ///
public int Port { get; set; }
///
@@ -104,6 +107,9 @@ namespace PepperDash.Core
///
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
///
+ ///
+ /// Gets or sets the SharedKey
+ ///
public string SharedKey { get; set; }
///
@@ -114,6 +120,9 @@ namespace PepperDash.Core
///
/// Defaults to 2000
///
+ ///
+ /// Gets or sets the BufferSize
+ ///
public int BufferSize { get; set; }
///
@@ -291,6 +300,9 @@ namespace PepperDash.Core
///
/// Just to help S+ set the key
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key)
{
Key = key;
@@ -313,6 +325,9 @@ namespace PepperDash.Core
///
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
///
+ ///
+ /// Connect method
+ ///
public void Connect()
{
ConnectionCount++;
@@ -444,6 +459,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Disconnect method
+ ///
public void Disconnect()
{
this.LogVerbose("Disconnect Called");
@@ -671,6 +689,9 @@ namespace PepperDash.Core
///
/// General send method
///
+ ///
+ /// SendText method
+ ///
public void SendText(string text)
{
if (!string.IsNullOrEmpty(text))
@@ -700,6 +721,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// SendBytes method
+ ///
public void SendBytes(byte[] bytes)
{
if (bytes.Length > 0)
diff --git a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs
index 6aa5e6b5..e05064b7 100644
--- a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs
+++ b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs
@@ -54,6 +54,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Delegate for ServerHasChokedCallbackDelegate
+ ///
public delegate void ServerHasChokedCallbackDelegate();
#endregion
@@ -84,6 +87,9 @@ namespace PepperDash.Core
///
/// 3 by default
///
+ ///
+ /// Gets or sets the MonitorClientMaxFailureCount
+ ///
public int MonitorClientMaxFailureCount { get; set; }
///
@@ -173,6 +179,9 @@ namespace PepperDash.Core
///
/// Port Server should listen on
///
+ ///
+ /// Gets or sets the Port
+ ///
public int Port { get; set; }
///
@@ -207,6 +216,9 @@ namespace PepperDash.Core
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module.
/// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called
///
+ ///
+ /// Gets or sets the SharedKey
+ ///
public string SharedKey { get; set; }
///
@@ -231,6 +243,9 @@ namespace PepperDash.Core
///
/// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+
///
+ ///
+ /// Gets or sets the HeartbeatRequiredIntervalMs
+ ///
public int HeartbeatRequiredIntervalMs { get; set; }
///
@@ -241,6 +256,9 @@ namespace PepperDash.Core
///
/// String to Match for heartbeat. If null or empty any string will reset heartbeat timer
///
+ ///
+ /// Gets or sets the HeartbeatStringToMatch
+ ///
public string HeartbeatStringToMatch { get; set; }
//private timers for Heartbeats per client
@@ -259,6 +277,9 @@ namespace PepperDash.Core
///
/// Defaults to 2000
///
+ ///
+ /// Gets or sets the BufferSize
+ ///
public int BufferSize { get; set; }
///
@@ -322,6 +343,9 @@ namespace PepperDash.Core
///
/// Disconnects all clients and stops the server
///
+ ///
+ /// KillServer method
+ ///
public void KillServer()
{
ServerStopped = true;
@@ -337,6 +361,9 @@ namespace PepperDash.Core
/// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+
///
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key)
{
Key = key;
@@ -377,6 +404,9 @@ namespace PepperDash.Core
///
/// Start listening on the specified port
///
+ ///
+ /// Listen method
+ ///
public void Listen()
{
ServerCCSection.Enter();
@@ -434,6 +464,9 @@ namespace PepperDash.Core
///
/// Stop Listening
///
+ ///
+ /// StopListening method
+ ///
public void StopListening()
{
try
@@ -457,6 +490,9 @@ namespace PepperDash.Core
/// Disconnects Client
///
///
+ ///
+ /// DisconnectClient method
+ ///
public void DisconnectClient(uint client)
{
try
@@ -472,6 +508,9 @@ namespace PepperDash.Core
///
/// Disconnect All Clients
///
+ ///
+ /// DisconnectAllClientsForShutdown method
+ ///
public void DisconnectAllClientsForShutdown()
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Disconnecting All Clients");
@@ -512,6 +551,9 @@ namespace PepperDash.Core
/// Broadcast text from server to all connected clients
///
///
+ ///
+ /// BroadcastText method
+ ///
public void BroadcastText(string text)
{
CCriticalSection CCBroadcast = new CCriticalSection();
@@ -545,6 +587,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// SendTextToClient method
+ ///
public void SendTextToClient(string text, uint clientIndex)
{
try
@@ -613,6 +658,9 @@ namespace PepperDash.Core
///
///
/// IP address of the client
+ ///
+ /// GetClientIPAddress method
+ ///
public string GetClientIPAddress(uint clientIndex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex);
diff --git a/src/PepperDash.Core/Comm/GenericUdpServer.cs b/src/PepperDash.Core/Comm/GenericUdpServer.cs
index a5a68c45..15f80443 100644
--- a/src/PepperDash.Core/Comm/GenericUdpServer.cs
+++ b/src/PepperDash.Core/Comm/GenericUdpServer.cs
@@ -150,6 +150,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key, string address, ushort port)
{
Key = key;
@@ -187,6 +190,9 @@ namespace PepperDash.Core
///
/// Enables the UDP Server
///
+ ///
+ /// Connect method
+ ///
public void Connect()
{
if (Server == null)
@@ -224,6 +230,9 @@ namespace PepperDash.Core
///
/// Disabled the UDP Server
///
+ ///
+ /// Disconnect method
+ ///
public void Disconnect()
{
if(Server != null)
@@ -292,6 +301,9 @@ namespace PepperDash.Core
/// General send method
///
///
+ ///
+ /// SendText method
+ ///
public void SendText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
@@ -309,6 +321,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// SendBytes method
+ ///
public void SendBytes(byte[] bytes)
{
if (StreamDebugging.TxStreamDebuggingIsEnabled)
@@ -323,6 +338,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Represents a GenericUdpReceiveTextExtraArgs
+ ///
public class GenericUdpReceiveTextExtraArgs : EventArgs
{
///
diff --git a/src/PepperDash.Core/Comm/TcpClientConfigObject.cs b/src/PepperDash.Core/Comm/TcpClientConfigObject.cs
index c3b3bcec..86c891d1 100644
--- a/src/PepperDash.Core/Comm/TcpClientConfigObject.cs
+++ b/src/PepperDash.Core/Comm/TcpClientConfigObject.cs
@@ -5,6 +5,9 @@ namespace PepperDash.Core
///
/// Client config object for TCP client with server that inherits from TcpSshPropertiesConfig and adds properties for shared key and heartbeat
///
+ ///
+ /// Represents a TcpClientConfigObject
+ ///
public class TcpClientConfigObject
{
///
diff --git a/src/PepperDash.Core/CommunicationExtras.cs b/src/PepperDash.Core/CommunicationExtras.cs
index 81fd76c5..a3ccb811 100644
--- a/src/PepperDash.Core/CommunicationExtras.cs
+++ b/src/PepperDash.Core/CommunicationExtras.cs
@@ -41,6 +41,9 @@ namespace PepperDash.Core
///
/// Represents a device that uses basic connection
///
+ ///
+ /// Defines the contract for IBasicCommunication
+ ///
public interface IBasicCommunication : ICommunicationReceiver
{
///
@@ -150,6 +153,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Gets or sets the Bytes
+ ///
public byte[] Bytes { get; private set; }
///
@@ -228,6 +234,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// GetEscapedText method
+ ///
public static string GetEscapedText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
@@ -239,6 +248,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// GetDebugText method
+ ///
public static string GetDebugText(string text)
{
return Regex.Replace(text, @"[^\u0020-\u007E]", a => GetEscapedText(a.Value));
diff --git a/src/PepperDash.Core/Config/PortalConfigReader.cs b/src/PepperDash.Core/Config/PortalConfigReader.cs
index 43e9ea1e..ffb2d16b 100644
--- a/src/PepperDash.Core/Config/PortalConfigReader.cs
+++ b/src/PepperDash.Core/Config/PortalConfigReader.cs
@@ -67,6 +67,9 @@ namespace PepperDash.Core.Config
///
///
///
+ ///
+ /// MergeConfigs method
+ ///
public static JObject MergeConfigs(JObject doubleConfig)
{
var system = JObject.FromObject(doubleConfig["system"]);
diff --git a/src/PepperDash.Core/Conversion/Convert.cs b/src/PepperDash.Core/Conversion/Convert.cs
index 2bafdcb0..49f8bb94 100644
--- a/src/PepperDash.Core/Conversion/Convert.cs
+++ b/src/PepperDash.Core/Conversion/Convert.cs
@@ -6,13 +6,22 @@ using Crestron.SimplSharp;
namespace PepperDash.Core
{
+ ///
+ /// Represents a EncodingHelper
+ ///
public class EncodingHelper
{
+ ///
+ /// ConvertUtf8ToAscii method
+ ///
public static string ConvertUtf8ToAscii(string utf8String)
{
return Encoding.ASCII.GetString(Encoding.UTF8.GetBytes(utf8String), 0, utf8String.Length);
}
+ ///
+ /// ConvertUtf8ToUtf16 method
+ ///
public static string ConvertUtf8ToUtf16(string utf8String)
{
return Encoding.Unicode.GetString(Encoding.UTF8.GetBytes(utf8String), 0, utf8String.Length);
diff --git a/src/PepperDash.Core/Device.cs b/src/PepperDash.Core/Device.cs
index ef9f6111..a33ab594 100644
--- a/src/PepperDash.Core/Device.cs
+++ b/src/PepperDash.Core/Device.cs
@@ -8,6 +8,9 @@ namespace PepperDash.Core
///
/// The core event and status-bearing class that most if not all device and connectors can derive from.
///
+ ///
+ /// Represents a Device
+ ///
public class Device : IKeyName
{
@@ -18,6 +21,9 @@ namespace PepperDash.Core
///
/// Name of the devie
///
+ ///
+ /// Gets or sets the Name
+ ///
public string Name { get; protected set; }
///
///
@@ -86,6 +92,9 @@ namespace PepperDash.Core
/// Adds a post activation action
///
///
+ ///
+ /// AddPostActivationAction method
+ ///
public void AddPostActivationAction(Action act)
{
if (_PostActivationActions == null)
@@ -96,6 +105,9 @@ namespace PepperDash.Core
///
/// Executes the preactivation actions
///
+ ///
+ /// PreActivate method
+ ///
public void PreActivate()
{
if (_PreActivationActions != null)
@@ -117,6 +129,9 @@ namespace PepperDash.Core
/// all post-activation at end. Classes needing additional logic to
/// run should override CustomActivate()
///
+ ///
+ /// Activate method
+ ///
public bool Activate()
{
//if (_PreActivationActions != null)
@@ -130,6 +145,9 @@ namespace PepperDash.Core
///
/// Executes the postactivation actions
///
+ ///
+ /// PostActivate method
+ ///
public void PostActivate()
{
if (_PostActivationActions != null)
@@ -152,6 +170,9 @@ namespace PepperDash.Core
/// do not need to call base.CustomActivate()
///
/// true if device activated successfully.
+ ///
+ /// CustomActivate method
+ ///
public virtual bool CustomActivate() { return true; }
///
@@ -178,12 +199,15 @@ namespace PepperDash.Core
if (o is bool && !(bool)o) a();
}
- ///
- /// Returns a string representation of the object, including its key and name.
- ///
- /// The returned string is formatted as "{Key} - {Name}". If the Name property is
- /// null or empty, "---" is used in place of the name.
+ ///
+ /// Returns a string representation of the object, including its key and name.
+ ///
+ /// The returned string is formatted as "{Key} - {Name}". If the Name property is
+ /// null or empty, "---" is used in place of the name.
/// A string that represents the object, containing the key and name in the format "{Key} - {Name}".
+ ///
+ /// ToString method
+ ///
public override string ToString()
{
return string.Format("{0} - {1}", Key, string.IsNullOrEmpty(Name) ? "---" : Name);
diff --git a/src/PepperDash.Core/EthernetHelper.cs b/src/PepperDash.Core/EthernetHelper.cs
index 88429886..120a7505 100644
--- a/src/PepperDash.Core/EthernetHelper.cs
+++ b/src/PepperDash.Core/EthernetHelper.cs
@@ -7,6 +7,9 @@ namespace PepperDash.Core
///
/// Class to help with accessing values from the CrestronEthernetHelper class
///
+ ///
+ /// Represents a EthernetHelper
+ ///
public class EthernetHelper
{
///
@@ -27,6 +30,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// Gets or sets the PortNumber
+ ///
public int PortNumber { get; private set; }
private EthernetHelper(int portNumber)
diff --git a/src/PepperDash.Core/EventArgs.cs b/src/PepperDash.Core/EventArgs.cs
index 29ef13a8..dace1314 100644
--- a/src/PepperDash.Core/EventArgs.cs
+++ b/src/PepperDash.Core/EventArgs.cs
@@ -19,16 +19,25 @@ namespace PepperDash.Core
///
/// Boolean ushort value property
///
+ ///
+ /// Gets or sets the IntValue
+ ///
public ushort IntValue { get { return (ushort)(State ? 1 : 0); } }
///
/// Boolean change event args type
///
+ ///
+ /// Gets or sets the Type
+ ///
public ushort Type { get; set; }
///
/// Boolean change event args index
///
+ ///
+ /// Gets or sets the Index
+ ///
public ushort Index { get; set; }
///
@@ -67,6 +76,9 @@ namespace PepperDash.Core
///
/// Ushort change event args
///
+ ///
+ /// Represents a UshrtChangeEventArgs
+ ///
public class UshrtChangeEventArgs : EventArgs
{
///
@@ -77,11 +89,17 @@ namespace PepperDash.Core
///
/// Ushort change event args type
///
+ ///
+ /// Gets or sets the Type
+ ///
public ushort Type { get; set; }
///
/// Ushort change event args index
///
+ ///
+ /// Gets or sets the Index
+ ///
public ushort Index { get; set; }
///
@@ -120,6 +138,9 @@ namespace PepperDash.Core
///
/// String change event args
///
+ ///
+ /// Represents a StringChangeEventArgs
+ ///
public class StringChangeEventArgs : EventArgs
{
///
@@ -130,11 +151,17 @@ namespace PepperDash.Core
///
/// String change event args type
///
+ ///
+ /// Gets or sets the Type
+ ///
public ushort Type { get; set; }
///
/// string change event args index
///
+ ///
+ /// Gets or sets the Index
+ ///
public ushort Index { get; set; }
///
diff --git a/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs b/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs
index ed02ccb0..e460e75d 100644
--- a/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs
+++ b/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs
@@ -35,11 +35,17 @@ namespace PepperDash.Core.JsonStandardObjects
///
/// Device change event args type
///
+ ///
+ /// Gets or sets the Type
+ ///
public ushort Type { get; set; }
///
/// Device change event args index
///
+ ///
+ /// Gets or sets the Index
+ ///
public ushort Index { get; set; }
///
diff --git a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs
index 3abfd36a..2ad47e27 100644
--- a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs
+++ b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs
@@ -58,6 +58,9 @@ namespace PepperDash.Core.JsonStandardObjects
///
///
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string uniqueID, string deviceKey)
{
// S+ set EvaluateFb low
diff --git a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs
index fa23d87e..83e2df6c 100644
--- a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs
+++ b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs
@@ -50,11 +50,17 @@ namespace PepperDash.Core.JsonStandardObjects
///
/// Device communication parameter class
///
+ ///
+ /// Represents a ComParamsConfig
+ ///
public class ComParamsConfig
{
///
///
///
+ ///
+ /// Gets or sets the baudRate
+ ///
public int baudRate { get; set; }
///
///
@@ -89,10 +95,16 @@ namespace PepperDash.Core.JsonStandardObjects
///
///
///
+ ///
+ /// Gets or sets the simplBaudRate
+ ///
public ushort simplBaudRate { get { return Convert.ToUInt16(baudRate); } }
///
///
///
+ ///
+ /// Gets or sets the simplDataBits
+ ///
public ushort simplDataBits { get { return Convert.ToUInt16(dataBits); } }
///
///
@@ -146,10 +158,16 @@ namespace PepperDash.Core.JsonStandardObjects
///
///
///
+ ///
+ /// Gets or sets the simplPort
+ ///
public ushort simplPort { get { return Convert.ToUInt16(port); } }
///
///
///
+ ///
+ /// Gets or sets the simplAutoReconnect
+ ///
public ushort simplAutoReconnect { get { return (ushort)(autoReconnect ? 1 : 0); } }
///
///
@@ -195,6 +213,9 @@ namespace PepperDash.Core.JsonStandardObjects
///
///
///
+ ///
+ /// Gets or sets the simplControlPortNumber
+ ///
public ushort simplControlPortNumber { get { return Convert.ToUInt16(controlPortNumber); } }
///
@@ -210,6 +231,9 @@ namespace PepperDash.Core.JsonStandardObjects
///
/// Device properties class
///
+ ///
+ /// Represents a PropertiesConfig
+ ///
public class PropertiesConfig
{
///
@@ -229,10 +253,16 @@ namespace PepperDash.Core.JsonStandardObjects
///
///
///
+ ///
+ /// Gets or sets the simplDeviceId
+ ///
public ushort simplDeviceId { get { return Convert.ToUInt16(deviceId); } }
///
///
///
+ ///
+ /// Gets or sets the simplEnabled
+ ///
public ushort simplEnabled { get { return (ushort)(enabled ? 1 : 0); } }
///
diff --git a/src/PepperDash.Core/JsonToSimpl/Constants.cs b/src/PepperDash.Core/JsonToSimpl/Constants.cs
index d87b50c2..5cdf9cb2 100644
--- a/src/PepperDash.Core/JsonToSimpl/Constants.cs
+++ b/src/PepperDash.Core/JsonToSimpl/Constants.cs
@@ -91,6 +91,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// Gets or sets the ValueType
+ ///
public SPlusType ValueType { get; private set; }
///
///
@@ -125,6 +128,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// S+ types enum
///
+ ///
+ /// Enumeration of SPlusType values
+ ///
public enum SPlusType
{
///
diff --git a/src/PepperDash.Core/JsonToSimpl/Global.cs b/src/PepperDash.Core/JsonToSimpl/Global.cs
index 8392fa61..6833096b 100644
--- a/src/PepperDash.Core/JsonToSimpl/Global.cs
+++ b/src/PepperDash.Core/JsonToSimpl/Global.cs
@@ -23,6 +23,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// New master to add
///
+ ///
+ /// AddMaster method
+ ///
public static void AddMaster(JsonToSimplMaster master)
{
if (master == null)
@@ -52,6 +55,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Gets a master by its key. Case-insensitive
///
+ ///
+ /// GetMasterByFile method
+ ///
public static JsonToSimplMaster GetMasterByFile(string file)
{
return Masters.FirstOrDefault(m => m.UniqueID.Equals(file, StringComparison.OrdinalIgnoreCase));
diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs
index c94dad29..00c6999f 100644
--- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs
+++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs
@@ -8,6 +8,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Used to interact with an array of values with the S+ modules
///
+ ///
+ /// Represents a JsonToSimplArrayLookupChild
+ ///
public class JsonToSimplArrayLookupChild : JsonToSimplChildObjectBase
{
///
@@ -79,6 +82,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Process all values
///
+ ///
+ /// ProcessAll method
+ ///
public override void ProcessAll()
{
if (FindInArray())
diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs
index 5aa67c96..e13e117f 100644
--- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs
+++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs
@@ -31,11 +31,17 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Use a callback to reduce task switch/threading
///
+ ///
+ /// Gets or sets the SetAllPathsDelegate
+ ///
public SPlusValuesDelegate SetAllPathsDelegate { get; set; }
///
/// Unique identifier for instance
///
+ ///
+ /// Gets or sets the Key
+ ///
public string Key { get; protected set; }
///
@@ -52,6 +58,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Indicates if the instance is linked to an object
///
+ ///
+ /// Gets or sets the LinkedToObject
+ ///
public bool LinkedToObject { get; protected set; }
///
@@ -96,6 +105,9 @@ namespace PepperDash.Core.JsonToSimpl
/// Sets the path prefix for the object
///
///
+ ///
+ /// SetPathPrefix method
+ ///
public void SetPathPrefix(string pathPrefix)
{
PathPrefix = pathPrefix;
@@ -113,6 +125,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Set the JPath for a ushort out index.
///
+ ///
+ /// SetUshortPath method
+ ///
public void SetUshortPath(ushort index, string path)
{
Debug.Console(1, "JSON Child[{0}] SetUshortPath {1}={2}", Key, index, path);
@@ -123,6 +138,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Set the JPath for a string output index.
///
+ ///
+ /// SetStringPath method
+ ///
public void SetStringPath(ushort index, string path)
{
Debug.Console(1, "JSON Child[{0}] SetStringPath {1}={2}", Key, index, path);
@@ -134,6 +152,9 @@ namespace PepperDash.Core.JsonToSimpl
/// Evalutates all outputs with defined paths. called by S+ when paths are ready to process
/// and by Master when file is read.
///
+ ///
+ /// ProcessAll method
+ ///
public virtual void ProcessAll()
{
if (!LinkedToObject)
@@ -277,6 +298,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// USetBoolValue method
+ ///
public void USetBoolValue(ushort key, ushort theValue)
{
SetBoolValue(key, theValue == 1);
@@ -287,6 +311,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// SetBoolValue method
+ ///
public void SetBoolValue(ushort key, bool theValue)
{
if (BoolPaths.ContainsKey(key))
@@ -298,6 +325,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// SetUShortValue method
+ ///
public void SetUShortValue(ushort key, ushort theValue)
{
if (UshortPaths.ContainsKey(key))
@@ -309,6 +339,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// SetStringValue method
+ ///
public void SetStringValue(ushort key, string theValue)
{
if (StringPaths.ContainsKey(key))
@@ -320,6 +353,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// SetValueOnMaster method
+ ///
public void SetValueOnMaster(string keyPath, JValue valueToSave)
{
var path = GetFullPath(keyPath);
diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs
index 411fbdc5..d26ae5b5 100644
--- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs
+++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs
@@ -22,11 +22,17 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Filepath to the actual file that will be read (Portal or local)
///
+ ///
+ /// Gets or sets the ActualFilePath
+ ///
public string ActualFilePath { get; private set; }
///
///
///
+ ///
+ /// Gets or sets the Filename
+ ///
public string Filename { get; private set; }
///
///
@@ -194,6 +200,9 @@ namespace PepperDash.Core.JsonToSimpl
/// Sets the debug level
///
///
+ ///
+ /// setDebugLevel method
+ ///
public void setDebugLevel(uint level)
{
Debug.SetDebugLevel(level);
diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs
index 3e69ed9d..2c69f055 100644
--- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs
+++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs
@@ -5,6 +5,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// Represents a JsonToSimplFixedPathObject
+ ///
public class JsonToSimplFixedPathObject : JsonToSimplChildObjectBase
{
///
diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs
index e0f42f8e..27607335 100644
--- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs
+++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs
@@ -8,6 +8,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Generic Master
///
+ ///
+ /// Represents a JsonToSimplGenericMaster
+ ///
public class JsonToSimplGenericMaster : JsonToSimplMaster
{
/*****************************************************************************************/
@@ -23,6 +26,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Callback action for saving
///
+ ///
+ /// Gets or sets the SaveCallback
+ ///
public Action SaveCallback { get; set; }
/*****************************************************************************************/
@@ -60,6 +66,9 @@ namespace PepperDash.Core.JsonToSimpl
/// Loads JSON into JsonObject, but does not trigger evaluation by children
///
///
+ ///
+ /// SetJsonWithoutEvaluating method
+ ///
public void SetJsonWithoutEvaluating(string json)
{
try
@@ -75,6 +84,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// Save method
+ ///
public override void Save()
{
// this code is duplicated in the other masters!!!!!!!!!!!!!
diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs
index 2f872e41..73259d08 100644
--- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs
+++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs
@@ -41,6 +41,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// A unique ID
///
+ ///
+ /// Gets or sets the UniqueID
+ ///
public string UniqueID { get; protected set; }
///
@@ -57,6 +60,9 @@ namespace PepperDash.Core.JsonToSimpl
/// This will be prepended to all paths to allow path swapping or for more organized
/// sub-paths
///
+ ///
+ /// Gets or sets the PathPrefix
+ ///
public string PathPrefix { get; set; }
///
@@ -86,6 +92,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// Gets or sets the JsonObject
+ ///
public JObject JsonObject { get; protected set; }
/*****************************************************************************************/
@@ -120,6 +129,9 @@ namespace PepperDash.Core.JsonToSimpl
/// Adds a child "module" to this master
///
///
+ ///
+ /// AddChild method
+ ///
public void AddChild(JsonToSimplChildObjectBase child)
{
if (!Children.Contains(child))
@@ -131,6 +143,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// Called from the child to add changed or new values for saving
///
+ ///
+ /// AddUnsavedValue method
+ ///
public void AddUnsavedValue(string path, JValue value)
{
if (UnsavedValues.ContainsKey(path))
@@ -179,6 +194,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// ParseArray method
+ ///
public static JArray ParseArray(string json)
{
#if NET6_0
diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs
index c170a9a1..8eae90ed 100644
--- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs
+++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs
@@ -21,6 +21,9 @@ namespace PepperDash.Core.JsonToSimpl
///
/// File path of the actual file being read (Portal or local)
///
+ ///
+ /// Gets or sets the ActualFilePath
+ ///
public string ActualFilePath { get; private set; }
/*****************************************************************************************/
@@ -128,6 +131,9 @@ namespace PepperDash.Core.JsonToSimpl
///
///
///
+ ///
+ /// setDebugLevel method
+ ///
public void setDebugLevel(uint level)
{
Debug.SetDebugLevel(level);
diff --git a/src/PepperDash.Core/Logging/CrestronEnricher.cs b/src/PepperDash.Core/Logging/CrestronEnricher.cs
index 902ce8d5..c25306ca 100644
--- a/src/PepperDash.Core/Logging/CrestronEnricher.cs
+++ b/src/PepperDash.Core/Logging/CrestronEnricher.cs
@@ -9,6 +9,9 @@ using System.Threading.Tasks;
namespace PepperDash.Core.Logging
{
+ ///
+ /// Represents a CrestronEnricher
+ ///
public class CrestronEnricher : ILogEventEnricher
{
static readonly string _appName;
@@ -27,6 +30,9 @@ namespace PepperDash.Core.Logging
}
+ ///
+ /// Enrich method
+ ///
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
{
var property = propertyFactory.CreateProperty("App", _appName);
diff --git a/src/PepperDash.Core/Logging/Debug.cs b/src/PepperDash.Core/Logging/Debug.cs
index 38dfa034..3362a065 100644
--- a/src/PepperDash.Core/Logging/Debug.cs
+++ b/src/PepperDash.Core/Logging/Debug.cs
@@ -80,11 +80,17 @@ namespace PepperDash.Core
///
/// Debug level to set for a given program.
///
+ ///
+ /// Gets or sets the Level
+ ///
public static int Level { get; private set; }
///
/// When this is true, the configuration file will NOT be loaded until triggered by either a console command or a signal
///
+ ///
+ /// Gets or sets the DoNotLoadConfigOnNextBoot
+ ///
public static bool DoNotLoadConfigOnNextBoot { get; private set; }
private static DebugContextCollection _contexts;
@@ -96,6 +102,9 @@ namespace PepperDash.Core
///
/// Version for the currently loaded PepperDashCore dll
///
+ ///
+ /// Gets or sets the PepperDashCoreVersion
+ ///
public static string PepperDashCoreVersion { get; private set; }
private static CTimer _saveTimer;
@@ -233,6 +242,9 @@ namespace PepperDash.Core
};
}
+ ///
+ /// UpdateLoggerConfiguration method
+ ///
public static void UpdateLoggerConfiguration(LoggerConfiguration config)
{
_loggerConfiguration = config;
@@ -240,6 +252,9 @@ namespace PepperDash.Core
_logger = config.CreateLogger();
}
+ ///
+ /// ResetLoggerConfiguration method
+ ///
public static void ResetLoggerConfiguration()
{
_loggerConfiguration = _defaultLoggerConfiguration;
@@ -319,6 +334,9 @@ namespace PepperDash.Core
/// Callback for console command
///
///
+ ///
+ /// SetDebugFromConsole method
+ ///
public static void SetDebugFromConsole(string levelString)
{
try
@@ -371,6 +389,9 @@ namespace PepperDash.Core
/// Sets the debug level
///
/// Valid values 0-5
+ ///
+ /// SetDebugLevel method
+ ///
public static void SetDebugLevel(uint level)
{
if(!_logLevels.TryGetValue(level, out var logLevel))
@@ -385,6 +406,9 @@ namespace PepperDash.Core
SetDebugLevel(logLevel);
}
+ ///
+ /// SetDebugLevel method
+ ///
public static void SetDebugLevel(LogEventLevel level)
{
_consoleLoggingLevelSwitch.MinimumLevel = level;
@@ -402,6 +426,9 @@ namespace PepperDash.Core
CrestronConsole.PrintLine($"Error saving console debug level setting: {err}");
}
+ ///
+ /// SetWebSocketMinimumDebugLevel method
+ ///
public static void SetWebSocketMinimumDebugLevel(LogEventLevel level)
{
_websocketLoggingLevelSwitch.MinimumLevel = level;
@@ -414,6 +441,9 @@ namespace PepperDash.Core
LogMessage(LogEventLevel.Information, "Websocket debug level set to {0}", _websocketLoggingLevelSwitch.MinimumLevel);
}
+ ///
+ /// SetErrorLogMinimumDebugLevel method
+ ///
public static void SetErrorLogMinimumDebugLevel(LogEventLevel level)
{
_errorLogLevelSwitch.MinimumLevel = level;
@@ -426,6 +456,9 @@ namespace PepperDash.Core
LogMessage(LogEventLevel.Information, "Error log debug level set to {0}", _websocketLoggingLevelSwitch.MinimumLevel);
}
+ ///
+ /// SetFileMinimumDebugLevel method
+ ///
public static void SetFileMinimumDebugLevel(LogEventLevel level)
{
_errorLogLevelSwitch.MinimumLevel = level;
@@ -442,6 +475,9 @@ namespace PepperDash.Core
/// Callback for console command
///
///
+ ///
+ /// SetDoNotLoadOnNextBootFromConsole method
+ ///
public static void SetDoNotLoadOnNextBootFromConsole(string stateString)
{
try
@@ -464,6 +500,9 @@ namespace PepperDash.Core
/// Callback for console command
///
///
+ ///
+ /// SetDebugFilterFromConsole method
+ ///
public static void SetDebugFilterFromConsole(string items)
{
var str = items.Trim();
@@ -559,6 +598,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// GetDeviceDebugSettingsForKey method
+ ///
public static object GetDeviceDebugSettingsForKey(string deviceKey)
{
return _contexts.GetDebugSettingsForKey(deviceKey);
@@ -581,6 +623,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// ShowDebugLog method
+ ///
public static void ShowDebugLog(string s)
{
var loglist = CrestronLogger.PrintTheLog(s.ToLower() == "all");
@@ -595,6 +640,9 @@ namespace PepperDash.Core
/// Message template
/// Optional IKeyed device. If provided, the Key of the device will be added to the log message
/// Args to put into message template
+ ///
+ /// LogMessage method
+ ///
public static void LogMessage(Exception ex, string message, IKeyed device = null, params object[] args)
{
using (LogContext.PushProperty("Key", device?.Key))
@@ -623,16 +671,25 @@ namespace PepperDash.Core
_logger.Write(level, message, args);
}
+ ///
+ /// LogMessage method
+ ///
public static void LogMessage(LogEventLevel level, Exception ex, string message, params object[] args)
{
_logger.Write(level, ex, message, args);
}
+ ///
+ /// LogMessage method
+ ///
public static void LogMessage(LogEventLevel level, IKeyed keyed, string message, params object[] args)
{
LogMessage(level, message, keyed, args);
}
+ ///
+ /// LogMessage method
+ ///
public static void LogMessage(LogEventLevel level, Exception ex, IKeyed device, string message, params object[] args)
{
using (LogContext.PushProperty("Key", device?.Key))
@@ -642,6 +699,9 @@ namespace PepperDash.Core
}
#region Explicit methods for logging levels
+ ///
+ /// LogVerbose method
+ ///
public static void LogVerbose(IKeyed keyed, string message, params object[] args)
{
using(LogContext.PushProperty("Key", keyed?.Key))
@@ -650,6 +710,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogVerbose method
+ ///
public static void LogVerbose(Exception ex, IKeyed keyed, string message, params object[] args)
{
using(LogContext.PushProperty("Key", keyed?.Key))
@@ -658,16 +721,25 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogVerbose method
+ ///
public static void LogVerbose(string message, params object[] args)
{
_logger.Write(LogEventLevel.Verbose, message, args);
}
+ ///
+ /// LogVerbose method
+ ///
public static void LogVerbose(Exception ex, string message, params object[] args)
{
_logger.Write(LogEventLevel.Verbose, ex, null, message, args);
}
+ ///
+ /// LogDebug method
+ ///
public static void LogDebug(IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -676,6 +748,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogDebug method
+ ///
public static void LogDebug(Exception ex, IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -684,16 +759,25 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogDebug method
+ ///
public static void LogDebug(string message, params object[] args)
{
_logger.Write(LogEventLevel.Debug, message, args);
}
+ ///
+ /// LogDebug method
+ ///
public static void LogDebug(Exception ex, string message, params object[] args)
{
_logger.Write(LogEventLevel.Debug, ex, null, message, args);
}
+ ///
+ /// LogInformation method
+ ///
public static void LogInformation(IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -702,6 +786,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogInformation method
+ ///
public static void LogInformation(Exception ex, IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -710,16 +797,25 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogInformation method
+ ///
public static void LogInformation(string message, params object[] args)
{
_logger.Write(LogEventLevel.Information, message, args);
}
+ ///
+ /// LogInformation method
+ ///
public static void LogInformation(Exception ex, string message, params object[] args)
{
_logger.Write(LogEventLevel.Information, ex, null, message, args);
}
+ ///
+ /// LogWarning method
+ ///
public static void LogWarning(IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -728,6 +824,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogWarning method
+ ///
public static void LogWarning(Exception ex, IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -736,16 +835,25 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogWarning method
+ ///
public static void LogWarning(string message, params object[] args)
{
_logger.Write(LogEventLevel.Warning, message, args);
}
+ ///
+ /// LogWarning method
+ ///
public static void LogWarning(Exception ex, string message, params object[] args)
{
_logger.Write(LogEventLevel.Warning, ex, null, message, args);
}
+ ///
+ /// LogError method
+ ///
public static void LogError(IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -754,6 +862,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogError method
+ ///
public static void LogError(Exception ex, IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -762,16 +873,25 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogError method
+ ///
public static void LogError(string message, params object[] args)
{
_logger.Write(LogEventLevel.Error, message, args);
}
+ ///
+ /// LogError method
+ ///
public static void LogError(Exception ex, string message, params object[] args)
{
_logger.Write(LogEventLevel.Error, ex, null, message, args);
}
+ ///
+ /// LogFatal method
+ ///
public static void LogFatal(IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -780,6 +900,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogFatal method
+ ///
public static void LogFatal(Exception ex, IKeyed keyed, string message, params object[] args)
{
using (LogContext.PushProperty("Key", keyed?.Key))
@@ -788,11 +911,17 @@ namespace PepperDash.Core
}
}
+ ///
+ /// LogFatal method
+ ///
public static void LogFatal(string message, params object[] args)
{
_logger.Write(LogEventLevel.Fatal, message, args);
}
+ ///
+ /// LogFatal method
+ ///
public static void LogFatal(Exception ex, string message, params object[] args)
{
_logger.Write(LogEventLevel.Fatal, ex, null, message, args);
@@ -869,6 +998,9 @@ namespace PepperDash.Core
/// Logs to Console when at-level, and all messages to error log
///
[Obsolete("Use LogMessage methods, Will be removed in 2.2.0 and later versions")]
+ ///
+ /// Console method
+ ///
public static void Console(uint level, ErrorLogLevel errorLogLevel,
string format, params object[] items)
{
@@ -881,6 +1013,9 @@ namespace PepperDash.Core
/// it will only be written to the log.
///
[Obsolete("Use LogMessage methods, Will be removed in 2.2.0 and later versions")]
+ ///
+ /// ConsoleWithLog method
+ ///
public static void ConsoleWithLog(uint level, string format, params object[] items)
{
LogMessage(level, format, items);
@@ -1005,6 +1140,9 @@ namespace PepperDash.Core
///
/// Error level to for message to be logged at
///
+ ///
+ /// Enumeration of ErrorLogLevel values
+ ///
public enum ErrorLogLevel
{
///
diff --git a/src/PepperDash.Core/Logging/DebugConsoleSink.cs b/src/PepperDash.Core/Logging/DebugConsoleSink.cs
index a6c7f893..6363caa5 100644
--- a/src/PepperDash.Core/Logging/DebugConsoleSink.cs
+++ b/src/PepperDash.Core/Logging/DebugConsoleSink.cs
@@ -11,10 +11,16 @@ using System.Text;
namespace PepperDash.Core
{
+ ///
+ /// Represents a DebugConsoleSink
+ ///
public class DebugConsoleSink : ILogEventSink
{
private readonly ITextFormatter _textFormatter;
+ ///
+ /// Emit method
+ ///
public void Emit(LogEvent logEvent)
{
if (!Debug.IsRunningOnAppliance) return;
@@ -44,6 +50,9 @@ namespace PepperDash.Core
public static class DebugConsoleSinkExtensions
{
+ ///
+ /// DebugConsoleSink method
+ ///
public static LoggerConfiguration DebugConsoleSink(
this LoggerSinkConfiguration loggerConfiguration,
ITextFormatter formatProvider = null)
diff --git a/src/PepperDash.Core/Logging/DebugContext.cs b/src/PepperDash.Core/Logging/DebugContext.cs
index 54c87414..88567eff 100644
--- a/src/PepperDash.Core/Logging/DebugContext.cs
+++ b/src/PepperDash.Core/Logging/DebugContext.cs
@@ -38,6 +38,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// GetDebugContext method
+ ///
public static DebugContext GetDebugContext(string key)
{
var context = Contexts.FirstOrDefault(c => c.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
@@ -92,6 +95,9 @@ namespace PepperDash.Core
/// Callback for console command
///
///
+ ///
+ /// SetDebugFromConsole method
+ ///
public void SetDebugFromConsole(string levelString)
{
try
@@ -114,6 +120,9 @@ namespace PepperDash.Core
/// Sets the debug level
///
/// Valid values 0 (no debug), 1 (critical), 2 (all messages)
+ ///
+ /// SetDebugLevel method
+ ///
public void SetDebugLevel(int level)
{
if (level <= 2)
@@ -143,6 +152,9 @@ namespace PepperDash.Core
///
/// Appends a device Key to the beginning of a message
///
+ ///
+ /// Console method
+ ///
public void Console(uint level, IKeyed dev, string format, params object[] items)
{
if (SaveData.Level >= level)
@@ -191,6 +203,9 @@ namespace PepperDash.Core
///
///
///
+ ///
+ /// LogError method
+ ///
public void LogError(Debug.ErrorLogLevel errorLogLevel, string str)
{
string msg = string.Format("App {0}:{1}", InitialParametersClass.ApplicationNumber, str);
diff --git a/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs b/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs
index 0814453b..76859209 100644
--- a/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs
+++ b/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs
@@ -5,8 +5,14 @@ using Serilog.Events;
namespace PepperDash.Core.Logging
{
+ ///
+ /// Represents a DebugCrestronLoggerSink
+ ///
public class DebugCrestronLoggerSink : ILogEventSink
{
+ ///
+ /// Emit method
+ ///
public void Emit(LogEvent logEvent)
{
if (!Debug.IsRunningOnAppliance) return;
diff --git a/src/PepperDash.Core/Logging/DebugErrorLogSink.cs b/src/PepperDash.Core/Logging/DebugErrorLogSink.cs
index 3885982b..9ab4dc6b 100644
--- a/src/PepperDash.Core/Logging/DebugErrorLogSink.cs
+++ b/src/PepperDash.Core/Logging/DebugErrorLogSink.cs
@@ -11,6 +11,9 @@ using System.Threading.Tasks;
namespace PepperDash.Core.Logging
{
+ ///
+ /// Represents a DebugErrorLogSink
+ ///
public class DebugErrorLogSink : ILogEventSink
{
private ITextFormatter _formatter;
@@ -24,6 +27,9 @@ namespace PepperDash.Core.Logging
{LogEventLevel.Error, (msg) => ErrorLog.Error(msg) },
{LogEventLevel.Fatal, (msg) => ErrorLog.Error(msg) }
};
+ ///
+ /// Emit method
+ ///
public void Emit(LogEvent logEvent)
{
string message;
diff --git a/src/PepperDash.Core/Logging/DebugExtensions.cs b/src/PepperDash.Core/Logging/DebugExtensions.cs
index a8b7bd55..c5174541 100644
--- a/src/PepperDash.Core/Logging/DebugExtensions.cs
+++ b/src/PepperDash.Core/Logging/DebugExtensions.cs
@@ -6,66 +6,105 @@ namespace PepperDash.Core.Logging
{
public static class DebugExtensions
{
+ ///
+ /// LogException method
+ ///
public static void LogException(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(ex, message, device, args);
}
+ ///
+ /// LogVerbose method
+ ///
public static void LogVerbose(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Verbose, ex, message, device, args);
}
+ ///
+ /// LogVerbose method
+ ///
public static void LogVerbose(this IKeyed device, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Verbose, device, message, args);
}
+ ///
+ /// LogDebug method
+ ///
public static void LogDebug(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Debug, ex, message, device, args);
}
+ ///
+ /// LogDebug method
+ ///
public static void LogDebug(this IKeyed device, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Debug, device, message, args);
}
+ ///
+ /// LogInformation method
+ ///
public static void LogInformation(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Information, ex, message, device, args);
}
+ ///
+ /// LogInformation method
+ ///
public static void LogInformation(this IKeyed device, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Information, device, message, args);
}
+ ///
+ /// LogWarning method
+ ///
public static void LogWarning(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Warning, ex, message, device, args);
}
+ ///
+ /// LogWarning method
+ ///
public static void LogWarning(this IKeyed device, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Warning, device, message, args);
}
+ ///
+ /// LogError method
+ ///
public static void LogError(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Error, ex, message, device, args);
}
+ ///
+ /// LogError method
+ ///
public static void LogError(this IKeyed device, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Error, device, message, args);
}
+ ///
+ /// LogFatal method
+ ///
public static void LogFatal(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Fatal, ex, message, device, args);
}
+ ///
+ /// LogFatal method
+ ///
public static void LogFatal(this IKeyed device, string message, params object[] args)
{
Log.LogMessage(LogEventLevel.Fatal, device, message, args);
diff --git a/src/PepperDash.Core/Logging/DebugMemory.cs b/src/PepperDash.Core/Logging/DebugMemory.cs
index a5737af9..e1894816 100644
--- a/src/PepperDash.Core/Logging/DebugMemory.cs
+++ b/src/PepperDash.Core/Logging/DebugMemory.cs
@@ -7,6 +7,9 @@ namespace PepperDash.Core.Logging
///
/// Class to persist current Debug settings across program restarts
///
+ ///
+ /// Represents a DebugContextCollection
+ ///
public class DebugContextCollection
{
///
@@ -39,6 +42,9 @@ namespace PepperDash.Core.Logging
///
///
///
+ ///
+ /// SetLevel method
+ ///
public void SetLevel(string contextKey, int level)
{
if (level < 0 || level > 2)
@@ -51,6 +57,9 @@ namespace PepperDash.Core.Logging
///
///
///
+ ///
+ /// GetOrCreateItem method
+ ///
public DebugContextItem GetOrCreateItem(string contextKey)
{
if (!_items.ContainsKey(contextKey))
@@ -65,6 +74,9 @@ namespace PepperDash.Core.Logging
///
///
///
+ ///
+ /// SetDebugSettingsForKey method
+ ///
public void SetDebugSettingsForKey(string deviceKey, object settings)
{
try
@@ -89,6 +101,9 @@ namespace PepperDash.Core.Logging
///
///
///
+ ///
+ /// GetDebugSettingsForKey method
+ ///
public object GetDebugSettingsForKey(string deviceKey)
{
return DeviceDebugSettings[deviceKey];
diff --git a/src/PepperDash.Core/Logging/DebugWebsocketSink.cs b/src/PepperDash.Core/Logging/DebugWebsocketSink.cs
index d818977e..9c3df14e 100644
--- a/src/PepperDash.Core/Logging/DebugWebsocketSink.cs
+++ b/src/PepperDash.Core/Logging/DebugWebsocketSink.cs
@@ -21,6 +21,9 @@ using Serilog.Formatting.Json;
namespace PepperDash.Core
{
+ ///
+ /// Represents a DebugWebsocketSink
+ ///
public class DebugWebsocketSink : ILogEventSink
{
private HttpServer _httpsServer;
@@ -47,6 +50,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// Gets or sets the IsRunning
+ ///
public bool IsRunning { get => _httpsServer?.IsListening ?? false; }
@@ -105,6 +111,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// Emit method
+ ///
public void Emit(LogEvent logEvent)
{
if (_httpsServer == null || !_httpsServer.IsListening) return;
@@ -116,6 +125,9 @@ namespace PepperDash.Core
}
+ ///
+ /// StartServerAndSetPort method
+ ///
public void StartServerAndSetPort(int port)
{
Debug.Console(0, "Starting Websocket Server on port: {0}", port);
@@ -193,6 +205,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// StopServer method
+ ///
public void StopServer()
{
Debug.Console(0, "Stopping Websocket Server");
@@ -204,6 +219,9 @@ namespace PepperDash.Core
public static class DebugWebsocketSinkExtensions
{
+ ///
+ /// DebugWebsocketSink method
+ ///
public static LoggerConfiguration DebugWebsocketSink(
this LoggerSinkConfiguration loggerConfiguration,
ITextFormatter formatProvider = null)
@@ -212,6 +230,9 @@ namespace PepperDash.Core
}
}
+ ///
+ /// Represents a DebugClient
+ ///
public class DebugClient : WebSocketBehavior
{
private DateTime _connectionTime;
diff --git a/src/PepperDash.Core/PasswordManagement/PasswordClient.cs b/src/PepperDash.Core/PasswordManagement/PasswordClient.cs
index 225a563c..0df95c29 100644
--- a/src/PepperDash.Core/PasswordManagement/PasswordClient.cs
+++ b/src/PepperDash.Core/PasswordManagement/PasswordClient.cs
@@ -5,6 +5,9 @@ namespace PepperDash.Core.PasswordManagement
///
/// A class to allow user interaction with the PasswordManager
///
+ ///
+ /// Represents a PasswordClient
+ ///
public class PasswordClient
{
///
@@ -59,6 +62,9 @@ namespace PepperDash.Core.PasswordManagement
/// Retrieve password by index
///
///
+ ///
+ /// GetPasswordByIndex method
+ ///
public void GetPasswordByIndex(ushort key)
{
OnUshrtChange((ushort)PasswordManager.Passwords.Count, 0, PasswordManagementConstants.PasswordManagerCountChange);
@@ -81,6 +87,9 @@ namespace PepperDash.Core.PasswordManagement
/// Password validation method
///
///
+ ///
+ /// ValidatePassword method
+ ///
public void ValidatePassword(string password)
{
if (string.IsNullOrEmpty(password))
@@ -99,6 +108,9 @@ namespace PepperDash.Core.PasswordManagement
/// password against the selected password when the length of the 2 are equal
///
///
+ ///
+ /// BuildPassword method
+ ///
public void BuildPassword(string data)
{
PasswordToValidate = String.Concat(PasswordToValidate, data);
@@ -111,6 +123,9 @@ namespace PepperDash.Core.PasswordManagement
///
/// Clears the user entered password and resets the LEDs
///
+ ///
+ /// ClearPassword method
+ ///
public void ClearPassword()
{
PasswordToValidate = "";
diff --git a/src/PepperDash.Core/PasswordManagement/PasswordManager.cs b/src/PepperDash.Core/PasswordManagement/PasswordManager.cs
index d15ac1e1..6ec4583b 100644
--- a/src/PepperDash.Core/PasswordManagement/PasswordManager.cs
+++ b/src/PepperDash.Core/PasswordManagement/PasswordManager.cs
@@ -7,6 +7,9 @@ namespace PepperDash.Core.PasswordManagement
///
/// Allows passwords to be stored and managed
///
+ ///
+ /// Represents a PasswordManager
+ ///
public class PasswordManager
{
///
@@ -71,6 +74,9 @@ namespace PepperDash.Core.PasswordManagement
///
///
///
+ ///
+ /// UpdatePassword method
+ ///
public void UpdatePassword(ushort key, string password)
{
// validate the parameters
@@ -152,6 +158,9 @@ namespace PepperDash.Core.PasswordManagement
/// Method to change the default timer value, (default 5000ms/5s)
///
///
+ ///
+ /// PasswordTimerMs method
+ ///
public void PasswordTimerMs(ushort time)
{
PasswordTimerElapsedMs = Convert.ToInt64(time);
diff --git a/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs b/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs
index cc71e303..61c0d689 100644
--- a/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs
+++ b/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs
@@ -71,6 +71,9 @@ namespace PepperDash.Core.SystemInfo
///
/// Processor Change Event Args Class
///
+ ///
+ /// Represents a ProcessorChangeEventArgs
+ ///
public class ProcessorChangeEventArgs : EventArgs
{
///
@@ -117,6 +120,9 @@ namespace PepperDash.Core.SystemInfo
///
/// Ethernet Change Event Args Class
///
+ ///
+ /// Represents a EthernetChangeEventArgs
+ ///
public class EthernetChangeEventArgs : EventArgs
{
///
@@ -168,6 +174,9 @@ namespace PepperDash.Core.SystemInfo
///
/// Control Subnet Chage Event Args Class
///
+ ///
+ /// Represents a ControlSubnetChangeEventArgs
+ ///
public class ControlSubnetChangeEventArgs : EventArgs
{
///
@@ -214,6 +223,9 @@ namespace PepperDash.Core.SystemInfo
///
/// Program Change Event Args Class
///
+ ///
+ /// Represents a ProgramChangeEventArgs
+ ///
public class ProgramChangeEventArgs : EventArgs
{
///
diff --git a/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs b/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs
index 6677b9ef..65d718c6 100644
--- a/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs
+++ b/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs
@@ -103,6 +103,9 @@ namespace PepperDash.Core.SystemInfo
///
/// Gets the current ethernet info
///
+ ///
+ /// GetEthernetInfo method
+ ///
public void GetEthernetInfo()
{
OnBoolChange(true, 0, SystemInfoConstants.BusyBoolChange);
@@ -164,6 +167,9 @@ namespace PepperDash.Core.SystemInfo
///
/// Gets the current control subnet info
///
+ ///
+ /// GetControlSubnetInfo method
+ ///
public void GetControlSubnetInfo()
{
OnBoolChange(true, 0, SystemInfoConstants.BusyBoolChange);
@@ -206,6 +212,9 @@ namespace PepperDash.Core.SystemInfo
/// Gets the program info by index
///
///
+ ///
+ /// GetProgramInfoByIndex method
+ ///
public void GetProgramInfoByIndex(ushort index)
{
if (index < 1 || index > 10)
@@ -266,6 +275,9 @@ namespace PepperDash.Core.SystemInfo
///
/// Gets the processor uptime and passes it to S+
///
+ ///
+ /// RefreshProcessorUptime method
+ ///
public void RefreshProcessorUptime()
{
try
@@ -287,6 +299,9 @@ namespace PepperDash.Core.SystemInfo
/// Gets the program uptime, by index, and passes it to S+
///
///
+ ///
+ /// RefreshProgramUptimeByIndex method
+ ///
public void RefreshProgramUptimeByIndex(int index)
{
try
@@ -308,6 +323,9 @@ namespace PepperDash.Core.SystemInfo
/// Sends command to console, passes response back using string change event
///
///
+ ///
+ /// SendConsoleCommand method
+ ///
public void SendConsoleCommand(string cmd)
{
if (string.IsNullOrEmpty(cmd))
diff --git a/src/PepperDash.Core/Web/BouncyCertificate.cs b/src/PepperDash.Core/Web/BouncyCertificate.cs
index bf8b0f4c..9e885094 100644
--- a/src/PepperDash.Core/Web/BouncyCertificate.cs
+++ b/src/PepperDash.Core/Web/BouncyCertificate.cs
@@ -35,6 +35,9 @@ namespace PepperDash.Core
return issuerCertificate;
}
+ ///
+ /// IssueCertificate method
+ ///
public X509Certificate2 IssueCertificate(string subjectName, X509Certificate2 issuerCertificate, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@@ -56,6 +59,9 @@ namespace PepperDash.Core
return ConvertCertificate(certificate, subjectKeyPair, random);
}
+ ///
+ /// CreateCertificateAuthorityCertificate method
+ ///
public X509Certificate2 CreateCertificateAuthorityCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@@ -78,6 +84,9 @@ namespace PepperDash.Core
return ConvertCertificate(certificate, subjectKeyPair, random);
}
+ ///
+ /// CreateSelfSignedCertificate method
+ ///
public X509Certificate2 CreateSelfSignedCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@@ -305,6 +314,9 @@ namespace PepperDash.Core
return convertedCertificate;
}
+ ///
+ /// WriteCertificate method
+ ///
public void WriteCertificate(X509Certificate2 certificate, string outputDirectory, string certName)
{
// This password is the one attached to the PFX file. Use 'null' for no password.
@@ -332,6 +344,9 @@ namespace PepperDash.Core
}
}
}
+ ///
+ /// AddCertToStore method
+ ///
public bool AddCertToStore(X509Certificate2 cert, System.Security.Cryptography.X509Certificates.StoreName st, System.Security.Cryptography.X509Certificates.StoreLocation sl)
{
bool bRet = false;
diff --git a/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs b/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs
index ca19cf2f..46ce3a96 100644
--- a/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs
+++ b/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs
@@ -5,6 +5,9 @@ namespace PepperDash.Core.Web.RequestHandlers
///
/// Web API default request handler
///
+ ///
+ /// Represents a DefaultRequestHandler
+ ///
public class DefaultRequestHandler : WebApiBaseRequestHandler
{
///
diff --git a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs
index b1170031..927092db 100644
--- a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs
+++ b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs
@@ -142,6 +142,9 @@ namespace PepperDash.Core.Web.RequestHandlers
/// Process request
///
///
+ ///
+ /// ProcessRequest method
+ ///
public void ProcessRequest(HttpCwsContext context)
{
if (!_handlers.TryGetValue(context.Request.HttpMethod, out Func handler))
diff --git a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs
index 99e4aa93..a02f3497 100644
--- a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs
+++ b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs
@@ -144,6 +144,9 @@ namespace PepperDash.Core.Web.RequestHandlers
/// Process request
///
///
+ ///
+ /// ProcessRequest method
+ ///
public void ProcessRequest(HttpCwsContext context)
{
Action handler;
diff --git a/src/PepperDash.Core/Web/WebApiServer.cs b/src/PepperDash.Core/Web/WebApiServer.cs
index cf45b361..c8f7398f 100644
--- a/src/PepperDash.Core/Web/WebApiServer.cs
+++ b/src/PepperDash.Core/Web/WebApiServer.cs
@@ -28,21 +28,33 @@ namespace PepperDash.Core.Web
///
/// Web API server key
///
+ ///
+ /// Gets or sets the Key
+ ///
public string Key { get; private set; }
///
/// Web API server name
///
+ ///
+ /// Gets or sets the Name
+ ///
public string Name { get; private set; }
///
/// CWS base path, will default to "/api" if not set via initialize method
///
+ ///
+ /// Gets or sets the BasePath
+ ///
public string BasePath { get; private set; }
///
/// Indicates CWS is registered with base path
///
+ ///
+ /// Gets or sets the IsRegistered
+ ///
public bool IsRegistered { get; private set; }
///
@@ -140,6 +152,9 @@ namespace PepperDash.Core.Web
///
/// Initializes CWS class
///
+ ///
+ /// Initialize method
+ ///
public void Initialize(string key, string basePath)
{
Key = key;
@@ -165,6 +180,9 @@ namespace PepperDash.Core.Web
/// Removes a route from CWS
///
///
+ ///
+ /// RemoveRoute method
+ ///
public void RemoveRoute(HttpCwsRoute route)
{
if (route == null)
@@ -179,6 +197,9 @@ namespace PepperDash.Core.Web
///
/// Returns a list of the current routes
///
+ ///
+ /// GetRouteCollection method
+ ///
public HttpCwsRouteCollection GetRouteCollection()
{
return _server.Routes;
@@ -225,6 +246,9 @@ namespace PepperDash.Core.Web
///
/// Stop CWS instance
///
+ ///
+ /// Stop method
+ ///
public void Stop()
{
try
diff --git a/src/PepperDash.Core/WebApi/Presets/Preset.cs b/src/PepperDash.Core/WebApi/Presets/Preset.cs
index bdbc5820..f407a9ba 100644
--- a/src/PepperDash.Core/WebApi/Presets/Preset.cs
+++ b/src/PepperDash.Core/WebApi/Presets/Preset.cs
@@ -5,6 +5,9 @@ namespace PepperDash.Core.WebApi.Presets
///
/// Represents a preset
///
+ ///
+ /// Represents a Preset
+ ///
public class Preset
{
///
@@ -15,26 +18,41 @@ namespace PepperDash.Core.WebApi.Presets
///
/// User ID
///
+ ///
+ /// Gets or sets the UserId
+ ///
public int UserId { get; set; }
///
/// Room Type ID
///
+ ///
+ /// Gets or sets the RoomTypeId
+ ///
public int RoomTypeId { get; set; }
///
/// Preset Name
///
+ ///
+ /// Gets or sets the PresetName
+ ///
public string PresetName { get; set; }
///
/// Preset Number
///
+ ///
+ /// Gets or sets the PresetNumber
+ ///
public int PresetNumber { get; set; }
///
/// Preset Data
///
+ ///
+ /// Gets or sets the Data
+ ///
public string Data { get; set; }
///
@@ -51,6 +69,9 @@ namespace PepperDash.Core.WebApi.Presets
///
///
///
+ ///
+ /// Represents a PresetReceivedEventArgs
+ ///
public class PresetReceivedEventArgs : EventArgs
{
///
@@ -61,11 +82,17 @@ namespace PepperDash.Core.WebApi.Presets
///
/// S+ helper
///
+ ///
+ /// Gets or sets the ULookupSuccess
+ ///
public ushort ULookupSuccess { get { return (ushort)(LookupSuccess ? 1 : 0); } }
///
/// The preset
///
+ ///
+ /// Gets or sets the Preset
+ ///
public Preset Preset { get; private set; }
///
diff --git a/src/PepperDash.Core/WebApi/Presets/User.cs b/src/PepperDash.Core/WebApi/Presets/User.cs
index c82824f6..a7acee66 100644
--- a/src/PepperDash.Core/WebApi/Presets/User.cs
+++ b/src/PepperDash.Core/WebApi/Presets/User.cs
@@ -19,16 +19,25 @@ namespace PepperDash.Core.WebApi.Presets
///
///
///
+ ///
+ /// Gets or sets the ExternalId
+ ///
public string ExternalId { get; set; }
///
///
///
+ ///
+ /// Gets or sets the FirstName
+ ///
public string FirstName { get; set; }
///
///
///
+ ///
+ /// Gets or sets the LastName
+ ///
public string LastName { get; set; }
}
@@ -46,11 +55,17 @@ namespace PepperDash.Core.WebApi.Presets
///
/// For stupid S+
///
+ ///
+ /// Gets or sets the ULookupSuccess
+ ///
public ushort ULookupSuccess { get { return (ushort)(LookupSuccess ? 1 : 0); } }
///
///
///
+ ///
+ /// Gets or sets the User
+ ///
public User User { get; private set; }
///
@@ -73,6 +88,9 @@ namespace PepperDash.Core.WebApi.Presets
///
///
///
+ ///
+ /// Represents a UserAndRoomMessage
+ ///
public class UserAndRoomMessage
{
///
@@ -83,11 +101,17 @@ namespace PepperDash.Core.WebApi.Presets
///
///
///
+ ///
+ /// Gets or sets the RoomTypeId
+ ///
public int RoomTypeId { get; set; }
///
///
///
+ ///
+ /// Gets or sets the PresetNumber
+ ///
public int PresetNumber { get; set; }
}
}
\ No newline at end of file
diff --git a/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs b/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs
index 0a9317bf..95ca78f0 100644
--- a/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs
+++ b/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs
@@ -28,6 +28,9 @@ namespace PepperDash.Core.WebApi.Presets
///
/// Unique identifier for this instance
///
+ ///
+ /// Gets or sets the Key
+ ///
public string Key { get; private set; }
//string JsonMasterKey;
@@ -77,6 +80,9 @@ namespace PepperDash.Core.WebApi.Presets
/// Gets the user for a passcode
///
///
+ ///
+ /// GetUserForPasscode method
+ ///
public void GetUserForPasscode(string passcode)
{
// Bullshit duplicate code here... These two cases should be the same
@@ -115,6 +121,9 @@ namespace PepperDash.Core.WebApi.Presets
///
///
///
+ ///
+ /// GetPresetForThisUser method
+ ///
public void GetPresetForThisUser(int roomTypeId, int presetNumber)
{
if (CurrentUser == null)
@@ -212,6 +221,9 @@ namespace PepperDash.Core.WebApi.Presets
///
///
///
+ ///
+ /// SavePresetForThisUser method
+ ///
public void SavePresetForThisUser(int roomTypeId, int presetNumber)
{
if (CurrentPreset == null)
diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs
index 58473362..d079ec31 100644
--- a/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs
+++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs
@@ -59,6 +59,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// GetTokenWithOffset method
+ ///
public override XSigToken GetTokenWithOffset(int offset)
{
if (offset == 0) return this;
@@ -69,6 +72,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// ToString method
+ ///
public override string ToString()
{
return Index + " = 0x" + Value.ToString("X4");
@@ -80,6 +86,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// ToString method
+ ///
public string ToString(string format, IFormatProvider formatProvider)
{
return Value.ToString(format, formatProvider);
diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs
index 70ccc852..b02cdfc8 100644
--- a/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs
+++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs
@@ -57,6 +57,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// GetTokenWithOffset method
+ ///
public override XSigToken GetTokenWithOffset(int offset)
{
if (offset == 0) return this;
@@ -67,6 +70,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// ToString method
+ ///
public override string ToString()
{
return Index + " = " + (Value ? "High" : "Low");
@@ -77,6 +83,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// ToString method
+ ///
public string ToString(IFormatProvider formatProvider)
{
return Value.ToString(formatProvider);
diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs
index 25ee3fd0..6233a79c 100644
--- a/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs
+++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs
@@ -63,6 +63,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// GetTokenWithOffset method
+ ///
public override XSigToken GetTokenWithOffset(int offset)
{
if (offset == 0) return this;
@@ -73,6 +76,9 @@ namespace PepperDash.Core.Intersystem.Tokens
///
///
///
+ ///
+ /// ToString method
+ ///
public override string ToString()
{
return Index + " = \"" + Value + "\"";
diff --git a/src/PepperDash.Core/XSigUtility/XSigHelpers.cs b/src/PepperDash.Core/XSigUtility/XSigHelpers.cs
index 4ea6f634..d93cc32b 100644
--- a/src/PepperDash.Core/XSigUtility/XSigHelpers.cs
+++ b/src/PepperDash.Core/XSigUtility/XSigHelpers.cs
@@ -52,6 +52,9 @@ namespace PepperDash.Core.Intersystem
///
/// XSig state resolver.
/// Bytes in XSig format for each token within the state representation.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(IXSigSerialization xSigSerialization)
{
return GetBytes(xSigSerialization, 0);
@@ -63,6 +66,9 @@ namespace PepperDash.Core.Intersystem
/// XSig state resolver.
/// Offset to which the data will be aligned.
/// Bytes in XSig format for each token within the state representation.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(IXSigSerialization xSigSerialization, int offset)
{
var tokens = xSigSerialization.Serialize();
@@ -82,6 +88,9 @@ namespace PepperDash.Core.Intersystem
/// 1-based digital index
/// Digital data to be encoded
/// Bytes in XSig format for digtial information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int index, bool value)
{
return GetBytes(index, 0, value);
@@ -94,6 +103,9 @@ namespace PepperDash.Core.Intersystem
/// Index offset.
/// Digital data to be encoded
/// Bytes in XSig format for digtial information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int index, int offset, bool value)
{
return new XSigDigitalToken(index + offset, value).GetBytes();
@@ -105,6 +117,9 @@ namespace PepperDash.Core.Intersystem
/// Starting index of the sequence.
/// Digital signal value array.
/// Byte sequence in XSig format for digital signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int startIndex, bool[] values)
{
return GetBytes(startIndex, 0, values);
@@ -117,6 +132,9 @@ namespace PepperDash.Core.Intersystem
/// Index offset.
/// Digital signal value array.
/// Byte sequence in XSig format for digital signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int startIndex, int offset, bool[] values)
{
// Digital XSig data is 2 bytes per value
@@ -134,6 +152,9 @@ namespace PepperDash.Core.Intersystem
/// 1-based analog index
/// Analog data to be encoded
/// Bytes in XSig format for analog signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int index, ushort value)
{
return GetBytes(index, 0, value);
@@ -146,6 +167,9 @@ namespace PepperDash.Core.Intersystem
/// Index offset.
/// Analog data to be encoded
/// Bytes in XSig format for analog signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int index, int offset, ushort value)
{
return new XSigAnalogToken(index + offset, value).GetBytes();
@@ -157,6 +181,9 @@ namespace PepperDash.Core.Intersystem
/// Starting index of the sequence.
/// Analog signal value array.
/// Byte sequence in XSig format for analog signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int startIndex, ushort[] values)
{
return GetBytes(startIndex, 0, values);
@@ -169,6 +196,9 @@ namespace PepperDash.Core.Intersystem
/// Index offset.
/// Analog signal value array.
/// Byte sequence in XSig format for analog signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int startIndex, int offset, ushort[] values)
{
// Analog XSig data is 4 bytes per value
@@ -186,6 +216,9 @@ namespace PepperDash.Core.Intersystem
/// 1-based serial index
/// Serial data to be encoded
/// Bytes in XSig format for serial signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int index, string value)
{
return GetBytes(index, 0, value);
@@ -198,6 +231,9 @@ namespace PepperDash.Core.Intersystem
/// Index offset.
/// Serial data to be encoded
/// Bytes in XSig format for serial signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int index, int offset, string value)
{
return new XSigSerialToken(index + offset, value).GetBytes();
@@ -209,6 +245,9 @@ namespace PepperDash.Core.Intersystem
/// Starting index of the sequence.
/// Serial signal value array.
/// Byte sequence in XSig format for serial signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int startIndex, string[] values)
{
return GetBytes(startIndex, 0, values);
@@ -221,6 +260,9 @@ namespace PepperDash.Core.Intersystem
/// Index offset.
/// Serial signal value array.
/// Byte sequence in XSig format for serial signal information.
+ ///
+ /// GetBytes method
+ ///
public static byte[] GetBytes(int startIndex, int offset, string[] values)
{
// Serial XSig data is not fixed-length like the other formats
diff --git a/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs b/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs
index 9d70d02e..03e79946 100644
--- a/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs
+++ b/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs
@@ -48,6 +48,9 @@ namespace PepperDash.Core.Intersystem
/// Input stream
/// Result
/// True if successful, otherwise false.
+ ///
+ /// TryReadUInt16BE method
+ ///
public static bool TryReadUInt16BE(Stream stream, out ushort value)
{
value = 0;
@@ -65,6 +68,9 @@ namespace PepperDash.Core.Intersystem
///
/// XSigToken
/// Offset is less than 0.
+ ///
+ /// ReadXSigToken method
+ ///
public XSigToken ReadXSigToken()
{
ushort prefix;
@@ -114,6 +120,9 @@ namespace PepperDash.Core.Intersystem
/// Reads all available XSig tokens from the stream.
///
/// XSigToken collection.
+ ///
+ /// ReadAllXSigTokens method
+ ///
public IEnumerable ReadAllXSigTokens()
{
var tokens = new List();
diff --git a/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs b/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs
index 934f2c29..7a4d13e7 100644
--- a/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs
+++ b/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs
@@ -47,6 +47,9 @@ namespace PepperDash.Core.Intersystem
/// Write XSig data gathered from an IXSigStateResolver to the stream.
///
/// IXSigStateResolver object.
+ ///
+ /// WriteXSigData method
+ ///
public void WriteXSigData(IXSigSerialization xSigSerialization)
{
WriteXSigData(xSigSerialization, 0);
@@ -57,6 +60,9 @@ namespace PepperDash.Core.Intersystem
///
/// IXSigStateResolver object.
/// Index offset for each XSigToken.
+ ///
+ /// WriteXSigData method
+ ///
public void WriteXSigData(IXSigSerialization xSigSerialization, int offset)
{
if (xSigSerialization == null)
@@ -70,6 +76,9 @@ namespace PepperDash.Core.Intersystem
/// Write XSigToken to the stream.
///
/// XSigToken object.
+ ///
+ /// WriteXSigData method
+ ///
public void WriteXSigData(XSigToken token)
{
WriteXSigData(token, 0);
@@ -80,6 +89,9 @@ namespace PepperDash.Core.Intersystem
///
/// XSigToken object.
/// Index offset for each XSigToken.
+ ///
+ /// WriteXSigData method
+ ///
public void WriteXSigData(XSigToken token, int offset)
{
WriteXSigData(new[] { token }, offset);
@@ -108,6 +120,9 @@ namespace PepperDash.Core.Intersystem
///
/// XSigToken objects.
/// Index offset for each XSigToken.
+ ///
+ /// WriteXSigData method
+ ///
public void WriteXSigData(IEnumerable tokens, int offset)
{
if (offset < 0)
@@ -127,6 +142,9 @@ namespace PepperDash.Core.Intersystem
///
/// Disposes of the internal stream if specified to not leave open.
///
+ ///
+ /// Dispose method
+ ///
public void Dispose()
{
if (!_leaveOpen)
diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs
index 07bcc56a..96191433 100644
--- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs
+++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs
@@ -12,12 +12,29 @@ using System.Linq;
namespace PepperDash.Essentials.Core
{
+ ///
+ /// Wrapper class for device factory information
+ ///
public class DeviceFactoryWrapper
{
+ ///
+ /// Gets or sets the device type
+ ///
public Type Type { get; set; }
+
+ ///
+ /// Gets or sets the description of the device factory
+ ///
public string Description { get; set; }
+
+ ///
+ /// Gets or sets the factory method for creating devices
+ ///
public Func FactoryMethod { get; set; }
+ ///
+ /// Initializes a new instance of the DeviceFactoryWrapper class
+ ///
public DeviceFactoryWrapper()
{
Type = null;
@@ -25,8 +42,14 @@ namespace PepperDash.Essentials.Core
}
}
+ ///
+ /// Factory class for loading and managing device types
+ ///
public class DeviceFactory
{
+ ///
+ /// Initializes a new instance of the DeviceFactory class and loads all device type factories
+ ///
public DeviceFactory()
{
var assy = Assembly.GetExecutingAssembly();