Added xml doc and some summaries to some of the warnings. There are still 321 warnings for xml doc, but I think its helpful to see what summaries are there in ref'd solutions.

This commit is contained in:
Joshua Gutenplan
2019-06-13 19:33:39 -07:00
parent 214e1d215c
commit 8dc3cb967b
10 changed files with 101 additions and 5 deletions

View File

@@ -167,7 +167,9 @@ namespace PepperDash.Core
{ {
get { return (ushort)(IsListening ? 1 : 0); } get { return (ushort)(IsListening ? 1 : 0); }
} }
/// <summary>
/// Max number of clients this server will allow for connection. Crestron max is 64. This number should be less than 65
/// </summary>
public ushort MaxClients { get; set; } // should be set by parameter in SIMPL+ in the MAIN method, Should not ever need to be configurable public ushort MaxClients { get; set; } // should be set by parameter in SIMPL+ in the MAIN method, Should not ever need to be configurable
/// <summary> /// <summary>
/// Number of clients currently connected. /// Number of clients currently connected.

View File

@@ -352,7 +352,6 @@ namespace PepperDash.Core
} }
} }
public class TcpSshPropertiesConfig public class TcpSshPropertiesConfig
{ {
[JsonProperty(Required = Required.Always)] [JsonProperty(Required = Required.Always)]

View File

@@ -8,14 +8,40 @@ using Newtonsoft.Json;
namespace PepperDash_Core.Comm namespace PepperDash_Core.Comm
{ {
/// <summary>
/// Client config object for TCP client with server that inherits from TcpSshPropertiesConfig and adds properties for shared key and heartbeat
/// </summary>
public class TcpClientConfigObject : TcpSshPropertiesConfig public class TcpClientConfigObject : TcpSshPropertiesConfig
{ {
/// <summary>
/// Bool value for secure. Currently not implemented in TCP sockets as they are not dynamic
/// </summary>
public bool Secure { get; set; } public bool Secure { get; set; }
/// <summary>
/// Require a shared key that both server and client negotiate. If negotiation fails server disconnects the client
/// </summary>
public bool SharedKeyRequired { get; set; } public bool SharedKeyRequired { get; set; }
/// <summary>
/// The shared key that must match on the server and client
/// </summary>
public string SharedKey { get; set; } public string SharedKey { get; set; }
/// <summary>
/// Require a heartbeat on the client/server connection that will cause the server/client to disconnect if the heartbeat is not received.
/// heartbeats do not raise received events.
/// </summary>
public bool HeartbeatRequired { get; set; } public bool HeartbeatRequired { get; set; }
/// <summary>
/// The interval in seconds for the heartbeat from the client. If not received client is disconnected
/// </summary>
public ushort HeartbeatRequiredIntervalInSeconds { get; set; } public ushort HeartbeatRequiredIntervalInSeconds { get; set; }
/// <summary>
/// HeartbeatString that will be checked against the message received. defaults to heartbeat if no string is provided.
/// </summary>
public string HeartbeatStringToMatch { get; set; } public string HeartbeatStringToMatch { get; set; }
/// <summary>
/// Receive Queue size must be greater than 20 or defaults to 20
/// </summary>
public int ReceiveQueueSize { get; set; } public int ReceiveQueueSize { get; set; }
} }
} }

View File

@@ -6,18 +6,55 @@ using Crestron.SimplSharp;
namespace PepperDash.Core namespace PepperDash.Core
{ {
/// <summary>
/// Tcp Server Config object with properties for a tcp server with shared key and heartbeat capabilities
/// </summary>
public class TcpServerConfigObject public class TcpServerConfigObject
{ {
/// <summary>
/// Uique key
/// </summary>
public string Key { get; set; } public string Key { get; set; }
/// <summary>
/// Max Clients that the server will allow to connect.
/// </summary>
public ushort MaxClients { get; set; } public ushort MaxClients { get; set; }
/// <summary>
/// Bool value for secure. Currently not implemented in TCP sockets as they are not dynamic
/// </summary>
public bool Secure { get; set; } public bool Secure { get; set; }
/// <summary>
/// Port for the server to listen on
/// </summary>
public int Port { get; set; } public int Port { get; set; }
/// <summary>
/// Require a shared key that both server and client negotiate. If negotiation fails server disconnects the client
/// </summary>
public bool SharedKeyRequired { get; set; } public bool SharedKeyRequired { get; set; }
/// <summary>
/// The shared key that must match on the server and client
/// </summary>
public string SharedKey { get; set; } public string SharedKey { get; set; }
/// <summary>
/// Require a heartbeat on the client/server connection that will cause the server/client to disconnect if the heartbeat is not received.
/// heartbeats do not raise received events.
/// </summary>
public bool HeartbeatRequired { get; set; } public bool HeartbeatRequired { get; set; }
/// <summary>
/// The interval in seconds for the heartbeat from the client. If not received client is disconnected
/// </summary>
public ushort HeartbeatRequiredIntervalInSeconds { get; set; } public ushort HeartbeatRequiredIntervalInSeconds { get; set; }
/// <summary>
/// HeartbeatString that will be checked against the message received. defaults to heartbeat if no string is provided.
/// </summary>
public string HeartbeatStringToMatch { get; set; } public string HeartbeatStringToMatch { get; set; }
/// <summary>
/// Client buffer size. See Crestron help. defaults to 2000 if not greater than 2000
/// </summary>
public int BufferSize { get; set; } public int BufferSize { get; set; }
/// <summary>
/// Receive Queue size must be greater than 20 or defaults to 20
/// </summary>
public int ReceiveQueueSize { get; set; } public int ReceiveQueueSize { get; set; }
} }
} }

View File

@@ -6,6 +6,9 @@ using Crestron.SimplSharp;
namespace PepperDash.Core namespace PepperDash.Core
{ {
/// <summary>
/// Crestron Control Methods for a comm object
/// </summary>
public enum eControlMethod public enum eControlMethod
{ {
None = 0, Com, IpId, IpidTcp, IR, Ssh, Tcpip, Telnet, Cresnet, Cec, Udp None = 0, Com, IpId, IpidTcp, IR, Ssh, Tcpip, Telnet, Cresnet, Cec, Udp

View File

@@ -6,13 +6,25 @@ using Crestron.SimplSharp;
namespace PepperDash.Core namespace PepperDash.Core
{ {
/// <summary>
/// Unique key interface to require a unique key for the class
/// </summary>
public interface IKeyed public interface IKeyed
{ {
/// <summary>
/// Unique Key
/// </summary>
string Key { get; } string Key { get; }
} }
/// <summary>
/// Named Keyed device interface. Forces the devie to have a Unique Key and a name.
/// </summary>
public interface IKeyName : IKeyed public interface IKeyName : IKeyed
{ {
/// <summary>
/// Isn't it obvious :)
/// </summary>
string Name { get; } string Name { get; }
} }
} }

View File

@@ -10,8 +10,17 @@ namespace PepperDash.Core
/// </summary> /// </summary>
public class Device : IKeyName public class Device : IKeyName
{ {
/// <summary>
/// Unique Key
/// </summary>
public string Key { get; protected set; } public string Key { get; protected set; }
public string Name { get; protected set; } /// <summary>
/// Name of the devie
/// </summary>
public string Name { get; protected set; }
/// <summary>
///
/// </summary>
public bool Enabled { get; protected set; } public bool Enabled { get; protected set; }
///// <summary> ///// <summary>

View File

@@ -6,6 +6,9 @@ using Crestron.SimplSharp;
namespace PepperDash.Core.JsonToSimpl namespace PepperDash.Core.JsonToSimpl
{ {
/// <summary>
/// Constants for Simpl modules
/// </summary>
public class JsonToSimplConstants public class JsonToSimplConstants
{ {
public const ushort JsonIsValidBoolChange = 2; public const ushort JsonIsValidBoolChange = 2;

View File

@@ -6,10 +6,14 @@ using Crestron.SimplSharp;
namespace PepperDash.Core namespace PepperDash.Core
{ {
/// <summary>
/// Not in use
/// </summary>
public static class NetworkComm public static class NetworkComm
{ {
/// <summary>
/// Not in use
/// </summary>
static NetworkComm() static NetworkComm()
{ {
} }

View File

@@ -31,6 +31,7 @@
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib> <NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig> <NoConfig>true</NoConfig>
<DocumentationFile>bin\PepperDash_Core.xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions> <AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>