diff --git a/src/PepperDash.Core/Comm/CommunicationGather.cs b/src/PepperDash.Core/Comm/CommunicationGather.cs index 9ffe8262..e75a012d 100644 --- a/src/PepperDash.Core/Comm/CommunicationGather.cs +++ b/src/PepperDash.Core/Comm/CommunicationGather.cs @@ -84,10 +84,9 @@ namespace PepperDash.Core port.TextReceived += Port_TextReceivedStringDelimiter; } - /// - /// 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..33141f0c 100644 --- a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs +++ b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs @@ -23,7 +23,7 @@ namespace PepperDash.Core private CTimer DebugExpiryPeriod; /// - /// The current debug setting + /// Gets or sets the DebugSetting /// public eStreamDebuggingSetting DebugSetting { get; private set; } @@ -42,7 +42,7 @@ namespace PepperDash.Core } /// - /// Indicates that receive stream debugging is enabled + /// Gets or sets the RxStreamDebuggingIsEnabled /// public bool RxStreamDebuggingIsEnabled{ get; private set; } @@ -65,6 +65,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 +84,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SetDebuggingWithSpecificTimeout method + /// public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes) { if (setting == eStreamDebuggingSetting.Off) @@ -135,6 +141,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..c665dad8 100644 --- a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs +++ b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs @@ -6,7 +6,7 @@ using Newtonsoft.Json.Converters; 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..0b394423 100644 --- a/src/PepperDash.Core/Comm/EventArgs.cs +++ b/src/PepperDash.Core/Comm/EventArgs.cs @@ -29,9 +29,9 @@ namespace PepperDash.Core /// public class GenericSocketStatusChageEventArgs : EventArgs { - /// - /// - /// + /// + /// Gets or sets the Client + /// public ISocketStatus Client { get; private set; } /// @@ -60,7 +60,7 @@ namespace PepperDash.Core public class GenericTcpServerStateChangedEventArgs : EventArgs { /// - /// + /// Gets or sets the State /// public ServerState State { get; private set; } @@ -154,7 +154,7 @@ 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..204c548b 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs @@ -79,7 +79,7 @@ namespace PepperDash.Core } /// - /// Port on server + /// Gets or sets the Port /// public int Port { get; set; } @@ -149,7 +149,7 @@ namespace PepperDash.Core public string ConnectionFailure { get { return ClientStatus.ToString(); } } /// - /// bool to track if auto reconnect should be set on the socket + /// Gets or sets the AutoReconnect /// public bool AutoReconnect { get; set; } @@ -188,7 +188,7 @@ namespace PepperDash.Core #region GenericSecureTcpIpClient properties /// - /// 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; } @@ -207,7 +207,7 @@ 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; } @@ -222,7 +222,7 @@ namespace PepperDash.Core bool IsTryingToConnect; /// - /// Bool showing if socket is ready for communication after shared key exchange + /// Gets or sets the IsReadyForCommunication /// public bool IsReadyForCommunication { get; set; } @@ -342,7 +342,7 @@ namespace PepperDash.Core } /// - /// Just to help S+ set the key + /// Initialize method /// public void Initialize(string key) { @@ -421,6 +421,9 @@ namespace PepperDash.Core /// Deactivate the client /// /// + /// + /// Deactivate method + /// public override bool Deactivate() { if (_client != null) @@ -432,7 +435,7 @@ 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() { @@ -563,7 +566,7 @@ namespace PepperDash.Core } /// - /// + /// Disconnect method /// public void Disconnect() { @@ -586,7 +589,7 @@ namespace PepperDash.Core } /// - /// Does the actual disconnect business + /// DisconnectClient method /// public void DisconnectClient() { @@ -846,7 +849,7 @@ namespace PepperDash.Core } /// - /// General send method + /// SendText method /// public void SendText(string text) { @@ -875,7 +878,7 @@ namespace PepperDash.Core } /// - /// + /// SendBytes method /// public void SendBytes(byte[] bytes) { diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs index 93b195ca..49350164 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs @@ -80,7 +80,7 @@ namespace PepperDash.Core public string Hostname { get; set; } /// - /// Port on server + /// Gets or sets the Port /// public int Port { get; set; } @@ -113,7 +113,7 @@ 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; } @@ -123,7 +123,7 @@ namespace PepperDash.Core private bool WaitingForSharedKeyResponse { get; set; } /// - /// Defaults to 2000 + /// Gets or sets the BufferSize /// public int BufferSize { get; set; } @@ -336,7 +336,7 @@ namespace PepperDash.Core #region Methods /// - /// Just to help S+ set the key + /// Initialize method /// public void Initialize(string key) { @@ -395,7 +395,7 @@ 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() { @@ -526,7 +526,7 @@ namespace PepperDash.Core } /// - /// + /// Disconnect method /// public void Disconnect() { @@ -804,7 +804,7 @@ namespace PepperDash.Core } /// - /// General send method + /// SendText method /// public void SendText(string text) { @@ -833,7 +833,7 @@ namespace PepperDash.Core } /// - /// + /// SendBytes method /// public void SendBytes(byte[] bytes) { diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs index e0da068f..6502d544 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs @@ -58,7 +58,7 @@ namespace PepperDash.Core public ServerHasChokedCallbackDelegate ServerHasChoked { get; set; } /// - /// + /// Delegate for ServerHasChokedCallbackDelegate /// public delegate void ServerHasChokedCallbackDelegate(); @@ -104,7 +104,7 @@ namespace PepperDash.Core int MonitorClientFailureCount; /// - /// 3 by default + /// Gets or sets the MonitorClientMaxFailureCount /// public int MonitorClientMaxFailureCount { get; set; } @@ -190,7 +190,7 @@ namespace PepperDash.Core } /// - /// Port Server should listen on + /// Gets or sets the Port /// public int Port { get; set; } @@ -223,8 +223,7 @@ 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; } @@ -248,7 +247,7 @@ 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; } @@ -258,7 +257,7 @@ namespace PepperDash.Core public ushort HeartbeatRequiredIntervalInSeconds { set { HeartbeatRequiredIntervalMs = (value * 1000); } } /// - /// 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; } @@ -276,7 +275,7 @@ namespace PepperDash.Core public List ConnectedClientsIndexes = new List(); /// - /// Defaults to 2000 + /// Gets or sets the BufferSize /// public int BufferSize { get; set; } @@ -339,7 +338,7 @@ namespace PepperDash.Core #region Methods - Server Actions /// - /// Disconnects all clients and stops the server + /// KillServer method /// public void KillServer() { @@ -356,6 +355,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; @@ -395,7 +397,7 @@ namespace PepperDash.Core } /// - /// Start listening on the specified port + /// Listen method /// public void Listen() { @@ -453,7 +455,7 @@ namespace PepperDash.Core } /// - /// Stop Listeneing + /// StopListening method /// public void StopListening() { @@ -478,6 +480,9 @@ namespace PepperDash.Core /// Disconnects Client /// /// + /// + /// DisconnectClient method + /// public void DisconnectClient(uint client) { try @@ -491,7 +496,7 @@ namespace PepperDash.Core } } /// - /// Disconnect All Clients + /// DisconnectAllClientsForShutdown method /// public void DisconnectAllClientsForShutdown() { @@ -533,6 +538,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 +574,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendTextToClient method + /// public void SendTextToClient(string text, uint clientIndex) { try @@ -634,6 +645,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..3ba9059e 100644 --- a/src/PepperDash.Core/Comm/GenericSshClient.cs +++ b/src/PepperDash.Core/Comm/GenericSshClient.cs @@ -36,13 +36,13 @@ namespace PepperDash.Core /// public event EventHandler ConnectionChange; - ///// + /// ///// ///// //public event GenericSocketStatusChangeEventDelegate SocketStatusChange; /// - /// Address of server + /// Gets or sets the Hostname /// public string Hostname { get; set; } @@ -52,12 +52,12 @@ namespace PepperDash.Core public int Port { get; set; } /// - /// 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; } @@ -79,7 +79,7 @@ namespace PepperDash.Core } /// - /// + /// Socket status change event /// public SocketStatus ClientStatus { @@ -123,8 +123,7 @@ 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; } @@ -198,7 +197,7 @@ namespace PepperDash.Core } /// - /// Connect to the server, using the provided properties. + /// Connect method /// public void Connect() { @@ -324,9 +323,9 @@ namespace PepperDash.Core } } - /// - /// Disconnect the clients and put away it's resources. - /// + /// + /// Disconnect method + /// public void Disconnect() { ConnectEnabled = false; @@ -476,6 +475,9 @@ namespace PepperDash.Core /// Sends text to the server /// /// + /// + /// SendText method + /// public void SendText(string text) { try @@ -513,6 +515,9 @@ namespace PepperDash.Core /// Sends Bytes to the server /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { try @@ -549,7 +554,7 @@ namespace PepperDash.Core //***************************************************************************************************** //***************************************************************************************************** /// -/// Fired when connection changes +/// Represents a SshConnectionChangeEventArgs /// public class SshConnectionChangeEventArgs : EventArgs { @@ -558,19 +563,19 @@ public class SshConnectionChangeEventArgs : EventArgs /// public bool IsConnected { get; private set; } - /// - /// 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..c9235411 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpClient.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpClient.cs @@ -59,7 +59,7 @@ namespace PepperDash.Core } /// - /// Port on server + /// Gets or sets the Port /// public int Port { get; set; } @@ -135,9 +135,9 @@ namespace PepperDash.Core /// public string ConnectionFailure { get { return ClientStatus.ToString(); } } - /// - /// bool to track if auto reconnect should be set on the socket - /// + /// + /// Gets or sets the AutoReconnect + /// public bool AutoReconnect { get; set; } /// @@ -232,7 +232,7 @@ namespace PepperDash.Core } /// - /// Just to help S+ set the key + /// Initialize method /// public void Initialize(string key) { @@ -255,6 +255,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Deactivate method + /// public override bool Deactivate() { RetryTimer.Stop(); @@ -267,9 +270,9 @@ namespace PepperDash.Core return true; } - /// - /// Attempts to connect to the server - /// + /// + /// Connect method + /// public void Connect() { if (string.IsNullOrEmpty(Hostname)) @@ -334,9 +337,9 @@ namespace PepperDash.Core } } - /// - /// Attempts to disconnect the client - /// + /// + /// Disconnect method + /// public void Disconnect() { try @@ -355,7 +358,7 @@ namespace PepperDash.Core } /// - /// Does the actual disconnect business + /// DisconnectClient method /// public void DisconnectClient() { @@ -446,9 +449,9 @@ namespace PepperDash.Core } } - /// - /// General send method - /// + /// + /// SendText method + /// public void SendText(string text) { var bytes = Encoding.GetEncoding(28591).GetBytes(text); @@ -459,9 +462,9 @@ namespace PepperDash.Core _client.SendData(bytes, bytes.Length); } - /// - /// 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 +479,9 @@ namespace PepperDash.Core /// Sends Bytes to the server /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (StreamDebugging.TxStreamDebuggingIsEnabled) @@ -508,9 +514,9 @@ namespace PepperDash.Core } } - /// - /// Configuration properties for TCP/SSH Connections - /// + /// + /// Represents a TcpSshPropertiesConfig + /// public class TcpSshPropertiesConfig { /// @@ -529,9 +535,9 @@ namespace PepperDash.Core /// Username credential /// public string Username { get; set; } - /// - /// Passord credential - /// + /// + /// Gets or sets the Password + /// public string Password { get; set; } /// @@ -539,14 +545,14 @@ namespace PepperDash.Core /// public int BufferSize { get; set; } - /// - /// 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..6d4958ca 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs @@ -69,7 +69,7 @@ namespace PepperDash.Core public string Hostname { get; set; } /// - /// Port on server + /// Gets or sets the Port /// public int Port { get; set; } @@ -102,7 +102,7 @@ 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; } @@ -112,7 +112,7 @@ namespace PepperDash.Core private bool WaitingForSharedKeyResponse { get; set; } /// - /// Defaults to 2000 + /// Gets or sets the BufferSize /// public int BufferSize { get; set; } @@ -289,7 +289,7 @@ namespace PepperDash.Core #region Methods /// - /// Just to help S+ set the key + /// Initialize method /// public void Initialize(string key) { @@ -311,7 +311,7 @@ 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() { @@ -442,7 +442,7 @@ namespace PepperDash.Core } /// - /// + /// Disconnect method /// public void Disconnect() { @@ -669,7 +669,7 @@ namespace PepperDash.Core } /// - /// General send method + /// SendText method /// public void SendText(string text) { @@ -698,7 +698,7 @@ namespace PepperDash.Core } /// - /// + /// SendBytes method /// public void SendBytes(byte[] bytes) { diff --git a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs index 6aa5e6b5..5cec96df 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs @@ -52,7 +52,7 @@ namespace PepperDash.Core public ServerHasChokedCallbackDelegate ServerHasChoked { get; set; } /// - /// + /// Delegate for ServerHasChokedCallbackDelegate /// public delegate void ServerHasChokedCallbackDelegate(); @@ -82,7 +82,7 @@ namespace PepperDash.Core int MonitorClientFailureCount; /// - /// 3 by default + /// Gets or sets the MonitorClientMaxFailureCount /// public int MonitorClientMaxFailureCount { get; set; } @@ -171,7 +171,7 @@ namespace PepperDash.Core } /// - /// Port Server should listen on + /// Gets or sets the Port /// public int Port { get; set; } @@ -204,8 +204,7 @@ 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; } @@ -229,7 +228,7 @@ 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; } @@ -239,7 +238,7 @@ namespace PepperDash.Core public ushort HeartbeatRequiredIntervalInSeconds { set { HeartbeatRequiredIntervalMs = (value * 1000); } } /// - /// 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; } @@ -257,7 +256,7 @@ namespace PepperDash.Core public List ConnectedClientsIndexes = new List(); /// - /// Defaults to 2000 + /// Gets or sets the BufferSize /// public int BufferSize { get; set; } @@ -320,7 +319,7 @@ namespace PepperDash.Core #region Methods - Server Actions /// - /// Disconnects all clients and stops the server + /// KillServer method /// public void KillServer() { @@ -337,6 +336,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; @@ -375,7 +377,7 @@ namespace PepperDash.Core } /// - /// Start listening on the specified port + /// Listen method /// public void Listen() { @@ -432,7 +434,7 @@ namespace PepperDash.Core } /// - /// Stop Listening + /// StopListening method /// public void StopListening() { @@ -457,6 +459,9 @@ namespace PepperDash.Core /// Disconnects Client /// /// + /// + /// DisconnectClient method + /// public void DisconnectClient(uint client) { try @@ -470,7 +475,7 @@ namespace PepperDash.Core } } /// - /// Disconnect All Clients + /// DisconnectAllClientsForShutdown method /// public void DisconnectAllClientsForShutdown() { @@ -512,6 +517,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 +553,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendTextToClient method + /// public void SendTextToClient(string text, uint clientIndex) { try @@ -613,6 +624,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..61bebf8d 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; @@ -185,7 +188,7 @@ namespace PepperDash.Core } /// - /// Enables the UDP Server + /// Connect method /// public void Connect() { @@ -222,7 +225,7 @@ namespace PepperDash.Core } /// - /// Disabled the UDP Server + /// Disconnect method /// public void Disconnect() { @@ -292,6 +295,9 @@ namespace PepperDash.Core /// General send method /// /// + /// + /// SendText method + /// public void SendText(string text) { var bytes = Encoding.GetEncoding(28591).GetBytes(text); @@ -309,6 +315,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (StreamDebugging.TxStreamDebuggingIsEnabled) @@ -320,9 +329,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..226473bf 100644 --- a/src/PepperDash.Core/Comm/TcpClientConfigObject.cs +++ b/src/PepperDash.Core/Comm/TcpClientConfigObject.cs @@ -3,7 +3,7 @@ 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..d16ea761 100644 --- a/src/PepperDash.Core/CommunicationExtras.cs +++ b/src/PepperDash.Core/CommunicationExtras.cs @@ -38,9 +38,9 @@ namespace PepperDash.Core void Disconnect(); } - /// - /// Represents a device that uses basic connection - /// + /// + /// Defines the contract for IBasicCommunication + /// public interface IBasicCommunication : ICommunicationReceiver { /// @@ -147,9 +147,9 @@ namespace PepperDash.Core /// public class GenericCommMethodReceiveBytesArgs : EventArgs { - /// - /// - /// + /// + /// Gets or sets the Bytes + /// public byte[] Bytes { get; private set; } /// @@ -228,6 +228,9 @@ namespace PepperDash.Core /// /// /// + /// + /// GetEscapedText method + /// public static string GetEscapedText(string text) { var bytes = Encoding.GetEncoding(28591).GetBytes(text); @@ -239,6 +242,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..7124550e 100644 --- a/src/PepperDash.Core/Device.cs +++ b/src/PepperDash.Core/Device.cs @@ -5,9 +5,9 @@ using Serilog.Events; 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 { @@ -15,23 +15,23 @@ namespace PepperDash.Core /// Unique Key /// public string Key { get; protected set; } - /// - /// Name of the devie - /// + /// + /// Gets or sets the Name + /// public string Name { get; protected set; } /// /// /// public bool Enabled { get; protected set; } - ///// - ///// A place to store reference to the original config object, if any. These values should - ///// NOT be used as properties on the device as they are all publicly-settable values. - ///// + /// + /// A place to store reference to the original config object, if any. These values should + /// NOT be used as properties on the device as they are all publicly-settable values. + /// //public DeviceConfig Config { get; private set; } - ///// - ///// Helper method to check if Config exists - ///// + /// + /// Helper method to check if Config exists + /// //public bool HasConfig { get { return Config != null; } } List _PreActivationActions; @@ -86,6 +86,9 @@ namespace PepperDash.Core /// Adds a post activation action /// /// + /// + /// AddPostActivationAction method + /// public void AddPostActivationAction(Action act) { if (_PostActivationActions == null) @@ -93,9 +96,9 @@ namespace PepperDash.Core _PostActivationActions.Add(act); } - /// - /// Executes the preactivation actions - /// + /// + /// PreActivate method + /// public void PreActivate() { if (_PreActivationActions != null) @@ -112,11 +115,9 @@ namespace PepperDash.Core }); } - /// - /// Gets this device ready to be used in the system. Runs any added pre-activation items, and - /// all post-activation at end. Classes needing additional logic to - /// run should override CustomActivate() - /// + /// + /// Activate method + /// public bool Activate() { //if (_PreActivationActions != null) @@ -127,9 +128,9 @@ namespace PepperDash.Core return result; } - /// - /// Executes the postactivation actions - /// + /// + /// PostActivate method + /// public void PostActivate() { if (_PostActivationActions != null) @@ -152,6 +153,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 +182,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..76a9405c 100644 --- a/src/PepperDash.Core/EthernetHelper.cs +++ b/src/PepperDash.Core/EthernetHelper.cs @@ -4,9 +4,9 @@ using Serilog.Events; namespace PepperDash.Core { - /// - /// Class to help with accessing values from the CrestronEthernetHelper class - /// + /// + /// Represents a EthernetHelper + /// public class EthernetHelper { /// @@ -24,9 +24,9 @@ namespace PepperDash.Core // ADD OTHER HELPERS HERE - /// - /// - /// + /// + /// 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..c146a6f2 100644 --- a/src/PepperDash.Core/EventArgs.cs +++ b/src/PepperDash.Core/EventArgs.cs @@ -16,19 +16,19 @@ namespace PepperDash.Core /// public bool State { get; set; } - /// - /// 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; } /// @@ -64,9 +64,9 @@ namespace PepperDash.Core } } - /// - /// Ushort change event args - /// + /// + /// Represents a UshrtChangeEventArgs + /// public class UshrtChangeEventArgs : EventArgs { /// @@ -74,14 +74,14 @@ namespace PepperDash.Core /// public ushort IntValue { get; set; } - /// - /// 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; } /// @@ -117,9 +117,9 @@ namespace PepperDash.Core } } - /// - /// String change event args - /// + /// + /// Represents a StringChangeEventArgs + /// public class StringChangeEventArgs : EventArgs { /// @@ -127,14 +127,14 @@ namespace PepperDash.Core /// public string StringValue { get; set; } - /// - /// 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..110587ab 100644 --- a/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs +++ b/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs @@ -32,14 +32,14 @@ namespace PepperDash.Core.JsonStandardObjects /// public DeviceConfig Device { get; set; } - /// - /// 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..d754a029 100644 --- a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs +++ b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs @@ -47,14 +47,14 @@ namespace PepperDash.Core.JsonStandardObjects ] } */ - /// - /// Device communication parameter class - /// + /// + /// Represents a ComParamsConfig + /// public class ComParamsConfig { - /// - /// - /// + /// + /// Gets or sets the baudRate + /// public int baudRate { get; set; } /// /// @@ -86,13 +86,13 @@ namespace PepperDash.Core.JsonStandardObjects public int pacing { get; set; } // convert properties for simpl - /// - /// - /// + /// + /// 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); } } /// /// @@ -143,13 +143,13 @@ namespace PepperDash.Core.JsonStandardObjects public int autoReconnectIntervalMs { get; set; } // convert properties for simpl - /// - /// - /// + /// + /// 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); } } /// /// @@ -192,9 +192,9 @@ namespace PepperDash.Core.JsonStandardObjects public TcpSshPropertiesConfig tcpSshProperties { get; set; } // convert properties for simpl - /// - /// - /// + /// + /// Gets or sets the simplControlPortNumber + /// public ushort simplControlPortNumber { get { return Convert.ToUInt16(controlPortNumber); } } /// @@ -207,9 +207,9 @@ namespace PepperDash.Core.JsonStandardObjects } } - /// - /// Device properties class - /// + /// + /// Represents a PropertiesConfig + /// public class PropertiesConfig { /// @@ -226,13 +226,13 @@ namespace PepperDash.Core.JsonStandardObjects public ControlConfig control { get; set; } // convert properties for simpl - /// - /// - /// + /// + /// 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..ca638bbf 100644 --- a/src/PepperDash.Core/JsonToSimpl/Constants.cs +++ b/src/PepperDash.Core/JsonToSimpl/Constants.cs @@ -88,9 +88,9 @@ namespace PepperDash.Core.JsonToSimpl /// public class SPlusValueWrapper { - /// - /// - /// + /// + /// Gets or sets the ValueType + /// public SPlusType ValueType { get; private set; } /// /// @@ -122,9 +122,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..8d71c5fb 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) @@ -49,9 +52,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..268f6207 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs @@ -5,9 +5,9 @@ using Serilog.Events; namespace PepperDash.Core.JsonToSimpl { - /// - /// Used to interact with an array of values with the S+ modules - /// + /// + /// Represents a JsonToSimplArrayLookupChild + /// public class JsonToSimplArrayLookupChild : JsonToSimplChildObjectBase { /// @@ -76,9 +76,10 @@ namespace PepperDash.Core.JsonToSimpl PathSuffix == null ? "" : PathSuffix); } - /// - /// 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..68e4bf91 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs @@ -28,14 +28,14 @@ namespace PepperDash.Core.JsonToSimpl /// public SPlusValuesDelegate GetAllValuesDelegate { get; set; } - /// - /// 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; } /// @@ -49,9 +49,9 @@ namespace PepperDash.Core.JsonToSimpl /// public string PathSuffix { get; protected set; } - /// - /// Indicates if the instance is linked to an object - /// + /// + /// Gets or sets the LinkedToObject + /// public bool LinkedToObject { get; protected set; } /// @@ -96,6 +96,9 @@ namespace PepperDash.Core.JsonToSimpl /// Sets the path prefix for the object /// /// + /// + /// SetPathPrefix method + /// public void SetPathPrefix(string pathPrefix) { PathPrefix = pathPrefix; @@ -110,9 +113,9 @@ namespace PepperDash.Core.JsonToSimpl BoolPaths[index] = path; } - /// - /// 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); @@ -120,9 +123,9 @@ namespace PepperDash.Core.JsonToSimpl UshortPaths[index] = path; } - /// - /// 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); @@ -130,10 +133,10 @@ namespace PepperDash.Core.JsonToSimpl StringPaths[index] = path; } - /// - /// 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 +280,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// USetBoolValue method + /// public void USetBoolValue(ushort key, ushort theValue) { SetBoolValue(key, theValue == 1); @@ -287,6 +293,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// SetBoolValue method + /// public void SetBoolValue(ushort key, bool theValue) { if (BoolPaths.ContainsKey(key)) @@ -298,6 +307,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// SetUShortValue method + /// public void SetUShortValue(ushort key, ushort theValue) { if (UshortPaths.ContainsKey(key)) @@ -309,6 +321,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// SetStringValue method + /// public void SetStringValue(ushort key, string theValue) { if (StringPaths.ContainsKey(key)) @@ -320,6 +335,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..13354fdd 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs @@ -20,12 +20,12 @@ namespace PepperDash.Core.JsonToSimpl public string Filepath { get; private set; } /// - /// 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 +194,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..9fa8ba01 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs @@ -2,9 +2,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..14f7eaa8 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs @@ -5,9 +5,9 @@ using Newtonsoft.Json.Linq; namespace PepperDash.Core.JsonToSimpl { - /// - /// Generic Master - /// + /// + /// Represents a JsonToSimplGenericMaster + /// public class JsonToSimplGenericMaster : JsonToSimplMaster { /*****************************************************************************************/ @@ -20,9 +20,9 @@ namespace PepperDash.Core.JsonToSimpl // To prevent multiple same-file access static object WriteLock = new object(); - /// - /// Callback action for saving - /// + /// + /// Gets or sets the SaveCallback + /// public Action SaveCallback { get; set; } /*****************************************************************************************/ @@ -60,6 +60,9 @@ namespace PepperDash.Core.JsonToSimpl /// Loads JSON into JsonObject, but does not trigger evaluation by children /// /// + /// + /// SetJsonWithoutEvaluating method + /// public void SetJsonWithoutEvaluating(string json) { try @@ -72,9 +75,10 @@ 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..b3fa92a3 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs @@ -38,9 +38,9 @@ namespace PepperDash.Core.JsonToSimpl /// public string Key { get { return UniqueID; } } - /// - /// A unique ID - /// + /// + /// Gets or sets the UniqueID + /// public string UniqueID { get; protected set; } /// @@ -53,10 +53,9 @@ namespace PepperDash.Core.JsonToSimpl } string _DebugName = ""; - /// - /// 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; } /// @@ -83,9 +82,9 @@ namespace PepperDash.Core.JsonToSimpl } } - /// - /// - /// + /// + /// Gets or sets the JsonObject + /// public JObject JsonObject { get; protected set; } /*****************************************************************************************/ @@ -120,6 +119,9 @@ namespace PepperDash.Core.JsonToSimpl /// Adds a child "module" to this master /// /// + /// + /// AddChild method + /// public void AddChild(JsonToSimplChildObjectBase child) { if (!Children.Contains(child)) @@ -128,9 +130,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 +181,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..e142d1bc 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs @@ -19,7 +19,7 @@ namespace PepperDash.Core.JsonToSimpl public string PortalFilepath { get; private set; } /// - /// File path of the actual file being read (Portal or local) + /// Gets or sets the ActualFilePath /// public string ActualFilePath { get; private set; } @@ -128,6 +128,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..ff489b25 100644 --- a/src/PepperDash.Core/Logging/Debug.cs +++ b/src/PepperDash.Core/Logging/Debug.cs @@ -78,12 +78,12 @@ namespace PepperDash.Core public static string FileName = string.Format(@"app{0}Debug.json", InitialParametersClass.ApplicationNumber); /// - /// 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; } @@ -94,7 +94,7 @@ namespace PepperDash.Core public static bool IsRunningOnAppliance = CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance; /// - /// Version for the currently loaded PepperDashCore dll + /// Gets or sets the PepperDashCoreVersion /// public static string PepperDashCoreVersion { get; private set; } @@ -233,6 +233,9 @@ namespace PepperDash.Core }; } + /// + /// UpdateLoggerConfiguration method + /// public static void UpdateLoggerConfiguration(LoggerConfiguration config) { _loggerConfiguration = config; @@ -240,6 +243,9 @@ namespace PepperDash.Core _logger = config.CreateLogger(); } + /// + /// ResetLoggerConfiguration method + /// public static void ResetLoggerConfiguration() { _loggerConfiguration = _defaultLoggerConfiguration; @@ -319,6 +325,9 @@ namespace PepperDash.Core /// Callback for console command /// /// + /// + /// SetDebugFromConsole method + /// public static void SetDebugFromConsole(string levelString) { try @@ -371,6 +380,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 +397,9 @@ namespace PepperDash.Core SetDebugLevel(logLevel); } + /// + /// SetDebugLevel method + /// public static void SetDebugLevel(LogEventLevel level) { _consoleLoggingLevelSwitch.MinimumLevel = level; @@ -402,6 +417,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 +432,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 +447,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 +466,9 @@ namespace PepperDash.Core /// Callback for console command /// /// + /// + /// SetDoNotLoadOnNextBootFromConsole method + /// public static void SetDoNotLoadOnNextBootFromConsole(string stateString) { try @@ -464,6 +491,9 @@ namespace PepperDash.Core /// Callback for console command /// /// + /// + /// SetDebugFilterFromConsole method + /// public static void SetDebugFilterFromConsole(string items) { var str = items.Trim(); @@ -559,6 +589,9 @@ namespace PepperDash.Core /// /// /// + /// + /// GetDeviceDebugSettingsForKey method + /// public static object GetDeviceDebugSettingsForKey(string deviceKey) { return _contexts.GetDebugSettingsForKey(deviceKey); @@ -579,7 +612,7 @@ namespace PepperDash.Core } /// - /// + /// ShowDebugLog method /// public static void ShowDebugLog(string s) { @@ -595,6 +628,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 +659,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 +687,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 +698,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 +709,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 +736,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 +747,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 +774,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 +785,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 +812,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 +823,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 +850,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 +861,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 +888,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 +899,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 +986,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 +1001,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); @@ -1003,7 +1126,7 @@ 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..e90ec86a 100644 --- a/src/PepperDash.Core/Logging/DebugContext.cs +++ b/src/PepperDash.Core/Logging/DebugContext.cs @@ -19,9 +19,9 @@ namespace PepperDash.Core /// public string Key { get; private set; } - ///// - ///// The name of the file containing the current debug settings. - ///// + /// + /// The name of the file containing the current debug settings. + /// //string FileName = string.Format(@"\nvram\debug\app{0}Debug.json", InitialParametersClass.ApplicationNumber); DebugContextSaveData SaveData; @@ -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) @@ -141,7 +150,7 @@ 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) { @@ -191,6 +200,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..286707b8 100644 --- a/src/PepperDash.Core/Logging/DebugMemory.cs +++ b/src/PepperDash.Core/Logging/DebugMemory.cs @@ -4,9 +4,9 @@ using Newtonsoft.Json; namespace PepperDash.Core.Logging { - /// - /// Class to persist current Debug settings across program restarts - /// + /// + /// Represents a DebugContextCollection + /// public class DebugContextCollection { /// @@ -39,6 +39,9 @@ namespace PepperDash.Core.Logging /// /// /// + /// + /// SetLevel method + /// public void SetLevel(string contextKey, int level) { if (level < 0 || level > 2) @@ -51,6 +54,9 @@ namespace PepperDash.Core.Logging /// /// /// + /// + /// GetOrCreateItem method + /// public DebugContextItem GetOrCreateItem(string contextKey) { if (!_items.ContainsKey(contextKey)) @@ -65,6 +71,9 @@ namespace PepperDash.Core.Logging /// /// /// + /// + /// SetDebugSettingsForKey method + /// public void SetDebugSettingsForKey(string deviceKey, object settings) { try @@ -89,6 +98,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..9443be0b 100644 --- a/src/PepperDash.Core/PasswordManagement/PasswordClient.cs +++ b/src/PepperDash.Core/PasswordManagement/PasswordClient.cs @@ -2,9 +2,9 @@ namespace PepperDash.Core.PasswordManagement { - /// - /// A class to allow user interaction with the PasswordManager - /// + /// + /// Represents a PasswordClient + /// public class PasswordClient { /// @@ -59,6 +59,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 +84,9 @@ namespace PepperDash.Core.PasswordManagement /// Password validation method /// /// + /// + /// ValidatePassword method + /// public void ValidatePassword(string password) { if (string.IsNullOrEmpty(password)) @@ -99,6 +105,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); @@ -108,9 +117,9 @@ namespace PepperDash.Core.PasswordManagement ValidatePassword(PasswordToValidate); } - /// - /// 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..9ba008e4 100644 --- a/src/PepperDash.Core/PasswordManagement/PasswordManager.cs +++ b/src/PepperDash.Core/PasswordManagement/PasswordManager.cs @@ -4,9 +4,9 @@ using Crestron.SimplSharp; namespace PepperDash.Core.PasswordManagement { - /// - /// Allows passwords to be stored and managed - /// + /// + /// Represents a PasswordManager + /// public class PasswordManager { /// @@ -71,6 +71,9 @@ namespace PepperDash.Core.PasswordManagement /// /// /// + /// + /// UpdatePassword method + /// public void UpdatePassword(ushort key, string password) { // validate the parameters @@ -152,6 +155,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..a83f8901 100644 --- a/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs +++ b/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs @@ -68,9 +68,9 @@ namespace PepperDash.Core.SystemInfo public const ushort ProgramConfigChange = 305; } - /// - /// Processor Change Event Args Class - /// + /// + /// Represents a ProcessorChangeEventArgs + /// public class ProcessorChangeEventArgs : EventArgs { /// @@ -114,9 +114,9 @@ namespace PepperDash.Core.SystemInfo } } - /// - /// Ethernet Change Event Args Class - /// + /// + /// Represents a EthernetChangeEventArgs + /// public class EthernetChangeEventArgs : EventArgs { /// @@ -165,9 +165,9 @@ namespace PepperDash.Core.SystemInfo } } - /// - /// Control Subnet Chage Event Args Class - /// + /// + /// Represents a ControlSubnetChangeEventArgs + /// public class ControlSubnetChangeEventArgs : EventArgs { /// @@ -211,9 +211,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..45f787f5 100644 --- a/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs +++ b/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs @@ -100,9 +100,9 @@ namespace PepperDash.Core.SystemInfo OnBoolChange(false, 0, SystemInfoConstants.BusyBoolChange); } - /// - /// Gets the current ethernet info - /// + /// + /// GetEthernetInfo method + /// public void GetEthernetInfo() { OnBoolChange(true, 0, SystemInfoConstants.BusyBoolChange); @@ -161,9 +161,9 @@ namespace PepperDash.Core.SystemInfo OnBoolChange(false, 0, SystemInfoConstants.BusyBoolChange); } - /// - /// Gets the current control subnet info - /// + /// + /// GetControlSubnetInfo method + /// public void GetControlSubnetInfo() { OnBoolChange(true, 0, SystemInfoConstants.BusyBoolChange); @@ -206,6 +206,9 @@ namespace PepperDash.Core.SystemInfo /// Gets the program info by index /// /// + /// + /// GetProgramInfoByIndex method + /// public void GetProgramInfoByIndex(ushort index) { if (index < 1 || index > 10) @@ -263,9 +266,9 @@ namespace PepperDash.Core.SystemInfo OnBoolChange(false, 0, SystemInfoConstants.BusyBoolChange); } - /// - /// Gets the processor uptime and passes it to S+ - /// + /// + /// RefreshProcessorUptime method + /// public void RefreshProcessorUptime() { try @@ -287,6 +290,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 +314,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..154dc01e 100644 --- a/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs +++ b/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs @@ -2,9 +2,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..11ec4e2f 100644 --- a/src/PepperDash.Core/Web/WebApiServer.cs +++ b/src/PepperDash.Core/Web/WebApiServer.cs @@ -25,24 +25,24 @@ namespace PepperDash.Core.Web private readonly CCriticalSection _serverLock = new CCriticalSection(); private HttpCwsServer _server; - /// - /// 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; } /// @@ -137,9 +137,9 @@ namespace PepperDash.Core.Web Start(); } - /// - /// Initializes CWS class - /// + /// + /// Initialize method + /// public void Initialize(string key, string basePath) { Key = key; @@ -165,6 +165,9 @@ namespace PepperDash.Core.Web /// Removes a route from CWS /// /// + /// + /// RemoveRoute method + /// public void RemoveRoute(HttpCwsRoute route) { if (route == null) @@ -176,9 +179,9 @@ namespace PepperDash.Core.Web _server.Routes.Remove(route); } - /// - /// Returns a list of the current routes - /// + /// + /// GetRouteCollection method + /// public HttpCwsRouteCollection GetRouteCollection() { return _server.Routes; @@ -222,9 +225,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..88df890c 100644 --- a/src/PepperDash.Core/WebApi/Presets/Preset.cs +++ b/src/PepperDash.Core/WebApi/Presets/Preset.cs @@ -2,9 +2,9 @@ namespace PepperDash.Core.WebApi.Presets { - /// - /// Represents a preset - /// + /// + /// Represents a Preset + /// public class Preset { /// @@ -12,29 +12,29 @@ namespace PepperDash.Core.WebApi.Presets /// public int Id { get; set; } - /// - /// 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; } /// @@ -48,9 +48,9 @@ namespace PepperDash.Core.WebApi.Presets } } - /// - /// - /// + /// + /// Represents a PresetReceivedEventArgs + /// public class PresetReceivedEventArgs : EventArgs { /// @@ -59,12 +59,12 @@ namespace PepperDash.Core.WebApi.Presets public bool LookupSuccess { get; private set; } /// - /// 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..4044ae7b 100644 --- a/src/PepperDash.Core/WebApi/Presets/User.cs +++ b/src/PepperDash.Core/WebApi/Presets/User.cs @@ -16,19 +16,19 @@ namespace PepperDash.Core.WebApi.Presets /// public int Id { get; set; } - /// - /// - /// + /// + /// 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; } } @@ -44,13 +44,13 @@ namespace PepperDash.Core.WebApi.Presets public bool LookupSuccess { get; private set; } /// - /// 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; } /// @@ -70,9 +70,9 @@ namespace PepperDash.Core.WebApi.Presets } } - /// - /// - /// + /// + /// Represents a UserAndRoomMessage + /// public class UserAndRoomMessage { /// @@ -80,14 +80,14 @@ namespace PepperDash.Core.WebApi.Presets /// public int UserId { get; set; } - /// - /// - /// + /// + /// 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..f8c815fd 100644 --- a/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs +++ b/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs @@ -25,9 +25,9 @@ namespace PepperDash.Core.WebApi.Presets /// public event EventHandler PresetReceived; - /// - /// Unique identifier for this instance - /// + /// + /// Gets or sets the Key + /// public string Key { get; private set; } //string JsonMasterKey; @@ -77,6 +77,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 +118,9 @@ namespace PepperDash.Core.WebApi.Presets /// /// /// + /// + /// GetPresetForThisUser method + /// public void GetPresetForThisUser(int roomTypeId, int presetNumber) { if (CurrentUser == null) @@ -212,6 +218,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..68c61d90 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,10 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// ToString method + /// + /// public override string ToString() { return Index + " = 0x" + Value.ToString("X4"); @@ -80,6 +87,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..50fac7fc 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,10 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// ToString method + /// + /// public override string ToString() { return Index + " = " + (Value ? "High" : "Low"); @@ -77,6 +84,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..635d40e3 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,10 @@ 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..12eeaf91 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) @@ -125,7 +140,7 @@ namespace PepperDash.Core.Intersystem } /// - /// Disposes of the internal stream if specified to not leave open. + /// Dispose method /// public void Dispose() { diff --git a/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs b/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs index c1590704..1dc843a1 100644 --- a/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs +++ b/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs @@ -31,7 +31,7 @@ namespace PepperDash.Essentials.Core.Bridges } /// - /// Bridge API using EISC + /// Represents a EiscApiAdvanced /// public class EiscApiAdvanced : BridgeApi, ICommunicationMonitor { @@ -60,12 +60,19 @@ namespace PepperDash.Essentials.Core.Bridges AddPostActivationAction(RegisterEisc); } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { CommunicationMonitor.Start(); return base.CustomActivate(); } + /// + /// Deactivate method + /// public override bool Deactivate() { CommunicationMonitor.Stop(); @@ -123,6 +130,9 @@ namespace PepperDash.Essentials.Core.Bridges Debug.LogMessage(LogEventLevel.Debug, this, "EISC registration successful"); } + /// + /// LinkRooms method + /// public void LinkRooms() { Debug.LogMessage(LogEventLevel.Debug, this, "Linking Rooms..."); @@ -153,6 +163,9 @@ namespace PepperDash.Essentials.Core.Bridges /// /// /// + /// + /// AddJoinMap method + /// public void AddJoinMap(string deviceKey, JoinMapBaseAdvanced joinMap) { if (!JoinMaps.ContainsKey(deviceKey)) @@ -166,8 +179,9 @@ namespace PepperDash.Essentials.Core.Bridges } /// - /// Prints all the join maps on this bridge + /// PrintJoinMaps method /// + /// public virtual void PrintJoinMaps() { CrestronConsole.ConsoleCommandResponse("Join Maps for EISC IPID: {0}\r\n", Eisc.ID.ToString("X")); @@ -179,8 +193,9 @@ namespace PepperDash.Essentials.Core.Bridges } } /// - /// Generates markdown for all join maps on this bridge + /// MarkdownForBridge method /// + /// public virtual void MarkdownForBridge(string bridgeKey) { Debug.LogMessage(LogEventLevel.Information, this, "Writing Joinmaps to files for EISC IPID: {0}", Eisc.ID.ToString("X")); @@ -196,6 +211,9 @@ namespace PepperDash.Essentials.Core.Bridges /// Prints the join map for a device by key /// /// + /// + /// PrintJoinMapForDevice method + /// public void PrintJoinMapForDevice(string deviceKey) { var joinMap = JoinMaps[deviceKey]; @@ -213,6 +231,9 @@ namespace PepperDash.Essentials.Core.Bridges /// Prints the join map for a device by key /// /// + /// + /// MarkdownJoinMapForDevice method + /// public void MarkdownJoinMapForDevice(string deviceKey, string bridgeKey) { var joinMap = JoinMaps[deviceKey]; @@ -233,6 +254,9 @@ namespace PepperDash.Essentials.Core.Bridges /// /// /// + /// + /// ExecuteJoinAction method + /// public void ExecuteJoinAction(uint join, string type, object state) { try @@ -318,49 +342,91 @@ namespace PepperDash.Essentials.Core.Bridges #region Implementation of ICommunicationMonitor + /// + /// Gets or sets the CommunicationMonitor + /// public StatusMonitorBase CommunicationMonitor { get; private set; } #endregion } + /// + /// Represents a EiscApiPropertiesConfig + /// public class EiscApiPropertiesConfig { [JsonProperty("control")] + /// + /// Gets or sets the Control + /// public EssentialsControlPropertiesConfig Control { get; set; } [JsonProperty("devices")] + /// + /// Gets or sets the Devices + /// public List Devices { get; set; } [JsonProperty("rooms")] + /// + /// Gets or sets the Rooms + /// public List Rooms { get; set; } + /// + /// Represents a ApiDevicePropertiesConfig + /// public class ApiDevicePropertiesConfig { [JsonProperty("deviceKey")] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } [JsonProperty("joinStart")] + /// + /// Gets or sets the JoinStart + /// public uint JoinStart { get; set; } [JsonProperty("joinMapKey")] + /// + /// Gets or sets the JoinMapKey + /// public string JoinMapKey { get; set; } } + /// + /// Represents a ApiRoomPropertiesConfig + /// public class ApiRoomPropertiesConfig { [JsonProperty("roomKey")] + /// + /// Gets or sets the RoomKey + /// public string RoomKey { get; set; } [JsonProperty("joinStart")] + /// + /// Gets or sets the JoinStart + /// public uint JoinStart { get; set; } [JsonProperty("joinMapKey")] + /// + /// Gets or sets the JoinMapKey + /// public string JoinMapKey { get; set; } } } + /// + /// Represents a EiscApiAdvancedFactory + /// public class EiscApiAdvancedFactory : EssentialsDeviceFactory { public EiscApiAdvancedFactory() @@ -368,6 +434,10 @@ namespace PepperDash.Essentials.Core.Bridges TypeNames = new List { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new EiscApiAdvanced Device"); diff --git a/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs b/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs index 0254cd0d..599c06a6 100644 --- a/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs +++ b/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs @@ -34,6 +34,9 @@ namespace PepperDash.Essentials.Core.Bridges bridge.PrintJoinMaps(); } } + /// + /// JoinmapMarkdown method + /// public static void JoinmapMarkdown(string command) { var targets = command.Split(' '); diff --git a/src/PepperDash.Essentials.Core/Bridges/IBridge.cs b/src/PepperDash.Essentials.Core/Bridges/IBridge.cs index 0c6b44ed..6e921921 100644 --- a/src/PepperDash.Essentials.Core/Bridges/IBridge.cs +++ b/src/PepperDash.Essentials.Core/Bridges/IBridge.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.Core.Bridges { /// - /// Defines a device that uses JoinMapBaseAdvanced for its join map + /// Defines the contract for IBridgeAdvanced /// public interface IBridgeAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs index c46df18c..6975ce3c 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs @@ -2,6 +2,9 @@ using System; namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a AirMediaControllerJoinMap + /// public class AirMediaControllerJoinMap : JoinMapBaseAdvanced { [JoinName("IsOnline")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs index 7a9dfa74..0776f653 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a AppleTvJoinMap + /// public class AppleTvJoinMap : JoinMapBaseAdvanced { [JoinName("UpArrow")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs index dd141c8e..3d6d01b1 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a C2nRthsControllerJoinMap + /// public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced { [JoinName("IsOnline")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs index 5c07b4a7..70f182cb 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.Core.Bridges { /// - /// Join map for CameraBase devices + /// Represents a CameraControllerJoinMap /// public class CameraControllerJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs index e306bf85..8ad097e6 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a CenOdtOccupancySensorBaseJoinMap + /// public class CenOdtOccupancySensorBaseJoinMap : JoinMapBaseAdvanced { #region Digitals diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs index 8e51c952..d200c591 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DisplayControllerJoinMap + /// public class DisplayControllerJoinMap : JoinMapBaseAdvanced { [JoinName("Name")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs index 3a4c4255..99d59a7c 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs @@ -1,6 +1,9 @@ using System; namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DmBladeChassisControllerJoinMap + /// public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced { [JoinName("IsOnline")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs index 539e8d29..27770d81 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs @@ -2,6 +2,9 @@ using System; namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DmChassisControllerJoinMap + /// public class DmChassisControllerJoinMap : JoinMapBaseAdvanced { [JoinName("EnableAudioBreakaway")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs index bdcc3a69..6eae5037 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs @@ -2,6 +2,9 @@ using System; namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DmRmcControllerJoinMap + /// public class DmRmcControllerJoinMap : JoinMapBaseAdvanced { [JoinName("IsOnline")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs index c6f8f89f..6aec8c33 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DmTxControllerJoinMap + /// public class DmTxControllerJoinMap : JoinMapBaseAdvanced { [JoinName("IsOnline")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs index 11509acf..7ab0900d 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DmpsAudioOutputControllerJoinMap + /// public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs index 6922c569..91f642bb 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DmpsMicrophoneControllerJoinMap + /// public class DmpsMicrophoneControllerJoinMap : JoinMapBaseAdvanced { [JoinName("MicGain")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs index a0d8d7b8..71ce39a6 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a DmpsRoutingControllerJoinMap + /// public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced { [JoinName("EnableRouting")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs index 2a3015f1..e98fdaf3 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs @@ -3,6 +3,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a GenericLightingJoinMap + /// public class GenericLightingJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs index 68897767..65e49843 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a GenericRelayControllerJoinMap + /// public class GenericRelayControllerJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs index ded7343f..ca223921 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a GlsOccupancySensorBaseJoinMap + /// public class GlsOccupancySensorBaseJoinMap : JoinMapBaseAdvanced { [JoinName("IsOnline")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs index cb0f07b2..466d0fed 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs @@ -3,6 +3,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.Bridges.JoinMaps { + /// + /// Represents a GlsPartitionSensorJoinMap + /// public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs index e69946ea..cbc5d9ae 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a HdMdNxM4kEControllerJoinMap + /// public class HdMdNxM4kEControllerJoinMap : JoinMapBaseAdvanced { [JoinName("Name")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs index 0936f75d..ea1a9784 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a HdMdxxxCEControllerJoinMap + /// public class HdMdxxxCEControllerJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs index 04d75d41..c4cd5dcb 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs @@ -3,6 +3,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a HdPsXxxControllerJoinMap + /// public class HdPsXxxControllerJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs index 23305b20..c93da2f7 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a Hrxxx0WirelessRemoteControllerJoinMap + /// public class Hrxxx0WirelessRemoteControllerJoinMap : JoinMapBaseAdvanced { [JoinName("Power")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs index eaf70f3a..dc4c29f1 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a IAnalogInputJoinMap + /// public class IAnalogInputJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs index 0d077284..303f9b1b 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a IBasicCommunicationJoinMap + /// public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced { [JoinName("TextReceived")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs index aa31ac76..77405182 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a IDigitalInputJoinMap + /// public class IDigitalInputJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs index cbe62398..92d78772 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a IDigitalOutputJoinMap + /// public class IDigitalOutputJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs index 0c2e9ed9..e50d9b8f 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a PduJoinMapBase + /// public class PduJoinMapBase : JoinMapBaseAdvanced { [JoinName("Name")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs index ec0ff8d2..a5e2ea6f 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs @@ -3,6 +3,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a SetTopBoxControllerJoinMap + /// public class SetTopBoxControllerJoinMap : JoinMapBaseAdvanced { [JoinName("PowerOn")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs index ba441ef0..60b7e5d8 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a StatusSignControllerJoinMap + /// public class StatusSignControllerJoinMap : JoinMapBaseAdvanced { [JoinName("IsOnline")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs index 9adabfce..b594a685 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Bridges { + /// + /// Represents a SystemMonitorJoinMap + /// public class SystemMonitorJoinMap : JoinMapBaseAdvanced { [JoinName("TimeZone")] diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs index 755a586e..463ba4d3 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs @@ -2,6 +2,9 @@ using System; using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.Bridges.JoinMaps { + /// + /// Represents a VideoCodecControllerJoinMap + /// public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced { #region Digital diff --git a/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs b/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs index 544a682f..7dacce5c 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs @@ -12,13 +12,22 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Represents a CecPortController + /// public class CecPortController : Device, IBasicCommunicationWithStreamDebugging { + /// + /// Gets or sets the StreamDebugging + /// public CommunicationStreamDebugging StreamDebugging { get; private set; } public event EventHandler BytesReceived; public event EventHandler TextReceived; + /// + /// Gets or sets the IsConnected + /// public bool IsConnected { get { return true; } } ICec Port; @@ -74,6 +83,9 @@ namespace PepperDash.Essentials.Core #region IBasicCommunication Members + /// + /// SendText method + /// public void SendText(string text) { if (Port == null) @@ -83,6 +95,9 @@ namespace PepperDash.Essentials.Core Port.StreamCec.Send.StringValue = text; } + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (Port == null) @@ -93,10 +108,16 @@ namespace PepperDash.Essentials.Core Port.StreamCec.Send.StringValue = text; } + /// + /// Connect method + /// public void Connect() { } + /// + /// Disconnect method + /// public void Disconnect() { } @@ -107,6 +128,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SimulateReceive method + /// public void SimulateReceive(string s) { // split out hex chars and build string diff --git a/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs b/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs index 41420b7c..cc57fa19 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs @@ -12,13 +12,22 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Represents a ComPortController + /// public class ComPortController : Device, IBasicCommunicationWithStreamDebugging { + /// + /// Gets or sets the StreamDebugging + /// public CommunicationStreamDebugging StreamDebugging { get; private set; } public event EventHandler BytesReceived; public event EventHandler TextReceived; + /// + /// Gets or sets the IsConnected + /// public bool IsConnected { get { return true; } } ComPort Port; @@ -116,6 +125,10 @@ namespace PepperDash.Essentials.Core if(!eventSubscribed) Debug.LogMessage(LogEventLevel.Warning, this, "Received data but no handler is registered"); } + /// + /// Deactivate method + /// + /// public override bool Deactivate() { return Port.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success; @@ -123,6 +136,9 @@ namespace PepperDash.Essentials.Core #region IBasicCommunication Members + /// + /// SendText method + /// public void SendText(string text) { if (Port == null) @@ -133,6 +149,9 @@ namespace PepperDash.Essentials.Core Port.Send(text); } + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (Port == null) @@ -144,10 +163,16 @@ namespace PepperDash.Essentials.Core Port.Send(text); } + /// + /// Connect method + /// public void Connect() { } + /// + /// Disconnect method + /// public void Disconnect() { } @@ -158,6 +183,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SimulateReceive method + /// public void SimulateReceive(string s) { // split out hex chars and build string diff --git a/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs b/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs index bfdccb65..e2d13f5f 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs @@ -34,8 +34,9 @@ namespace PepperDash.Essentials.Core } /// - /// + /// CanConvert method /// + /// public override bool CanConvert(Type objectType) { return objectType == typeof(ComPort.ComPortSpec?); @@ -44,10 +45,15 @@ namespace PepperDash.Essentials.Core public override bool CanRead { get { return true; } } /// - /// This converter will not be used for writing + /// Gets or sets the CanWrite /// + /// public override bool CanWrite { get { return false; } } + /// + /// WriteJson method + /// + /// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { throw new NotImplementedException(); @@ -55,12 +61,11 @@ namespace PepperDash.Essentials.Core } /// - /// The gist of this converter: The comspec JSON comes in with normal values that need to be converted - /// into enum names. This converter takes the value and applies the appropriate enum's name prefix to the value - /// and then returns the enum value using Enum.Parse. NOTE: Does not write + /// Represents a ComSpecPropsJsonConverter /// public class ComSpecPropsJsonConverter : JsonConverter { + /// public override bool CanConvert(Type objectType) { return objectType == typeof(ComPort.eComBaudRates) @@ -72,8 +77,15 @@ namespace PepperDash.Essentials.Core || objectType == typeof(ComPort.eComStopBits); } + /// + /// Gets or sets the CanRead + /// + /// public override bool CanRead { get { return true; } } + /// + /// ReadJson method + /// public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { //Debug.LogMessage(LogEventLevel.Verbose, "ReadJson type: " + objectType.Name); @@ -94,6 +106,10 @@ namespace PepperDash.Essentials.Core return null; } + /// + /// WriteJson method + /// + /// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { throw new NotImplementedException(); diff --git a/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs b/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs index 8fa4076a..2cd81a77 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs @@ -38,6 +38,9 @@ namespace PepperDash.Essentials.Core /// Returns a comm method of either com port, TCP, SSH, and puts this into the DeviceManager /// /// The Device config object + /// + /// CreateCommForDevice method + /// public static IBasicCommunication CreateCommForDevice(DeviceConfig deviceConfig) { EssentialsControlPropertiesConfig controlConfig = GetControlPropertiesConfig(deviceConfig); @@ -110,6 +113,9 @@ namespace PepperDash.Essentials.Core return comm; } + /// + /// GetComPort method + /// public static ComPort GetComPort(EssentialsControlPropertiesConfig config) { var comPar = config.ComParams; @@ -125,6 +131,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetCecPort method + /// public static ICec GetCecPort(ControlPropertiesConfig config) { try @@ -182,6 +191,9 @@ namespace PepperDash.Essentials.Core /// return the ControlSystem object from the Global class. /// /// IComPorts device or null if the device is not found or does not implement IComPorts + /// + /// GetIComPortsDeviceFromManagedDevice method + /// public static IComPorts GetIComPortsDeviceFromManagedDevice(string ComPortDevKey) { if ((ComPortDevKey.Equals("controlSystem", System.StringComparison.OrdinalIgnoreCase) @@ -199,7 +211,7 @@ namespace PepperDash.Essentials.Core } /// - /// + /// Represents a EssentialsControlPropertiesConfig /// public class EssentialsControlPropertiesConfig : ControlPropertiesConfig @@ -232,6 +244,9 @@ namespace PepperDash.Essentials.Core } [JsonProperty("infinetId", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the InfinetId + /// public string InfinetId { get; set; } /// @@ -254,10 +269,22 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a IrControlSpec + /// public class IrControlSpec { + /// + /// Gets or sets the PortDeviceKey + /// public string PortDeviceKey { get; set; } + /// + /// Gets or sets the PortNumber + /// public uint PortNumber { get; set; } + /// + /// Gets or sets the File + /// public string File { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs b/src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs index fd7184aa..5bc4c8fb 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs @@ -11,20 +11,32 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Represents a ConsoleCommMockDevice + /// public class ConsoleCommMockDevice : EssentialsDevice, ICommunicationMonitor { + /// + /// Gets or sets the Communication + /// public IBasicCommunication Communication { get; private set; } + /// + /// Gets or sets the PortGather + /// public CommunicationGather PortGather { get; private set; } + /// + /// Gets or sets the CommunicationMonitor + /// public StatusMonitorBase CommunicationMonitor { get; private set; } - /// - /// Defaults to \x0a - /// + /// + /// Gets or sets the LineEnding + /// public string LineEnding { get; set; } - /// - /// Set to true to show responses in full hex - /// + /// + /// Gets or sets the ShowHexResponse + /// public bool ShowHexResponse { get; set; } public ConsoleCommMockDevice(string key, string name, ConsoleCommMockDevicePropertiesConfig props, IBasicCommunication comm) @@ -37,6 +49,10 @@ namespace PepperDash.Essentials.Core LineEnding = props.LineEnding; } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { Communication.Connect(); @@ -56,9 +72,18 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a ConsoleCommMockDevicePropertiesConfig + /// public class ConsoleCommMockDevicePropertiesConfig { + /// + /// Gets or sets the LineEnding + /// public string LineEnding { get; set; } + /// + /// Gets or sets the CommunicationMonitorProperties + /// public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } public ConsoleCommMockDevicePropertiesConfig() @@ -67,6 +92,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a ConsoleCommMockDeviceFactory + /// public class ConsoleCommMockDeviceFactory : EssentialsDeviceFactory { public ConsoleCommMockDeviceFactory() @@ -74,6 +102,10 @@ namespace PepperDash.Essentials.Core TypeNames = new List() { "commmock" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Comm Mock Device"); diff --git a/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs b/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs index ddd7ec5d..a9c4df08 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs @@ -44,12 +44,18 @@ namespace PepperDash.Essentials.Core } + /// + /// BuildDevice method + /// public static IKeyed BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device"); return new GenericComm(dc); } + /// + /// SetPortConfig method + /// public void SetPortConfig(string portConfig) { // TODO: Deserialize new EssentialsControlPropertiesConfig and handle as necessary @@ -71,6 +77,10 @@ namespace PepperDash.Essentials.Core ConfigWriter.UpdateDeviceConfig(config); } + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new IBasicCommunicationJoinMap(joinStart); @@ -129,6 +139,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a GenericCommFactory + /// public class GenericCommFactory : EssentialsDeviceFactory { public GenericCommFactory() @@ -136,6 +149,10 @@ namespace PepperDash.Essentials.Core TypeNames = new List() { "genericComm" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device"); diff --git a/src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs b/src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs index d88e9728..3a1ba4d4 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs @@ -5,6 +5,9 @@ using System; namespace PepperDash.Essentials.Core { [Obsolete("Please use the builtin HttpClient class instead: https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines")] + /// + /// Represents a GenericHttpClient + /// public class GenericHttpClient : Device, IBasicCommunication { private readonly HttpClient Client; @@ -25,6 +28,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SendText method + /// public void SendText(string path) { HttpClientRequest request = new HttpClientRequest(); @@ -40,6 +46,9 @@ namespace PepperDash.Essentials.Core HttpClient.DISPATCHASYNC_ERROR error = Client.DispatchAsyncEx(request, Response, request); } + /// + /// SendTextNoResponse method + /// public void SendTextNoResponse(string format, params object[] items) { HttpClientRequest request = new HttpClientRequest(); @@ -65,6 +74,9 @@ namespace PepperDash.Essentials.Core #region IBasicCommunication Members + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { throw new NotImplementedException(); @@ -78,11 +90,17 @@ namespace PepperDash.Essentials.Core public event EventHandler BytesReceived; + /// + /// Connect method + /// public void Connect() { throw new NotImplementedException(); } + /// + /// Disconnect method + /// public void Disconnect() { throw new NotImplementedException(); @@ -97,10 +115,22 @@ namespace PepperDash.Essentials.Core #endregion } + /// + /// Represents a GenericHttpClientEventArgs + /// public class GenericHttpClientEventArgs : EventArgs { + /// + /// Gets or sets the ResponseText + /// public string ResponseText { get; private set; } + /// + /// Gets or sets the RequestPath + /// public string RequestPath { get; private set; } + /// + /// Gets or sets the Error + /// public HTTP_CALLBACK_ERROR Error { get; set; } public GenericHttpClientEventArgs(string response, string request, HTTP_CALLBACK_ERROR error) { diff --git a/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs b/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs index 498df9d2..0655e83b 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs @@ -83,6 +83,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// GetIrOutputPort method + /// public static IROutputPort GetIrOutputPort(DeviceConfig dc) { var irControllerKey = dc.Key + "-ir"; @@ -142,6 +145,9 @@ namespace PepperDash.Essentials.Core return port; } + /// + /// GetIrOutputPortController method + /// public static IrOutputPortController GetIrOutputPortController(DeviceConfig config) { Debug.LogMessage(LogEventLevel.Debug, "Attempting to create new Ir Port Controller"); @@ -159,8 +165,8 @@ namespace PepperDash.Essentials.Core /* /// - /// Returns a ready-to-go IrOutputPortController from a DeviceConfig object. - /// + /// GetIrOutputPortController method + /// public static IrOutputPortController GetIrOutputPortController(DeviceConfig devConf) { var irControllerKey = devConf.Key + "-ir"; @@ -222,12 +228,15 @@ namespace PepperDash.Essentials.Core }*/ } - /// - /// Wrapper to help in IR port creation - /// + /// + /// Represents a IrOutPortConfig + /// public class IrOutPortConfig { [JsonProperty("port")] + /// + /// Gets or sets the Port + /// public IROutputPort Port { get; set; } [JsonProperty("fileName")] diff --git a/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs b/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs index 3552c2b2..8b2aea54 100644 --- a/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs +++ b/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs @@ -8,6 +8,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.Config { + /// + /// Represents a AudioControlPointListItem + /// public class AudioControlPointListItem { [JsonProperty("levelControls")] diff --git a/src/PepperDash.Essentials.Core/Config/BasicConfig.cs b/src/PepperDash.Essentials.Core/Config/BasicConfig.cs index 0e3e1e35..c4cbc63a 100644 --- a/src/PepperDash.Essentials.Core/Config/BasicConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/BasicConfig.cs @@ -33,6 +33,9 @@ namespace PepperDash.Essentials.Core.Config public Dictionary> CameraLists { get; set; } [JsonProperty("tieLines")] + /// + /// Gets or sets the TieLines + /// public List TieLines { get; set; } [JsonProperty("joinMaps")] @@ -81,6 +84,9 @@ namespace PepperDash.Essentials.Core.Config /// /// key of the list to retrieve /// AudioControlPointList if the key exists, null otherwise + /// + /// GetAudioControlPointListForKey method + /// public AudioControlPointListItem GetAudioControlPointListForKey(string key) { if (AudioControlPointLists == null || string.IsNullOrEmpty(key) || !AudioControlPointLists.ContainsKey(key)) @@ -105,6 +111,9 @@ namespace PepperDash.Essentials.Core.Config /// /// Key of desired device /// + /// + /// GetDeviceForKey method + /// public DeviceConfig GetDeviceForKey(string key) { if (string.IsNullOrEmpty(key)) diff --git a/src/PepperDash.Essentials.Core/Config/ConfigPropertiesHelpers.cs b/src/PepperDash.Essentials.Core/Config/ConfigPropertiesHelpers.cs index 0950d62e..99633266 100644 --- a/src/PepperDash.Essentials.Core/Config/ConfigPropertiesHelpers.cs +++ b/src/PepperDash.Essentials.Core/Config/ConfigPropertiesHelpers.cs @@ -11,10 +11,13 @@ using Newtonsoft.Json.Linq; namespace PepperDash.Essentials.Core.Config { + /// + /// Represents a ConfigPropertiesHelpers + /// public class ConfigPropertiesHelpers { /// - /// Returns the value of properties.hasAudio, or false if not defined + /// GetHasAudio method /// public static bool GetHasAudio(DeviceConfig deviceConfig) { diff --git a/src/PepperDash.Essentials.Core/Config/DeviceConfig.cs b/src/PepperDash.Essentials.Core/Config/DeviceConfig.cs index 3eac80d9..651f17aa 100644 --- a/src/PepperDash.Essentials.Core/Config/DeviceConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/DeviceConfig.cs @@ -13,25 +13,46 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.Config { + /// + /// Represents a DeviceConfig + /// public class DeviceConfig { [JsonProperty("key")] + /// + /// Gets or sets the Key + /// public string Key { get; set; } [JsonProperty("uid")] + /// + /// Gets or sets the Uid + /// public int Uid { get; set; } [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty("group")] + /// + /// Gets or sets the Group + /// public string Group { get; set; } [JsonProperty("type")] + /// + /// Gets or sets the Type + /// public string Type { get; set; } [JsonProperty("properties")] [JsonConverter(typeof(DevicePropertiesConverter))] + /// + /// Gets or sets the Properties + /// public JToken Properties { get; set; } public DeviceConfig(DeviceConfig dc) @@ -51,11 +72,14 @@ namespace PepperDash.Essentials.Core.Config } /// - /// + /// Represents a DevicePropertiesConverter /// public class DevicePropertiesConverter : JsonConverter { + /// + /// CanConvert method + /// public override bool CanConvert(Type objectType) { return objectType == typeof(JToken); @@ -66,6 +90,7 @@ namespace PepperDash.Essentials.Core.Config return JToken.ReadFrom(reader); } + /// public override bool CanWrite { get @@ -74,6 +99,10 @@ namespace PepperDash.Essentials.Core.Config } } + /// + /// WriteJson method + /// + /// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { throw new NotImplementedException("SOD OFF HOSER"); diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs index 8549ecd8..b93de1c4 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs @@ -26,6 +26,9 @@ namespace PepperDash.Essentials.Core.Config public static EssentialsConfig ConfigObject { get; private set; } + /// + /// LoadConfig2 method + /// public static bool LoadConfig2() { Debug.LogMessage(LogEventLevel.Information, "Loading unmerged system/template portal configuration file."); @@ -157,6 +160,9 @@ namespace PepperDash.Essentials.Core.Config /// /// /// + /// + /// GetConfigFiles method + /// public static FileInfo[] GetConfigFiles(string filePath) { // Get the directory @@ -189,6 +195,9 @@ namespace PepperDash.Essentials.Core.Config /// /// /// + /// + /// GetGroupForDeviceKey method + /// public static string GetGroupForDeviceKey(string key) { var dev = ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs index 141ffc25..d7322cc4 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs @@ -20,6 +20,9 @@ namespace PepperDash.Essentials.Core.Config { public static event EventHandler ConfigStatusChanged; + /// + /// GetConfigFromServer method + /// public static void GetConfigFromServer(string url) { Debug.LogMessage(LogEventLevel.Information, "Attempting to get new config from '{0}'", url); @@ -202,6 +205,9 @@ namespace PepperDash.Essentials.Core.Config } + /// + /// Enumeration of eUpdateStatus values + /// public enum eUpdateStatus { UpdateStarted, @@ -214,8 +220,14 @@ namespace PepperDash.Essentials.Core.Config UpdateFailed } + /// + /// Represents a ConfigStatusEventArgs + /// public class ConfigStatusEventArgs : EventArgs { + /// + /// Gets or sets the UpdateStatus + /// public eUpdateStatus UpdateStatus { get; private set; } public ConfigStatusEventArgs(eUpdateStatus status) diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs index 58ced97e..665da856 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs @@ -31,6 +31,9 @@ namespace PepperDash.Essentials.Core.Config /// /// /// + /// + /// UpdateDeviceProperties method + /// public static bool UpdateDeviceProperties(string deviceKey, JToken properties) { bool success = false; @@ -53,6 +56,9 @@ namespace PepperDash.Essentials.Core.Config return success; } + /// + /// UpdateDeviceConfig method + /// public static bool UpdateDeviceConfig(DeviceConfig config) { bool success = false; @@ -73,6 +79,9 @@ namespace PepperDash.Essentials.Core.Config return success; } + /// + /// UpdateRoomConfig method + /// public static bool UpdateRoomConfig(DeviceConfig config) { bool success = false; @@ -124,6 +133,9 @@ namespace PepperDash.Essentials.Core.Config /// /// /// + /// + /// WriteFile method + /// public static void WriteFile(string filePath, string configData) { if (WriteTimer != null) diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs b/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs index b42ec94c..630ffbdf 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs @@ -68,6 +68,9 @@ namespace PepperDash.Essentials.Core.Config } [JsonProperty("rooms")] + /// + /// Gets or sets the Rooms + /// public List Rooms { get; set; } @@ -78,11 +81,14 @@ namespace PepperDash.Essentials.Core.Config } } - /// - /// - /// + /// + /// Represents a SystemTemplateConfigs + /// public class SystemTemplateConfigs { + /// + /// Gets or sets the System + /// public EssentialsConfig System { get; set; } public EssentialsConfig Template { get; set; } diff --git a/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs b/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs index 00bbf5f6..9780bd44 100644 --- a/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for ILoadConfig + /// public interface ILoadConfig { void GoWithLoad(); diff --git a/src/PepperDash.Essentials.Core/Config/InfoConfig.cs b/src/PepperDash.Essentials.Core/Config/InfoConfig.cs index 12ca49f4..8c506f17 100644 --- a/src/PepperDash.Essentials.Core/Config/InfoConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/InfoConfig.cs @@ -22,18 +22,33 @@ namespace PepperDash.Essentials.Core.Config public string Type { get; set; } [JsonProperty("version")] + /// + /// Gets or sets the Version + /// public string Version { get; set; } [JsonProperty("runtimeInfo")] + /// + /// Gets or sets the RuntimeInfo + /// public RuntimeInfo RuntimeInfo { get; set; } [JsonProperty("comment")] + /// + /// Gets or sets the Comment + /// public string Comment { get; set; } [JsonProperty("hostname")] + /// + /// Gets or sets the HostName + /// public string HostName { get; set; } [JsonProperty("appNumber")] + /// + /// Gets or sets the AppNumber + /// public uint AppNumber { get; set; } public InfoConfig() @@ -52,7 +67,7 @@ namespace PepperDash.Essentials.Core.Config /// - /// Represents runtime information about the program/processor + /// Represents a RuntimeInfo /// public class RuntimeInfo { diff --git a/src/PepperDash.Essentials.Core/Config/SourceDevicePropertiesConfigBase.cs b/src/PepperDash.Essentials.Core/Config/SourceDevicePropertiesConfigBase.cs index e6d13339..42a576a2 100644 --- a/src/PepperDash.Essentials.Core/Config/SourceDevicePropertiesConfigBase.cs +++ b/src/PepperDash.Essentials.Core/Config/SourceDevicePropertiesConfigBase.cs @@ -6,8 +6,14 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core.Config { + /// + /// Represents a SourceDevicePropertiesConfigBase + /// public class SourceDevicePropertiesConfigBase { + /// + /// Gets or sets the DisableSharing + /// public bool DisableSharing { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs index ce543885..28f840ee 100644 --- a/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs @@ -14,18 +14,26 @@ namespace PepperDash.Essentials.Core protected GenericBase Hardware; /// - /// Returns a list containing the Outputs that we want to expose. + /// Gets or sets the Feedbacks /// public FeedbackCollection Feedbacks { get; private set; } + /// + /// Gets or sets the IsOnline + /// public BoolFeedback IsOnline { get; private set; } + /// + /// Gets or sets the IsRegistered + /// public BoolFeedback IsRegistered { get; private set; } + /// + /// Gets or sets the IpConnectionsText + /// public StringFeedback IpConnectionsText { get; private set; } - /// - /// Used by implementing classes to prevent registration with Crestron TLDM. For - /// devices like RMCs and TXs attached to a chassis. - /// + /// + /// Gets or sets the PreventRegistration + /// public bool PreventRegistration { get; protected set; } protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware) @@ -60,10 +68,10 @@ namespace PepperDash.Essentials.Core CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000); } - /// - /// Make sure that overriding classes call this! - /// Registers the Crestron device, connects up to the base events, starts communication monitor - /// + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { Debug.LogMessage(LogEventLevel.Information, this, "Activating"); @@ -111,6 +119,10 @@ namespace PepperDash.Essentials.Core /// This disconnects events and unregisters the base hardware device. /// /// + /// + /// Deactivate method + /// + /// public override bool Deactivate() { CommunicationMonitor.Stop(); @@ -127,6 +139,9 @@ namespace PepperDash.Essentials.Core /// Adds feedback(s) to the list /// /// + /// + /// AddToFeedbackList method + /// public void AddToFeedbackList(params Feedback[] newFbs) { foreach (var f in newFbs) @@ -158,11 +173,17 @@ namespace PepperDash.Essentials.Core #region IStatusMonitor Members + /// + /// Gets or sets the CommunicationMonitor + /// public StatusMonitorBase CommunicationMonitor { get; private set; } #endregion #region IUsageTracking Members + /// + /// Gets or sets the UsageTracker + /// public UsageTracking UsageTracker { get; set; } #endregion @@ -185,6 +206,9 @@ namespace PepperDash.Essentials.Core //*********************************************************************************** + /// + /// Represents a CrestronGenericBaseDeviceEventIds + /// public class CrestronGenericBaseDeviceEventIds { public const uint IsOnline = 1; @@ -196,6 +220,9 @@ namespace PepperDash.Essentials.Core /// public static class GenericBaseExtensions { + /// + /// RegisterWithLogging method + /// public static eDeviceRegistrationUnRegistrationResponse RegisterWithLogging(this GenericBase device, string key) { var result = device.Register(); diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs index a5923011..8463ae96 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs @@ -17,10 +17,19 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.CrestronIO { [Description("Wrapper class for Digital Input")] + /// + /// Represents a GenericDigitalInputDevice + /// public class GenericDigitalInputDevice : EssentialsBridgeableDevice, IDigitalInput { + /// + /// Gets or sets the InputPort + /// public DigitalInput InputPort { get; private set; } + /// + /// Gets or sets the InputStateFeedback + /// public BoolFeedback InputStateFeedback { get; private set; } Func InputStateFeedbackFunc @@ -103,6 +112,10 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Bridge Linking + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new IDigitalInputJoinMap(joinStart); @@ -139,6 +152,9 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Factory + /// + /// Represents a GenericDigitalInputDeviceFactory + /// public class GenericDigitalInputDeviceFactory : EssentialsDeviceFactory { public GenericDigitalInputDeviceFactory() @@ -146,6 +162,10 @@ namespace PepperDash.Essentials.Core.CrestronIO TypeNames = new List() { "digitalinput" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Digital Input Device"); diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs index 2bc2c50b..63221fe7 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs @@ -115,16 +115,25 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Methods + /// + /// OpenRelay method + /// public void OpenRelay() { RelayOutput.State = false; } + /// + /// CloseRelay method + /// public void CloseRelay() { RelayOutput.State = true; } + /// + /// ToggleRelayState method + /// public void ToggleRelayState() { if (RelayOutput.State == true) @@ -151,6 +160,10 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Bridge Linking + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new GenericRelayControllerJoinMap(joinStart); @@ -194,6 +207,9 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Factory + /// + /// Represents a GenericRelayDeviceFactory + /// public class GenericRelayDeviceFactory : EssentialsDeviceFactory { public GenericRelayDeviceFactory() @@ -201,6 +217,10 @@ namespace PepperDash.Essentials.Core.CrestronIO TypeNames = new List() { "relayoutput" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Relay Device"); diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs index af83b3d6..c87a688c 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs @@ -70,6 +70,9 @@ namespace PepperDash.Essentials.Core.CrestronIO /// Set minimum voltage change for device to update voltage changed method /// /// valid values range from 0 - 65535, representing the full 100% range of the processor voltage source. Check processor documentation for details + /// + /// SetMinimumChange method + /// public void SetMinimumChange(ushort value) { InputPort.AnalogMinChange = value; @@ -88,6 +91,10 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Bridge Linking + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new IAnalogInputJoinMap(joinStart); @@ -139,6 +146,9 @@ namespace PepperDash.Essentials.Core.CrestronIO #endregion + /// + /// GetVersiportDigitalInput method + /// public static Versiport GetVersiportDigitalInput(IOPortConfig dc) { @@ -188,6 +198,9 @@ namespace PepperDash.Essentials.Core.CrestronIO } + /// + /// Represents a GenericVersiportAbalogInputDeviceFactory + /// public class GenericVersiportAbalogInputDeviceFactory : EssentialsDeviceFactory { public GenericVersiportAbalogInputDeviceFactory() @@ -195,6 +208,10 @@ namespace PepperDash.Essentials.Core.CrestronIO TypeNames = new List() { "versiportanaloginput" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device"); diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs index c9133a60..f94137c3 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs @@ -35,6 +35,9 @@ namespace PepperDash.Essentials.Core.CrestronIO } } + /// + /// Gets or sets the PartitionPresentFeedback + /// public BoolFeedback PartitionPresentFeedback { get; } public bool PartitionPresent => !InputStateFeedbackFunc(); @@ -80,6 +83,10 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Bridge Linking + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new IDigitalInputJoinMap(joinStart); @@ -115,6 +122,9 @@ namespace PepperDash.Essentials.Core.CrestronIO #endregion + /// + /// GetVersiportDigitalInput method + /// public static Versiport GetVersiportDigitalInput(IOPortConfig dc) { @@ -157,6 +167,9 @@ namespace PepperDash.Essentials.Core.CrestronIO } + /// + /// Represents a GenericVersiportDigitalInputDeviceFactory + /// public class GenericVersiportDigitalInputDeviceFactory : EssentialsDeviceFactory { public GenericVersiportDigitalInputDeviceFactory() @@ -164,6 +177,10 @@ namespace PepperDash.Essentials.Core.CrestronIO TypeNames = new List() { "versiportinput" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device"); diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs index 030dc613..7a823c9a 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs @@ -74,6 +74,9 @@ namespace PepperDash.Essentials.Core.CrestronIO /// Set value of the versiport digital output /// /// value to set the output to + /// + /// SetOutput method + /// public void SetOutput(bool state) { if (OutputPort.SupportsDigitalOutput) @@ -92,6 +95,10 @@ namespace PepperDash.Essentials.Core.CrestronIO #region Bridge Linking + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new IDigitalOutputJoinMap(joinStart); @@ -128,6 +135,9 @@ namespace PepperDash.Essentials.Core.CrestronIO #endregion + /// + /// GetVersiportDigitalOutput method + /// public static Versiport GetVersiportDigitalOutput(IOPortConfig dc) { @@ -169,6 +179,9 @@ namespace PepperDash.Essentials.Core.CrestronIO } + /// + /// Represents a GenericVersiportDigitalOutputDeviceFactory + /// public class GenericVersiportDigitalOutputDeviceFactory : EssentialsDeviceFactory { public GenericVersiportDigitalOutputDeviceFactory() @@ -176,6 +189,10 @@ namespace PepperDash.Essentials.Core.CrestronIO TypeNames = new List() { "versiportoutput" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device"); diff --git a/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs b/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs index 44af9954..c647834e 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs @@ -7,6 +7,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.CrestronIO { + /// + /// Defines the contract for IAnalogInput + /// public interface IAnalogInput { IntFeedback InputValueFeedback { get; } diff --git a/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs b/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs index a13aca1a..4f70f914 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs @@ -8,6 +8,9 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IHasCresnetBranches + /// public interface IHasCresnetBranches { CrestronCollection CresnetBranches { get; } diff --git a/src/PepperDash.Essentials.Core/CrestronIO/IOPortConfig.cs b/src/PepperDash.Essentials.Core/CrestronIO/IOPortConfig.cs index ab269f08..52db6300 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/IOPortConfig.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/IOPortConfig.cs @@ -9,15 +9,30 @@ using Newtonsoft.Json; namespace PepperDash.Essentials.Core.CrestronIO { + /// + /// Represents a IOPortConfig + /// public class IOPortConfig { [JsonProperty("portDeviceKey")] + /// + /// Gets or sets the PortDeviceKey + /// public string PortDeviceKey { get; set; } [JsonProperty("portNumber")] + /// + /// Gets or sets the PortNumber + /// public uint PortNumber { get; set; } [JsonProperty("disablePullUpResistor")] + /// + /// Gets or sets the DisablePullUpResistor + /// public bool DisablePullUpResistor { get; set; } [JsonProperty("minimumChange")] + /// + /// Gets or sets the MinimumChange + /// public int MinimumChange { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Device Info/DeviceInfo.cs b/src/PepperDash.Essentials.Core/Device Info/DeviceInfo.cs index 9b03ec11..6e55c9b3 100644 --- a/src/PepperDash.Essentials.Core/Device Info/DeviceInfo.cs +++ b/src/PepperDash.Essentials.Core/Device Info/DeviceInfo.cs @@ -1,11 +1,29 @@ namespace PepperDash.Essentials.Core.DeviceInfo { + /// + /// Represents a DeviceInfo + /// public class DeviceInfo { + /// + /// Gets or sets the HostName + /// public string HostName { get; set; } + /// + /// Gets or sets the IpAddress + /// public string IpAddress { get; set; } + /// + /// Gets or sets the MacAddress + /// public string MacAddress { get; set; } + /// + /// Gets or sets the SerialNumber + /// public string SerialNumber { get; set; } + /// + /// Gets or sets the FirmwareVersion + /// public string FirmwareVersion { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Device Info/DeviceInfoEventArgs.cs b/src/PepperDash.Essentials.Core/Device Info/DeviceInfoEventArgs.cs index 6727bce6..22cd3b0d 100644 --- a/src/PepperDash.Essentials.Core/Device Info/DeviceInfoEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Device Info/DeviceInfoEventArgs.cs @@ -2,8 +2,14 @@ namespace PepperDash.Essentials.Core.DeviceInfo { + /// + /// Represents a DeviceInfoEventArgs + /// public class DeviceInfoEventArgs:EventArgs { + /// + /// Gets or sets the DeviceInfo + /// public DeviceInfo DeviceInfo { get; set; } public DeviceInfoEventArgs() diff --git a/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs b/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs index ea9c16e6..4ac9e6c3 100644 --- a/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs +++ b/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs @@ -3,6 +3,9 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core.DeviceInfo { + /// + /// Defines the contract for IDeviceInfoProvider + /// public interface IDeviceInfoProvider:IKeyed { DeviceInfo DeviceInfo { get; } @@ -12,5 +15,8 @@ namespace PepperDash.Essentials.Core.DeviceInfo void UpdateDeviceInfo(); } + /// + /// Delegate for DeviceInfoChangeHandler + /// public delegate void DeviceInfoChangeHandler(IKeyed device, DeviceInfoEventArgs args); } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs b/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs index a1cc1e2f..32c987b3 100644 --- a/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs +++ b/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs @@ -27,12 +27,12 @@ namespace PepperDash.Essentials.Core.DeviceInfo private static readonly CCriticalSection Lock = new CCriticalSection(); /// - /// Last resolved ARP table - it is recommended to refresh the arp before using this. + /// Gets or sets the ArpTable /// public static List ArpTable { get; private set; } /// - /// Force recheck of ARP table + /// RefreshArp method /// public static void RefreshArp() { @@ -98,6 +98,9 @@ namespace PepperDash.Essentials.Core.DeviceInfo /// /// Ip Address to Santitize /// Sanitized Ip Address + /// + /// SanitizeIpAddress method + /// public static string SanitizeIpAddress(string ipAddressIn) { try @@ -117,6 +120,9 @@ namespace PepperDash.Essentials.Core.DeviceInfo /// /// IP Address to resolve from /// Resolved Hostname - on failure to determine hostname, will return IP Address + /// + /// ResolveHostnameFromIp method + /// public static string ResolveHostnameFromIp(string ipAddress) { try @@ -137,6 +143,9 @@ namespace PepperDash.Essentials.Core.DeviceInfo /// /// Hostname to resolve from /// Resolved IP Address - on a failure to determine IP Address, will return hostname + /// + /// ResolveIpFromHostname method + /// public static string ResolveIpFromHostname(string hostName) { try @@ -154,7 +163,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo } /// - /// Object to hold data about an arp entry + /// Represents a ArpEntry /// public class ArpEntry { @@ -182,7 +191,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo } /// - /// Arguments passed by the ArpTableUpdated event + /// Represents a ArpTableEventArgs /// public class ArpTableEventArgs : EventArgs { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs index 5a38c703..09e0ac7a 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs @@ -24,6 +24,9 @@ namespace PepperDash.Essentials.Core /// public static class IChannelExtensions { + /// + /// LinkButtons method + /// public static void LinkButtons(this IChannel dev, BasicTriList triList) { triList.SetBoolSigAction(123, dev.ChannelUp); @@ -34,6 +37,9 @@ namespace PepperDash.Essentials.Core triList.SetBoolSigAction(134, dev.Exit); } + /// + /// UnlinkButtons method + /// public static void UnlinkButtons(this IChannel dev, BasicTriList triList) { triList.ClearBoolSigAction(123); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs index 232362e9..0df2a97d 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs @@ -22,6 +22,9 @@ namespace PepperDash.Essentials.Core /// public static class IColorExtensions { + /// + /// LinkButtons method + /// public static void LinkButtons(this IColor dev, BasicTriList TriList) { TriList.SetBoolSigAction(155, dev.Red); @@ -30,6 +33,9 @@ namespace PepperDash.Essentials.Core TriList.SetBoolSigAction(158, dev.Blue); } + /// + /// UnlinkButtons method + /// public static void UnlinkButtons(this IColor dev, BasicTriList triList) { triList.ClearBoolSigAction(155); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs index a69cfe3b..4a070382 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs @@ -25,6 +25,9 @@ namespace PepperDash.Essentials.Core /// public static class IDPadExtensions { + /// + /// LinkButtons method + /// public static void LinkButtons(this IDPad dev, BasicTriList triList) { triList.SetBoolSigAction(138, dev.Up); @@ -36,6 +39,9 @@ namespace PepperDash.Essentials.Core triList.SetBoolSigAction(134, dev.Exit); } + /// + /// UnlinkButtons method + /// public static void UnlinkButtons(this IDPad dev, BasicTriList triList) { triList.ClearBoolSigAction(138); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs index 024bac27..5deee690 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs @@ -6,6 +6,9 @@ using PepperDash.Essentials.Core.SmartObjects; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IDiscPlayerControls + /// public interface IDiscPlayerControls : IColor, IDPad, INumericKeypad, IHasPowerControl, ITransport, IUiDisplayInfo { } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs index 5624f77c..f191417c 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs @@ -6,6 +6,9 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core.Devices.DeviceTypeInterfaces { + /// + /// Defines the contract for IDisplayBasic + /// public interface IDisplayBasic { void InputHdmi1(); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs index 1d4829cd..2f419498 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs @@ -6,6 +6,9 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IDumbSource + /// public interface IDumbSource { } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs index 9e55702c..214fa78b 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs @@ -25,6 +25,9 @@ namespace PepperDash.Essentials.Core /// public static class IDvrExtensions { + /// + /// LinkButtons method + /// public static void LinkButtons(this IDvr dev, BasicTriList triList) { triList.SetBoolSigAction(136, dev.DvrList); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IEmergencyOSD.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IEmergencyOSD.cs index 7d158027..c24e3e7a 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IEmergencyOSD.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IEmergencyOSD.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IEmergencyOSD + /// public interface IEmergencyOSD { void ShowEmergencyMessage(string url); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasBranding.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasBranding.cs index 10db107f..299f1431 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasBranding.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasBranding.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IHasBranding + /// public interface IHasBranding { bool BrandingEnabled { get; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs index 21bde91f..114665db 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs @@ -1,5 +1,8 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IHasFarEndContentStatus + /// public interface IHasFarEndContentStatus { BoolFeedback ReceivingContent { get; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs index cd208d4b..80fdcbe4 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs @@ -3,6 +3,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IHasPhoneDialing + /// public interface IHasPhoneDialing { BoolFeedback PhoneOffHookFeedback { get; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasWebView.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasWebView.cs index 84177a89..3d95504c 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasWebView.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasWebView.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IHasWebView + /// public interface IHasWebView { bool WebviewIsVisible { get; } @@ -14,8 +17,14 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces event EventHandler WebViewStatusChanged; } + /// + /// Represents a WebViewStatusChangedEventArgs + /// public class WebViewStatusChangedEventArgs : EventArgs { + /// + /// Gets or sets the Status + /// public string Status { get; } public WebViewStatusChangedEventArgs(string status) diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs index 8e9a369b..748fb860 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IHumiditySensor + /// public interface IHumiditySensor { /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageDefinition.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageDefinition.cs index 181cac35..6a168f2d 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageDefinition.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageDefinition.cs @@ -3,6 +3,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for ILanguageDefinition + /// public interface ILanguageDefinition { string LocaleName { get; set; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageProvider.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageProvider.cs index 428f78c3..ea6afe3b 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageProvider.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILanguageProvider.cs @@ -3,6 +3,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for ILanguageProvider + /// public interface ILanguageProvider { ILanguageDefinition CurrentLanguage { get; set; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs index f4cb4b71..34c87419 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for ILevelControls + /// public interface ILevelControls { Dictionary LevelControlPoints { get; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs index edc2e627..09420b7e 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs @@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces }*/ /// - /// Describes a MobileSystemController that accepts IEssentialsRoom + /// Defines the contract for IMobileControl /// public interface IMobileControl : IKeyed { @@ -52,7 +52,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces } /// - /// Describes a mobile control messenger + /// Defines the contract for IMobileControlMessenger /// public interface IMobileControlMessenger : IKeyed { @@ -77,7 +77,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces } /// - /// Describes a MobileControl Room Bridge + /// Defines the contract for IMobileControlRoomMessenger /// public interface IMobileControlRoomMessenger : IKeyed { @@ -104,6 +104,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces void UpdateAppUrl(string url); } + /// + /// Defines the contract for IMobileControlAction + /// public interface IMobileControlAction { IMobileControlMessenger Messenger { get; } @@ -112,7 +115,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces } /// - /// Describes a MobileControl Touchpanel Controller + /// Defines the contract for IMobileControlTouchpanelController /// public interface IMobileControlTouchpanelController : IKeyed { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs index 62ea8b3f..3adb7f4e 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs @@ -5,9 +5,9 @@ using PepperDash.Essentials.Core.SmartObjects; namespace PepperDash.Essentials.Core { - /// - /// - /// + /// + /// Defines the contract for INumericKeypad + /// public interface INumericKeypad:IKeyed { void Digit0(bool pressRelease); @@ -65,6 +65,9 @@ namespace PepperDash.Essentials.Core trilist.StringInput[111].StringValue = dev.KeypadAccessoryButton2Label; } + /// + /// UnlinkButtons method + /// public static void UnlinkButtons(this INumericKeypad dev, BasicTriList trilist) { trilist.ClearBoolSigAction(110); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs index 6ecdd775..31e7acaf 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs @@ -31,17 +31,17 @@ namespace PepperDash.Essentials.Core public bool LastAttemptWasIncorrect { get; private set; } /// - /// Indicates that the login attempt has failed + /// Gets or sets the LoginAttemptFailed /// public bool LoginAttemptFailed { get; private set; } /// - /// Indicates that the process was cancelled and the prompt should be dismissed + /// Gets or sets the LoginAttemptCancelled /// public bool LoginAttemptCancelled { get; private set; } /// - /// A message to be displayed to the user + /// Gets or sets the Message /// public string Message { get; private set; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs index b7c3345e..79c58fa2 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs @@ -37,6 +37,9 @@ namespace PepperDash.Essentials.Core /// public static class IHasPowerControlExtensions { + /// + /// LinkButtons method + /// public static void LinkButtons(this IHasPowerControl dev, BasicTriList triList) { triList.SetSigFalseAction(101, dev.PowerOn); @@ -50,6 +53,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// UnlinkButtons method + /// public static void UnlinkButtons(this IHasPowerControl dev, BasicTriList triList) { triList.ClearBoolSigAction(101); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs index 26895114..1d5d20da 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs @@ -5,9 +5,9 @@ using Newtonsoft.Json.Converters; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { - /// - /// Defines a class that has warm up and cool down - /// + /// + /// Defines the contract for IProjectorScreenLiftControl + /// public interface IProjectorScreenLiftControl { void Raise(); @@ -19,6 +19,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces eScreenLiftControlType Type { get; } // screen/lift } + /// + /// Enumeration of eScreenLiftControlType values + /// public enum eScreenLiftControlType { lift, diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs index 0f7408f6..8d99b959 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs @@ -6,7 +6,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// - /// Describes an item that can be selected + /// Defines the contract for ISelectableItem /// public interface ISelectableItem : IKeyName { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs index 9479099c..f3d2beec 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs @@ -4,6 +4,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for ISelectableItems + /// public interface ISelectableItems where TValue : ISelectableItem { event EventHandler ItemsUpdated; @@ -21,6 +24,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces /// Describes a collection of items that can be selected /// /// type for the keys in the collection. Probably a string or enum + /// + /// Defines the contract for ISelectableItems + /// public interface ISelectableItems : ISelectableItems { } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs index a9a92126..646aab93 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs @@ -5,9 +5,9 @@ using PepperDash.Essentials.Core.SmartObjects; namespace PepperDash.Essentials.Core { - /// - /// - /// + /// + /// Defines the contract for ISetTopBoxControls + /// public interface ISetTopBoxControls : IChannel, IColor, IDPad, ISetTopBoxNumericKeypad, ITransport, IUiDisplayInfo { @@ -40,12 +40,18 @@ namespace PepperDash.Essentials.Core public static class ISetTopBoxControlsExtensions { + /// + /// LinkButtons method + /// public static void LinkButtons(this ISetTopBoxControls dev, BasicTriList triList) { triList.SetBoolSigAction(136, dev.DvrList); triList.SetBoolSigAction(152, dev.Replay); } + /// + /// UnlinkButtons method + /// public static void UnlinkButtons(this ISetTopBoxControls dev, BasicTriList triList) { triList.ClearBoolSigAction(136); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs index fe1c560c..f77a2ef8 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for ITemperatureSensor + /// public interface ITemperatureSensor { /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs index 1189c10b..1a8f2a2b 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs @@ -2,9 +2,9 @@ namespace PepperDash.Essentials.Core { - /// - /// - /// + /// + /// Defines the contract for ITransport + /// public interface ITransport { void Play(bool pressRelease); @@ -38,6 +38,9 @@ namespace PepperDash.Essentials.Core triList.SetBoolSigAction(154, dev.Record); } + /// + /// UnlinkButtons method + /// public static void UnlinkButtons(this ITransport dev, BasicTriList triList) { triList.ClearBoolSigAction(145); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITvPresetsProvider.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITvPresetsProvider.cs index 61b8ec09..68650fa4 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITvPresetsProvider.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITvPresetsProvider.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for ITvPresetsProvider + /// public interface ITvPresetsProvider { DevicePresetsModel TvPresets { get; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs index fb51f7e2..aa0144fe 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs @@ -2,9 +2,9 @@ namespace PepperDash.Essentials.Core { - /// - /// Describes things needed to show on UI - /// + /// + /// Defines the contract for IUiDisplayInfo + /// public interface IUiDisplayInfo : IKeyed { uint DisplayUiType { get; } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/LanguageLabel.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/LanguageLabel.cs index 890d1416..c8a45592 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/LanguageLabel.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/LanguageLabel.cs @@ -3,11 +3,26 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Represents a LanguageLabel + /// public class LanguageLabel { + /// + /// Gets or sets the Key + /// public string Key { get; set; } + /// + /// Gets or sets the Description + /// public string Description { get; set; } + /// + /// Gets or sets the DisplayText + /// public string DisplayText { get; set; } + /// + /// Gets or sets the JoinNumber + /// public uint JoinNumber { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs b/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs index 295fd25c..19244469 100644 --- a/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs +++ b/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs @@ -13,6 +13,9 @@ namespace PepperDash.Essentials.Core /// Key of the parent device in the DeviceManager /// [JsonProperty("parentDeviceKey")] + /// + /// Gets or sets the ParentDeviceKey + /// public string ParentDeviceKey { get; set; } /// diff --git a/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs index 90aa4909..99b55669 100644 --- a/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs @@ -9,14 +9,26 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Core { + /// + /// Enumeration of AudioChangeType values + /// public enum AudioChangeType { Mute, Volume } + /// + /// Represents a AudioChangeEventArgs + /// public class AudioChangeEventArgs { + /// + /// Gets or sets the ChangeType + /// public AudioChangeType ChangeType { get; private set; } + /// + /// Gets or sets the AudioDevice + /// public IBasicVolumeControls AudioDevice { get; private set; } public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType) diff --git a/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs b/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs index d519feb4..9b45c728 100644 --- a/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs @@ -3,9 +3,15 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { + /// + /// Represents a CameraListItem + /// public class CameraListItem { [JsonProperty("deviceKey")] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } /// @@ -46,6 +52,9 @@ namespace PepperDash.Essentials.Core /// A name that will override the source's name on the UI /// [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } diff --git a/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs index afb1da17..1c2391bb 100644 --- a/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs @@ -21,7 +21,7 @@ namespace PepperDash.Essentials.Core } /// - /// Adds control of codec transmit volume + /// Defines the contract for ITransmitVolume /// public interface ITransmitVolume { @@ -34,7 +34,7 @@ namespace PepperDash.Essentials.Core } /// - /// Adds control of codec privacy function (microphone mute) + /// Defines the contract for IPrivacy /// public interface IPrivacy { diff --git a/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs b/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs index 5a66c0b3..053d3895 100644 --- a/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs @@ -52,6 +52,9 @@ namespace PepperDash.Essentials.Core /// If set, this name will be used as the PreferredName instead of the device name. /// [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } /// diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs b/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs index 1ef59b0f..e2ef5d8d 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs @@ -17,6 +17,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetFeedbackProperty method + /// public static Feedback GetFeedbackProperty(this Device device, string propertyName) { var feedback = DeviceJsonApi.GetPropertyByName(device.Key, propertyName) as Feedback; diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs b/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs index 816251ba..a71ca455 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs @@ -11,12 +11,18 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core { + /// + /// Represents a DeviceJsonApi + /// public class DeviceJsonApi { /// /// /// /// + /// + /// DoDeviceActionWithJson method + /// public static void DoDeviceActionWithJson(string json) { if (String.IsNullOrEmpty(json)) @@ -43,6 +49,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// DoDeviceAction method + /// public static void DoDeviceAction(DeviceActionWrapper action) { var key = action.DeviceKey; @@ -187,6 +196,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetProperties method + /// public static string GetProperties(string deviceObjectPath) { var obj = FindObjectOnPath(deviceObjectPath); @@ -205,6 +217,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetPropertyByName method + /// public static object GetPropertyByName(string deviceObjectPath, string propertyName) { var dev = FindObjectOnPath(deviceObjectPath); @@ -230,6 +245,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetMethods method + /// public static string GetMethods(string deviceObjectPath) { var obj = FindObjectOnPath(deviceObjectPath); @@ -244,6 +262,9 @@ namespace PepperDash.Essentials.Core return JsonConvert.SerializeObject(methods, Formatting.Indented); } + /// + /// GetApiMethods method + /// public static string GetApiMethods(string deviceObjectPath) { var obj = FindObjectOnPath(deviceObjectPath); @@ -261,8 +282,7 @@ namespace PepperDash.Essentials.Core /// - /// Walks down a dotted object path, starting with a Device, and returns the object - /// at the end of the path + /// FindObjectOnPath method /// public static object FindObjectOnPath(string deviceObjectPath) { @@ -351,6 +371,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SetProperty method + /// public static string SetProperty(string deviceObjectPath) { throw new NotImplementedException("This could be really useful. Finish it please"); @@ -373,17 +396,35 @@ namespace PepperDash.Essentials.Core public class DeviceActionWrapper { public string DeviceKey { get; set; } + /// + /// Gets or sets the MethodName + /// public string MethodName { get; set; } + /// + /// Gets or sets the Params + /// public object[] Params { get; set; } } + /// + /// Represents a PropertyNameType + /// public class PropertyNameType { private object Parent; [JsonIgnore] + /// + /// Gets or sets the PropInfo + /// public PropertyInfo PropInfo { get; private set; } + /// + /// Gets or sets the Name + /// public string Name { get { return PropInfo.Name; } } + /// + /// Gets or sets the Type + /// public string Type { get { return PropInfo.PropertyType.Name; } } public string Value { @@ -405,7 +446,13 @@ namespace PepperDash.Essentials.Core } } + /// + /// Gets or sets the CanRead + /// public bool CanRead { get { return PropInfo.CanRead; } } + /// + /// Gets or sets the CanWrite + /// public bool CanWrite { get { return PropInfo.CanWrite; } } @@ -416,11 +463,20 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a MethodNameParams + /// public class MethodNameParams { [JsonIgnore] + /// + /// Gets or sets the MethodInfo + /// public MethodInfo MethodInfo { get; private set; } + /// + /// Gets or sets the Name + /// public string Name { get { return MethodInfo.Name; } } public IEnumerable Params { @@ -437,13 +493,25 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a NameType + /// public class NameType { + /// + /// Gets or sets the Name + /// public string Name { get; set; } + /// + /// Gets or sets the Type + /// public string Type { get; set; } } [AttributeUsage(AttributeTargets.All)] + /// + /// Represents a ApiAttribute + /// public class ApiAttribute : Attribute { diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs index 5cd921b8..fd116aed 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs @@ -25,12 +25,18 @@ namespace PepperDash.Essentials.Core private static readonly Dictionary Devices = new Dictionary(StringComparer.OrdinalIgnoreCase); /// - /// Returns a copy of all the devices in a list + /// Gets or sets the AllDevices /// public static List AllDevices { get { return new List(Devices.Values); } } + /// + /// Gets or sets the AddDeviceEnabled + /// public static bool AddDeviceEnabled; + /// + /// Initialize method + /// public static void Initialize(CrestronControlSystem cs) { AddDeviceEnabled = true; @@ -53,7 +59,7 @@ namespace PepperDash.Essentials.Core } /// - /// Calls activate steps on all Device class items + /// ActivateAll method /// public static void ActivateAll() { @@ -164,7 +170,7 @@ namespace PepperDash.Essentials.Core } /// - /// Calls activate on all Device class items + /// DeactivateAll method /// public static void DeactivateAll() { @@ -258,6 +264,9 @@ namespace PepperDash.Essentials.Core // Debug.LogMessage(LogEventLevel.Information, "Not yet implemented. Stay tuned"); //} + /// + /// AddDevice method + /// public static void AddDevice(IKeyed newDev) { try @@ -296,6 +305,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// AddDevice method + /// public static void AddDevice(IEnumerable devicesToAdd) { try @@ -332,6 +344,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// RemoveDevice method + /// public static void RemoveDevice(IKeyed newDev) { try @@ -352,18 +367,27 @@ namespace PepperDash.Essentials.Core } } + /// + /// GetDeviceKeys method + /// public static IEnumerable GetDeviceKeys() { //return _Devices.Select(d => d.Key).ToList(); return Devices.Keys; } + /// + /// GetDevices method + /// public static IEnumerable GetDevices() { //return _Devices.Select(d => d.Key).ToList(); return Devices.Values; } + /// + /// GetDeviceForKey method + /// public static IKeyed GetDeviceForKey(string key) { //return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); @@ -377,6 +401,9 @@ namespace PepperDash.Essentials.Core /// Console handler that simulates com port data receive /// /// + /// + /// SimulateComReceiveOnDevice method + /// public static void SimulateComReceiveOnDevice(string s) { // devcomsim:1 xyzabc @@ -400,6 +427,9 @@ namespace PepperDash.Essentials.Core /// Prints a list of routing inputs and outputs by device key. /// /// Device key from which to report data + /// + /// GetRoutingPorts method + /// public static void GetRoutingPorts(string s) { var device = GetDeviceForKey(s); @@ -427,6 +457,9 @@ namespace PepperDash.Essentials.Core /// Attempts to set the debug level of a device /// /// + /// + /// SetDeviceStreamDebugging method + /// public static void SetDeviceStreamDebugging(string s) { if (String.IsNullOrEmpty(s) || s.Contains("?")) @@ -492,7 +525,7 @@ namespace PepperDash.Essentials.Core } /// - /// Sets stream debugging settings to off for all devices + /// DisableAllDeviceStreamDebugging method /// public static void DisableAllDeviceStreamDebugging() { diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs index 778f9226..2fcbf1a4 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs @@ -71,6 +71,10 @@ namespace PepperDash.Essentials.Core }); } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { CreateMobileControlMessengers(); @@ -105,6 +109,9 @@ namespace PepperDash.Essentials.Core } [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] + /// + /// Represents a ConfigSnippetAttribute + /// public class ConfigSnippetAttribute : Attribute { private string _ConfigSnippet; @@ -134,7 +141,7 @@ namespace PepperDash.Essentials.Core public List TypeNames { get; protected set; } /// - /// Loads an item to the DeviceFactory.FactoryMethods dictionary for each entry in the TypeNames list + /// LoadTypeFactories method /// public void LoadTypeFactories() { @@ -163,12 +170,12 @@ namespace PepperDash.Essentials.Core #region IProcessorExtensionDeviceFactory Members /// - /// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device + /// Gets or sets the TypeNames /// public List TypeNames { get; protected set; } /// - /// Loads an item to the ProcessorExtensionDeviceFactory.ProcessorExtensionFactoryMethods dictionary for each entry in the TypeNames list + /// LoadFactories method /// public void LoadFactories() { @@ -211,6 +218,9 @@ namespace PepperDash.Essentials.Core /// public string MinimumEssentialsFrameworkVersion { get; protected set; } + /// + /// Gets or sets the DevelopmentEssentialsFrameworkVersions + /// public List DevelopmentEssentialsFrameworkVersions { get; protected set; } } diff --git a/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs b/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs index d4b09779..44b36134 100644 --- a/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs @@ -3,14 +3,17 @@ namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IOnline + /// public interface IOnline { BoolFeedback IsOnline { get; } } - /// - /// Describes a device that can have a video sync providing device attached to it - /// + /// + /// Defines the contract for IAttachVideoStatus + /// public interface IAttachVideoStatus : IKeyed { // Extension methods will depend on this diff --git a/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs b/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs index 26718ebf..bbb3c544 100644 --- a/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs +++ b/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs @@ -13,6 +13,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.Devices { + /// + /// Represents a GenericIrController + /// public class GenericIrController: EssentialsBridgeableDevice { //data storage for bridging @@ -23,6 +26,9 @@ namespace PepperDash.Essentials.Core.Devices private readonly IrOutputPortController _port; + /// + /// Gets or sets the IrCommands + /// public string[] IrCommands {get { return _port.IrFileCommands; }} public GenericIrController(string key, string name, IrOutputPortController irPort) : base(key, name) @@ -55,6 +61,10 @@ namespace PepperDash.Essentials.Core.Devices #region Overrides of EssentialsBridgeableDevice + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { //if driver isn't loaded yet, store the variables until it is loaded, then call the LinkToApi method again @@ -148,12 +158,18 @@ Value.Metadata.Description-'{3}'", #endregion + /// + /// Press method + /// public void Press(string command, bool pressRelease) { _port.PressRelease(command, pressRelease); } } + /// + /// Represents a GenericIrControllerFactory + /// public class GenericIrControllerFactory : EssentialsDeviceFactory { public GenericIrControllerFactory() @@ -162,6 +178,10 @@ Value.Metadata.Description-'{3}'", } #region Overrides of EssentialsDeviceFactory + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic IR Controller Device"); diff --git a/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs b/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs index 8929edeb..e4a2b986 100644 --- a/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs @@ -10,10 +10,16 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.Devices { + /// + /// Represents a GenericCommunicationMonitoredDevice + /// public class GenericCommunicationMonitoredDevice : Device, ICommunicationMonitor { IBasicCommunication Client; + /// + /// Gets or sets the CommunicationMonitor + /// public StatusMonitorBase CommunicationMonitor { get; private set; } public GenericCommunicationMonitoredDevice(string key, string name, IBasicCommunication comm, string pollString, @@ -36,12 +42,19 @@ namespace PepperDash.Essentials.Core.Devices { } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { CommunicationMonitor.Start(); return true; } + /// + /// Deactivate method + /// public override bool Deactivate() { CommunicationMonitor.Stop(); diff --git a/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs index e5218ee0..d92f9530 100644 --- a/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs +++ b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs @@ -13,6 +13,9 @@ namespace PepperDash.Essentials.Core /// /// /// Attached VideoStatusOutputs or the default if none attached + /// + /// GetVideoStatuses method + /// public static VideoStatusOutputs GetVideoStatuses(this IAttachVideoStatus attachedDev) { // See if this device is connected to a status-providing port @@ -29,6 +32,9 @@ namespace PepperDash.Essentials.Core return VideoStatusOutputs.NoStatus; } + /// + /// HasVideoStatuses method + /// public static bool HasVideoStatuses(this IAttachVideoStatus attachedDev) { return TieLineCollection.Default.FirstOrDefault(t => diff --git a/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs b/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs index 94bc3929..90006b3b 100644 --- a/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs +++ b/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs @@ -3,6 +3,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IDspPresets + /// public interface IDspPresets { Dictionary Presets { get; } diff --git a/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs b/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs index 9943c738..91620c63 100644 --- a/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs +++ b/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs @@ -6,6 +6,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IHasFeedback + /// public interface IHasFeedback : IKeyed { /// diff --git a/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs index c0cb33ed..5195592d 100644 --- a/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs @@ -6,11 +6,17 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IBasicVideoMute + /// public interface IBasicVideoMute { void VideoMuteToggle(); } + /// + /// Defines the contract for IBasicVideoMuteWithFeedback + /// public interface IBasicVideoMuteWithFeedback : IBasicVideoMute { BoolFeedback VideoMuteIsOn { get; } diff --git a/src/PepperDash.Essentials.Core/Devices/IReconfigurableDevice.cs b/src/PepperDash.Essentials.Core/Devices/IReconfigurableDevice.cs index ab0e37c3..6712312d 100644 --- a/src/PepperDash.Essentials.Core/Devices/IReconfigurableDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/IReconfigurableDevice.cs @@ -8,6 +8,9 @@ using PepperDash.Essentials.Core.Config; namespace PepperDash.Essentials.Core.Devices { + /// + /// Defines the contract for IReconfigurableDevice + /// public interface IReconfigurableDevice { event EventHandler ConfigChanged; diff --git a/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs b/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs index 968fa127..352e736d 100644 --- a/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs +++ b/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs @@ -8,6 +8,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IUsageTracking + /// public interface IUsageTracking { UsageTracking UsageTracker { get; set; } @@ -21,18 +24,39 @@ namespace PepperDash.Essentials.Core // } //} + /// + /// Represents a UsageTracking + /// public class UsageTracking { public event EventHandler DeviceUsageEnded; + /// + /// Gets or sets the InUseTracker + /// public InUseTracking InUseTracker { get; protected set; } + /// + /// Gets or sets the UsageIsTracked + /// public bool UsageIsTracked { get; set; } + /// + /// Gets or sets the UsageTrackingStarted + /// public bool UsageTrackingStarted { get; protected set; } + /// + /// Gets or sets the UsageStartTime + /// public DateTime UsageStartTime { get; protected set; } + /// + /// Gets or sets the UsageEndTime + /// public DateTime UsageEndTime { get; protected set; } + /// + /// Gets or sets the Parent + /// public Device Parent { get; private set; } public UsageTracking(Device parent) @@ -58,7 +82,7 @@ namespace PepperDash.Essentials.Core /// - /// Stores the usage start time + /// StartDeviceUsage method /// public void StartDeviceUsage() { @@ -97,9 +121,18 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a DeviceUsageEventArgs + /// public class DeviceUsageEventArgs : EventArgs { + /// + /// Gets or sets the UsageEndTime + /// public DateTime UsageEndTime { get; set; } + /// + /// Gets or sets the MinutesUsed + /// public int MinutesUsed { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs index 5d8e0724..32a28113 100644 --- a/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs @@ -17,7 +17,7 @@ namespace PepperDash.Essentials.Core } /// - /// Defines basic volume control methods + /// Defines the contract for IHasVolumeControl /// public interface IHasVolumeControl { @@ -52,9 +52,9 @@ namespace PepperDash.Essentials.Core void MuteOff(); } - /// - /// Adds feedback and direct volume level set to IBasicVolumeControls - /// + /// + /// Defines the contract for IBasicVolumeWithFeedback + /// public interface IBasicVolumeWithFeedback : IBasicVolumeControls { BoolFeedback MuteFeedback { get; } @@ -64,9 +64,9 @@ namespace PepperDash.Essentials.Core IntFeedback VolumeLevelFeedback { get; } } - /// - /// Adds the ability to display a raw volume level and the units of that level - /// + /// + /// Defines the contract for IBasicVolumeWithFeedbackAdvanced + /// public interface IBasicVolumeWithFeedbackAdvanced : IBasicVolumeWithFeedback { int RawVolumeLevel { get; } @@ -83,8 +83,7 @@ namespace PepperDash.Essentials.Core } /// - /// A class that implements this contains a reference to a current IBasicVolumeControls device. - /// The class may have multiple IBasicVolumeControls. + /// Defines the contract for IHasCurrentVolumeControls /// public interface IHasCurrentVolumeControls { @@ -97,9 +96,9 @@ namespace PepperDash.Essentials.Core } - /// - /// - /// + /// + /// Defines the contract for IFullAudioSettings + /// public interface IFullAudioSettings : IBasicVolumeWithFeedback { void SetBalance(ushort level); @@ -136,11 +135,9 @@ namespace PepperDash.Essentials.Core IntFeedback DefaultVolumeFeedback { get; } } - /// - /// A class that implements this, contains a reference to an IBasicVolumeControls device. - /// For example, speakers attached to an audio zone. The speakers can provide reference - /// to their linked volume control. - /// + /// + /// Defines the contract for IHasVolumeDevice + /// public interface IHasVolumeDevice { IBasicVolumeControls VolumeDevice { get; } diff --git a/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs b/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs index edcedfbb..78e1a7e6 100644 --- a/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs +++ b/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs @@ -32,8 +32,14 @@ namespace PepperDash.Essentials.Core public string DriverFilepath { get; private set; } public bool DriverIsLoaded { get; private set; } + /// + /// Gets or sets the IrFileCommands + /// public string[] IrFileCommands { get { return IrPort.AvailableStandardIRCmds(IrPortUid); } } + /// + /// Gets or sets the UseBridgeJoinMap + /// public bool UseBridgeJoinMap { get; private set; } /// @@ -99,6 +105,9 @@ namespace PepperDash.Essentials.Core }); } + /// + /// PrintAvailableCommands method + /// public void PrintAvailableCommands() { Debug.LogMessage(LogEventLevel.Verbose, this, "Available IR Commands in IR File {0}", IrPortUid); @@ -113,6 +122,9 @@ namespace PepperDash.Essentials.Core /// Loads the IR driver at path /// /// + /// + /// LoadDriver method + /// public void LoadDriver(string path) { Debug.LogMessage(LogEventLevel.Verbose, this, "***Loading IR File***"); @@ -136,9 +148,10 @@ namespace PepperDash.Essentials.Core } - /// - /// Starts and stops IR command on driver. Safe for missing commands - /// + /// + /// PressRelease method + /// + /// public virtual void PressRelease(string command, bool state) { Debug.LogMessage(LogEventLevel.Verbose, this, "IR:'{0}'={1}", command, state); @@ -163,9 +176,10 @@ namespace PepperDash.Essentials.Core IrPort.Release(); } - /// - /// Pulses a command on driver. Safe for missing commands - /// + /// + /// Pulse method + /// + /// public virtual void Pulse(string command, ushort time) { if (IrPort == null) diff --git a/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs b/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs index 821a0c2b..ea54857e 100644 --- a/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs @@ -74,6 +74,9 @@ namespace PepperDash.Essentials.Core /// [JsonProperty("type")] [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + /// + /// Gets or sets the Type + /// public eLevelControlType Type { get; set; } diff --git a/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs index 1fc6672a..e09a002d 100644 --- a/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs @@ -4,7 +4,7 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { /// - /// Interface for any device that has a battery that can be monitored + /// Defines the contract for IHasBatteryStats /// public interface IHasBatteryStats : IKeyName { @@ -18,7 +18,7 @@ namespace PepperDash.Essentials.Core } /// - /// Interface for any device that has a battery that can be monitored and the ability to charge and discharge + /// Defines the contract for IHasBatteryCharging /// public interface IHasBatteryCharging : IHasBatteryStats { @@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core } /// - /// Interface for any device that is able to control its power, has a configurable reboot time, and has batteries that can be monitored + /// Defines the contract for IHasPowerCycleWithBattery /// public interface IHasPowerCycleWithBattery : IHasPowerCycle, IHasBatteryStats { diff --git a/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs b/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs index 41555ae8..56367e53 100644 --- a/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs +++ b/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs @@ -9,6 +9,9 @@ using Crestron.SimplSharpPro.UI; namespace PepperDash.Essentials.Core { + /// + /// Enumeration of PresentationSourceType values + /// public enum PresentationSourceType { None, Dvd, Laptop, PC, SetTopBox, VCR diff --git a/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs b/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs index f539d718..04a1aeaa 100644 --- a/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs @@ -9,6 +9,9 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { + /// + /// Represents a PresetListItem + /// public class PresetListItem : AudioControlListItemBase { [JsonIgnore] diff --git a/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs b/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs index 1da908a9..3f83640f 100644 --- a/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs @@ -35,6 +35,9 @@ namespace PepperDash.Essentials.Core.Devices /// Sets the Config, calls CustomSetConfig and fires the ConfigChanged event /// /// + /// + /// SetConfig method + /// public void SetConfig(DeviceConfig config) { Config = config; diff --git a/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs b/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs index 37e62036..48020690 100644 --- a/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs +++ b/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs @@ -1,6 +1,9 @@  namespace PepperDash.Essentials.Core { + /// + /// Represents a SmartObjectJoinOffsets + /// public class SmartObjectJoinOffsets { public const ushort Dpad = 1; diff --git a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs index fe0bde9d..d4fac061 100644 --- a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs @@ -27,7 +27,7 @@ namespace PepperDash.Essentials.Core } /// - /// Represents an item in a source list - can be deserialized into. + /// Represents a SourceListItem /// public class SourceListItem { @@ -76,6 +76,9 @@ namespace PepperDash.Essentials.Core /// A name that will override the source's name on the UI /// [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } /// diff --git a/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs b/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs index 2171cb73..441af0d6 100644 --- a/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs @@ -26,9 +26,9 @@ namespace PepperDash.Essentials.Core } } - /// - /// - /// + /// + /// Enumeration of ChangeType values + /// public enum ChangeType { WillChange, DidChange diff --git a/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs b/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs index 2d71c6bc..43a84443 100644 --- a/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs +++ b/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs @@ -12,6 +12,9 @@ namespace PepperDash.Essentials.Core { public static class JsonExtensions { + /// + /// FindTokens method + /// public static List FindTokens(this JToken containerToken, string name) { List matches = new List(); diff --git a/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs b/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs index 7bf8d5a5..2efa3c18 100644 --- a/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs +++ b/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs @@ -14,6 +14,9 @@ namespace PepperDash.Essentials.Core /// /// string input /// null if the string is emtpy, otherwise returns the string + /// + /// NullIfEmpty method + /// public static string NullIfEmpty(this string s) { return string.IsNullOrEmpty(s) ? null : s; @@ -24,6 +27,9 @@ namespace PepperDash.Essentials.Core /// /// string input /// null if the string is wempty or made of only whitespace characters, otherwise returns the string + /// + /// NullIfWhiteSpace method + /// public static string NullIfWhiteSpace(this string s) { return string.IsNullOrEmpty(s.Trim()) ? null : s; @@ -35,6 +41,9 @@ namespace PepperDash.Essentials.Core /// input string /// string to replace with if input string is empty or whitespace /// returns newString if s is null, emtpy, or made of whitespace characters, otherwise returns s + /// + /// ReplaceIfNullOrEmpty method + /// public static string ReplaceIfNullOrEmpty(this string s, string newString) { return string.IsNullOrEmpty(s) ? newString : s; @@ -47,6 +56,9 @@ namespace PepperDash.Essentials.Core /// String to check in Source String /// Comparison parameters /// true of string contains "toCheck" + /// + /// Contains method + /// public static bool Contains(this string source, string toCheck, StringComparison comp) { if (string.IsNullOrEmpty(source)) return false; @@ -58,6 +70,9 @@ namespace PepperDash.Essentials.Core /// /// String to Trim /// Trimmed String + /// + /// TrimAll method + /// public static string TrimAll(this string source) { return string.IsNullOrEmpty(source) ? string.Empty : source.TrimStart().TrimEnd(); @@ -69,6 +84,9 @@ namespace PepperDash.Essentials.Core /// String to Trim /// Char Array to trim from string /// Trimmed String + /// + /// TrimAll method + /// public static string TrimAll(this string source, char[] chars) { return string.IsNullOrEmpty(source) ? string.Empty : source.TrimStart(chars).TrimEnd(chars); diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index 07bcc56a..5c8d4dec 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 + /// 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 } } + /// + /// Represents a DeviceFactory + /// public class DeviceFactory { + /// + /// Initializes a new instance of the DeviceFactory class and loads all device type factories + /// public DeviceFactory() { var assy = Assembly.GetExecutingAssembly(); @@ -118,6 +141,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetDevice method + /// public static IKeyed GetDevice(DeviceConfig dc) { try @@ -158,6 +184,9 @@ namespace PepperDash.Essentials.Core /// Prints the type names and associated metadata from the FactoryMethods collection. /// /// + /// + /// GetDeviceFactoryTypes method + /// public static void GetDeviceFactoryTypes(string filter) { var types = !string.IsNullOrEmpty(filter) diff --git a/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs index 9f7eec58..31ff95d2 100644 --- a/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Defines a class that is capable of loading device types + /// Defines the contract for IDeviceFactory /// public interface IDeviceFactory { diff --git a/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs index a50ab16d..57870721 100644 --- a/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IProcessorExtensionDeviceFactory + /// public interface IProcessorExtensionDeviceFactory { /// diff --git a/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs index b67dcf5b..02bf1bcd 100644 --- a/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs @@ -10,6 +10,9 @@ using System.Linq; namespace PepperDash.Essentials.Core { + /// + /// Represents a ProcessorExtensionDeviceFactory + /// public class ProcessorExtensionDeviceFactory { public ProcessorExtensionDeviceFactory() { @@ -103,6 +106,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetExtensionDevice method + /// public static IKeyed GetExtensionDevice(DeviceConfig dc) { try diff --git a/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs b/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs index 6ccc0600..1b917690 100644 --- a/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs @@ -7,8 +7,14 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core { + /// + /// Represents a IsReadyEventArgs + /// public class IsReadyEventArgs : EventArgs { + /// + /// Gets or sets the IsReady + /// public bool IsReady { get; set; } public IsReadyEventArgs(bool data) @@ -17,6 +23,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// Defines the contract for IHasReady + /// public interface IHasReady { event EventHandler IsReadyEvent; diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs index 055ed5b6..bc4cfde5 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs @@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Core public bool TestValue { get; private set; } /// - /// Func that evaluates on FireUpdate + /// Gets or sets the ValueFunc /// public Func ValueFunc { get; private set; } @@ -67,6 +67,10 @@ namespace PepperDash.Essentials.Core ValueFunc = newFunc; } + /// + /// FireUpdate method + /// + /// public override void FireUpdate() { bool newValue = InTestMode ? TestValue : ValueFunc.Invoke(); @@ -83,6 +87,9 @@ namespace PepperDash.Essentials.Core /// Links an input sig /// /// + /// + /// LinkInputSig method + /// public void LinkInputSig(BoolInputSig sig) { LinkedInputSigs.Add(sig); @@ -93,6 +100,9 @@ namespace PepperDash.Essentials.Core /// Unlinks an inputs sig /// /// + /// + /// UnlinkInputSig method + /// public void UnlinkInputSig(BoolInputSig sig) { LinkedInputSigs.Remove(sig); @@ -112,6 +122,9 @@ namespace PepperDash.Essentials.Core /// Unlinks an input sig to the complement value /// /// + /// + /// UnlinkComplementInputSig method + /// public void UnlinkComplementInputSig(BoolInputSig sig) { LinkedComplementInputSigs.Remove(sig); @@ -131,6 +144,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// UnlinkCrestronFeedback method + /// public void UnlinkCrestronFeedback(Crestron.SimplSharpPro.DeviceSupport.Feedback feedback) { LinkedCrestronFeedbacks.Remove(feedback); @@ -145,6 +161,9 @@ namespace PepperDash.Essentials.Core /// Puts this in test mode, sets the test value and fires an update. /// /// + /// + /// SetTestValue method + /// public void SetTestValue(bool value) { TestValue = value; diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs index cc183569..7dca3eaf 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs @@ -6,15 +6,24 @@ using Crestron.SimplSharp; using Crestron.SimplSharpPro; namespace PepperDash.Essentials.Core { + /// + /// Represents a BoolFeedbackPulse + /// public class BoolFeedbackPulse { + /// + /// Gets or sets the TimeoutMs + /// public uint TimeoutMs { get; set; } - /// - /// Defaults to false - /// + /// + /// Gets or sets the CanRetrigger + /// public bool CanRetrigger { get; set; } + /// + /// Gets or sets the Feedback + /// public BoolFeedback Feedback { get; private set; } CTimer Timer; @@ -42,6 +51,9 @@ namespace PepperDash.Essentials.Core /// Starts the /// /// + /// + /// Start method + /// public void Start() { if (Timer == null) @@ -60,6 +72,9 @@ namespace PepperDash.Essentials.Core Timer.Reset(TimeoutMs); } + /// + /// Cancel method + /// public void Cancel() { if(Timer != null) diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs index a8dae7b8..b4562904 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs @@ -11,9 +11,9 @@ namespace PepperDash.Essentials.Core public abstract class BoolFeedbackLogic { - /// - /// Output representing the "and" value of all connected inputs - /// + /// + /// Gets or sets the Output + /// public BoolFeedback Output { get; private set; } /// @@ -38,6 +38,9 @@ namespace PepperDash.Essentials.Core Evaluate(); } + /// + /// AddOutputsIn method + /// public void AddOutputsIn(List outputs) { foreach (var o in outputs.Where(o => !OutputsIn.Contains(o))) @@ -48,6 +51,9 @@ namespace PepperDash.Essentials.Core Evaluate(); } + /// + /// RemoveOutputIn method + /// public void RemoveOutputIn(BoolFeedback output) { // Don't double up outputs @@ -58,6 +64,9 @@ namespace PepperDash.Essentials.Core Evaluate(); } + /// + /// RemoveOutputsIn method + /// public void RemoveOutputsIn(List outputs) { foreach (var o in outputs) @@ -68,6 +77,9 @@ namespace PepperDash.Essentials.Core Evaluate(); } + /// + /// ClearOutputs method + /// public void ClearOutputs() { OutputsIn.Clear(); @@ -82,6 +94,9 @@ namespace PepperDash.Essentials.Core protected abstract void Evaluate(); } + /// + /// Represents a BoolFeedbackAnd + /// public class BoolFeedbackAnd : BoolFeedbackLogic { protected override void Evaluate() @@ -97,6 +112,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a BoolFeedbackOr + /// public class BoolFeedbackOr : BoolFeedbackLogic { protected override void Evaluate() @@ -112,6 +130,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a BoolFeedbackLinq + /// public class BoolFeedbackLinq : BoolFeedbackLogic { readonly Func, bool> _predicate; diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs index c3aac50b..d4caa7e5 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs @@ -13,18 +13,32 @@ namespace PepperDash.Essentials.Core { public event EventHandler OutputChange; + /// + /// Gets or sets the Key + /// public string Key { get; private set; } + /// + /// Gets or sets the BoolValue + /// + /// public virtual bool BoolValue { get { return false; } } + /// + /// Gets or sets the IntValue + /// public virtual int IntValue { get { return 0; } } + /// + /// Gets or sets the StringValue + /// public virtual string StringValue { get { return ""; } } + /// + /// Gets or sets the SerialValue + /// public virtual string SerialValue { get { return ""; } } - /// - /// Feedbacks can be put into test mode for simulation of events without real data. - /// Using JSON debugging methods and the Set/ClearTestValue methods, we can simulate - /// Feedback behaviors - /// + /// + /// Gets or sets the InTestMode + /// public bool InTestMode { get; protected set; } /// @@ -44,9 +58,9 @@ namespace PepperDash.Essentials.Core - /// - /// Clears test mode and fires update. - /// + /// + /// ClearTestValue method + /// public void ClearTestValue() { InTestMode = false; @@ -66,9 +80,9 @@ namespace PepperDash.Essentials.Core CrestronInvoke.BeginInvoke(o => FireUpdate()); } - ///// - ///// Helper method that fires event. Use this intstead of calling OutputChange - ///// + /// + /// Helper method that fires event. Use this intstead of calling OutputChange + /// //protected void OnOutputChange() //{ // if (OutputChange != null) OutputChange(this, EventArgs.Empty); diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs index 9a7f5c29..d2182245 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs @@ -6,9 +6,18 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core { + /// + /// Represents a FeedbackEventArgs + /// public class FeedbackEventArgs : EventArgs { + /// + /// Gets or sets the BoolValue + /// public bool BoolValue { get; private set; } + /// + /// Gets or sets the IntValue + /// public int IntValue { get; private set; } public ushort UShortValue { @@ -17,7 +26,13 @@ namespace PepperDash.Essentials.Core return (ushort)IntValue; } } + /// + /// Gets or sets the StringValue + /// public string StringValue { get; private set; } + /// + /// Gets or sets the Type + /// public eFeedbackEventType Type { get; private set; } public FeedbackEventArgs(bool value) @@ -39,6 +54,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// Enumeration of eFeedbackEventType values + /// public enum eFeedbackEventType { TypeBool, diff --git a/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs index 53bae09a..06e35850 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs @@ -7,14 +7,26 @@ using Crestron.SimplSharpPro; namespace PepperDash.Essentials.Core { + /// + /// Represents a IntFeedback + /// public class IntFeedback : Feedback { + /// + /// Gets or sets the IntValue + /// public override int IntValue { get { return _IntValue; } } // ValueFunc.Invoke(); } } int _IntValue; + /// + /// Gets or sets the UShortValue + /// public ushort UShortValue { get { return (ushort)_IntValue; } } //public override eCueType Type { get { return eCueType.Int; } } + /// + /// Gets or sets the TestValue + /// public int TestValue { get; private set; } /// @@ -57,6 +69,10 @@ namespace PepperDash.Essentials.Core } + /// + /// FireUpdate method + /// + /// public override void FireUpdate() { var newValue = InTestMode ? TestValue : ValueFunc.Invoke(); @@ -68,17 +84,26 @@ namespace PepperDash.Essentials.Core } } + /// + /// LinkInputSig method + /// public void LinkInputSig(UShortInputSig sig) { LinkedInputSigs.Add(sig); UpdateSig(sig); } + /// + /// UnlinkInputSig method + /// public void UnlinkInputSig(UShortInputSig sig) { LinkedInputSigs.Remove(sig); } + /// + /// ToString method + /// public override string ToString() { return (InTestMode ? "TEST -- " : "") + IntValue.ToString(); @@ -88,6 +113,9 @@ namespace PepperDash.Essentials.Core /// Puts this in test mode, sets the test value and fires an update. /// /// + /// + /// SetTestValue method + /// public void SetTestValue(int value) { TestValue = value; diff --git a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs index bbf135dc..0daec8c1 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs @@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Core //public override eCueType Type { get { return eCueType.Serial; } } /// - /// Used in testing. Set/Clear functions + /// Gets or sets the TestValue /// public string TestValue { get; private set; } @@ -34,11 +34,18 @@ namespace PepperDash.Essentials.Core { } + /// + /// FireUpdate method + /// + /// public override void FireUpdate() { throw new NotImplementedException("This feedback type does not use Funcs"); } + /// + /// FireUpdate method + /// public void FireUpdate(string newValue) { _SerialValue = newValue; @@ -46,17 +53,26 @@ namespace PepperDash.Essentials.Core OnOutputChange(newValue); } + /// + /// LinkInputSig method + /// public void LinkInputSig(StringInputSig sig) { LinkedInputSigs.Add(sig); UpdateSig(sig); } + /// + /// UnlinkInputSig method + /// public void UnlinkInputSig(StringInputSig sig) { LinkedInputSigs.Remove(sig); } + /// + /// ToString method + /// public override string ToString() { return (InTestMode ? "TEST -- " : "") + SerialValue; @@ -66,6 +82,9 @@ namespace PepperDash.Essentials.Core /// Puts this in test mode, sets the test value and fires an update. /// /// + /// + /// SetTestValue method + /// public void SetTestValue(string value) { TestValue = value; diff --git a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs index fb5cccb5..fe6d6884 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs @@ -8,18 +8,24 @@ using Crestron.SimplSharpPro; namespace PepperDash.Essentials.Core { + /// + /// Represents a StringFeedback + /// public class StringFeedback : Feedback { + /// + /// Gets or sets the StringValue + /// public override string StringValue { get { return _StringValue; } } // ValueFunc.Invoke(); } } string _StringValue; /// - /// Used in testing. Set/Clear functions + /// Gets or sets the TestValue /// public string TestValue { get; private set; } /// - /// Evaluated on FireUpdate + /// Gets or sets the ValueFunc /// public Func ValueFunc { get; private set; } List LinkedInputSigs = new List(); @@ -57,6 +63,10 @@ namespace PepperDash.Essentials.Core ValueFunc = newFunc; } + /// + /// FireUpdate method + /// + /// public override void FireUpdate() { var newValue = InTestMode ? TestValue : ValueFunc.Invoke(); @@ -68,17 +78,26 @@ namespace PepperDash.Essentials.Core } } + /// + /// LinkInputSig method + /// public void LinkInputSig(StringInputSig sig) { LinkedInputSigs.Add(sig); UpdateSig(sig); } + /// + /// UnlinkInputSig method + /// public void UnlinkInputSig(StringInputSig sig) { LinkedInputSigs.Remove(sig); } + /// + /// ToString method + /// public override string ToString() { return (InTestMode ? "TEST -- " : "") + StringValue; @@ -88,6 +107,9 @@ namespace PepperDash.Essentials.Core /// Puts this in test mode, sets the test value and fires an update. /// /// + /// + /// SetTestValue method + /// public void SetTestValue(string value) { TestValue = value; diff --git a/src/PepperDash.Essentials.Core/File/FileIO.cs b/src/PepperDash.Essentials.Core/File/FileIO.cs index 24bdf8d1..0c41522b 100644 --- a/src/PepperDash.Essentials.Core/File/FileIO.cs +++ b/src/PepperDash.Essentials.Core/File/FileIO.cs @@ -14,6 +14,9 @@ namespace PepperDash.Essentials.Core { static CCriticalSection fileLock = new CCriticalSection(); + /// + /// Delegate for GotFileEventHandler + /// public delegate void GotFileEventHandler(object sender, FileEventArgs e); public static event GotFileEventHandler GotFileEvent; @@ -22,6 +25,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetFiles method + /// public static FileInfo[] GetFiles(string fileName) { string fullFilePath = Global.FilePathPrefix + fileName; @@ -38,6 +44,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// GetFile method + /// public static FileInfo GetFile(string fileName) { string fullFilePath = Global.FilePathPrefix + fileName; @@ -60,6 +69,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// ReadDataFromFile method + /// public static string ReadDataFromFile(string fileName) { try @@ -78,6 +90,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// ReadDataFromFile method + /// public static string ReadDataFromFile(FileInfo file) { try @@ -121,6 +136,9 @@ namespace PepperDash.Essentials.Core } + /// + /// ReadDataFromFileASync method + /// public static void ReadDataFromFileASync(string fileName) { try @@ -133,6 +151,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// ReadDataFromFileASync method + /// public static void ReadDataFromFileASync(FileInfo file) { try @@ -247,6 +268,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// FileIoUnitTest method + /// public static bool FileIoUnitTest() { var testData = "Testing FileIO"; @@ -268,9 +292,15 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a FileEventArgs + /// public class FileEventArgs { public FileEventArgs(string data) { Data = data; } + /// + /// Gets or sets the Data + /// public string Data { get; private set; } // readonly } diff --git a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs index 9a2667f0..e2638493 100644 --- a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs +++ b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs @@ -18,6 +18,9 @@ using System.Text; namespace PepperDash.Essentials.Core.Fusion { + /// + /// Represents a EssentialsHuddleSpaceFusionSystemControllerBase + /// public class EssentialsHuddleSpaceFusionSystemControllerBase : Device, IOccupancyStatusProvider { private readonly EssentialsHuddleSpaceRoomFusionRoomJoinMap JoinMap; @@ -196,6 +199,9 @@ namespace PepperDash.Essentials.Core.Fusion get { return _guiDs.RoomGuid; } } + /// + /// Gets or sets the RoomOccupancyRemoteStringFeedback + /// public StringFeedback RoomOccupancyRemoteStringFeedback { get; private set; } protected Func RoomIsOccupiedFeedbackFunc @@ -205,6 +211,9 @@ namespace PepperDash.Essentials.Core.Fusion #region IOccupancyStatusProvider Members + /// + /// Gets or sets the RoomIsOccupiedFeedback + /// public BoolFeedback RoomIsOccupiedFeedback { get; private set; } #endregion @@ -580,6 +589,9 @@ namespace PepperDash.Essentials.Core.Fusion /// Requests the local date and time from the Fusion Server /// /// + /// + /// RequestLocalDateTime method + /// public void RequestLocalDateTime(object callbackObject) { const string timeRequestId = "TimeRequest"; @@ -591,7 +603,7 @@ namespace PepperDash.Essentials.Core.Fusion } /// - /// Generates a room schedule request for this room for the next 24 hours. + /// RequestFullRoomSchedule method /// public void RequestFullRoomSchedule(object callbackObject) { @@ -618,6 +630,9 @@ namespace PepperDash.Essentials.Core.Fusion /// Wrapper method to allow console commands to modify the current meeting end time /// /// meetingID extendTime + /// + /// ModifyMeetingEndTimeConsoleHelper method + /// public void ModifyMeetingEndTimeConsoleHelper(string command) { var extendMinutes = -1; @@ -643,6 +658,9 @@ namespace PepperDash.Essentials.Core.Fusion /// /// /// Number of minutes to extend the meeting. A value of 0 will end the meeting. + /// + /// ModifyMeetingEndTime method + /// public void ModifyMeetingEndTime(string requestId, int extendMinutes) { if (_currentMeeting == null) @@ -677,7 +695,7 @@ namespace PepperDash.Essentials.Core.Fusion } /// - /// Creates and Ad Hoc meeting with a duration of 1 hour, or until the next meeting if in less than 1 hour. + /// CreateAdHocMeeting method /// public void CreateAdHocMeeting(string command) { @@ -1625,6 +1643,9 @@ namespace PepperDash.Essentials.Core.Fusion /// FusionRoom.AddSig with join number - 49 /// /// The new attribute + /// + /// CreateOffsetBoolSig method + /// public static BooleanSigData CreateOffsetBoolSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) { if (number < 50) @@ -1642,6 +1663,9 @@ namespace PepperDash.Essentials.Core.Fusion /// FusionRoom.AddSig with join number - 49 /// /// The new attribute + /// + /// CreateOffsetUshortSig method + /// public static UShortSigData CreateOffsetUshortSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) { if (number < 50) @@ -1659,6 +1683,9 @@ namespace PepperDash.Essentials.Core.Fusion /// FusionRoom.AddSig with join number - 49 /// /// The new attribute + /// + /// CreateOffsetStringSig method + /// public static StringSigData CreateOffsetStringSig(this FusionRoom fr, uint number, string name, eSigIoMask mask) { if (number < 50) @@ -1674,6 +1701,9 @@ namespace PepperDash.Essentials.Core.Fusion /// Creates and returns a static asset /// /// the new asset + /// + /// CreateStaticAsset method + /// public static FusionStaticAsset CreateStaticAsset(this FusionRoom fr, uint number, string name, string type, string instanceId) { @@ -1696,6 +1726,9 @@ namespace PepperDash.Essentials.Core.Fusion } } + /// + /// CreateOccupancySensorAsset method + /// public static FusionOccupancySensor CreateOccupancySensorAsset(this FusionRoom fr, uint number, string name, string type, string instanceId) { @@ -1765,6 +1798,9 @@ namespace PepperDash.Essentials.Core.Fusion } } + /// + /// Represents a RoomInformation + /// public class RoomInformation { public RoomInformation() @@ -1772,18 +1808,51 @@ namespace PepperDash.Essentials.Core.Fusion FusionCustomProperties = new List(); } + /// + /// Gets or sets the ID + /// public string ID { get; set; } + /// + /// Gets or sets the Name + /// public string Name { get; set; } + /// + /// Gets or sets the Location + /// public string Location { get; set; } + /// + /// Gets or sets the Description + /// public string Description { get; set; } + /// + /// Gets or sets the TimeZone + /// public string TimeZone { get; set; } + /// + /// Gets or sets the WebcamURL + /// public string WebcamURL { get; set; } + /// + /// Gets or sets the BacklogMsg + /// public string BacklogMsg { get; set; } + /// + /// Gets or sets the SubErrorMsg + /// public string SubErrorMsg { get; set; } + /// + /// Gets or sets the EmailInfo + /// public string EmailInfo { get; set; } + /// + /// Gets or sets the FusionCustomProperties + /// public List FusionCustomProperties { get; set; } } + /// + /// Represents a FusionCustomProperty + /// public class FusionCustomProperty { public FusionCustomProperty() @@ -1795,9 +1864,21 @@ namespace PepperDash.Essentials.Core.Fusion ID = id; } + /// + /// Gets or sets the ID + /// public string ID { get; set; } + /// + /// Gets or sets the CustomFieldName + /// public string CustomFieldName { get; set; } + /// + /// Gets or sets the CustomFieldType + /// public string CustomFieldType { get; set; } + /// + /// Gets or sets the CustomFieldValue + /// public string CustomFieldValue { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs index 33f2fe1b..d6a7bffa 100644 --- a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs @@ -9,6 +9,9 @@ using PepperDash.Essentials.Core.Bridges; namespace PepperDash.Essentials.Core.Fusion { + /// + /// Represents a EssentialsHuddleSpaceRoomFusionRoomJoinMap + /// public class EssentialsHuddleSpaceRoomFusionRoomJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Fusion/FusionEventHandlers.cs b/src/PepperDash.Essentials.Core/Fusion/FusionEventHandlers.cs index 26647a96..6f374237 100644 --- a/src/PepperDash.Essentials.Core/Fusion/FusionEventHandlers.cs +++ b/src/PepperDash.Essentials.Core/Fusion/FusionEventHandlers.cs @@ -6,13 +6,25 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core.Fusion { + /// + /// Represents a ScheduleChangeEventArgs + /// public class ScheduleChangeEventArgs : EventArgs { + /// + /// Gets or sets the Schedule + /// public RoomSchedule Schedule { get; set; } } + /// + /// Represents a MeetingChangeEventArgs + /// public class MeetingChangeEventArgs : EventArgs { + /// + /// Gets or sets the Meeting + /// public Event Meeting { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs b/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs index cdf1dfa8..930483fb 100644 --- a/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs +++ b/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs @@ -53,11 +53,17 @@ namespace PepperDash.Essentials.Core.Fusion } /// - /// Used in ProcessorProgReg + /// Represents a ProcessorProgramItem /// public class ProcessorProgramItem { + /// + /// Gets or sets the Exists + /// public bool Exists { get; set; } + /// + /// Gets or sets the Name + /// public string Name { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs b/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs index 1ac5dbde..da83d9d7 100644 --- a/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs +++ b/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs @@ -54,6 +54,9 @@ namespace PepperDash.Essentials.Core.Fusion /// /// /// + /// + /// GenerateNewRoomGuid method + /// public string GenerateNewRoomGuid(uint progSlot, string mac) { Guid roomGuid = Guid.NewGuid(); @@ -89,6 +92,9 @@ namespace PepperDash.Essentials.Core.Fusion /// /// /// + /// + /// GetNextAvailableAssetNumber method + /// public static uint GetNextAvailableAssetNumber(FusionRoom room) { uint slotNum = 0; @@ -113,13 +119,28 @@ namespace PepperDash.Essentials.Core.Fusion } + /// + /// Represents a FusionOccupancySensorAsset + /// public class FusionOccupancySensorAsset { // SlotNumber fixed at 4 + /// + /// Gets or sets the SlotNumber + /// public uint SlotNumber { get { return 4; } } + /// + /// Gets or sets the Name + /// public string Name { get { return "Occupancy Sensor"; } } + /// + /// Gets or sets the Type + /// public eAssetType Type { get; set; } + /// + /// Gets or sets the InstanceId + /// public string InstanceId { get; set; } public FusionOccupancySensorAsset() @@ -134,11 +155,26 @@ namespace PepperDash.Essentials.Core.Fusion } } + /// + /// Represents a FusionAsset + /// public class FusionAsset { + /// + /// Gets or sets the SlotNumber + /// public uint SlotNumber { get; set; } + /// + /// Gets or sets the Name + /// public string Name { get; set; } + /// + /// Gets or sets the Type + /// public string Type { get; set; } + /// + /// Gets or sets the InstanceId + /// public string InstanceId { get;set; } public FusionAsset() @@ -164,8 +200,14 @@ namespace PepperDash.Essentials.Core.Fusion //*************************************************************************************************** + /// + /// Represents a RoomSchedule + /// public class RoomSchedule { + /// + /// Gets or sets the Meetings + /// public List Meetings { get; set; } public RoomSchedule() @@ -178,7 +220,7 @@ namespace PepperDash.Essentials.Core.Fusion // Helper Classes for XML API /// - /// Data needed to request the local time from the Fusion server + /// Represents a LocalTimeRequest /// public class LocalTimeRequest { @@ -192,6 +234,9 @@ namespace PepperDash.Essentials.Core.Fusion public class RequestSchedule { //[XmlElement(ElementName = "RequestID")] + /// + /// Gets or sets the RequestID + /// public string RequestID { get; set; } //[XmlElement(ElementName = "RoomID")] public string RoomID { get; set; } @@ -211,15 +256,30 @@ namespace PepperDash.Essentials.Core.Fusion //[XmlRoot(ElementName = "RequestAction")] + /// + /// Represents a RequestAction + /// public class RequestAction { //[XmlElement(ElementName = "RequestID")] + /// + /// Gets or sets the RequestID + /// public string RequestID { get; set; } //[XmlElement(ElementName = "RoomID")] + /// + /// Gets or sets the RoomID + /// public string RoomID { get; set; } //[XmlElement(ElementName = "ActionID")] + /// + /// Gets or sets the ActionID + /// public string ActionID { get; set; } //[XmlElement(ElementName = "Parameters")] + /// + /// Gets or sets the Parameters + /// public List Parameters { get; set; } public RequestAction(string roomID, string actionID, List parameters) @@ -231,22 +291,43 @@ namespace PepperDash.Essentials.Core.Fusion } //[XmlRoot(ElementName = "ActionResponse")] + /// + /// Represents a ActionResponse + /// public class ActionResponse { //[XmlElement(ElementName = "RequestID")] + /// + /// Gets or sets the RequestID + /// public string RequestID { get; set; } //[XmlElement(ElementName = "ActionID")] + /// + /// Gets or sets the ActionID + /// public string ActionID { get; set; } //[XmlElement(ElementName = "Parameters")] + /// + /// Gets or sets the Parameters + /// public List Parameters { get; set; } } //[XmlRoot(ElementName = "Parameter")] + /// + /// Represents a Parameter + /// public class Parameter { //[XmlAttribute(AttributeName = "ID")] + /// + /// Gets or sets the ID + /// public string ID { get; set; } //[XmlAttribute(AttributeName = "Value")] + /// + /// Gets or sets the Value + /// public string Value { get; set; } } @@ -279,51 +360,120 @@ namespace PepperDash.Essentials.Core.Fusion } //[XmlRoot(ElementName = "Event")] + /// + /// Represents a Event + /// public class Event { //[XmlElement(ElementName = "MeetingID")] + /// + /// Gets or sets the MeetingID + /// public string MeetingID { get; set; } //[XmlElement(ElementName = "RVMeetingID")] + /// + /// Gets or sets the RVMeetingID + /// public string RVMeetingID { get; set; } //[XmlElement(ElementName = "Recurring")] + /// + /// Gets or sets the Recurring + /// public string Recurring { get; set; } //[XmlElement(ElementName = "InstanceID")] + /// + /// Gets or sets the InstanceID + /// public string InstanceID { get; set; } //[XmlElement(ElementName = "dtStart")] + /// + /// Gets or sets the dtStart + /// public DateTime dtStart { get; set; } //[XmlElement(ElementName = "dtEnd")] + /// + /// Gets or sets the dtEnd + /// public DateTime dtEnd { get; set; } //[XmlElement(ElementName = "Organizer")] + /// + /// Gets or sets the Organizer + /// public string Organizer { get; set; } //[XmlElement(ElementName = "Attendees")] + /// + /// Gets or sets the Attendees + /// public Attendees Attendees { get; set; } //[XmlElement(ElementName = "Resources")] + /// + /// Gets or sets the Resources + /// public Resources Resources { get; set; } //[XmlElement(ElementName = "IsEvent")] + /// + /// Gets or sets the IsEvent + /// public string IsEvent { get; set; } //[XmlElement(ElementName = "IsRoomViewMeeting")] + /// + /// Gets or sets the IsRoomViewMeeting + /// public string IsRoomViewMeeting { get; set; } //[XmlElement(ElementName = "IsPrivate")] + /// + /// Gets or sets the IsPrivate + /// public string IsPrivate { get; set; } //[XmlElement(ElementName = "IsExchangePrivate")] + /// + /// Gets or sets the IsExchangePrivate + /// public string IsExchangePrivate { get; set; } //[XmlElement(ElementName = "MeetingTypes")] + /// + /// Gets or sets the MeetingTypes + /// public MeetingTypes MeetingTypes { get; set; } //[XmlElement(ElementName = "ParticipantCode")] + /// + /// Gets or sets the ParticipantCode + /// public string ParticipantCode { get; set; } //[XmlElement(ElementName = "PhoneNo")] + /// + /// Gets or sets the PhoneNo + /// public string PhoneNo { get; set; } //[XmlElement(ElementName = "WelcomeMsg")] + /// + /// Gets or sets the WelcomeMsg + /// public string WelcomeMsg { get; set; } //[XmlElement(ElementName = "Subject")] + /// + /// Gets or sets the Subject + /// public string Subject { get; set; } //[XmlElement(ElementName = "LiveMeeting")] + /// + /// Gets or sets the LiveMeeting + /// public LiveMeeting LiveMeeting { get; set; } //[XmlElement(ElementName = "ShareDocPath")] + /// + /// Gets or sets the ShareDocPath + /// public string ShareDocPath { get; set; } //[XmlElement(ElementName = "HaveAttendees")] + /// + /// Gets or sets the HaveAttendees + /// public string HaveAttendees { get; set; } //[XmlElement(ElementName = "HaveResources")] + /// + /// Gets or sets the HaveResources + /// public string HaveResources { get; set; } /// @@ -415,86 +565,167 @@ namespace PepperDash.Essentials.Core.Fusion } //[XmlRoot(ElementName = "Resources")] + /// + /// Represents a Resources + /// public class Resources { //[XmlElement(ElementName = "Rooms")] + /// + /// Gets or sets the Rooms + /// public Rooms Rooms { get; set; } } //[XmlRoot(ElementName = "Rooms")] + /// + /// Represents a Rooms + /// public class Rooms { //[XmlElement(ElementName = "Room")] + /// + /// Gets or sets the Room + /// public List Room { get; set; } } //[XmlRoot(ElementName = "Room")] + /// + /// Represents a Room + /// public class Room { //[XmlElement(ElementName = "Name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } //[XmlElement(ElementName = "ID")] + /// + /// Gets or sets the ID + /// public string ID { get; set; } //[XmlElement(ElementName = "MPType")] + /// + /// Gets or sets the MPType + /// public string MPType { get; set; } } //[XmlRoot(ElementName = "Attendees")] + /// + /// Represents a Attendees + /// public class Attendees { //[XmlElement(ElementName = "Required")] + /// + /// Gets or sets the Required + /// public Required Required { get; set; } //[XmlElement(ElementName = "Optional")] + /// + /// Gets or sets the Optional + /// public Optional Optional { get; set; } } //[XmlRoot(ElementName = "Required")] + /// + /// Represents a Required + /// public class Required { //[XmlElement(ElementName = "Attendee")] + /// + /// Gets or sets the Attendee + /// public List Attendee { get; set; } } //[XmlRoot(ElementName = "Optional")] + /// + /// Represents a Optional + /// public class Optional { //[XmlElement(ElementName = "Attendee")] + /// + /// Gets or sets the Attendee + /// public List Attendee { get; set; } } //[XmlRoot(ElementName = "MeetingType")] + /// + /// Represents a MeetingType + /// public class MeetingType { //[XmlAttribute(AttributeName = "ID")] + /// + /// Gets or sets the ID + /// public string ID { get; set; } //[XmlAttribute(AttributeName = "Value")] + /// + /// Gets or sets the Value + /// public string Value { get; set; } } //[XmlRoot(ElementName = "MeetingTypes")] + /// + /// Represents a MeetingTypes + /// public class MeetingTypes { //[XmlElement(ElementName = "MeetingType")] + /// + /// Gets or sets the MeetingType + /// public List MeetingType { get; set; } } //[XmlRoot(ElementName = "LiveMeeting")] + /// + /// Represents a LiveMeeting + /// public class LiveMeeting { //[XmlElement(ElementName = "URL")] + /// + /// Gets or sets the URL + /// public string URL { get; set; } //[XmlElement(ElementName = "ID")] + /// + /// Gets or sets the ID + /// public string ID { get; set; } //[XmlElement(ElementName = "Key")] + /// + /// Gets or sets the Key + /// public string Key { get; set; } //[XmlElement(ElementName = "Subject")] + /// + /// Gets or sets the Subject + /// public string Subject { get; set; } } //[XmlRoot(ElementName = "LiveMeetingURL")] + /// + /// Represents a LiveMeetingURL + /// public class LiveMeetingURL { //[XmlElement(ElementName = "LiveMeeting")] + /// + /// Gets or sets the LiveMeeting + /// public LiveMeeting LiveMeeting { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs b/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs index c21df098..6565c6de 100644 --- a/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs +++ b/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs @@ -6,18 +6,54 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core { + /// + /// Represents a EthernetAdapterInfo + /// public class EthernetAdapterInfo { + /// + /// Gets or sets the Type + /// public EthernetAdapterType Type { get; set; } + /// + /// Gets or sets the DhcpIsOn + /// public bool DhcpIsOn { get; set; } + /// + /// Gets or sets the Hostname + /// public string Hostname { get; set; } + /// + /// Gets or sets the MacAddress + /// public string MacAddress { get; set; } + /// + /// Gets or sets the IpAddress + /// public string IpAddress { get; set; } + /// + /// Gets or sets the Subnet + /// public string Subnet { get; set; } + /// + /// Gets or sets the Gateway + /// public string Gateway { get; set; } + /// + /// Gets or sets the Dns1 + /// public string Dns1 { get; set; } + /// + /// Gets or sets the Dns2 + /// public string Dns2 { get; set; } + /// + /// Gets or sets the Dns3 + /// public string Dns3 { get; set; } + /// + /// Gets or sets the Domain + /// public string Domain { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Global/Global.cs b/src/PepperDash.Essentials.Core/Global/Global.cs index 9e4b6462..95773858 100644 --- a/src/PepperDash.Essentials.Core/Global/Global.cs +++ b/src/PepperDash.Essentials.Core/Global/Global.cs @@ -24,14 +24,26 @@ namespace PepperDash.Essentials.Core { public static class Global { + /// + /// Gets or sets the ControlSystem + /// public static CrestronControlSystem ControlSystem { get; set; } + /// + /// Gets or sets the Platform + /// public static eDevicePlatform Platform { get { return CrestronEnvironment.DevicePlatform; } } public static Dictionary EthernetAdapterInfoCollection { get; private set; } + /// + /// Gets or sets the LicenseManager + /// public static LicenseManager LicenseManager { get; set; } + /// + /// Gets or sets the ProcessorSeries + /// public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } } // TODO: consider making this configurable later @@ -99,7 +111,7 @@ namespace PepperDash.Essentials.Core } /// - /// The file path prefix to the folder containing configuration files + /// Gets or sets the FilePathPrefix /// public static string FilePathPrefix { get; private set; } @@ -162,6 +174,9 @@ namespace PepperDash.Essentials.Core /// Sets the Assembly version to the version of the Essentials Library /// /// + /// + /// SetAssemblyVersion method + /// public static void SetAssemblyVersion(string assemblyVersion) { AssemblyVersion = assemblyVersion; diff --git a/src/PepperDash.Essentials.Core/Global/JobTimer.cs b/src/PepperDash.Essentials.Core/Global/JobTimer.cs index 83159c12..6a6fd683 100644 --- a/src/PepperDash.Essentials.Core/Global/JobTimer.cs +++ b/src/PepperDash.Essentials.Core/Global/JobTimer.cs @@ -16,6 +16,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// AddAction method + /// public static void AddAction(Action act) { @@ -26,6 +29,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// AddJobTimerItem method + /// public static void AddJobTimerItem(JobTimerItem item) { var existing = Items.FirstOrDefault(i => i.Key == item.Key); @@ -51,9 +57,9 @@ namespace PepperDash.Essentials.Core } } - /// - /// - /// + /// + /// Represents a JobTimerItem + /// public class JobTimerItem { public string Key { get; private set; } diff --git a/src/PepperDash.Essentials.Core/Global/Scheduler.cs b/src/PepperDash.Essentials.Core/Global/Scheduler.cs index e226ce5c..aee40cff 100644 --- a/src/PepperDash.Essentials.Core/Global/Scheduler.cs +++ b/src/PepperDash.Essentials.Core/Global/Scheduler.cs @@ -115,6 +115,9 @@ Recurrence Days: {evt.Value.Recurrence.RecurrenceDays} /// Adds the event group to the global list /// /// + /// + /// AddEventGroup method + /// public static void AddEventGroup(ScheduledEventGroup eventGroup) { // Add this group to the global collection @@ -126,6 +129,9 @@ Recurrence Days: {evt.Value.Recurrence.RecurrenceDays} /// Removes the event group from the global list /// /// + /// + /// RemoveEventGroup method + /// public static void RemoveEventGroup(ScheduledEventGroup eventGroup) { if(!EventGroups.ContainsKey(eventGroup.Name)) @@ -148,6 +154,9 @@ Recurrence Days: {evt.Value.Recurrence.RecurrenceDays} /// /// /// + /// + /// CheckIfDayOfWeekMatchesRecurrenceDays method + /// public static bool CheckIfDayOfWeekMatchesRecurrenceDays(DateTime eventTime, ScheduledEventCommon.eWeekDays recurrence) { bool isMatch = false; @@ -206,16 +215,25 @@ Recurrence Days: {evt.Value.Recurrence.RecurrenceDays} return isMatch; } + /// + /// CheckEventTimeForMatch method + /// public static bool CheckEventTimeForMatch(ScheduledEvent evnt, DateTime time) { return evnt.DateAndTime.Hour == time.Hour && evnt.DateAndTime.Minute == time.Minute; } + /// + /// CheckEventRecurrenceForMatch method + /// public static bool CheckEventRecurrenceForMatch(ScheduledEvent evnt, ScheduledEventCommon.eWeekDays days) { return evnt.Recurrence.RecurrenceDays == days; } + /// + /// CreateEventFromConfig method + /// public static void CreateEventFromConfig(ScheduledEventConfig config, ScheduledEventGroup group, ScheduledEvent.UserEventCallBack handler) { try diff --git a/src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs b/src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs index 4bf1a551..177b1c22 100644 --- a/src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs +++ b/src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs @@ -23,9 +23,9 @@ namespace PepperDash.Essentials.Core /// public BoolFeedback InUseFeedback { get; private set; } - /// - /// Feedback that changes with the count of users - /// + /// + /// Gets or sets the InUseCountFeedback + /// public IntFeedback InUseCountFeedback { get; private set; } public InUseTracking() @@ -39,6 +39,9 @@ namespace PepperDash.Essentials.Core /// multiple times, provided that the label is different /// /// A label to identify the instance of the user. Treated like a "role", etc. + /// + /// AddUser method + /// public void AddUser(object objectToAdd, string label) { // check if an exact object/label pair exists and ignore if so. No double-registers. @@ -53,9 +56,9 @@ namespace PepperDash.Essentials.Core InUseCountFeedback.FireUpdate(); } - /// - /// Remove a user object from this tracking - /// + /// + /// RemoveUser method + /// public void RemoveUser(object objectToRemove, string label) { // Find the user object if exists and remove it @@ -70,10 +73,9 @@ namespace PepperDash.Essentials.Core } } - /// - /// Wrapper for label/object pair representing in-use status. Allows the same object to - /// register for in-use with different roles. - /// + /// + /// Represents a InUseTrackingObject + /// public class InUseTrackingObject { public string Label { get; private set; } diff --git a/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs b/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs index 4f48e278..d55194fd 100644 --- a/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs +++ b/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs @@ -7,6 +7,9 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core.Interfaces { + /// + /// Defines the contract for ILogStrings + /// public interface ILogStrings : IKeyed { /// diff --git a/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs b/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs index 47c3674e..bb835919 100644 --- a/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs +++ b/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs @@ -7,6 +7,9 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core.Interfaces { + /// + /// Defines the contract for ILogStringsWithLevel + /// public interface ILogStringsWithLevel : IKeyed { /// diff --git a/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs index 37760e09..01f71098 100644 --- a/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs +++ b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs @@ -24,6 +24,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetSerializedJoinMapForDevice method + /// public static string GetSerializedJoinMapForDevice(string joinMapKey) { if (string.IsNullOrEmpty(joinMapKey)) @@ -39,6 +42,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetJoinMapForDevice method + /// public static string GetJoinMapForDevice(string joinMapKey) { return GetSerializedJoinMapForDevice(joinMapKey); @@ -143,7 +149,7 @@ namespace PepperDash.Essentials.Core } /// - /// Prints the join information to console + /// PrintJoinMapInfo method /// public void PrintJoinMapInfo() { @@ -195,7 +201,7 @@ namespace PepperDash.Essentials.Core } /// - /// Prints the join information to console + /// MarkdownJoinMapInfo method /// public void MarkdownJoinMapInfo(string deviceKey, string bridgeKey) { @@ -273,6 +279,9 @@ namespace PepperDash.Essentials.Core /// Attempts to find the matching key for the custom join and if found overwrites the default JoinData with the custom /// /// + /// + /// SetCustomJoinData method + /// public void SetCustomJoinData(Dictionary joinData) { foreach (var customJoinData in joinData) @@ -294,22 +303,18 @@ namespace PepperDash.Essentials.Core PrintJoinMapInfo(); } - ///// - ///// Returns the join number for the join with the specified key - ///// - ///// - ///// - //public uint GetJoinForKey(string key) - //{ - // return Joins.ContainsKey(key) ? Joins[key].JoinNumber : 0; - //} + /// + /// Returns the join span for the join with the specified key + /// + /// + /// - ///// - ///// Returns the join span for the join with the specified key - ///// - ///// - ///// + /// + /// Returns the join span for the join with the specified key + /// + /// + /// //public uint GetJoinSpanForKey(string key) //{ // return Joins.ContainsKey(key) ? Joins[key].JoinSpan : 0; @@ -333,6 +338,9 @@ namespace PepperDash.Essentials.Core } [Flags] + /// + /// Enumeration of eJoinType values + /// public enum eJoinType { None = 0, @@ -346,7 +354,7 @@ namespace PepperDash.Essentials.Core } /// - /// Metadata describing the join + /// Represents a JoinMetadata /// public class JoinMetadata { @@ -360,16 +368,25 @@ namespace PepperDash.Essentials.Core /// Signal type(s) /// [JsonProperty("joinType")] + /// + /// Gets or sets the JoinType + /// public eJoinType JoinType { get; set; } /// /// Indicates whether the join is read and/or write /// [JsonProperty("joinCapabilities")] + /// + /// Gets or sets the JoinCapabilities + /// public eJoinCapabilities JoinCapabilities { get; set; } /// /// Indicates a set of valid values (particularly if this translates to an enum /// [JsonProperty("validValues")] + /// + /// Gets or sets the ValidValues + /// public string[] ValidValues { get; set; } } @@ -393,6 +410,9 @@ namespace PepperDash.Essentials.Core /// Fusion Attribute Name (optional) /// [JsonProperty("attributeName")] + /// + /// Gets or sets the AttributeName + /// public string AttributeName { get; set; } } @@ -478,6 +498,9 @@ namespace PepperDash.Essentials.Core /// Sets the join offset value /// /// + /// + /// SetJoinOffset method + /// public void SetJoinOffset(uint joinOffset) { _joinOffset = joinOffset; @@ -502,11 +525,17 @@ namespace PepperDash.Essentials.Core get { return _data.AttributeName; } } + /// + /// SetCustomJoinData method + /// public void SetCustomJoinData(JoinData customJoinData) { _data = customJoinData; } + /// + /// GetNameAttribute method + /// public string GetNameAttribute(MemberInfo memberInfo) { var name = string.Empty; @@ -523,6 +552,9 @@ namespace PepperDash.Essentials.Core [AttributeUsage(AttributeTargets.All)] + /// + /// Represents a JoinNameAttribute + /// public class JoinNameAttribute : Attribute { private string _Name; diff --git a/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs b/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs index a242591e..f8500996 100644 --- a/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs +++ b/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs @@ -15,8 +15,17 @@ namespace PepperDash.Essentials.License { public abstract class LicenseManager { + /// + /// Gets or sets the LicenseIsValid + /// public BoolFeedback LicenseIsValid { get; protected set; } + /// + /// Gets or sets the LicenseMessage + /// public StringFeedback LicenseMessage { get; protected set; } + /// + /// Gets or sets the LicenseLog + /// public StringFeedback LicenseLog { get; protected set; } protected LicenseManager() @@ -30,6 +39,9 @@ namespace PepperDash.Essentials.License protected abstract string GetStatusString(); } + /// + /// Represents a MockEssentialsLicenseManager + /// public class MockEssentialsLicenseManager : LicenseManager { /// diff --git a/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs b/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs index c762147c..de581681 100644 --- a/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core.Lighting { /// - /// Requirements for a device that implements lighting scene control + /// Defines the contract for ILightingScenes /// public interface ILightingScenes { @@ -18,13 +18,16 @@ namespace PepperDash.Essentials.Core.Lighting } + /// + /// Defines the contract for ILightingScenesDynamic + /// public interface ILightingScenesDynamic : ILightingScenes { event EventHandler LightingScenesUpdated; } /// - /// Requirements for a device that implements master raise/lower + /// Defines the contract for ILightingMasterRaiseLower /// public interface ILightingMasterRaiseLower { @@ -34,7 +37,7 @@ namespace PepperDash.Essentials.Core.Lighting } /// - /// Requiremnts for controlling a lighting load + /// Defines the contract for ILightingLoad /// public interface ILightingLoad { @@ -46,8 +49,14 @@ namespace PepperDash.Essentials.Core.Lighting BoolFeedback LoadIsOnFeedback { get; } } + /// + /// Represents a LightingSceneChangeEventArgs + /// public class LightingSceneChangeEventArgs : EventArgs { + /// + /// Gets or sets the CurrentLightingScene + /// public LightingScene CurrentLightingScene { get; private set; } public LightingSceneChangeEventArgs(LightingScene scene) diff --git a/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs b/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs index b0e0ddbe..788dbb35 100644 --- a/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs +++ b/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs @@ -5,11 +5,20 @@ using Newtonsoft.Json; namespace PepperDash.Essentials.Core.Lighting { + /// + /// Represents a LightingScene + /// public class LightingScene { [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the ID + /// public string ID { get; set; } bool _IsActive; [JsonProperty("isActive", NullValueHandling = NullValueHandling.Ignore)] @@ -27,9 +36,15 @@ namespace PepperDash.Essentials.Core.Lighting } [JsonProperty("sortOrder", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the SortOrder + /// public int SortOrder { get; set; } [JsonIgnore] + /// + /// Gets or sets the IsActiveFeedback + /// public BoolFeedback IsActiveFeedback { get; set; } public LightingScene() diff --git a/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs b/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs index 653e2b18..203d75ed 100644 --- a/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs +++ b/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs @@ -47,14 +47,26 @@ namespace PepperDash.Essentials.Core.Privacy } bool _enableLeds; + /// + /// Gets or sets the Inputs + /// public List Inputs { get; private set; } + /// + /// Gets or sets the RedLedRelay + /// public GenericRelayDevice RedLedRelay { get; private set; } bool _redLedRelayState; + /// + /// Gets or sets the GreenLedRelay + /// public GenericRelayDevice GreenLedRelay { get; private set; } bool _greenLedRelayState; + /// + /// Gets or sets the PrivacyDevice + /// public IPrivacy PrivacyDevice { get; private set; } public MicrophonePrivacyController(string key, MicrophonePrivacyControllerConfig config) : @@ -65,6 +77,10 @@ namespace PepperDash.Essentials.Core.Privacy Inputs = new List(); } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { foreach (var i in Config.Inputs) @@ -101,6 +117,10 @@ namespace PepperDash.Essentials.Core.Privacy #region Overrides of Device + /// + /// Initialize method + /// + /// public override void Initialize() { CheckPrivacyMode(); @@ -108,6 +128,9 @@ namespace PepperDash.Essentials.Core.Privacy #endregion + /// + /// SetPrivacyDevice method + /// public void SetPrivacyDevice(IPrivacy privacyDevice) { PrivacyDevice = privacyDevice; @@ -236,6 +259,9 @@ namespace PepperDash.Essentials.Core.Privacy } } + /// + /// Represents a MicrophonePrivacyControllerFactory + /// public class MicrophonePrivacyControllerFactory : EssentialsDeviceFactory { public MicrophonePrivacyControllerFactory() @@ -243,6 +269,10 @@ namespace PepperDash.Essentials.Core.Privacy TypeNames = new List() { "microphoneprivacycontroller" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new MIcrophonePrivacyController Device"); diff --git a/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs b/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs index 1c172090..902b51ed 100644 --- a/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs +++ b/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs @@ -8,15 +8,33 @@ using PepperDash.Essentials.Core.CrestronIO; namespace PepperDash.Essentials.Core.Privacy { + /// + /// Represents a MicrophonePrivacyControllerConfig + /// public class MicrophonePrivacyControllerConfig { + /// + /// Gets or sets the Inputs + /// public List Inputs { get; set; } + /// + /// Gets or sets the GreenLedRelay + /// public KeyedDevice GreenLedRelay { get; set; } + /// + /// Gets or sets the RedLedRelay + /// public KeyedDevice RedLedRelay { get; set; } } + /// + /// Represents a KeyedDevice + /// public class KeyedDevice { + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs b/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs index bd57b70a..b10be947 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs @@ -26,6 +26,10 @@ namespace PepperDash.Essentials.Core Device = device; } + /// + /// Start method + /// + /// public override void Start() { Device.OnlineStatusChange -= Device_OnlineStatusChange; @@ -33,6 +37,10 @@ namespace PepperDash.Essentials.Core GetStatus(); } + /// + /// Stop method + /// + /// public override void Stop() { Device.OnlineStatusChange -= Device_OnlineStatusChange; diff --git a/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs b/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs index a3a427f1..eca013c5 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs @@ -221,9 +221,10 @@ namespace PepperDash.Essentials.Core } } - /// - /// Stop the poll cycle - /// + /// + /// Stop method + /// + /// public override void Stop() { if(MonitorBytesReceived) @@ -280,11 +281,14 @@ namespace PepperDash.Essentials.Core } } - /// - /// Communication Monitor Configuration from Essentials Configuration - /// + /// + /// Represents a CommunicationMonitorConfig + /// public class CommunicationMonitorConfig { + /// + /// Gets or sets the PollInterval + /// public int PollInterval { get; set; } public int TimeToWarning { get; set; } public int TimeToError { get; set; } diff --git a/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs b/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs index 6e4a847e..a4d8d2ae 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs @@ -6,6 +6,9 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IStatusMonitor + /// public interface IStatusMonitor { IKeyed Parent { get; } @@ -18,9 +21,9 @@ namespace PepperDash.Essentials.Core } - /// - /// Represents a class that has a basic communication monitoring - /// + /// + /// Defines the contract for ICommunicationMonitor + /// public interface ICommunicationMonitor { StatusMonitorBase CommunicationMonitor { get; } @@ -39,7 +42,13 @@ namespace PepperDash.Essentials.Core public class MonitorStatusChangeEventArgs : EventArgs { + /// + /// Gets or sets the Status + /// public MonitorStatus Status { get; private set; } + /// + /// Gets or sets the Message + /// public string Message { get; private set; } public MonitorStatusChangeEventArgs(MonitorStatus status) diff --git a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs index 4abb930f..1934f945 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs @@ -18,12 +18,18 @@ namespace PepperDash.Essentials.Core public event EventHandler StatusChange; /// - /// Format returned: "parentdevkey-comMonitor" + /// Gets or sets the Key /// public string Key { get { return Parent.Key + "-comMonitor"; } } + /// + /// Gets or sets the Name + /// public string Name { get { return "Comm. monitor"; } } + /// + /// Gets or sets the Parent + /// public IKeyed Parent { get; private set; } public BoolFeedback IsOnlineFeedback { get; set; } diff --git a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs index 7f985fe0..a517e5d0 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs @@ -26,10 +26,19 @@ namespace PepperDash.Essentials.Core public event EventHandler StatusChange; + /// + /// Gets or sets the Status + /// public MonitorStatus Status { get; protected set; } + /// + /// Gets or sets the Message + /// public string Message { get; private set; } + /// + /// Gets or sets the IsOnlineFeedback + /// public BoolFeedback IsOnlineFeedback { get; set; } public StatusMonitorCollection(IKeyed parent) @@ -37,6 +46,9 @@ namespace PepperDash.Essentials.Core Parent = parent; } + /// + /// Start method + /// public void Start() { foreach (var mon in Monitors) @@ -104,6 +116,9 @@ namespace PepperDash.Essentials.Core ProcessStatuses(); } + /// + /// Stop method + /// public void Stop() { throw new NotImplementedException(); @@ -111,6 +126,9 @@ namespace PepperDash.Essentials.Core #endregion + /// + /// AddMonitor method + /// public void AddMonitor(IStatusMonitor monitor) { if (!Monitors.Contains(monitor)) diff --git a/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs b/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs index 06a4fbd9..a353a072 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs @@ -31,27 +31,63 @@ namespace PepperDash.Essentials.Core.Monitoring public Dictionary ProgramStatusFeedbackCollection; public Dictionary EthernetStatusFeedbackCollection; + /// + /// Gets or sets the TimeZoneFeedback + /// public IntFeedback TimeZoneFeedback { get; protected set; } + /// + /// Gets or sets the TimeZoneTextFeedback + /// public StringFeedback TimeZoneTextFeedback { get; protected set; } + /// + /// Gets or sets the IoControllerVersionFeedback + /// public StringFeedback IoControllerVersionFeedback { get; protected set; } + /// + /// Gets or sets the SnmpVersionFeedback + /// public StringFeedback SnmpVersionFeedback { get; protected set; } + /// + /// Gets or sets the BaCnetAppVersionFeedback + /// public StringFeedback BaCnetAppVersionFeedback { get; protected set; } + /// + /// Gets or sets the ControllerVersionFeedback + /// public StringFeedback ControllerVersionFeedback { get; protected set; } //new feedbacks. Issue #50 + /// + /// Gets or sets the SerialNumberFeedback + /// public StringFeedback SerialNumberFeedback { get; protected set; } + /// + /// Gets or sets the ModelFeedback + /// public StringFeedback ModelFeedback { get; set; } + /// + /// Gets or sets the UptimeFeedback + /// public StringFeedback UptimeFeedback { get; set; } + /// + /// Gets or sets the LastStartFeedback + /// public StringFeedback LastStartFeedback { get; set; } + /// + /// Gets or sets the IsApplianceFeedback + /// public BoolFeedback IsApplianceFeedback { get; protected set; } private bool _isApplianceFb { get { return CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance; } } + /// + /// Gets or sets the IsServerFeedback + /// public BoolFeedback IsServerFeedback { get; protected set; } private bool _isServerFb { @@ -110,6 +146,9 @@ namespace PepperDash.Essentials.Core.Monitoring _uptimePollTimer = null; } + /// + /// PollUptime method + /// public void PollUptime(object obj) { var consoleResponse = string.Empty; @@ -142,6 +181,9 @@ namespace PepperDash.Essentials.Core.Monitoring _uptime = uptimeRaw.Substring(forIndex + 4); } + /// + /// ProcessorReboot method + /// public static void ProcessorReboot() { if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Server) return; @@ -152,6 +194,9 @@ namespace PepperDash.Essentials.Core.Monitoring CrestronConsole.SendControlSystemCommand("reboot", ref response); } + /// + /// ProgramReset method + /// public static void ProgramReset(uint index) { if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Server) return; @@ -242,6 +287,10 @@ namespace PepperDash.Essentials.Core.Monitoring } } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { RefreshSystemMonitorData(); @@ -249,6 +298,10 @@ namespace PepperDash.Essentials.Core.Monitoring return base.CustomActivate(); } + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new SystemMonitorJoinMap(joinStart); @@ -413,18 +466,51 @@ namespace PepperDash.Essentials.Core.Monitoring public class EthernetStatusFeedbacks { + /// + /// Gets or sets the HostNameFeedback + /// public StringFeedback HostNameFeedback { get; protected set; } + /// + /// Gets or sets the DnsServerFeedback + /// public StringFeedback DnsServerFeedback { get; protected set; } + /// + /// Gets or sets the DomainFeedback + /// public StringFeedback DomainFeedback { get; protected set; } + /// + /// Gets or sets the MacAddressFeedback + /// public StringFeedback MacAddressFeedback { get; protected set; } + /// + /// Gets or sets the DhcpStatusFeedback + /// public StringFeedback DhcpStatusFeedback { get; protected set; } + /// + /// Gets or sets the CurrentIpAddressFeedback + /// public StringFeedback CurrentIpAddressFeedback { get; protected set; } + /// + /// Gets or sets the CurrentSubnetMaskFeedback + /// public StringFeedback CurrentSubnetMaskFeedback { get; protected set; } + /// + /// Gets or sets the CurrentDefaultGatewayFeedback + /// public StringFeedback CurrentDefaultGatewayFeedback { get; protected set; } + /// + /// Gets or sets the StaticIpAddressFeedback + /// public StringFeedback StaticIpAddressFeedback { get; protected set; } + /// + /// Gets or sets the StaticSubnetMaskFeedback + /// public StringFeedback StaticSubnetMaskFeedback { get; protected set; } + /// + /// Gets or sets the StaticDefaultGatewayFeedback + /// public StringFeedback StaticDefaultGatewayFeedback { get; protected set; } public EthernetStatusFeedbacks(short adapterIndex) @@ -510,6 +596,9 @@ namespace PepperDash.Essentials.Core.Monitoring CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_DHCP_STATE, adapterIndex)); } + /// + /// UpdateEthernetStatus method + /// public void UpdateEthernetStatus() { HostNameFeedback.FireUpdate(); @@ -527,24 +616,60 @@ namespace PepperDash.Essentials.Core.Monitoring } + /// + /// Represents a ProgramStatusFeedbacks + /// public class ProgramStatusFeedbacks { public event EventHandler ProgramInfoChanged; + /// + /// Gets or sets the Program + /// public Program Program; + /// + /// Gets or sets the ProgramInfo + /// public ProgramInfo ProgramInfo { get; set; } + /// + /// Gets or sets the ProgramStartedFeedback + /// public BoolFeedback ProgramStartedFeedback; + /// + /// Gets or sets the ProgramStoppedFeedback + /// public BoolFeedback ProgramStoppedFeedback; + /// + /// Gets or sets the ProgramRegisteredFeedback + /// public BoolFeedback ProgramRegisteredFeedback; + /// + /// Gets or sets the ProgramUnregisteredFeedback + /// public BoolFeedback ProgramUnregisteredFeedback; + /// + /// Gets or sets the ProgramNameFeedback + /// public StringFeedback ProgramNameFeedback; + /// + /// Gets or sets the ProgramCompileTimeFeedback + /// public StringFeedback ProgramCompileTimeFeedback; + /// + /// Gets or sets the CrestronDataBaseVersionFeedback + /// public StringFeedback CrestronDataBaseVersionFeedback; // SIMPL windows version + /// + /// Gets or sets the EnvironmentVersionFeedback + /// public StringFeedback EnvironmentVersionFeedback; + /// + /// Gets or sets the AggregatedProgramInfoFeedback + /// public StringFeedback AggregatedProgramInfoFeedback; public ProgramStatusFeedbacks(Program program) @@ -580,7 +705,7 @@ namespace PepperDash.Essentials.Core.Monitoring } /// - /// Retrieves information about a running program + /// GetProgramInfo method /// public void GetProgramInfo() { @@ -686,6 +811,9 @@ namespace PepperDash.Essentials.Core.Monitoring OnProgramInfoChanged(); } + /// + /// OnProgramInfoChanged method + /// public void OnProgramInfoChanged() { //Debug.LogMessage(LogEventLevel.Debug, "Firing ProgramInfoChanged for slot: {0}", Program.Number); @@ -729,7 +857,7 @@ namespace PepperDash.Essentials.Core.Monitoring } /// - /// Class for serializing program slot information + /// Represents a ProgramInfo /// public class ProgramInfo { @@ -744,15 +872,27 @@ namespace PepperDash.Essentials.Core.Monitoring [JsonConverter(typeof (StringEnumConverter))] [JsonProperty("registrationState")] + /// + /// Gets or sets the RegistrationState + /// public eProgramRegistrationState RegistrationState { get; set; } [JsonProperty("programFile")] + /// + /// Gets or sets the ProgramFile + /// public string ProgramFile { get; set; } [JsonProperty("friendlyName")] + /// + /// Gets or sets the FriendlyName + /// public string FriendlyName { get; set; } [JsonProperty("compilerRevision")] + /// + /// Gets or sets the CompilerRevision + /// public string CompilerRevision { get; set; } [JsonIgnore] @@ -765,36 +905,66 @@ namespace PepperDash.Essentials.Core.Monitoring } [JsonProperty("compileTime")] + /// + /// Gets or sets the CompileTime + /// public string CompileTime { get; set; } [JsonProperty("include4Dat")] + /// + /// Gets or sets the Include4Dat + /// public string Include4Dat { get; set; } // SIMPL Windows properties [JsonProperty("systemName")] + /// + /// Gets or sets the SystemName + /// public string SystemName { get; set; } [JsonProperty("crestronDb")] + /// + /// Gets or sets the CrestronDb + /// public string CrestronDb { get; set; } [JsonProperty("environment")] + /// + /// Gets or sets the Environment + /// public string Environment { get; set; } [JsonProperty("programmer")] + /// + /// Gets or sets the Programmer + /// public string Programmer { get; set; } // SSP Properties [JsonProperty("applicationName")] + /// + /// Gets or sets the ApplicationName + /// public string ApplicationName { get; set; } [JsonProperty("programTool")] + /// + /// Gets or sets the ProgramTool + /// public string ProgramTool { get; set; } [JsonProperty("minFirmwareVersion")] + /// + /// Gets or sets the MinFirmwareVersion + /// public string MinFirmwareVersion { get; set; } [JsonProperty("plugInVersion")] + /// + /// Gets or sets the PlugInVersion + /// public string PlugInVersion { get; set; } public ProgramInfo(uint number) @@ -819,8 +989,14 @@ namespace PepperDash.Essentials.Core.Monitoring } } + /// + /// Represents a ProgramInfoEventArgs + /// public class ProgramInfoEventArgs : EventArgs { + /// + /// Gets or sets the ProgramInfo + /// public ProgramInfo ProgramInfo; public ProgramInfoEventArgs(ProgramInfo progInfo) diff --git a/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs b/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs index aca4f008..f2043dbc 100644 --- a/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs +++ b/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs @@ -84,8 +84,14 @@ namespace PepperDash.Essentials.Core #region IPartitionController Members + /// + /// Gets or sets the AdjacentRoomKeys + /// public List AdjacentRoomKeys { get; private set; } + /// + /// SetAutoMode method + /// public void SetAutoMode() { Debug.LogMessage(Serilog.Events.LogEventLevel.Verbose, $"Setting {Key} to Auto Mode", this); @@ -110,6 +116,9 @@ namespace PepperDash.Essentials.Core PartitionPresentFeedback.FireUpdate(); } + /// + /// SetManualMode method + /// public void SetManualMode() { Debug.LogMessage(Serilog.Events.LogEventLevel.Verbose, $"Setting {Key} to Manual Mode", this); @@ -134,6 +143,9 @@ namespace PepperDash.Essentials.Core } + /// + /// SetPartitionStatePresent method + /// public void SetPartitionStatePresent() { if (!IsInAutoMode) @@ -143,6 +155,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// SetPartitionStateNotPresent method + /// public void SetPartitionStateNotPresent() { if (!IsInAutoMode) @@ -152,6 +167,9 @@ namespace PepperDash.Essentials.Core } } + /// + /// ToggglePartitionState method + /// public void ToggglePartitionState() { Debug.LogMessage(Serilog.Events.LogEventLevel.Verbose, $"Toggling Partition State for {Key}", this); @@ -168,18 +186,27 @@ namespace PepperDash.Essentials.Core #region IPartitionStateProvider Members + /// + /// Gets or sets the PartitionPresentFeedback + /// public BoolFeedback PartitionPresentFeedback { get; private set; } #endregion #region IKeyName Members + /// + /// Gets or sets the Name + /// public string Name { get; private set; } #endregion #region IKeyed Members + /// + /// Gets or sets the Key + /// public string Key { get; private set; } #endregion diff --git a/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs b/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs index 418da80c..f41a3f35 100644 --- a/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs +++ b/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs @@ -5,7 +5,7 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { /// - /// Describes the functionality of a device that senses and provides partition state + /// Defines the contract for IPartitionStateProvider /// public interface IPartitionStateProvider : IKeyName { @@ -17,7 +17,7 @@ namespace PepperDash.Essentials.Core } /// - /// Describes the functionality of a device that can provide partition state either manually via user input or optionally via a sensor state + /// Defines the contract for IPartitionController /// public interface IPartitionController : IPartitionStateProvider { diff --git a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj index b1406d69..251ba316 100644 --- a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj +++ b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj @@ -22,6 +22,7 @@ pdbonly + bin\$(Configuration)\PepperDash_Essentials_Core.xml diff --git a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs index 3de08806..a74ba16a 100644 --- a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs +++ b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs @@ -56,7 +56,7 @@ namespace PepperDash.Essentials } /// - /// Retrieves all the loaded assemblies from the program directory + /// AddProgramAssemblies method /// public static void AddProgramAssemblies() { @@ -115,6 +115,9 @@ namespace PepperDash.Essentials } + /// + /// SetEssentialsAssembly method + /// public static void SetEssentialsAssembly(string name, Assembly assembly) { var loadedAssembly = LoadedAssemblies.FirstOrDefault(la => la.Name.Equals(name)); @@ -163,6 +166,9 @@ namespace PepperDash.Essentials /// /// /// + /// + /// GetAssemblyVersion method + /// public static string GetAssemblyVersion(Assembly assembly) { var ver = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); @@ -186,6 +192,9 @@ namespace PepperDash.Essentials /// /// /// True if file already matches loaded assembly file. + /// + /// CheckIfAssemblyLoaded method + /// public static bool CheckIfAssemblyLoaded(string name) { Debug.LogMessage(LogEventLevel.Verbose, "Checking if assembly: {0} is loaded...", name); @@ -207,6 +216,9 @@ namespace PepperDash.Essentials /// Used by console command to report the currently loaded assemblies and versions /// /// + /// + /// ReportAssemblyVersions method + /// public static void ReportAssemblyVersions(string command) { CrestronConsole.ConsoleCommandResponse("Essentials Version: {0}" + CrestronEnvironment.NewLine, Global.AssemblyVersion); @@ -521,7 +533,7 @@ namespace PepperDash.Essentials } /// - /// Loads plugins + /// LoadPlugins method /// public static void LoadPlugins() { @@ -551,7 +563,7 @@ namespace PepperDash.Essentials } /// - /// Represents an assembly loaded at runtime and it's associated metadata + /// Represents a LoadedAssembly /// public class LoadedAssembly { @@ -569,6 +581,9 @@ namespace PepperDash.Essentials Assembly = assembly; } + /// + /// SetAssembly method + /// public void SetAssembly(Assembly assembly) { Assembly = assembly; diff --git a/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs b/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs index 42059c78..81612e92 100644 --- a/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs +++ b/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs @@ -91,10 +91,22 @@ namespace PepperDash.Essentials.Core.Presets public event PresetRecalledCallback PresetRecalled; public event PresetsSavedCallback PresetsSaved; + /// + /// Gets or sets the PulseTime + /// public int PulseTime { get; set; } + /// + /// Gets or sets the DigitSpacingMs + /// public int DigitSpacingMs { get; set; } + /// + /// Gets or sets the PresetsAreLoaded + /// public bool PresetsAreLoaded { get; private set; } + /// + /// Gets or sets the PresetsList + /// public List PresetsList { get; private set; } public int Count @@ -102,13 +114,28 @@ namespace PepperDash.Essentials.Core.Presets get { return PresetsList != null ? PresetsList.Count : 0; } } + /// + /// Gets or sets the UseLocalImageStorage + /// public bool UseLocalImageStorage { get; set; } + /// + /// Gets or sets the ImagesLocalHostPrefix + /// public string ImagesLocalHostPrefix { get; set; } + /// + /// Gets or sets the ImagesPathPrefix + /// public string ImagesPathPrefix { get; set; } + /// + /// Gets or sets the ListPathPrefix + /// public string ListPathPrefix { get; set; } public event EventHandler PresetsLoaded; + /// + /// SetFileName method + /// public void SetFileName(string path) { _filePath = ListPathPrefix + path; @@ -117,6 +144,9 @@ namespace PepperDash.Essentials.Core.Presets LoadChannels(); } + /// + /// LoadChannels method + /// public void LoadChannels() { try @@ -155,6 +185,9 @@ namespace PepperDash.Essentials.Core.Presets } } + /// + /// Dial method + /// public void Dial(int presetNum) { if (presetNum <= PresetsList.Count) @@ -163,6 +196,9 @@ namespace PepperDash.Essentials.Core.Presets } } + /// + /// Dial method + /// public void Dial(string chanNum) { if (_dialIsRunning || !_initSuccess) @@ -199,6 +235,9 @@ namespace PepperDash.Essentials.Core.Presets OnPresetRecalled(_setTopBox, chanNum); } + /// + /// Dial method + /// public void Dial(int presetNum, ISetTopBoxNumericKeypad setTopBox) { if (presetNum <= PresetsList.Count) @@ -207,6 +246,9 @@ namespace PepperDash.Essentials.Core.Presets } } + /// + /// Dial method + /// public void Dial(string chanNum, ISetTopBoxNumericKeypad setTopBox) { _dialFunctions = new Dictionary>(10) @@ -243,6 +285,9 @@ namespace PepperDash.Essentials.Core.Presets handler(setTopBox, channel); } + /// + /// UpdatePreset method + /// public void UpdatePreset(int index, PresetChannel preset) { if (index >= PresetsList.Count) @@ -257,6 +302,9 @@ namespace PepperDash.Essentials.Core.Presets OnPresetsSaved(); } + /// + /// UpdatePresets method + /// public void UpdatePresets(List presets) { PresetsList = presets; diff --git a/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs b/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs index a43a7a2c..07fba078 100644 --- a/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs +++ b/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs @@ -8,13 +8,31 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Core.Presets { + /// + /// Represents a DevicePresetsView + /// public class DevicePresetsView { + /// + /// Gets or sets the ShowNumbers + /// public bool ShowNumbers { get; set; } + /// + /// Gets or sets the ShowName + /// public bool ShowName { get; set; } + /// + /// Gets or sets the ShowIcon + /// public bool ShowIcon { get; set; } + /// + /// Gets or sets the SRL + /// public SubpageReferenceList SRL { get; private set; } + /// + /// Gets or sets the Model + /// public DevicePresetsModel Model { get; private set; } public DevicePresetsView(BasicTriListWithSmartObject tl, DevicePresetsModel model) @@ -32,6 +50,9 @@ namespace PepperDash.Essentials.Core.Presets Model.PresetsLoaded += new EventHandler(Model_PresetsLoaded); } + /// + /// Attach method + /// public void Attach() { if (Model.PresetsAreLoaded) @@ -46,6 +67,9 @@ namespace PepperDash.Essentials.Core.Presets } } + /// + /// Detach method + /// public void Detach() { SRL.Clear(); diff --git a/src/PepperDash.Essentials.Core/Presets/PresetBase.cs b/src/PepperDash.Essentials.Core/Presets/PresetBase.cs index 1eaf7739..3e42dd66 100644 --- a/src/PepperDash.Essentials.Core/Presets/PresetBase.cs +++ b/src/PepperDash.Essentials.Core/Presets/PresetBase.cs @@ -10,24 +10,39 @@ using Newtonsoft.Json; namespace PepperDash.Essentials.Core.Presets { + /// + /// Represents a PresetBase + /// public class PresetBase { [JsonProperty("id")] + /// + /// Gets or sets the ID + /// public int ID { get; set; } /// /// Used to store the name of the preset /// [JsonProperty("description")] + /// + /// Gets or sets the Description + /// public string Description { get; set; } /// /// Indicates if the preset is defined(stored) in the codec /// [JsonProperty("defined")] + /// + /// Gets or sets the Defined + /// public bool Defined { get; set; } /// /// Indicates if the preset has the capability to be defined /// [JsonProperty("isDefinable")] + /// + /// Gets or sets the IsDefinable + /// public bool IsDefinable { get; set; } public PresetBase(int id, string description, bool def, bool isDef) diff --git a/src/PepperDash.Essentials.Core/Presets/PresetChannel.cs b/src/PepperDash.Essentials.Core/Presets/PresetChannel.cs index c10ba75d..b3b885eb 100644 --- a/src/PepperDash.Essentials.Core/Presets/PresetChannel.cs +++ b/src/PepperDash.Essentials.Core/Presets/PresetChannel.cs @@ -9,25 +9,46 @@ using Newtonsoft.Json; namespace PepperDash.Essentials.Core.Presets { + /// + /// Represents a PresetChannel + /// public class PresetChannel { [JsonProperty(Required = Required.Always,PropertyName = "name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty(Required = Required.Always, PropertyName = "iconUrl")] + /// + /// Gets or sets the IconUrl + /// public string IconUrl { get; set; } [JsonProperty(Required = Required.Always, PropertyName = "channel")] + /// + /// Gets or sets the Channel + /// public string Channel { get; set; } } + /// + /// Represents a PresetsList + /// public class PresetsList { [JsonProperty(Required=Required.Always,PropertyName = "name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty(Required = Required.Always, PropertyName = "channels")] + /// + /// Gets or sets the Channels + /// public List Channels { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs b/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs index c4349414..826098d1 100644 --- a/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs +++ b/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs @@ -12,6 +12,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.Presets { + /// + /// Represents a PresetsListSubpageReferenceListItem + /// public class PresetsListSubpageReferenceListItem : SubpageReferenceListItem { DevicePresetsView View; @@ -27,6 +30,10 @@ namespace PepperDash.Essentials.Core.Presets Refresh(); } + /// + /// Clear method + /// + /// public override void Clear() { Owner.GetBoolFeedbackSig(Index, 1).UserObject = null; @@ -35,6 +42,10 @@ namespace PepperDash.Essentials.Core.Presets Owner.StringInputSig(Index, 3).StringValue = ""; } + /// + /// Refresh method + /// + /// public override void Refresh() { var name = View.ShowName ? Channel.Name : ""; diff --git a/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs b/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs index 596c5921..1eb3a281 100644 --- a/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs +++ b/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs @@ -4,7 +4,7 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core.Queues { /// - /// IBasicCommunication Message for IQueue + /// Represents a ComsMessage /// public class ComsMessage : IQueueMessage { @@ -48,7 +48,7 @@ namespace PepperDash.Essentials.Core.Queues } /// - /// Dispatchs the string/byte[] to the IBasicCommunication specified + /// Dispatch method /// public void Dispatch() { @@ -63,8 +63,9 @@ namespace PepperDash.Essentials.Core.Queues } /// - /// Shows either the byte[] or string to be sent + /// ToString method /// + /// public override string ToString() { return _bytes != null ? _bytes.ToString() : _string; diff --git a/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs b/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs index 74b406fc..ab1b53e0 100644 --- a/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs +++ b/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs @@ -24,7 +24,7 @@ namespace PepperDash.Essentials.Core.Queues private const Thread.eThreadPriority _defaultPriority = Thread.eThreadPriority.MediumPriority; /// - /// If the instance has been disposed. + /// Gets or sets the Disposed /// public bool Disposed { get; private set; } @@ -208,6 +208,9 @@ namespace PepperDash.Essentials.Core.Queues return null; } + /// + /// Enqueue method + /// public void Enqueue(IQueueMessage item) { if (Disposed) @@ -221,8 +224,7 @@ namespace PepperDash.Essentials.Core.Queues } /// - /// Disposes the thread and cleans up resources. Thread cannot be restarted once - /// disposed. + /// Dispose method /// public void Dispose() { diff --git a/src/PepperDash.Essentials.Core/Queues/IQueue.cs b/src/PepperDash.Essentials.Core/Queues/IQueue.cs index cb3bb947..502fd0ef 100644 --- a/src/PepperDash.Essentials.Core/Queues/IQueue.cs +++ b/src/PepperDash.Essentials.Core/Queues/IQueue.cs @@ -3,6 +3,9 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core.Queues { + /// + /// Defines the contract for IQueue + /// public interface IQueue : IKeyed, IDisposable where T : class { void Enqueue(T item); diff --git a/src/PepperDash.Essentials.Core/Queues/IQueueMessage.cs b/src/PepperDash.Essentials.Core/Queues/IQueueMessage.cs index 408bffca..72463da8 100644 --- a/src/PepperDash.Essentials.Core/Queues/IQueueMessage.cs +++ b/src/PepperDash.Essentials.Core/Queues/IQueueMessage.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Queues { + /// + /// Defines the contract for IQueueMessage + /// public interface IQueueMessage { void Dispatch(); diff --git a/src/PepperDash.Essentials.Core/Queues/ProcessStringMessage.cs b/src/PepperDash.Essentials.Core/Queues/ProcessStringMessage.cs index 5617326f..5e2db7df 100644 --- a/src/PepperDash.Essentials.Core/Queues/ProcessStringMessage.cs +++ b/src/PepperDash.Essentials.Core/Queues/ProcessStringMessage.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.Core.Queues { /// - /// Message class for processing strings via an IQueue + /// Represents a ProcessStringMessage /// public class ProcessStringMessage : IQueueMessage { @@ -36,6 +36,10 @@ namespace PepperDash.Essentials.Core.Queues /// To string /// /// The current message + /// + /// ToString method + /// + /// public override string ToString() { return _message ?? String.Empty; diff --git a/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs b/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs index 62020af0..2f03a9d4 100644 --- a/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs +++ b/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs @@ -94,7 +94,7 @@ namespace PepperDash.Essentials.Core.Queues } /// - /// If the instance has been disposed or not. If it has, you can not use it anymore + /// Gets or sets the Disposed /// public bool Disposed { get; private set; } diff --git a/src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs b/src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs index f63d57bf..630aa4e9 100644 --- a/src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs +++ b/src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs @@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core } /// - /// Starts incrementing cycle + /// StartUp method /// public void StartUp() { diff --git a/src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs b/src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs index fefeb702..383593f4 100644 --- a/src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs +++ b/src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs @@ -6,6 +6,9 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Core { + /// + /// Represents a NumericalHelpers + /// public class NumericalHelpers { /// diff --git a/src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs b/src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs index 3d29be77..b516d17a 100644 --- a/src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs +++ b/src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs @@ -37,12 +37,18 @@ namespace PepperDash.Essentials.Core Debug.LogMessage(LogEventLevel.Debug, "UshortSigIncrementer has signed values that exceed range of -32768, 32767"); } + /// + /// StartUp method + /// public void StartUp() { if (Timer != null) return; Go(ChangeAmount); } + /// + /// StartDown method + /// public void StartDown() { if (Timer != null) return; @@ -85,6 +91,9 @@ namespace PepperDash.Essentials.Core return IsAtLimit; } + /// + /// Stop method + /// public void Stop() { if (Timer != null) diff --git a/src/PepperDash.Essentials.Core/Room/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs b/src/PepperDash.Essentials.Core/Room/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs index e96e2a23..49b51f67 100644 --- a/src/PepperDash.Essentials.Core/Room/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs +++ b/src/PepperDash.Essentials.Core/Room/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs @@ -33,6 +33,9 @@ namespace PepperDash.Essentials.Core const string FeatureEnableEventName = "EnableRoomOnToDefaultSourceWhenOccupied"; + /// + /// Gets or sets the FeatureDisabledTime + /// public DateTime FeatureDisabledTime { get; private set; } ScheduledEvent FeatureDisableEvent; @@ -41,6 +44,9 @@ namespace PepperDash.Essentials.Core ScheduledEventGroup FeatureEventGroup; + /// + /// Gets or sets the Room + /// public IRoomOccupancy Room { get; private set; } private Fusion.EssentialsHuddleSpaceFusionSystemControllerBase FusionRoom; @@ -75,6 +81,10 @@ namespace PepperDash.Essentials.Core }); } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { SetUpDevice(); @@ -505,42 +515,81 @@ namespace PepperDash.Essentials.Core } } + /// + /// Represents a RoomOnToDefaultSourceWhenOccupiedConfig + /// public class RoomOnToDefaultSourceWhenOccupiedConfig { [JsonProperty("roomKey")] + /// + /// Gets or sets the RoomKey + /// public string RoomKey { get; set; } [JsonProperty("enableRoomOnWhenOccupied")] + /// + /// Gets or sets the EnableRoomOnWhenOccupied + /// public bool EnableRoomOnWhenOccupied { get; set; } [JsonProperty("occupancyStartTime")] + /// + /// Gets or sets the OccupancyStartTime + /// public string OccupancyStartTime { get; set; } [JsonProperty("occupancyEndTime")] + /// + /// Gets or sets the OccupancyEndTime + /// public string OccupancyEndTime { get; set; } [JsonProperty("enableSunday")] + /// + /// Gets or sets the EnableSunday + /// public bool EnableSunday { get; set; } [JsonProperty("enableMonday")] + /// + /// Gets or sets the EnableMonday + /// public bool EnableMonday { get; set; } [JsonProperty("enableTuesday")] + /// + /// Gets or sets the EnableTuesday + /// public bool EnableTuesday { get; set; } [JsonProperty("enableWednesday")] + /// + /// Gets or sets the EnableWednesday + /// public bool EnableWednesday { get; set; } [JsonProperty("enableThursday")] + /// + /// Gets or sets the EnableThursday + /// public bool EnableThursday { get; set; } [JsonProperty("enableFriday")] + /// + /// Gets or sets the EnableFriday + /// public bool EnableFriday { get; set; } [JsonProperty("enableSaturday")] + /// + /// Gets or sets the EnableSaturday + /// public bool EnableSaturday { get; set; } } + /// + /// Represents a RoomOnToDefaultSourceWhenOccupiedFactory + /// public class RoomOnToDefaultSourceWhenOccupiedFactory : EssentialsDeviceFactory { public RoomOnToDefaultSourceWhenOccupiedFactory() @@ -548,6 +597,10 @@ namespace PepperDash.Essentials.Core TypeNames = new List() { "roomonwhenoccupancydetectedfeature" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new RoomOnToDefaultSourceWhenOccupied Device"); diff --git a/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs b/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs index d2a16739..a45adb27 100644 --- a/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs +++ b/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs @@ -10,8 +10,8 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core { - /// - /// Represents a device that manages room combinations by controlling partitions and scenarios. + /// + /// Represents a device that manages room combinations by controlling partitions and scenarios. /// /// The allows for dynamic configuration of room /// combinations based on partition states and predefined scenarios. It supports both automatic and manual modes @@ -25,8 +25,8 @@ namespace PepperDash.Essentials.Core private List _rooms; - /// - /// Gets a list of rooms represented as key-name pairs. + /// + /// Gets a list of rooms represented as key-name pairs. /// public List Rooms { @@ -38,8 +38,8 @@ namespace PepperDash.Essentials.Core private bool _isInAutoMode; - /// - /// Gets or sets a value indicating whether the system is operating in automatic mode. + /// + /// Gets or sets a value indicating whether the system is operating in automatic mode. /// /// Changing this property triggers an update event via /// IsInAutoModeFeedback.FireUpdate(). Ensure that any event listeners are properly configured to handle @@ -62,8 +62,8 @@ namespace PepperDash.Essentials.Core } } - /// - /// Gets a value indicating whether automatic mode is disabled. + /// + /// Gets a value indicating whether automatic mode is disabled. /// public bool DisableAutoMode { @@ -79,18 +79,18 @@ namespace PepperDash.Essentials.Core private Mutex _scenarioChange = new Mutex(); - /// - /// Initializes a new instance of the class, which manages room combination - /// scenarios and partition states. - /// - /// The class is designed to handle dynamic room - /// combination scenarios based on partition states. It supports both automatic and manual modes for managing - /// room combinations. By default, the instance starts in automatic mode unless the - /// specifies otherwise. After activation, the room combiner initializes partition state providers and sets up - /// the initial room configuration. Additionally, it subscribes to the event to ensure proper initialization of dependent devices - /// before determining or setting the room combination scenario. - /// The unique identifier for the room combiner instance. + /// + /// Initializes a new instance of the class, which manages room combination + /// scenarios and partition states. + /// + /// The class is designed to handle dynamic room + /// combination scenarios based on partition states. It supports both automatic and manual modes for managing + /// room combinations. By default, the instance starts in automatic mode unless the + /// specifies otherwise. After activation, the room combiner initializes partition state providers and sets up + /// the initial room configuration. Additionally, it subscribes to the event to ensure proper initialization of dependent devices + /// before determining or setting the room combination scenario. + /// The unique identifier for the room combiner instance. /// The configuration properties for the room combiner, including default settings and debounce times. public EssentialsRoomCombiner(string key, EssentialsRoomCombinerPropertiesConfig props) : base(key) @@ -286,15 +286,15 @@ namespace PepperDash.Essentials.Core #region IEssentialsRoomCombiner Members - /// - /// Occurs when the room combination scenario changes. + /// + /// Occurs when the room combination scenario changes. /// /// This event is triggered whenever the configuration or state of the room combination /// changes. Subscribers can use this event to update their logic or UI based on the new scenario. public event EventHandler RoomCombinationScenarioChanged; - /// - /// Gets the current room combination scenario. + /// + /// Gets the current room combination scenario. /// public IRoomCombinationScenario CurrentScenario { @@ -304,24 +304,24 @@ namespace PepperDash.Essentials.Core } } - /// - /// Gets the feedback indicating whether the system is currently in auto mode. + /// + /// Gets or sets the IsInAutoModeFeedback /// public BoolFeedback IsInAutoModeFeedback { get; private set; } - /// - /// Enables auto mode for the room combiner and its partitions, allowing automatic room combination scenarios to - /// be determined. + /// + /// Enables auto mode for the room combiner and its partitions, allowing automatic room combination scenarios to + /// be determined. /// /// Auto mode allows the room combiner to automatically adjust its configuration based on /// the state of its partitions. If auto mode is disabled in the configuration, this method logs a warning and /// does not enable auto mode. public void SetAutoMode() { - if(_propertiesConfig.DisableAutoMode) - { - this.LogWarning("Auto mode is disabled for this room combiner. Cannot set to auto mode."); - return; + if(_propertiesConfig.DisableAutoMode) + { + this.LogWarning("Auto mode is disabled for this room combiner. Cannot set to auto mode."); + return; } IsInAutoMode = true; @@ -333,12 +333,15 @@ namespace PepperDash.Essentials.Core DetermineRoomCombinationScenario(); } - /// - /// Switches the system to manual mode, disabling automatic operations. + /// + /// Switches the system to manual mode, disabling automatic operations. /// /// This method sets the system to manual mode by updating the mode state and propagates /// the change to all partitions. Once in manual mode, automatic operations are disabled for the system and its /// partitions. + /// + /// SetManualMode method + /// public void SetManualMode() { IsInAutoMode = false; @@ -349,11 +352,14 @@ namespace PepperDash.Essentials.Core } } - /// - /// Toggles the current mode between automatic and manual. + /// + /// Toggles the current mode between automatic and manual. /// /// If the current mode is automatic, this method switches to manual mode. If the /// current mode is manual, it switches to automatic mode. + /// + /// ToggleMode method + /// public void ToggleMode() { if (IsInAutoMode) @@ -366,21 +372,21 @@ namespace PepperDash.Essentials.Core } } - /// - /// Gets the collection of room combination scenarios. + /// + /// Gets or sets the RoomCombinationScenarios /// public List RoomCombinationScenarios { get; private set; } - /// - /// Gets the collection of partition controllers managed by this instance. + /// + /// Gets the collection of partition controllers managed by this instance. /// public List Partitions { get; private set; } - /// - /// Toggles the state of the partition identified by the specified partition key. - /// - /// If no partition with the specified key exists, the method performs no - /// action. + /// + /// Toggles the state of the partition identified by the specified partition key. + /// + /// If no partition with the specified key exists, the method performs no + /// action. /// The key of the partition whose state is to be toggled. This value cannot be null or empty. public void TogglePartitionState(string partitionKey) { @@ -392,16 +398,16 @@ namespace PepperDash.Essentials.Core } } - /// - /// Sets the room combination scenario based on the specified scenario key. - /// - /// This method manually adjusts the partition states according to the specified - /// scenario. If the application is in auto mode, the operation will not proceed, and a log message will be - /// generated indicating that the mode must be set to manual first. If the specified scenario key does not - /// match any existing scenario, a debug log message will be generated. For each partition state in the - /// scenario, the corresponding partition will be updated to either "Present" or "Not Present" based on the - /// scenario's configuration. If a partition key in the scenario cannot be found, a debug log message will be - /// generated. + /// + /// Sets the room combination scenario based on the specified scenario key. + /// + /// This method manually adjusts the partition states according to the specified + /// scenario. If the application is in auto mode, the operation will not proceed, and a log message will be + /// generated indicating that the mode must be set to manual first. If the specified scenario key does not + /// match any existing scenario, a debug log message will be generated. For each partition state in the + /// scenario, the corresponding partition will be updated to either "Present" or "Not Present" based on the + /// scenario's configuration. If a partition key in the scenario cannot be found, a debug log message will be + /// generated. /// The key identifying the room combination scenario to apply. This must match the key of an existing scenario. public void SetRoomCombinationScenario(string scenarioKey) { @@ -451,16 +457,19 @@ namespace PepperDash.Essentials.Core #endregion } - /// - /// Provides a factory for creating instances of devices. + /// + /// Provides a factory for creating instances of devices. /// /// This factory is responsible for constructing devices /// based on the provided configuration. It supports the type name "essentialsroomcombiner" for device /// creation. + /// + /// Represents a EssentialsRoomCombinerFactory + /// public class EssentialsRoomCombinerFactory : EssentialsDeviceFactory { - /// - /// Initializes a new instance of the class. + /// + /// Initializes a new instance of the class. /// /// This factory is used to create instances of room combiners with the specified type /// names. By default, the factory includes the type name "essentialsroomcombiner". @@ -469,13 +478,13 @@ namespace PepperDash.Essentials.Core TypeNames = new List { "essentialsroomcombiner" }; } - /// - /// Creates and initializes a new instance of the device. - /// - /// This method uses the provided device configuration to extract the properties and - /// create an device. Ensure that the configuration contains valid - /// properties for the device to be created successfully. - /// The device configuration containing the key and properties required to build the device. + /// + /// Creates and initializes a new instance of the device. + /// + /// This method uses the provided device configuration to extract the properties and + /// create an device. Ensure that the configuration contains valid + /// properties for the device to be created successfully. + /// The device configuration containing the key and properties required to build the device. /// A new instance of initialized with the specified configuration. public override EssentialsDevice BuildDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) { diff --git a/src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs b/src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs index 04dfd16f..50d6d84e 100644 --- a/src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs +++ b/src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs @@ -28,19 +28,19 @@ namespace PepperDash.Essentials.Core [JsonIgnore] BoolFeedback IsInAutoModeFeedback {get;} - /// - /// Gets a value indicating whether the automatic mode is disabled. + /// + /// Gets a value indicating whether the automatic mode is disabled. /// [JsonProperty("disableAutoMode")] bool DisableAutoMode { get; } - /// - /// Gets a value indicating whether the system is operating in automatic mode. + /// + /// Gets a value indicating whether the system is operating in automatic mode. /// [JsonProperty("isInAutoMode")] bool IsInAutoMode { get; } - /// - /// Gets the collection of rooms associated with the current object. + /// + /// Gets the collection of rooms associated with the current object. /// [JsonProperty("rooms")] List Rooms { get; } @@ -85,13 +85,16 @@ namespace PepperDash.Essentials.Core void SetRoomCombinationScenario(string scenarioKey); } - /// - /// Represents a scenario for combining rooms, including activation, deactivation, and associated state. + /// + /// Represents a scenario for combining rooms, including activation, deactivation, and associated state. /// /// This interface defines the behavior for managing room combination scenarios, including /// activation and deactivation, tracking the active state, and managing related partition states and UI mappings. /// Implementations of this interface are expected to handle the logic for room combinations based on the provided /// partition states and UI mappings. + /// + /// Defines the contract for IRoomCombinationScenario + /// public interface IRoomCombinationScenario : IKeyName { /// @@ -100,8 +103,8 @@ namespace PepperDash.Essentials.Core [JsonIgnore] BoolFeedback IsActiveFeedback { get; } - /// - /// Gets a value indicating whether the entity is active. + /// + /// Gets a value indicating whether the entity is active. /// [JsonProperty("isActive")] bool IsActive { get; } diff --git a/src/PepperDash.Essentials.Core/Room/Combining/RoomCombinationScenario.cs b/src/PepperDash.Essentials.Core/Room/Combining/RoomCombinationScenario.cs index b0b338ec..b6bd2547 100644 --- a/src/PepperDash.Essentials.Core/Room/Combining/RoomCombinationScenario.cs +++ b/src/PepperDash.Essentials.Core/Room/Combining/RoomCombinationScenario.cs @@ -21,6 +21,9 @@ namespace PepperDash.Essentials.Core public string Name { get; set; } [JsonProperty("partitionStates")] + /// + /// Gets or sets the PartitionStates + /// public List PartitionStates { get; private set; } [JsonProperty("uiMap")] @@ -45,6 +48,9 @@ namespace PepperDash.Essentials.Core } [JsonIgnore] + /// + /// Gets or sets the IsActiveFeedback + /// public BoolFeedback IsActiveFeedback { get; private set; } private List activationActions; diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs index 2eb56fd3..83584a5f 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs @@ -1,6 +1,9 @@  namespace PepperDash.Essentials.Room.Config { + /// + /// Represents a EssentialsDualDisplayRoomPropertiesConfig + /// public class EssentialsDualDisplayRoomPropertiesConfig : EssentialsNDisplayRoomPropertiesConfig { diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs index a0b3499f..85f8ca16 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.Room.Config { /// - /// + /// Represents a EssentialsHuddleRoomPropertiesConfig /// public class EssentialsHuddleRoomPropertiesConfig : EssentialsRoomPropertiesConfig { diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs index 27164f57..72286cec 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs @@ -4,9 +4,15 @@ using Newtonsoft.Json; namespace PepperDash.Essentials.Room.Config { + /// + /// Represents a EssentialsHuddleVtc1PropertiesConfig + /// public class EssentialsHuddleVtc1PropertiesConfig : EssentialsConferenceRoomPropertiesConfig { [JsonProperty("defaultDisplayKey")] + /// + /// Gets or sets the DefaultDisplayKey + /// public string DefaultDisplayKey { get; set; } } diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs index 6d8762fa..0d5670a9 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs @@ -25,9 +25,18 @@ namespace PepperDash.Essentials.Room.Config } + /// + /// Represents a DisplayItem + /// public class DisplayItem : IKeyName { + /// + /// Gets or sets the Key + /// public string Key { get; set; } + /// + /// Gets or sets the Name + /// public string Name { get; set; } } diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsPresentationPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsPresentationPropertiesConfig.cs index 53333f07..74a8813e 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsPresentationPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsPresentationPropertiesConfig.cs @@ -3,11 +3,17 @@ namespace PepperDash.Essentials.Room.Config { /// - /// + /// Represents a EssentialsPresentationRoomPropertiesConfig /// public class EssentialsPresentationRoomPropertiesConfig : EssentialsRoomPropertiesConfig { + /// + /// Gets or sets the DefaultAudioBehavior + /// public string DefaultAudioBehavior { get; set; } + /// + /// Gets or sets the DefaultAudioKey + /// public string DefaultAudioKey { get; set; } public string DefaultVideoBehavior { get; set; } public List DisplayKeys { get; set; } diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs index e9a2c29b..40810a89 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs @@ -9,11 +9,13 @@ using Serilog.Events; namespace PepperDash.Essentials.Room.Config { + /// + /// Represents a EssentialsRoomConfigHelper + /// public class EssentialsRoomConfigHelper { /// - /// Gets and operating, standalone emergegncy object that can be plugged into a room. - /// Returns null if there is no emergency defined + /// GetEmergency method /// public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, IEssentialsRoom room) { @@ -35,6 +37,9 @@ namespace PepperDash.Essentials.Room.Config /// /// /// + /// + /// GetMicrophonePrivacy method + /// public static MicrophonePrivacyController GetMicrophonePrivacy( EssentialsRoomPropertiesConfig props, IPrivacy room) { @@ -95,9 +100,9 @@ namespace PepperDash.Essentials.Room.Config } - /// - /// - /// + /// + /// Represents a EssentialsRoomPropertiesConfig + /// public class EssentialsRoomPropertiesConfig { [JsonProperty("addresses")] @@ -110,9 +115,15 @@ namespace PepperDash.Essentials.Room.Config public EssentialsRoomEmergencyConfig Emergency { get; set; } [JsonProperty("help")] + /// + /// Gets or sets the Help + /// public EssentialsHelpPropertiesConfig Help { get; set; } [JsonProperty("helpMessage")] + /// + /// Gets or sets the HelpMessage + /// public string HelpMessage { get; set; } /// @@ -134,48 +145,90 @@ namespace PepperDash.Essentials.Room.Config } [JsonProperty("environment")] + /// + /// Gets or sets the Environment + /// public EssentialsEnvironmentPropertiesConfig Environment { get; set; } [JsonProperty("logo")] + /// + /// Gets or sets the LogoLight + /// public EssentialsLogoPropertiesConfig LogoLight { get; set; } [JsonProperty("logoDark")] + /// + /// Gets or sets the LogoDark + /// public EssentialsLogoPropertiesConfig LogoDark { get; set; } [JsonProperty("microphonePrivacy")] + /// + /// Gets or sets the MicrophonePrivacy + /// public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; } [JsonProperty("occupancy")] + /// + /// Gets or sets the Occupancy + /// public EssentialsRoomOccSensorConfig Occupancy { get; set; } [JsonProperty("oneButtonMeeting")] + /// + /// Gets or sets the OneButtonMeeting + /// public EssentialsOneButtonMeetingPropertiesConfig OneButtonMeeting { get; set; } [JsonProperty("shutdownVacancySeconds")] + /// + /// Gets or sets the ShutdownVacancySeconds + /// public int ShutdownVacancySeconds { get; set; } [JsonProperty("shutdownPromptSeconds")] + /// + /// Gets or sets the ShutdownPromptSeconds + /// public int ShutdownPromptSeconds { get; set; } [JsonProperty("tech")] + /// + /// Gets or sets the Tech + /// public EssentialsRoomTechConfig Tech { get; set; } [JsonProperty("volumes")] + /// + /// Gets or sets the Volumes + /// public EssentialsRoomVolumesConfig Volumes { get; set; } [JsonProperty("fusion")] + /// + /// Gets or sets the Fusion + /// public EssentialsRoomFusionConfig Fusion { get; set; } [JsonProperty("essentialsRoomUiBehaviorConfig", NullValueHandling=NullValueHandling.Ignore)] + /// + /// Gets or sets the UiBehavior + /// public EssentialsRoomUiBehaviorConfig UiBehavior { get; set; } [JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")] + /// + /// Gets or sets the ZeroVolumeWhenSwtichingVolumeDevices + /// public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; } /// /// Indicates if this room represents a combination of other rooms /// [JsonProperty("isRoomCombinationScenario")] + /// + /// Gets or sets the IsRoomCombinationScenario + /// public bool IsRoomCombinationScenario { get; set; } public EssentialsRoomPropertiesConfig() @@ -185,58 +238,109 @@ namespace PepperDash.Essentials.Room.Config } } + /// + /// Represents a EssentialsRoomUiBehaviorConfig + /// public class EssentialsRoomUiBehaviorConfig { [JsonProperty("disableActivityButtonsWhileWarmingCooling")] + /// + /// Gets or sets the DisableActivityButtonsWhileWarmingCooling + /// public bool DisableActivityButtonsWhileWarmingCooling { get; set; } } + /// + /// Represents a EssentialsAvRoomPropertiesConfig + /// public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig { [JsonProperty("defaultAudioKey")] + /// + /// Gets or sets the DefaultAudioKey + /// public string DefaultAudioKey { get; set; } [JsonProperty("sourceListKey")] + /// + /// Gets or sets the SourceListKey + /// public string SourceListKey { get; set; } [JsonProperty("destinationListKey")] + /// + /// Gets or sets the DestinationListKey + /// public string DestinationListKey { get; set; } [JsonProperty("audioControlPointListKey")] + /// + /// Gets or sets the AudioControlPointListKey + /// public string AudioControlPointListKey { get; set; } [JsonProperty("cameraListKey")] + /// + /// Gets or sets the CameraListKey + /// public string CameraListKey { get; set; } [JsonProperty("defaultSourceItem")] + /// + /// Gets or sets the DefaultSourceItem + /// public string DefaultSourceItem { get; set; } /// /// Indicates if the room supports advanced sharing /// [JsonProperty("supportsAdvancedSharing")] + /// + /// Gets or sets the SupportsAdvancedSharing + /// public bool SupportsAdvancedSharing { get; set; } /// /// Indicates if non-tech users can change the share mode /// [JsonProperty("userCanChangeShareMode")] + /// + /// Gets or sets the UserCanChangeShareMode + /// public bool UserCanChangeShareMode { get; set; } [JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the MatrixRoutingKey + /// public string MatrixRoutingKey { get; set; } } public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig { [JsonProperty("videoCodecKey")] + /// + /// Gets or sets the VideoCodecKey + /// public string VideoCodecKey { get; set; } [JsonProperty("audioCodecKey")] + /// + /// Gets or sets the AudioCodecKey + /// public string AudioCodecKey { get; set; } } + /// + /// Represents a EssentialsEnvironmentPropertiesConfig + /// public class EssentialsEnvironmentPropertiesConfig { + /// + /// Gets or sets the Enabled + /// public bool Enabled { get; set; } [JsonProperty("deviceKeys")] + /// + /// Gets or sets the DeviceKeys + /// public List DeviceKeys { get; set; } public EssentialsEnvironmentPropertiesConfig() @@ -246,6 +350,9 @@ namespace PepperDash.Essentials.Room.Config } + /// + /// Represents a EssentialsRoomFusionConfig + /// public class EssentialsRoomFusionConfig { public uint IpIdInt @@ -265,28 +372,46 @@ namespace PepperDash.Essentials.Room.Config } [JsonProperty("ipId")] + /// + /// Gets or sets the IpId + /// public string IpId { get; set; } [JsonProperty("joinMapKey")] + /// + /// Gets or sets the JoinMapKey + /// public string JoinMapKey { get; set; } } + /// + /// Represents a EssentialsRoomMicrophonePrivacyConfig + /// public class EssentialsRoomMicrophonePrivacyConfig { [JsonProperty("deviceKey")] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } [JsonProperty("behaviour")] + /// + /// Gets or sets the Behaviour + /// public string Behaviour { get; set; } } /// - /// Properties for the help text box + /// Represents a EssentialsHelpPropertiesConfig /// public class EssentialsHelpPropertiesConfig { [JsonProperty("message")] + /// + /// Gets or sets the Message + /// public string Message { get; set; } [JsonProperty("showCallButton")] @@ -296,6 +421,9 @@ namespace PepperDash.Essentials.Room.Config /// Defaults to "Call Help Desk" /// [JsonProperty("callButtonText")] + /// + /// Gets or sets the CallButtonText + /// public string CallButtonText { get; set; } public EssentialsHelpPropertiesConfig() @@ -305,11 +433,14 @@ namespace PepperDash.Essentials.Room.Config } /// - /// + /// Represents a EssentialsOneButtonMeetingPropertiesConfig /// public class EssentialsOneButtonMeetingPropertiesConfig { [JsonProperty("enable")] + /// + /// Gets or sets the Enable + /// public bool Enable { get; set; } } @@ -319,22 +450,28 @@ namespace PepperDash.Essentials.Room.Config public string PhoneNumber { get; set; } [JsonProperty("sipAddress")] + /// + /// Gets or sets the SipAddress + /// public string SipAddress { get; set; } } /// - /// Properties for the room's logo on panels + /// Represents a EssentialsLogoPropertiesConfig /// public class EssentialsLogoPropertiesConfig { [JsonProperty("type")] + /// + /// Gets or sets the Type + /// public string Type { get; set; } [JsonProperty("url")] public string Url { get; set; } /// - /// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo + /// GetLogoUrlLight method /// public string GetLogoUrlLight() { @@ -346,6 +483,9 @@ namespace PepperDash.Essentials.Room.Config return null; } + /// + /// GetLogoUrlDark method + /// public string GetLogoUrlDark() { if (Type == "url") @@ -358,11 +498,14 @@ namespace PepperDash.Essentials.Room.Config } /// - /// Represents occupancy sensor(s) setup for a room + /// Represents a EssentialsRoomOccSensorConfig /// public class EssentialsRoomOccSensorConfig { [JsonProperty("deviceKey")] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } [JsonProperty("timeoutMinutes")] @@ -372,6 +515,9 @@ namespace PepperDash.Essentials.Room.Config public class EssentialsRoomTechConfig { [JsonProperty("password")] + /// + /// Gets or sets the Password + /// public string Password { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomEmergencyConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomEmergencyConfig.cs index dbc068eb..ff5b0e5a 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomEmergencyConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomEmergencyConfig.cs @@ -1,17 +1,23 @@ namespace PepperDash.Essentials.Room.Config { /// - /// + /// Represents a EssentialsRoomEmergencyConfig /// public class EssentialsRoomEmergencyConfig { + /// + /// Gets or sets the Trigger + /// public EssentialsRoomEmergencyTriggerConfig Trigger { get; set; } + /// + /// Gets or sets the Behavior + /// public string Behavior { get; set; } } /// - /// + /// Represents a EssentialsRoomEmergencyTriggerConfig /// public class EssentialsRoomEmergencyTriggerConfig { diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomScheduledEventsConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomScheduledEventsConfig.cs index 617b7c9f..bb1ec94d 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomScheduledEventsConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomScheduledEventsConfig.cs @@ -8,36 +8,66 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.Config { + /// + /// Represents a EssentialsRoomScheduledEventsConfig + /// public class EssentialsRoomScheduledEventsConfig { [JsonProperty("scheduledEvents")] + /// + /// Gets or sets the ScheduledEvents + /// public List ScheduledEvents; } + /// + /// Represents a ScheduledEventConfig + /// public class ScheduledEventConfig { [JsonProperty("key")] + /// + /// Gets or sets the Key + /// public string Key; [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name; [JsonProperty("days")] public ScheduledEventCommon.eWeekDays Days; [JsonProperty("time")] + /// + /// Gets or sets the Time + /// public string Time; [JsonProperty("actions")] + /// + /// Gets or sets the Actions + /// public List Actions; [JsonProperty("persistent")] + /// + /// Gets or sets the Persistent + /// public bool Persistent; [JsonProperty("acknowledgeable")] + /// + /// Gets or sets the Acknowledgeable + /// public bool Acknowledgeable; [JsonProperty("enable")] + /// + /// Gets or sets the Enable + /// public bool Enable; } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsTechRoomConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsTechRoomConfig.cs index 507bac5e..bca77725 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsTechRoomConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsTechRoomConfig.cs @@ -5,12 +5,18 @@ using PepperDash.Essentials.Room.Config; namespace PepperDash.Essentials.Room.Config { + /// + /// Represents a EssentialsTechRoomConfig + /// public class EssentialsTechRoomConfig { /// /// The key of the dummy device used to enable routing /// [JsonProperty("dummySourceKey")] + /// + /// Gets or sets the DummySourceKey + /// public string DummySourceKey { get; set; } /// @@ -44,12 +50,18 @@ namespace PepperDash.Essentials.Room.Config public string PresetsFileName { get; set; } [JsonProperty("scheduledEvents")] + /// + /// Gets or sets the ScheduledEvents + /// public List ScheduledEvents { get; set; } /// /// Indicates that the room is the primary when true /// [JsonProperty("isPrimary")] + /// + /// Gets or sets the IsPrimary + /// public bool IsPrimary { get; set; } /// @@ -59,12 +71,18 @@ namespace PepperDash.Essentials.Room.Config public Dictionary MirroredTuners { get; set; } [JsonProperty("helpMessage")] + /// + /// Gets or sets the HelpMessage + /// public string HelpMessage { get; set; } /// /// Indicates the room /// [JsonProperty("isTvPresetsProvider")] + /// + /// Gets or sets the IsTvPresetsProvider + /// public bool IsTvPresetsProvider; public EssentialsTechRoomConfig() diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsVolumeLevelConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsVolumeLevelConfig.cs index 5b9450f2..4e3d502f 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsVolumeLevelConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsVolumeLevelConfig.cs @@ -4,10 +4,13 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.Config { /// - /// + /// Represents a EssentialsRoomVolumesConfig /// public class EssentialsRoomVolumesConfig { + /// + /// Gets or sets the Master + /// public EssentialsVolumeLevelConfig Master { get; set; } public EssentialsVolumeLevelConfig Program { get; set; } public EssentialsVolumeLevelConfig AudioCallRx { get; set; } @@ -15,12 +18,21 @@ namespace PepperDash.Essentials.Room.Config } /// - /// + /// Represents a EssentialsVolumeLevelConfig /// public class EssentialsVolumeLevelConfig { + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } + /// + /// Gets or sets the Label + /// public string Label { get; set; } + /// + /// Gets or sets the Level + /// public int Level { get; set; } /// diff --git a/src/PepperDash.Essentials.Core/Room/Config/SimplRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/SimplRoomPropertiesConfig.cs index fdd9b857..b37335b9 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/SimplRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Room/Config/SimplRoomPropertiesConfig.cs @@ -3,23 +3,47 @@ using Newtonsoft.Json; namespace PepperDash.Essentials.Room.Config { + /// + /// Represents a SimplRoomPropertiesConfig + /// public class SimplRoomPropertiesConfig : EssentialsHuddleVtc1PropertiesConfig { [JsonProperty("roomPhoneNumber")] + /// + /// Gets or sets the RoomPhoneNumber + /// public string RoomPhoneNumber { get; set; } [JsonProperty("roomURI")] + /// + /// Gets or sets the RoomURI + /// public string RoomURI { get; set; } [JsonProperty("speedDials")] + /// + /// Gets or sets the SpeedDials + /// public List SpeedDials { get; set; } [JsonProperty("volumeSliderNames")] + /// + /// Gets or sets the VolumeSliderNames + /// public List VolumeSliderNames { get; set; } } + /// + /// Represents a SimplSpeedDial + /// public class SimplSpeedDial { [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty("number")] + /// + /// Gets or sets the Number + /// public string Number { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Room/EsentialsRoomEmergencyContactClosure.cs b/src/PepperDash.Essentials.Core/Room/EsentialsRoomEmergencyContactClosure.cs index 48d24ab0..3a354813 100644 --- a/src/PepperDash.Essentials.Core/Room/EsentialsRoomEmergencyContactClosure.cs +++ b/src/PepperDash.Essentials.Core/Room/EsentialsRoomEmergencyContactClosure.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Room.Config; namespace PepperDash.Essentials.Core { + /// + /// Represents a EssentialsRoomEmergencyContactClosure + /// public class EssentialsRoomEmergencyContactClosure : EssentialsRoomEmergencyBase, IEssentialsRoomEmergency { public event EventHandler EmergencyStateChange; @@ -12,6 +15,9 @@ namespace PepperDash.Essentials.Core string Behavior; bool TriggerOnClose; + /// + /// Gets or sets the InEmergency + /// public bool InEmergency { get; private set; } public EssentialsRoomEmergencyContactClosure(string key, EssentialsRoomEmergencyConfig config, IEssentialsRoom room) : @@ -75,7 +81,7 @@ namespace PepperDash.Essentials.Core } /// - /// + /// RunEmergencyBehavior method /// public void RunEmergencyBehavior() { @@ -85,7 +91,7 @@ namespace PepperDash.Essentials.Core } /// - /// Describes the functionality of a room emergency contact closure + /// Defines the contract for IEssentialsRoomEmergency /// public interface IEssentialsRoomEmergency { diff --git a/src/PepperDash.Essentials.Core/Room/EssentialsRoomBase.cs b/src/PepperDash.Essentials.Core/Room/EssentialsRoomBase.cs index 232c02ed..dfb8b5a1 100644 --- a/src/PepperDash.Essentials.Core/Room/EssentialsRoomBase.cs +++ b/src/PepperDash.Essentials.Core/Room/EssentialsRoomBase.cs @@ -32,6 +32,9 @@ namespace PepperDash.Essentials.Core public BoolFeedback IsWarmingUpFeedback { get; private set; } public BoolFeedback IsCoolingDownFeedback { get; private set; } + /// + /// Gets or sets the RoomOccupancy + /// public IOccupancyStatusProvider RoomOccupancy { get; protected set; } public bool OccupancyStatusProviderIsRemote { get; private set; } @@ -50,12 +53,12 @@ namespace PepperDash.Essentials.Core protected abstract Func IsCoolingFeedbackFunc { get; } /// - /// Indicates if this room is Mobile Control Enabled + /// Gets or sets the IsMobileControlEnabled /// public bool IsMobileControlEnabled { get; private set; } /// - /// The bridge for this room if Mobile Control is enabled + /// Gets or sets the MobileControlRoomBridge /// public IMobileControlRoomMessenger MobileControlRoomBridge { get; private set; } @@ -157,8 +160,8 @@ namespace PepperDash.Essentials.Core } /// - /// Timer used for informing the UIs of a shutdown - /// + /// Gets or sets the ShutdownPromptTimer + /// public SecondsCountdownTimer ShutdownPromptTimer { get; private set; } /// @@ -174,10 +177,16 @@ namespace PepperDash.Essentials.Core public string LogoUrlLightBkgnd { get; set; } + /// + /// Gets or sets the LogoUrlDarkBkgnd + /// public string LogoUrlDarkBkgnd { get; set; } protected SecondsCountdownTimer RoomVacancyShutdownTimer { get; private set; } + /// + /// Gets or sets the VacancyMode + /// public eVacancyMode VacancyMode { get; private set; } /// @@ -247,6 +256,10 @@ namespace PepperDash.Essentials.Core }); } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { SetUpMobileControl(); @@ -324,6 +337,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// StartShutdown method + /// public void StartShutdown(eShutdownType type) { // Check for shutdowns running. Manual should override other shutdowns @@ -338,6 +354,9 @@ namespace PepperDash.Essentials.Core Debug.LogMessage(LogEventLevel.Information, this, "ShutdownPromptTimer Started. Type: {0}. Seconds: {1}", ShutdownType, ShutdownPromptTimer.SecondsToCount); } + /// + /// StartRoomVacancyTimer method + /// public void StartRoomVacancyTimer(eVacancyMode mode) { if (mode == eVacancyMode.None) @@ -353,7 +372,7 @@ namespace PepperDash.Essentials.Core } /// - /// Resets the vacancy mode and shutsdwon the room + /// Shutdown method /// public void Shutdown() { @@ -474,7 +493,7 @@ namespace PepperDash.Essentials.Core } /// - /// + /// Enumeration of eWarmingCoolingMode values /// public enum eWarmingCoolingMode { diff --git a/src/PepperDash.Essentials.Core/Room/IRoomEventSchedule.cs b/src/PepperDash.Essentials.Core/Room/IRoomEventSchedule.cs index c2595151..0ddb61fc 100644 --- a/src/PepperDash.Essentials.Core/Room/IRoomEventSchedule.cs +++ b/src/PepperDash.Essentials.Core/Room/IRoomEventSchedule.cs @@ -4,6 +4,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IRoomEventSchedule + /// public interface IRoomEventSchedule { void AddOrUpdateScheduledEvent(ScheduledEventConfig eventConfig); @@ -13,8 +16,14 @@ namespace PepperDash.Essentials.Core event EventHandler ScheduledEventsChanged; } + /// + /// Represents a ScheduledEventEventArgs + /// public class ScheduledEventEventArgs : EventArgs { + /// + /// Gets or sets the ScheduledEvents + /// public List ScheduledEvents; } } diff --git a/src/PepperDash.Essentials.Core/Room/Interfaces.cs b/src/PepperDash.Essentials.Core/Room/Interfaces.cs index 6bad45df..00fa0b7c 100644 --- a/src/PepperDash.Essentials.Core/Room/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Room/Interfaces.cs @@ -44,7 +44,7 @@ namespace PepperDash.Essentials.Core } /// - /// Simplified routing direct from source to destination + /// Defines the contract for IRunDirectRouteAction /// public interface IRunDirectRouteAction { @@ -62,7 +62,7 @@ namespace PepperDash.Essentials.Core } /// - /// Describes a room with routing endpoints + /// Defines the contract for IHasRoutingEndpoints /// public interface IHasRoutingEndpoints { @@ -82,7 +82,7 @@ namespace PepperDash.Essentials.Core } /// - /// Describes a room with a tech password + /// Defines the contract for ITechPassword /// public interface ITechPassword { @@ -97,8 +97,14 @@ namespace PepperDash.Essentials.Core void SetTechPassword(string oldPassword, string newPassword); } + /// + /// Represents a TechPasswordEventArgs + /// public class TechPasswordEventArgs : EventArgs { + /// + /// Gets or sets the IsValid + /// public bool IsValid { get; private set; } public TechPasswordEventArgs(bool isValid) @@ -108,7 +114,7 @@ namespace PepperDash.Essentials.Core } /// - /// For rooms that default presentation only routing + /// Defines the contract for IRunDefaultPresentRoute /// public interface IRunDefaultPresentRoute { @@ -149,21 +155,33 @@ namespace PepperDash.Essentials.Core event EventHandler RoomOccupancyIsSet; } + /// + /// Defines the contract for IEmergency + /// public interface IEmergency { EssentialsRoomEmergencyBase Emergency { get; } } + /// + /// Defines the contract for IMicrophonePrivacy + /// public interface IMicrophonePrivacy { Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; } } + /// + /// Defines the contract for IHasAccessoryDevices + /// public interface IHasAccessoryDevices : IKeyName { List AccessoryDeviceKeys { get; } } + /// + /// Defines the contract for IHasCiscoNavigatorTouchpanel + /// public interface IHasCiscoNavigatorTouchpanel { string CiscoNavigatorTouchpanelKey { get; } diff --git a/src/PepperDash.Essentials.Core/Room/Room.cs b/src/PepperDash.Essentials.Core/Room/Room.cs index 5e190bc9..5ff03d26 100644 --- a/src/PepperDash.Essentials.Core/Room/Room.cs +++ b/src/PepperDash.Essentials.Core/Room/Room.cs @@ -19,10 +19,24 @@ namespace PepperDash.Essentials.Core public abstract BoolFeedback IsWarmingUpFeedback { get; protected set; } // In concrete classes, these should be computed from the relevant devices + /// + /// Gets or sets the CooldownTime + /// + /// public virtual uint CooldownTime { get { return 10000; } } + /// + /// Gets or sets the WarmupTime + /// + /// public virtual uint WarmupTime { get { return 5000; } } + /// + /// Gets or sets the Description + /// public string Description { get; set; } + /// + /// Gets or sets the HelpMessage + /// public string HelpMessage { get; set; } public Room(string key, string name) @@ -32,8 +46,15 @@ namespace PepperDash.Essentials.Core HelpMessage = ""; } + /// + /// RoomOn method + /// + /// public virtual void RoomOn() { } + /// + /// RoomOff method + /// public virtual void RoomOff() { } #region IDeviceWithOutputs Members diff --git a/src/PepperDash.Essentials.Core/Room/iOccupancyStatusProvider.cs b/src/PepperDash.Essentials.Core/Room/iOccupancyStatusProvider.cs index f46f10b1..3ac3c606 100644 --- a/src/PepperDash.Essentials.Core/Room/iOccupancyStatusProvider.cs +++ b/src/PepperDash.Essentials.Core/Room/iOccupancyStatusProvider.cs @@ -8,6 +8,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IOccupancyStatusProvider + /// public interface IOccupancyStatusProvider { BoolFeedback RoomIsOccupiedFeedback { get; } diff --git a/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs b/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs index d8b50a9b..6d127622 100644 --- a/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs +++ b/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs @@ -8,11 +8,14 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core.Routing { + /// + /// Represents a DummyRoutingInputsDevice + /// public class DummyRoutingInputsDevice : Device, IRoutingSource, IRoutingOutputs { - /// - /// A single output port, backplane, audioVideo - /// + /// + /// Gets or sets the AudioVideoOutputPort + /// public RoutingOutputPort AudioVideoOutputPort { get; private set; } /// diff --git a/src/PepperDash.Essentials.Core/Routing/Extensions.cs b/src/PepperDash.Essentials.Core/Routing/Extensions.cs index f3eec22a..17f1e50d 100644 --- a/src/PepperDash.Essentials.Core/Routing/Extensions.cs +++ b/src/PepperDash.Essentials.Core/Routing/Extensions.cs @@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core } /// - /// Will release the existing route to the destination, if a route is found. This does not CLEAR the route, only stop counting usage time on any output ports that have a usage tracker set + /// Will release the existing route to the destination, if a route is found. This does not CLEAR the route, only stop counting usage time on any output ports that have a usage tracker set. /// /// destination to clear public static void ReleaseRoute(this IRoutingInputs destination) @@ -60,6 +60,9 @@ namespace PepperDash.Essentials.Core /// /// destination to clear /// Input to use to find existing route + /// + /// ReleaseRoute method + /// public static void ReleaseRoute(this IRoutingInputs destination, string inputPortKey) { routeRequestQueue.Enqueue(new ReleaseRouteQueueItem(ReleaseRouteInternal, destination, inputPortKey, false)); @@ -79,6 +82,9 @@ namespace PepperDash.Essentials.Core /// /// destination /// input to use to find existing route + /// + /// ClearRoute method + /// public static void ClearRoute(this IRoutingInputs destination, string inputPortKey) { routeRequestQueue.Enqueue(new ReleaseRouteQueueItem(ReleaseRouteInternal, destination, inputPortKey, true)); diff --git a/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs b/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs index a8dbc594..a9e13a07 100644 --- a/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs +++ b/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs @@ -14,7 +14,7 @@ using System; namespace PepperDash.Essentials.Core { /// - /// The handler type for a Room's SourceInfoChange + /// Delegate for SourceInfoChangeHandler /// public delegate void SourceInfoChangeHandler(SourceListItem info, ChangeType type); //******************************************************************************************* diff --git a/src/PepperDash.Essentials.Core/Routing/IInputSync.cs b/src/PepperDash.Essentials.Core/Routing/IInputSync.cs index accb70a7..a4bc25ba 100644 --- a/src/PepperDash.Essentials.Core/Routing/IInputSync.cs +++ b/src/PepperDash.Essentials.Core/Routing/IInputSync.cs @@ -7,6 +7,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.Routing { + /// + /// Defines the contract for IVideoSync + /// public interface IVideoSync : IKeyed { bool VideoSyncDetected { get; } diff --git a/src/PepperDash.Essentials.Core/Routing/IMatrixRouting.cs b/src/PepperDash.Essentials.Core/Routing/IMatrixRouting.cs index d7dc8c79..a262e3df 100644 --- a/src/PepperDash.Essentials.Core/Routing/IMatrixRouting.cs +++ b/src/PepperDash.Essentials.Core/Routing/IMatrixRouting.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.Routing { + /// + /// Defines the contract for IMatrixRouting + /// public interface IMatrixRouting { Dictionary InputSlots { get; } diff --git a/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs b/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs index 52290bd2..ec5fe2c4 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Defines a receiver that has internal routing (DM-RMC-4K-Z-SCALER-C) + /// Defines the contract for IRmcRouting /// public interface IRmcRouting : IRoutingNumeric { diff --git a/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs index a8e6d5f0..ab14d066 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Defines an IRmcRouting with a feedback event + /// Defines the contract for IRmcRoutingWithFeedback /// public interface IRmcRoutingWithFeedback : IRmcRouting { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs index b8b22915..a76f571b 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs @@ -6,7 +6,7 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { /// - /// Defines an event structure for reporting output route data + /// Defines the contract for IRoutingFeedback /// public interface IRoutingFeedback : IKeyName { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs index 0f6d7834..9d344ce9 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs @@ -12,6 +12,9 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IRoutingHasVideoInputSyncFeedbacks + /// public interface IRoutingHasVideoInputSyncFeedbacks { FeedbackCollection VideoInputSyncFeedbacks { get; } diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs index faee0fe9..94eddd26 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs @@ -1,5 +1,8 @@ namespace PepperDash.Essentials.Core.Routing { + /// + /// Defines the contract for IRoutingInputSlot + /// public interface IRoutingInputSlot: IRoutingSlot, IOnline, IVideoSync { string TxDeviceKey { get; } diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs index ff96fded..102cf5f9 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs @@ -4,7 +4,7 @@ namespace PepperDash.Essentials.Core { /// - /// Defines a class that has a collection of RoutingInputPorts + /// Defines the contract for IRoutingInputs /// public interface IRoutingInputs : IKeyed { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs index e202fa3c..89e4d031 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// For devices like RMCs, baluns, other devices with no switching. + /// Defines the contract for IRoutingInputsOutputs /// public interface IRoutingInputsOutputs : IRoutingInputs, IRoutingOutputs { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs index d41909f1..ff7e6cd7 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs @@ -1,5 +1,8 @@ namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IRoutingNumeric + /// public interface IRoutingNumeric : IRouting { void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type); diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs index e278a193..33a837a8 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Defines an IRoutingNumeric with a feedback event + /// Defines the contract for IRoutingNumericWithFeedback /// public interface IRoutingNumericWithFeedback : IRoutingNumeric, IRoutingFeedback { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingOutputSlot.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingOutputSlot.cs index 478961cc..0d590684 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingOutputSlot.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingOutputSlot.cs @@ -3,6 +3,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core.Routing { + /// + /// Defines the contract for IRoutingOutputSlot + /// public interface IRoutingOutputSlot : IRoutingSlot { event EventHandler OutputSlotChanged; diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs index d3bc70de..dbfc2916 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs @@ -3,10 +3,10 @@ namespace PepperDash.Essentials.Core { - /// - /// Defines a class that has a collection of RoutingOutputPorts - /// + /// + /// Defines the contract for IRoutingOutputs + /// public interface IRoutingOutputs : IKeyed { RoutingPortCollection OutputPorts { get; } diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs index dd1d004e..6e599f29 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.Core { /// - /// For fixed-source endpoint devices + /// Defines the contract for IRoutingSink /// public interface IRoutingSink : IRoutingInputs, IHasCurrentSourceInfoChange { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs index d3d3e600..c0fd03df 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs @@ -6,7 +6,7 @@ namespace PepperDash.Essentials.Core { /// - /// For fixed-source endpoint devices + /// Defines the contract for IRoutingSinkWithFeedback /// public interface IRoutingSinkWithFeedback : IRoutingSinkWithSwitching { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs index d6f97c07..773e036e 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs @@ -2,16 +2,22 @@ namespace PepperDash.Essentials.Core { + /// + /// Delegate for InputChangedEventHandler + /// public delegate void InputChangedEventHandler(IRoutingSinkWithSwitching destination, RoutingInputPort currentPort); /// - /// Endpoint device like a display, that selects inputs + /// Defines the contract for IRoutingSinkWithSwitching /// public interface IRoutingSinkWithSwitching : IRoutingSink { void ExecuteSwitch(object inputSelector); } + /// + /// Defines the contract for IRoutingSinkWithSwitchingWithInputPort + /// public interface IRoutingSinkWithSwitchingWithInputPort:IRoutingSinkWithSwitching, IRoutingSinkWithInputPort { event InputChangedEventHandler InputChanged; @@ -20,6 +26,9 @@ namespace PepperDash.Essentials.Core /* /// /// Endpoint device like a display, that selects inputs /// + /// + /// Defines the contract for IRoutingSinkWithSwitching + /// public interface IRoutingSinkWithSwitching : IRoutingSink { void ExecuteSwitch(TSelector inputSelector); diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs index 7fabfb8b..b6922862 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs @@ -7,6 +7,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.Routing { + /// + /// Defines the contract for IRoutingSlot + /// public interface IRoutingSlot:IKeyName { int SlotNumber { get; } diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs index d3f61e72..75bf1bfb 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Marker interface to identify a device that acts as the origin of a signal path (). + /// Defines the contract for IRoutingSource /// public interface IRoutingSource : IRoutingOutputs { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs index 407133ef..2a80022d 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Defines a routing device () that supports explicitly clearing a route on an output. + /// Defines the contract for IRoutingWithClear /// public interface IRoutingWithClear : IRouting { diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs index a328441a..e66084a7 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs @@ -8,6 +8,9 @@ namespace PepperDash.Essentials.Core /// /// The routing device where the change occurred. /// A descriptor of the new route that was established. + /// + /// Delegate for RouteChangedEventHandler + /// public delegate void RouteChangedEventHandler(IRoutingWithFeedback midpoint, RouteSwitchDescriptor newRoute); /// /// Defines a routing device () that provides feedback about its current routes. diff --git a/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs b/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs index a157e8d1..0bd818ac 100644 --- a/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs +++ b/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs @@ -1,8 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Represents a routing device (typically a transmitter or source) that provides numeric feedback for its current route. - /// Extends . + /// Defines the contract for ITxRouting /// public interface ITxRouting : IRoutingNumeric { diff --git a/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs index 484fa134..abfbff7f 100644 --- a/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs @@ -1,7 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Defines an IRmcRouting with a feedback event + /// Defines the contract for ITxRoutingWithFeedback /// public interface ITxRoutingWithFeedback : ITxRouting { diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs index e02dd30e..aab82d38 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs @@ -20,22 +20,22 @@ namespace PepperDash.Essentials.Core public IRoutingInputs Destination { get; private set; } /// - /// The specific input port on the destination device used for this route. Can be null if not specified or applicable. + /// Gets or sets the InputPort /// public RoutingInputPort InputPort { get; private set; } /// - /// The source device for the route. + /// Gets or sets the Source /// public IRoutingOutputs Source { get; private set; } /// - /// The type of signal being routed (e.g., Audio, Video). This descriptor represents a single signal type. + /// Gets or sets the SignalType /// public eRoutingSignalType SignalType { get; private set; } /// - /// A list of individual switching steps required to establish the route. + /// Gets or sets the Routes /// public List Routes { get; private set; } @@ -66,7 +66,7 @@ namespace PepperDash.Essentials.Core } /// - /// Executes all the switching steps defined in the list. + /// ExecuteRoutes method /// public void ExecuteRoutes() { @@ -95,6 +95,8 @@ namespace PepperDash.Essentials.Core /// Releases the usage tracking for the route and optionally clears the route on the switching devices. /// /// If true, attempts to clear the route on the switching devices (e.g., set input to null/0). + + public void ReleaseRoutes(bool clearRoute = false) { foreach (var route in Routes.Where(r => r.SwitchingDevice is IRouting)) @@ -135,6 +137,9 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the route descriptor, including source, destination, and individual route steps. /// /// A string describing the route. + + + public override string ToString() { var routesText = Routes.Select(r => r.ToString()).ToArray(); @@ -145,10 +150,22 @@ namespace PepperDash.Essentials.Core /*/// /// Represents an collection of individual route steps between Source and Destination /// + /// + /// Represents a RouteDescriptor + /// public class RouteDescriptor { + /// + /// Gets or sets the Destination + /// public IRoutingInputs Destination { get; private set; } + /// + /// Gets or sets the Source + /// public IRoutingOutputs Source { get; private set; } + /// + /// Gets or sets the SignalType + /// public eRoutingSignalType SignalType { get; private set; } public List> Routes { get; private set; } @@ -162,8 +179,7 @@ namespace PepperDash.Essentials.Core } /// - /// Executes all routes described in this collection. Typically called via - /// extension method IRoutingInputs.ReleaseAndMakeRoute() + /// ExecuteRoutes method /// public void ExecuteRoutes() { @@ -189,8 +205,7 @@ namespace PepperDash.Essentials.Core } /// - /// Releases all routes in this collection. Typically called via - /// extension method IRoutingInputs.ReleaseAndMakeRoute() + /// ReleaseRoutes method /// public void ReleaseRoutes() { @@ -206,6 +221,10 @@ namespace PepperDash.Essentials.Core } } + /// + /// ToString method + /// + /// public override string ToString() { var routesText = Routes.Select(r => r.ToString()).ToArray(); diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs index 9bafc128..f389f719 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -48,9 +48,8 @@ namespace PepperDash.Essentials.Core } /// - /// Gets the RouteDescriptor for a destination + /// Gets the RouteDescriptor for a destination. Returns null if no RouteDescriptor for a destination exists. /// - /// null if no RouteDescriptor for a destination exists public RouteDescriptor GetRouteDescriptorForDestination(IRoutingInputs destination) { Debug.LogMessage(LogEventLevel.Information, "Getting route descriptor for '{destination}'", destination?.Key ?? null); @@ -65,9 +64,11 @@ namespace PepperDash.Essentials.Core } /// - /// Returns the RouteDescriptor for a given destination AND removes it from collection. - /// Returns null if no route with the provided destination exists. + /// Removes a RouteDescriptor from the collection based on the specified destination and input port key. /// + /// The destination for which the route descriptor is to be removed. + /// The key of the input port associated with the route descriptor. If empty, the method will attempt to remove a descriptor based solely on the destination. + /// The removed RouteDescriptor object if a matching descriptor was found; otherwise, null. public RouteDescriptor RemoveRouteDescriptor(IRoutingInputs destination, string inputPortKey = "") { Debug.LogMessage(LogEventLevel.Information, "Removing route descriptor for '{destination}':'{inputPortKey}'", destination.Key ?? null, string.IsNullOrEmpty(inputPortKey) ? "auto" : inputPortKey); @@ -87,6 +88,9 @@ namespace PepperDash.Essentials.Core /*/// /// A collection of RouteDescriptors - typically the static DefaultCollection is used /// + /// + /// Represents a RouteDescriptorCollection + /// public class RouteDescriptorCollection { public static RouteDescriptorCollection DefaultCollection @@ -108,6 +112,9 @@ namespace PepperDash.Essentials.Core /// proper route releasing. /// /// + /// + /// AddRouteDescriptor method + /// public void AddRouteDescriptor(RouteDescriptor descriptor) { if (RouteDescriptors.Any(t => t.Destination == descriptor.Destination)) @@ -123,6 +130,9 @@ namespace PepperDash.Essentials.Core /// Gets the RouteDescriptor for a destination /// /// null if no RouteDescriptor for a destination exists + /// + /// GetRouteDescriptorForDestination method + /// public RouteDescriptor GetRouteDescriptorForDestination(IRoutingInputs destination) { return RouteDescriptors.FirstOrDefault(rd => rd.Destination == destination); diff --git a/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs b/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs index a8bdf015..30c0e5f8 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs @@ -5,7 +5,7 @@ using System; namespace PepperDash.Essentials.Core { /// - /// Represents a request to establish a route between a source and a destination device. + /// Represents a RouteRequest /// public class RouteRequest { @@ -15,22 +15,22 @@ namespace PepperDash.Essentials.Core public RoutingInputPort DestinationPort { get; set; } /// - /// The specific output port on the source device to use for the route. Can be null if the port should be automatically determined or is not applicable. + /// Gets or sets the SourcePort /// public RoutingOutputPort SourcePort { get; set; } /// - /// The destination device (sink or midpoint) for the route. + /// Gets or sets the Destination /// public IRoutingInputs Destination { get; set; } /// - /// The source device for the route. + /// Gets or sets the Source /// public IRoutingOutputs Source { get; set; } /// - /// The type of signal being routed (e.g., Audio, Video, AudioVideo). + /// Gets or sets the SignalType /// public eRoutingSignalType SignalType { get; set; } diff --git a/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs b/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs index 07b52c2c..812f1399 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs @@ -6,7 +6,7 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.Routing { /// - /// Represents an item in the route request queue. + /// Represents a RouteRequestQueueItem /// public class RouteRequestQueueItem : IQueueMessage { @@ -41,7 +41,7 @@ namespace PepperDash.Essentials.Core.Routing } /// - /// Represents an item in the queue for releasing a route. + /// Represents a ReleaseRouteQueueItem /// public class ReleaseRouteQueueItem : IQueueMessage { @@ -78,7 +78,7 @@ namespace PepperDash.Essentials.Core.Routing } /// - /// Dispatches the release route action. + /// Dispatch method /// public void Dispatch() { diff --git a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs index 6394a3bc..12aebdcf 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs @@ -1,13 +1,13 @@ namespace PepperDash.Essentials.Core { /// - /// Represents a single switching step within a larger route, detailing the switching device, input port, and optionally the output port. + /// Represents a RouteSwitchDescriptor /// public class RouteSwitchDescriptor { - /// - /// The device performing the switch (derived from the InputPort's parent). - /// + /// + /// Gets or sets the SwitchingDevice + /// public IRoutingInputs SwitchingDevice { get { return InputPort?.ParentDevice; } } /// /// The output port being switched from (relevant for matrix switchers). Null for sink devices. @@ -42,6 +42,7 @@ /// Returns a string representation of the route switch descriptor. /// /// A string describing the switch operation. + /// public override string ToString() { if (SwitchingDevice is IRouting) @@ -54,10 +55,22 @@ /*/// /// Represents an individual link for a route /// + /// + /// Represents a RouteSwitchDescriptor + /// public class RouteSwitchDescriptor { + /// + /// Gets or sets the SwitchingDevice + /// public IRoutingInputs SwitchingDevice { get { return InputPort.ParentDevice; } } + /// + /// Gets or sets the OutputPort + /// public RoutingOutputPort OutputPort { get; set; } + /// + /// Gets or sets the InputPort + /// public RoutingInputPort InputPort { get; set; } public RouteSwitchDescriptor(RoutingInputPort inputPort) @@ -71,6 +84,10 @@ OutputPort = outputPort; } + /// + /// ToString method + /// + /// public override string ToString() { if (SwitchingDevice is IRouting) diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs index c949db4e..08876121 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs @@ -5,7 +5,7 @@ using System; namespace PepperDash.Essentials.Core { /// - /// Represents a basic routing input port on a device. + /// Represents a RoutingInputPort /// public class RoutingInputPort : RoutingPort { @@ -45,6 +45,7 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the input port. /// /// A string in the format "ParentDeviceKey|PortKey|SignalType|ConnectionType". + /// public override string ToString() { return $"{ParentDevice.Key}|{Key}|{Type}|{ConnectionType}"; @@ -57,7 +58,7 @@ namespace PepperDash.Essentials.Core public class RoutingInputPort : RoutingPort { /// - /// The IRoutingInputs object this lives on + /// Gets or sets the ParentDevice /// public IRoutingInputs ParentDevice { get; private set; } diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs b/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs index e0c6bba0..2ecf75c4 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs @@ -1,8 +1,7 @@ namespace PepperDash.Essentials.Core { /// - /// Represents a routing input port that provides video status feedback (e.g., sync, resolution). - /// Suitable for devices like DM transmitters or DM input cards. + /// Represents a RoutingInputPortWithVideoStatuses /// public class RoutingInputPortWithVideoStatuses : RoutingInputPort { diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs b/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs index a0e706ac..a2025dad 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs @@ -4,7 +4,7 @@ namespace PepperDash.Essentials.Core { /// - /// Provides event arguments for routing changes, potentially including numeric or port object references. + /// Represents a RoutingNumericEventArgs /// public class RoutingNumericEventArgs : EventArgs { diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs index 1cae64c0..c1cadfb1 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs @@ -5,7 +5,7 @@ using System; namespace PepperDash.Essentials.Core { /// - /// Represents a basic routing output port on a device. + /// Represents a RoutingOutputPort /// public class RoutingOutputPort : RoutingPort { @@ -65,10 +65,13 @@ namespace PepperDash.Essentials.Core /*public class RoutingOutputPort : RoutingPort { /// - /// The IRoutingOutputs object this port lives on + /// Gets or sets the ParentDevice /// public IRoutingOutputs ParentDevice { get; private set; } + /// + /// Gets or sets the InUseTracker + /// public InUseTracking InUseTracker { get; private set; } @@ -91,6 +94,10 @@ namespace PepperDash.Essentials.Core InUseTracker = new InUseTracking(); } + /// + /// ToString method + /// + /// public override string ToString() { return ParentDevice.Key + ":" + Key; diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs index 64fae203..30440578 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs @@ -57,12 +57,30 @@ namespace PepperDash.Essentials.Core /*public abstract class RoutingPort:IKeyed { + /// + /// Gets or sets the Key + /// public string Key { get; private set; } + /// + /// Gets or sets the Type + /// public eRoutingSignalType Type { get; private set; } + /// + /// Gets or sets the ConnectionType + /// public eRoutingPortConnectionType ConnectionType { get; private set; } public readonly TSelector Selector; + /// + /// Gets or sets the IsInternal + /// public bool IsInternal { get; private set; } + /// + /// Gets or sets the FeedbackMatchObject + /// public object FeedbackMatchObject { get; set; } + /// + /// Gets or sets the Port + /// public object Port { get; set; } public RoutingPort(string key, eRoutingSignalType type, eRoutingPortConnectionType connType, TSelector selector, bool isInternal) diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs index e1e6bc19..7ee349b5 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs @@ -4,9 +4,9 @@ using System.Linq; namespace PepperDash.Essentials.Core { - /// - /// Basically a List , with an indexer to find ports by key name - /// + /// + /// Represents a RoutingPortCollection, which is essentially a List with an indexer for case-insensitive lookup of ports by their key names. + /// public class RoutingPortCollection : List where T: RoutingPort { /// diff --git a/src/PepperDash.Essentials.Core/Routing/TieLine.cs b/src/PepperDash.Essentials.Core/Routing/TieLine.cs index f3a2c71d..42f024b4 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLine.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLine.cs @@ -5,7 +5,8 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core { /// - /// Represents a connection (tie line) between a and a . + /// Represents a connection between routing ports, linking a source output port to a destination input port. + /// This class is used to define signal paths for routing algorithms, including signal type overrides and internal connections. /// public class TieLine { @@ -127,7 +128,8 @@ namespace PepperDash.Essentials.Core //******************************************************************************** /// - /// Represents a collection of objects. + /// Represents a collection of objects, which define signal paths for routing algorithms. + /// This class provides functionality for managing tie lines and includes a singleton instance for global access. /// public class TieLineCollection : List { diff --git a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs index 5090f9c2..8143c1f5 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs @@ -23,29 +23,29 @@ namespace PepperDash.Essentials.Core.Config /// public string SourceKey { get; set; } - /// - /// The key of the source card (if applicable, e.g., in a modular chassis). - /// + /// + /// The key of the source card (if applicable, e.g., in a modular chassis). + /// public string SourceCard { get; set; } - /// - /// The key of the source output port. - /// + /// + /// The key of the source output port, used for routing configurations. + /// public string SourcePort { get; set; } - /// - /// The key of the destination device. - /// + /// + /// Gets or sets the DestinationKey + /// public string DestinationKey { get; set; } - /// - /// The key of the destination card (if applicable). - /// + /// + /// Gets or sets the DestinationCard + /// public string DestinationCard { get; set; } - /// - /// The key of the destination input port. - /// + /// + /// Gets or sets the DestinationPort + /// public string DestinationPort { get; set; } /// diff --git a/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs b/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs index 436ef9e6..41e8c81b 100644 --- a/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs +++ b/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs @@ -1,5 +1,8 @@ namespace PepperDash.Essentials.Core { + /// + /// Enumeration of eRoutingPortConnectionType values + /// public enum eRoutingPortConnectionType { None, BackplaneOnly, DisplayPort, Dvi, Hdmi, Rgb, Vga, LineAudio, DigitalAudio, Sdi, diff --git a/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs b/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs index b5f3d9f7..bab815fc 100644 --- a/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs +++ b/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs @@ -4,7 +4,10 @@ namespace PepperDash.Essentials.Core { [Flags] - public enum eRoutingSignalType + /// + /// Enumeration of eRoutingSignalType values + /// + public enum eRoutingSignalType { Audio = 1, Video = 2, diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs index 4614e661..83d0a0a8 100644 --- a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs +++ b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs @@ -7,10 +7,19 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Represents a CrestronGlobalSecretsProvider + /// public class CrestronGlobalSecretsProvider : ISecretProvider { + /// + /// Gets or sets the Key + /// public string Key { get; set; } //Added for reference + /// + /// Gets or sets the Description + /// public string Description { get; private set; } public CrestronGlobalSecretsProvider(string key) @@ -71,6 +80,9 @@ namespace PepperDash.Essentials.Core /// /// Secret Key /// ISecret Object containing key, provider, and value + + + public ISecret GetSecret(string key) { string mySecret; diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs index 6c355d30..a20d832e 100644 --- a/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs +++ b/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs @@ -8,10 +8,19 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Represents a CrestronLocalSecretsProvider + /// public class CrestronLocalSecretsProvider : ISecretProvider { + /// + /// Gets or sets the Key + /// public string Key { get; set; } //Added for reference + /// + /// Gets or sets the Description + /// public string Description { get; private set; } @@ -72,6 +81,9 @@ namespace PepperDash.Essentials.Core /// /// Secret Key /// ISecret Object containing key, provider, and value + /// + /// GetSecret method + /// public ISecret GetSecret(string key) { string mySecret; @@ -94,6 +106,9 @@ namespace PepperDash.Essentials.Core /// /// Secret Key /// bool if present + /// + /// TestSecret method + /// public bool TestSecret(string key) { string mySecret; diff --git a/src/PepperDash.Essentials.Core/Secrets/Interfaces.cs b/src/PepperDash.Essentials.Core/Secrets/Interfaces.cs index d2fd750a..55ce5ccc 100644 --- a/src/PepperDash.Essentials.Core/Secrets/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Secrets/Interfaces.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.Core { /// - /// All ISecrecretProvider classes must implement this interface. + /// Defines the contract for ISecretProvider /// public interface ISecretProvider : IKeyed { diff --git a/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs b/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs index 8309b7e9..6a08f0e2 100644 --- a/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs +++ b/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs @@ -12,7 +12,7 @@ namespace PepperDash.Essentials.Core public static Dictionary Secrets { get; private set; } /// - /// Initialize the SecretsManager + /// Initialize method /// public static void Initialize() { @@ -52,6 +52,9 @@ namespace PepperDash.Essentials.Core /// /// Dictionary Key for provider /// ISecretProvider + /// + /// GetSecretProviderByKey method + /// public static ISecretProvider GetSecretProviderByKey(string key) { ISecretProvider secret; @@ -65,6 +68,9 @@ namespace PepperDash.Essentials.Core return secret; } + /// + /// GetProviderInfo method + /// public static void GetProviderInfo(string cmd) { string response; @@ -104,6 +110,9 @@ namespace PepperDash.Essentials.Core /// Console Command that returns all valid secrets in the essentials program. /// /// + /// + /// ListProviders method + /// public static void ListProviders(string cmd) { var response = String.Empty; @@ -143,6 +152,9 @@ namespace PepperDash.Essentials.Core /// /// Key of new entry /// New Provider Entry + /// + /// AddSecretProvider method + /// public static void AddSecretProvider(string key, ISecretProvider provider) { if (!Secrets.ContainsKey(key)) @@ -160,6 +172,9 @@ namespace PepperDash.Essentials.Core /// Key of new entry /// New provider entry /// true to overwrite any existing providers in the dictionary + /// + /// AddSecretProvider method + /// public static void AddSecretProvider(string key, ISecretProvider provider, bool overwrite) { if (!Secrets.ContainsKey(key)) diff --git a/src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs b/src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs index 93fcbc52..728a5187 100644 --- a/src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core.Shades { - /// - /// Requirements for an object that contains shades - /// + /// + /// Defines the contract for IShades + /// public interface IShades { List Shades { get; } @@ -32,7 +32,7 @@ namespace PepperDash.Essentials.Core.Shades /// - /// Requirements for a shade device that provides raising/lowering feedback + /// Defines the contract for IShadesRaiseLowerFeedback /// public interface IShadesRaiseLowerFeedback { @@ -59,9 +59,9 @@ namespace PepperDash.Essentials.Core.Shades void OpenCloseOrStop(); } - /// - /// Basic feedback for shades/scene stopped - /// + /// + /// Defines the contract for IShadesStopFeedback + /// public interface IShadesStopFeedback : IShadesOpenCloseStop { BoolFeedback IsStoppedFeedback { get; } diff --git a/src/PepperDash.Essentials.Core/SigHelper.cs b/src/PepperDash.Essentials.Core/SigHelper.cs index 86395114..fb14df78 100644 --- a/src/PepperDash.Essentials.Core/SigHelper.cs +++ b/src/PepperDash.Essentials.Core/SigHelper.cs @@ -25,9 +25,9 @@ namespace PepperDash.Essentials.Core /// public static void Released(Sig sig, Action act) { if (!sig.BoolValue) act(); } - /// - /// Safely sets an action to non-null sig - /// + /// + /// SetBoolOutAction method + /// public static void SetBoolOutAction(BoolOutputSig sig, Action a) { if (sig != null) @@ -50,6 +50,9 @@ namespace PepperDash.Essentials.Core /// Ushort sig to scale /// Level to go to /// In ms (not hundredths like Crestron Sig ramp function) + /// + /// RampTimeScaled method + /// public static void RampTimeScaled(Sig sig, ushort newLevel, uint time) { ushort level = sig.UShortValue; @@ -64,6 +67,9 @@ namespace PepperDash.Essentials.Core /// /// /// In ms (not hundredths like Crestron Sig ramp function) + /// + /// Ramp method + /// public static void Ramp(Sig sig, ushort level, uint time) { sig.CreateRamp(level, time / 10); diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDPad.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDPad.cs index 2307be7e..436f00b4 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDPad.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDPad.cs @@ -8,12 +8,30 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Core.SmartObjects { + /// + /// Represents a SmartObjectDPad + /// public class SmartObjectDPad : SmartObjectHelperBase { + /// + /// Gets or sets the SigUp + /// public BoolOutputSig SigUp { get { return GetBoolOutputNamed("Up"); } } + /// + /// Gets or sets the SigDown + /// public BoolOutputSig SigDown { get { return GetBoolOutputNamed("Down"); } } + /// + /// Gets or sets the SigLeft + /// public BoolOutputSig SigLeft { get { return GetBoolOutputNamed("Left"); } } + /// + /// Gets or sets the SigRight + /// public BoolOutputSig SigRight { get { return GetBoolOutputNamed("Right"); } } + /// + /// Gets or sets the SigCenter + /// public BoolOutputSig SigCenter { get { return GetBoolOutputNamed("Center"); } } public SmartObjectDPad(SmartObject so, bool useUserObjectHandler) diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs index 5d768803..2080a07e 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs @@ -12,11 +12,17 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.SmartObjects { + /// + /// Represents a SmartObjectDynamicList + /// public class SmartObjectDynamicList : SmartObjectHelperBase { public const string SigNameScrollToItem = "Scroll To Item"; public const string SigNameSetNumberOfItems = "Set Number of Items"; + /// + /// Gets or sets the NameSigOffset + /// public uint NameSigOffset { get; private set; } public ushort Count @@ -28,10 +34,9 @@ namespace PepperDash.Essentials.Core.SmartObjects set { SmartObject.UShortInput[SigNameSetNumberOfItems].UShortValue = value; } } - /// - /// The limit of the list object, as defined by VTPro settings. Zero if object - /// is not a list - /// + /// + /// Gets or sets the MaxCount + /// public int MaxCount { get; private set; } /// @@ -57,9 +62,9 @@ namespace PepperDash.Essentials.Core.SmartObjects } } - /// - /// Builds a new list item - /// + /// + /// SetItem method + /// public void SetItem(uint index, string mainText, string iconName, Action action) { SetItemMainText(index, mainText); @@ -78,6 +83,9 @@ namespace PepperDash.Essentials.Core.SmartObjects //} } + /// + /// SetItemMainText method + /// public void SetItemMainText(uint index, string text) { if (index > MaxCount) return; @@ -85,21 +93,27 @@ namespace PepperDash.Essentials.Core.SmartObjects (SmartObject.Device as BasicTriList).StringInput[NameSigOffset + index].StringValue = text; } + /// + /// SetItemIcon method + /// public void SetItemIcon(uint index, string iconName) { if (index > MaxCount) return; SmartObject.StringInput[string.Format("Set Item {0} Icon Serial", index)].StringValue = iconName; } + /// + /// SetItemButtonAction method + /// public void SetItemButtonAction(uint index, Action action) { if (index > MaxCount) return; SmartObject.BooleanOutput[string.Format("Item {0} Pressed", index)].UserObject = action; } - /// - /// Sets the feedback on the given line, clearing others when interlocked is set - /// + /// + /// SetFeedback method + /// public void SetFeedback(uint index, bool interlocked) { if (interlocked) @@ -107,9 +121,9 @@ namespace PepperDash.Essentials.Core.SmartObjects SmartObject.BooleanInput[string.Format("Item {0} Selected", index)].BoolValue = true; } - /// - /// Clears all button feedbacks - /// + /// + /// ClearFeedbacks method + /// public void ClearFeedbacks() { for(int i = 1; i<= Count; i++) diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs index 23bf4530..031259b0 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs @@ -11,13 +11,19 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.SmartObjects { + /// + /// Represents a SmartObjectHelperBase + /// public class SmartObjectHelperBase { + /// + /// Gets or sets the SmartObject + /// public SmartObject SmartObject { get; private set; } - /// - /// This should be set by all inheriting classes, after the class has verified that it is linked to the right object. - /// + /// + /// Gets or sets the Validated + /// public bool Validated { get; protected set; } public SmartObjectHelperBase(SmartObject so, bool useUserObjectHandler) @@ -41,6 +47,9 @@ namespace PepperDash.Essentials.Core.SmartObjects /// /// /// + /// + /// GetBoolOutputNamed method + /// public BoolOutputSig GetBoolOutputNamed(string name) { if (SmartObject.BooleanOutput.Contains(name)) @@ -56,6 +65,9 @@ namespace PepperDash.Essentials.Core.SmartObjects /// /// /// + /// + /// SetBoolAction method + /// public void SetBoolAction(string name, Action a) { if (SmartObject.BooleanOutput.Contains(name)) diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectNumeric.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectNumeric.cs index 7e574242..493fd213 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectNumeric.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectNumeric.cs @@ -8,14 +8,17 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Core.SmartObjects { + /// + /// Represents a SmartObjectNumeric + /// public class SmartObjectNumeric : SmartObjectHelperBase { /// - /// Defaults to "Misc_1". The name of the button in VTPro (Usually the text) + /// Gets or sets the Misc1SigName /// public string Misc1SigName { get; set; } /// - /// Defaults to "Misc_2". The name of the button in VTPro (Usually the text) + /// Gets or sets the Misc2SigName /// public string Misc2SigName { get; set; } @@ -23,13 +26,28 @@ namespace PepperDash.Essentials.Core.SmartObjects public BoolOutputSig Digit2 { get { return GetBoolOutputNamed("2"); } } public BoolOutputSig Digit3 { get { return GetBoolOutputNamed("3"); } } public BoolOutputSig Digit4 { get { return GetBoolOutputNamed("4"); } } + /// + /// Gets or sets the Digit5 + /// public BoolOutputSig Digit5 { get { return GetBoolOutputNamed("5"); } } public BoolOutputSig Digit6 { get { return GetBoolOutputNamed("6"); } } public BoolOutputSig Digit7 { get { return GetBoolOutputNamed("7"); } } public BoolOutputSig Digit8 { get { return GetBoolOutputNamed("8"); } } + /// + /// Gets or sets the Digit9 + /// public BoolOutputSig Digit9 { get { return GetBoolOutputNamed("9"); } } + /// + /// Gets or sets the Digit0 + /// public BoolOutputSig Digit0 { get { return GetBoolOutputNamed("0"); } } + /// + /// Gets or sets the Misc1 + /// public BoolOutputSig Misc1 { get { return GetBoolOutputNamed(Misc1SigName); } } + /// + /// Gets or sets the Misc2 + /// public BoolOutputSig Misc2 { get { return GetBoolOutputNamed(Misc2SigName); } } public SmartObjectNumeric(SmartObject so, bool useUserObjectHandler) : base(so, useUserObjectHandler) diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs index f92e182b..f955011a 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs @@ -15,9 +15,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { ////***************************************************************************** - ///// - ///// Base class for all subpage reference list controllers - ///// + /// + /// Base class for all subpage reference list controllers + /// //public class SubpageReferenceListController //{ // public SubpageReferenceList TheList { get; protected set; } @@ -38,10 +38,22 @@ namespace PepperDash.Essentials.Core } public ushort MaxDefinedItems { get; private set; } + /// + /// Gets or sets the ScrollToItemSig + /// public UShortInputSig ScrollToItemSig { get; private set; } UShortInputSig SetNumberOfItemsSig; + /// + /// Gets or sets the BoolIncrement + /// public uint BoolIncrement { get; protected set; } + /// + /// Gets or sets the UShortIncrement + /// public uint UShortIncrement { get; protected set; } + /// + /// Gets or sets the StringIncrement + /// public uint StringIncrement { get; protected set; } protected readonly SmartObject SRL; @@ -84,16 +96,17 @@ namespace PepperDash.Essentials.Core /// DOES NOT adjust Count /// /// + /// + /// AddItem method + /// public void AddItem(SubpageReferenceListItem item) { Items.Add(item); } - /// - /// Items need to be responsible for managing their own deallocation process, - /// disconnecting from events, etc. - /// - /// + /// + /// Clear method + /// public void Clear() { // If a line item needs to disconnect an CueActionPair or do something to release RAM @@ -106,10 +119,9 @@ namespace PepperDash.Essentials.Core ScrollToItemSig.UShortValue = 1; } - /// - /// Optional call to refresh the signals on the objects in the SRL - this calls Refresh() on - /// all SubpageReferenceListItem items - /// + /// + /// Refresh method + /// public void Refresh() { foreach (var item in Items) item.Refresh(); @@ -251,6 +263,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SRL_SigChange method + /// public static void SRL_SigChange(GenericBase currentDevice, SmartObjectEventArgs args) { var uo = args.Sig.UserObject; diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs index 30e15f74..4e979a69 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs @@ -8,6 +8,9 @@ using Crestron.SimplSharpPro.UI; namespace PepperDash.Essentials.Core { + /// + /// Represents a SubpageReferenceListItem + /// public class SubpageReferenceListItem { /// @@ -22,13 +25,17 @@ namespace PepperDash.Essentials.Core Owner = owner; } - /// - /// Called by SRL to release all referenced objects - /// + /// + /// Clear method + /// + /// public virtual void Clear() { } + /// + /// Refresh method + /// public virtual void Refresh() { } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs b/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs index cbb470d6..c00eb014 100644 --- a/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs +++ b/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs @@ -9,30 +9,57 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Represents a SecondsCountdownTimer + /// public class SecondsCountdownTimer: IKeyed { public event EventHandler HasStarted; public event EventHandler HasFinished; public event EventHandler WasCancelled; + /// + /// Gets or sets the Key + /// public string Key { get; private set; } + /// + /// Gets or sets the IsRunningFeedback + /// public BoolFeedback IsRunningFeedback { get; private set; } bool _isRunning; + /// + /// Gets or sets the PercentFeedback + /// public IntFeedback PercentFeedback { get; private set; } + /// + /// Gets or sets the TimeRemainingFeedback + /// public StringFeedback TimeRemainingFeedback { get; private set; } + /// + /// Gets or sets the SecondsRemainingFeedback + /// public IntFeedback SecondsRemainingFeedback { get; private set; } + /// + /// Gets or sets the CountsDown + /// public bool CountsDown { get; set; } /// - /// The number of seconds to countdown + /// Gets or sets the SecondsToCount /// public int SecondsToCount { get; set; } + /// + /// Gets or sets the StartTime + /// public DateTime StartTime { get; private set; } + /// + /// Gets or sets the FinishTime + /// public DateTime FinishTime { get; private set; } private CTimer _secondTimer; @@ -77,7 +104,7 @@ namespace PepperDash.Essentials.Core } /// - /// Starts the Timer + /// Start method /// public void Start() { @@ -98,7 +125,7 @@ namespace PepperDash.Essentials.Core } /// - /// Restarts the timer + /// Reset method /// public void Reset() { @@ -108,7 +135,7 @@ namespace PepperDash.Essentials.Core } /// - /// Cancels the timer (without triggering it to finish) + /// Cancel method /// public void Cancel() { @@ -120,7 +147,7 @@ namespace PepperDash.Essentials.Core } /// - /// Called upon expiration, or calling this will force timer to finish. + /// Finish method /// public void Finish() { diff --git a/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs b/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs index 968c10bb..ee734489 100644 --- a/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs +++ b/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs @@ -39,6 +39,10 @@ namespace PepperDash.Essentials.Core.Timers } } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { if (_propertiesConfig.StartTimerOnActivation) @@ -60,6 +64,9 @@ namespace PepperDash.Essentials.Core.Timers _timer = null; } + /// + /// StartTimer method + /// public void StartTimer() { CleanUpTimer(); @@ -68,6 +75,9 @@ namespace PepperDash.Essentials.Core.Timers _timer = new CTimer(TimerElapsedCallback, GetActionFromConfig(eRetriggerableTimerEvents.Elapsed), _timerIntervalMs, _timerIntervalMs); } + /// + /// StopTimer method + /// public void StopTimer() { Debug.LogMessage(LogEventLevel.Information, this, "Stopping Timer"); @@ -150,7 +160,7 @@ namespace PepperDash.Essentials.Core.Timers } /// - /// The set of values describing events on the timer + /// Enumeration of eRetriggerableTimerEvents values /// public enum eRetriggerableTimerEvents { diff --git a/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs index aa4dac6d..1358b1b9 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs @@ -2,24 +2,45 @@ namespace PepperDash.Essentials.Core { + /// + /// Represents a CrestronTouchpanelPropertiesConfig + /// public class CrestronTouchpanelPropertiesConfig { [JsonProperty("control")] + /// + /// Gets or sets the ControlProperties + /// public EssentialsControlPropertiesConfig ControlProperties { get; set; } [JsonProperty("ipId", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the IpId + /// public string IpId { get; set; } [JsonProperty("defaultRoomKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DefaultRoomKey + /// public string DefaultRoomKey { get; set; } [JsonProperty("roomListKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the RoomListKey + /// public string RoomListKey { get; set; } [JsonProperty("sgdFile", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the SgdFile + /// public string SgdFile { get; set; } [JsonProperty("projectName", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the ProjectName + /// public string ProjectName { get; set; } [JsonProperty("showVolumeGauge", NullValueHandling = NullValueHandling.Ignore)] @@ -35,9 +56,15 @@ namespace PepperDash.Essentials.Core public bool? ShowTime { get; set; } [JsonProperty("setup", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Setup + /// public UiSetupPropertiesConfig Setup { get; set; } [JsonProperty("headerStyle", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the HeaderStyle + /// public string HeaderStyle { get; set; } [JsonProperty("includeInFusionRoomHealth", NullValueHandling = NullValueHandling.Ignore)] @@ -81,7 +108,7 @@ namespace PepperDash.Essentials.Core } /// - /// + /// Represents a UiSetupPropertiesConfig /// public class UiSetupPropertiesConfig { diff --git a/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs b/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs index 946f4f9d..6f59aba1 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs @@ -7,6 +7,9 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Core { + /// + /// Defines the contract for IHasBasicTriListWithSmartObject + /// public interface IHasBasicTriListWithSmartObject { BasicTriListWithSmartObject Panel { get; } diff --git a/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs b/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs index 5e068c12..b45ea649 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs @@ -7,6 +7,9 @@ using Crestron.SimplSharpPro.DeviceSupport; namespace PepperDash.Essentials.Core.Touchpanels.Keyboards { + /// + /// Represents a HabaneroKeyboardController + /// public class HabaneroKeyboardController { /// @@ -14,26 +17,47 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards /// public event EventHandler KeyPress; + /// + /// Gets or sets the TriList + /// public BasicTriList TriList { get; private set; } + /// + /// Gets or sets the OutputFeedback + /// public StringFeedback OutputFeedback { get; private set; } public bool IsVisible { get; private set; } public string DotComButtonString { get; set; } + /// + /// Gets or sets the GoButtonText + /// public string GoButtonText { get; set; } + /// + /// Gets or sets the SecondaryButtonText + /// public string SecondaryButtonText { get; set; } + /// + /// Gets or sets the GoButtonVisible + /// public bool GoButtonVisible { get; set; } + /// + /// Gets or sets the SecondaryButtonVisible + /// public bool SecondaryButtonVisible { get; set; } int ShiftMode = 0; StringBuilder Output; + /// + /// Gets or sets the HideAction + /// public Action HideAction { get; set; } CTimer BackspaceTimer; @@ -51,7 +75,7 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards } /// - /// Shows the keyboard and attaches sig handlers in the range of 2901-2969 + /// Show method /// public void Show() { @@ -108,7 +132,7 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards } /// - /// Hides the keyboard and disconnects ALL sig handlers from 2901 - 2969 + /// Hide method /// public void Hide() { @@ -130,6 +154,9 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards /// /// /// + /// + /// Press method + /// public void Press(char c) { OnKeyPress(c.ToString()); @@ -142,6 +169,9 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards /// /// /// + /// + /// Press method + /// public void Press(string s) { OnKeyPress(s); @@ -151,7 +181,7 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards } /// - /// + /// EnableGoButton method /// public void EnableGoButton() { @@ -416,6 +446,9 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards public class KeyboardControllerPressEventArgs : EventArgs { public string Text { get; private set; } + /// + /// Gets or sets the SpecialKey + /// public KeyboardSpecialKey SpecialKey { get; private set; } public KeyboardControllerPressEventArgs(string text) @@ -429,6 +462,9 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards } } + /// + /// Enumeration of KeyboardSpecialKey values + /// public enum KeyboardSpecialKey { None = 0, Backspace, Clear, GoButton, SecondaryButton diff --git a/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs b/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs index 4dbe7158..65249df4 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs @@ -6,6 +6,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Represents a ModalDialog + /// public class ModalDialog { /// @@ -165,7 +168,7 @@ namespace PepperDash.Essentials.Core } /// - /// Wakes the panel by turning on the backlight if off + /// WakePanel method /// public void WakePanel() { @@ -182,9 +185,9 @@ namespace PepperDash.Essentials.Core } } - /// - /// Hide dialog from elsewhere, fires CompleteAction - /// + /// + /// CancelDialog method + /// public void CancelDialog() { OnModalComplete(0); diff --git a/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs b/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs index 8649d292..fa20ca84 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs @@ -67,6 +67,9 @@ namespace PepperDash.Essentials.Core.Touchpanels /// /// /// + /// + /// InitializeButton method + /// public void InitializeButton(string key, KeypadButton config) { if (config == null) @@ -151,6 +154,9 @@ namespace PepperDash.Essentials.Core.Touchpanels /// /// /// + /// + /// InitializeButtonFeedback method + /// public void InitializeButtonFeedback(string key, KeypadButton config) { //Debug.LogMessage(LogEventLevel.Debug, this, "Initializing button '{0}' feedback...", key); @@ -305,6 +311,9 @@ namespace PepperDash.Essentials.Core.Touchpanels /// /// /// + /// + /// Press method + /// public void Press(string buttonKey, string type) { this.LogVerbose("Press: buttonKey-'{buttonKey}', type-'{type}'", buttonKey, type); @@ -320,6 +329,9 @@ namespace PepperDash.Essentials.Core.Touchpanels } + /// + /// ListButtons method + /// public void ListButtons() { this.LogVerbose("MPC3 Controller {0} - Available Buttons", Key); @@ -331,9 +343,9 @@ namespace PepperDash.Essentials.Core.Touchpanels } } - /// - /// Represents the configuration of a keypad button - /// + /// + /// Represents a KeypadButton + /// public class KeypadButton { [JsonProperty("eventTypes")] @@ -349,12 +361,15 @@ namespace PepperDash.Essentials.Core.Touchpanels } } - /// - /// Represents the configuration of a keypad button feedback - /// + /// + /// Represents a KeypadButtonFeedback + /// public class KeypadButtonFeedback { [JsonProperty("deviceKey")] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } [JsonProperty("feedbackName")] diff --git a/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs b/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs index bfbb73f0..232dff33 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs @@ -36,6 +36,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SetBoolSigAction method + /// public static BoolOutputSig SetBoolSigAction(this BasicTriList tl, uint sigNum, Action a) { return tl.BooleanOutput[sigNum].SetBoolSigAction(a); @@ -50,6 +53,9 @@ namespace PepperDash.Essentials.Core /// Attaches a void Action to a TriList's output sig's UserObject, to be run on release /// /// The sig + /// + /// SetSigFalseAction method + /// public static BoolOutputSig SetSigFalseAction(this BasicTriList tl, uint sigNum, Action a) { return tl.BooleanOutput[sigNum].SetBoolSigAction(b => { if (!b) a(); }); @@ -118,6 +124,9 @@ namespace PepperDash.Essentials.Core /// Sets an action to a held sig as well as a released-without-hold action /// /// The sig + /// + /// SetSigHeldAction method + /// public static BoolOutputSig SetSigHeldAction(this BasicTriList tl, uint sigNum, uint heldMs, Action heldAction, Action releaseAction) { return tl.BooleanOutput[sigNum].SetSigHeldAction(heldMs, heldAction, null, releaseAction); @@ -139,6 +148,9 @@ namespace PepperDash.Essentials.Core /// /// /// The Sig + /// + /// SetUShortSigAction method + /// public static UShortOutputSig SetUShortSigAction(this UShortOutputSig sig, Action a) { sig.UserObject = a; @@ -151,6 +163,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SetUShortSigAction method + /// public static UShortOutputSig SetUShortSigAction(this BasicTriList tl, uint sigNum, Action a) { return tl.UShortOutput[sigNum].SetUShortSigAction(a); @@ -162,6 +177,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SetStringSigAction method + /// public static StringOutputSig SetStringSigAction(this StringOutputSig sig, Action a) { sig.UserObject = a; @@ -175,6 +193,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// SetStringSigAction method + /// public static StringOutputSig SetStringSigAction(this BasicTriList tl, uint sigNum, Action a) { return tl.StringOutput[sigNum].SetStringSigAction(a); @@ -185,6 +206,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// ClearSigAction method + /// public static Sig ClearSigAction(this Sig sig) { sig.UserObject = null; @@ -196,18 +220,24 @@ namespace PepperDash.Essentials.Core return ClearSigAction(tl.BooleanOutput[sigNum]) as BoolOutputSig; } + /// + /// ClearUShortSigAction method + /// public static UShortOutputSig ClearUShortSigAction(this BasicTriList tl, uint sigNum) { return ClearSigAction(tl.UShortOutput[sigNum]) as UShortOutputSig; } + /// + /// ClearStringSigAction method + /// public static StringOutputSig ClearStringSigAction(this BasicTriList tl, uint sigNum) { return ClearSigAction(tl.StringOutput[sigNum]) as StringOutputSig; } /// - /// Clears all actions on all sigs + /// ClearAllSigActions method /// public static void ClearAllSigActions(this BasicTriList t1) { @@ -228,7 +258,7 @@ namespace PepperDash.Essentials.Core } /// - /// Helper method to set the value of a bool Sig on TriList + /// SetBool method /// public static void SetBool(this BasicTriList tl, uint sigNum, bool value) { @@ -240,6 +270,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// PulseBool method + /// public static void PulseBool(this BasicTriList tl, uint sigNum) { tl.BooleanInput[sigNum].Pulse(); @@ -251,6 +284,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// PulseBool method + /// public static void PulseBool(this BasicTriList tl, uint sigNum, int ms) { tl.BooleanInput[sigNum].Pulse(ms); @@ -284,6 +320,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetBool method + /// public static bool GetBool(this BasicTriList tl, uint sigNum) { return tl.BooleanOutput[sigNum].BoolValue; @@ -295,6 +334,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetUshort method + /// public static ushort GetUshort(this BasicTriList tl, uint sigNum) { return tl.UShortOutput[sigNum].UShortValue; @@ -306,6 +348,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetString method + /// public static string GetString(this BasicTriList tl, uint sigNum) { return tl.StringOutput[sigNum].StringValue; diff --git a/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs b/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs index e1a69707..7e887f5b 100644 --- a/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs +++ b/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs @@ -11,6 +11,9 @@ namespace PepperDash.Essentials.Core { public abstract class HandlerBridge { + /// + /// Gets or sets the IsAttached + /// public bool IsAttached { get; protected set; } /// diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs index c272a65a..a18d8b6e 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs @@ -3,6 +3,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.PageManagers { + /// + /// Represents a DiscPlayerMediumPageManager + /// public class DiscPlayerMediumPageManager : MediumLeftSwitchablePageManager { IDiscPlayerControls Player; @@ -14,6 +17,10 @@ namespace PepperDash.Essentials.Core.PageManagers TriList = trilist; } + /// + /// Show method + /// + /// public override void Show() { uint offset = GetOffsetJoin(); @@ -33,6 +40,10 @@ namespace PepperDash.Essentials.Core.PageManagers } } + /// + /// Hide method + /// + /// public override void Hide() { TriList.BooleanInput[BackingPageJoin].BoolValue = false; diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs index 1f261f87..a6f8761f 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs @@ -21,6 +21,9 @@ namespace PepperDash.Essentials.Core.PageManagers /// /// 1 through 49, as defined in some constants somewhere! /// + /// + /// GetOffsetJoin method + /// public uint GetOffsetJoin(uint deviceType) { return 10000 + (deviceType * 100); @@ -47,11 +50,18 @@ namespace PepperDash.Essentials.Core.PageManagers BackingPageJoin = join; } + /// + /// Show method + /// + /// public override void Show() { TriList.BooleanInput[BackingPageJoin].BoolValue = true; } + /// + /// Hide method + /// public override void Hide() { TriList.BooleanInput[BackingPageJoin].BoolValue = false; diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs index 539bb9d4..7c78464e 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs @@ -9,10 +9,16 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.PageManagers { + /// + /// Represents a ThreePanelPlusOnePageManager + /// public class ThreePanelPlusOnePageManager : PageManager { protected BasicTriListWithSmartObject TriList; + /// + /// Gets or sets the Position5TabsId + /// public uint Position5TabsId { get; set; } /// @@ -79,6 +85,10 @@ namespace PepperDash.Essentials.Core.PageManagers (uo as Action)(args.Sig.BoolValue); } + /// + /// Hide method + /// + /// public override void Hide() { var fixedSigs = FixedVisibilityJoins.Select(u => TriList.BooleanInput[u]).ToList(); @@ -109,13 +119,25 @@ namespace PepperDash.Essentials.Core.PageManagers + /// + /// Represents a SetTopBoxThreePanelPageManager + /// public class SetTopBoxThreePanelPageManager : ThreePanelPlusOnePageManager { ISetTopBoxControls SetTopBox; DevicePresetsView PresetsView; + /// + /// Gets or sets the DpadSmartObjectId + /// public uint DpadSmartObjectId { get; set; } + /// + /// Gets or sets the NumberPadSmartObjectId + /// public uint NumberPadSmartObjectId { get; set; } + /// + /// Gets or sets the PresetsSmartObjectId + /// public uint PresetsSmartObjectId { get; set; } /// @@ -176,6 +198,10 @@ namespace PepperDash.Essentials.Core.PageManagers } } + /// + /// Show method + /// + /// public override void Show() { if(PresetsView != null) @@ -183,6 +209,10 @@ namespace PepperDash.Essentials.Core.PageManagers base.Show(); } + /// + /// Hide method + /// + /// public override void Hide() { if (PresetsView != null) diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs index 2797695e..73465e57 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs @@ -4,10 +4,9 @@ using PepperDash.Essentials.Core.Presets; namespace PepperDash.Essentials.Core.PageManagers { - /// - /// A fixed-layout page manager that expects a DPad on the right, fixed portion of the page, and a two/three - /// tab switchable area on the left for presets, numeric and transport controls - /// + /// + /// Represents a SetTopBoxMediumPageManager + /// public class SetTopBoxMediumPageManager : MediumLeftSwitchablePageManager { ISetTopBoxControls SetTopBox; @@ -22,6 +21,10 @@ namespace PepperDash.Essentials.Core.PageManagers PresetsView = new DevicePresetsView(trilist, stb.TvPresets); } + /// + /// Show method + /// + /// public override void Show() { if(PresetsView != null) @@ -51,6 +54,10 @@ namespace PepperDash.Essentials.Core.PageManagers } } + /// + /// Hide method + /// + /// public override void Hide() { TriList.BooleanInput[BackingPageJoin].BoolValue = false; diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/SinglePageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SinglePageManager.cs index dd7d605c..4438e89d 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/SinglePageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/SinglePageManager.cs @@ -4,9 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core.PageManagers { - /// - /// A simple class that hides and shows the default subpage for a given source type - /// + /// + /// Represents a SinglePageManager + /// public class SinglePageManager : PageManager { BasicTriList TriList; @@ -18,11 +18,18 @@ namespace PepperDash.Essentials.Core.PageManagers BackingPageJoin = pageJoin; } + /// + /// Show method + /// + /// public override void Show() { TriList.BooleanInput[BackingPageJoin].BoolValue = true; } + /// + /// Hide method + /// public override void Hide() { TriList.BooleanInput[BackingPageJoin].BoolValue = false; diff --git a/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs b/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs index 1d83ea5b..3ffed9fc 100644 --- a/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs +++ b/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs @@ -16,6 +16,9 @@ namespace PepperDash.Essentials.Core.UI public abstract class TouchpanelBase: EssentialsDevice, IHasBasicTriListWithSmartObject { protected CrestronTouchpanelPropertiesConfig _config; + /// + /// Gets or sets the Panel + /// public BasicTriListWithSmartObject Panel { get; private set; } /// diff --git a/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs b/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs index 5c519f60..cc83f171 100644 --- a/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs +++ b/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs @@ -46,7 +46,7 @@ namespace PepperDash.Essentials.Core.Utilities } /// - /// Starts executing the sequenced actions + /// StartSequence method /// public void StartSequence() { @@ -63,7 +63,7 @@ namespace PepperDash.Essentials.Core.Utilities } /// - /// Stops executing the sequenced actions + /// StopSequence method /// public void StopSequence() { @@ -122,7 +122,7 @@ namespace PepperDash.Essentials.Core.Utilities } /// - /// Configuration Properties for ActionSequence + /// Represents a ActionSequencePropertiesConfig /// public class ActionSequencePropertiesConfig { @@ -135,14 +135,20 @@ namespace PepperDash.Essentials.Core.Utilities } } + /// + /// Represents a SequencedDeviceActionWrapper + /// public class SequencedDeviceActionWrapper : DeviceActionWrapper { [JsonProperty("delayMs")] + /// + /// Gets or sets the DelayMs + /// public int DelayMs { get; set; } } /// - /// Factory class + /// Represents a ActionSequenceFactory /// public class ActionSequenceFactory : EssentialsDeviceFactory { diff --git a/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs b/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs index 62d0040a..9a929234 100644 --- a/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs +++ b/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs @@ -30,20 +30,26 @@ namespace PepperDash.Essentials.Core } } - /// - /// Wraps up the common video statuses exposed on a video input port - /// + /// + /// Represents a VideoStatusOutputs + /// public class VideoStatusOutputs { + /// + /// Gets or sets the HasVideoStatusFeedback + /// public BoolFeedback HasVideoStatusFeedback { get; private set; } + /// + /// Gets or sets the HdcpActiveFeedback + /// public BoolFeedback HdcpActiveFeedback { get; private set; } public StringFeedback HdcpStateFeedback { get; private set; } public StringFeedback VideoResolutionFeedback { get; private set; } public BoolFeedback VideoSyncFeedback { get; private set; } - /// - /// Gets the default, empty status group. - /// + /// + /// Gets or sets the NoStatus + /// public static VideoStatusOutputs NoStatus { get { return _Default; } } static VideoStatusOutputs _Default = new VideoStatusOutputs(new VideoStatusFuncsWrapper { @@ -60,6 +66,9 @@ namespace PepperDash.Essentials.Core VideoSyncFeedback = new BoolFeedback("VideoSyncFeedback", funcs.VideoSyncFeedbackFunc); } + /// + /// FireAll method + /// public void FireAll() { HasVideoStatusFeedback.FireUpdate(); @@ -69,6 +78,9 @@ namespace PepperDash.Essentials.Core VideoSyncFeedback.FireUpdate(); } + /// + /// ToList method + /// public List ToList() { return new List @@ -82,9 +94,9 @@ namespace PepperDash.Essentials.Core } } - ///// - ///// Wraps up the common video statuses exposed on a video input port - ///// + /// + /// Wraps up the common video statuses exposed on a video input port + /// //public class BasicVideoStatus : IBasicVideoStatus //{ // public event VideoStatusChangeHandler VideoStatusChange; diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs b/src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs index 94dbf5ad..ffbe5509 100644 --- a/src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs +++ b/src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs @@ -10,6 +10,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.Web { + /// + /// Represents a EssentialsWebApi + /// public class EssentialsWebApi : EssentialsDevice { private readonly WebApiServer _server; @@ -26,9 +29,9 @@ namespace PepperDash.Essentials.Core.Web private const int DebugInfo = 1; private const int DebugVerbose = 2; - /// - /// CWS base path - /// + /// + /// Gets or sets the BasePath + /// public string BasePath { get; private set; } /// @@ -183,6 +186,9 @@ namespace PepperDash.Essentials.Core.Web /// Add a single route to the API. MUST be done during the activation phase /// /// + /// + /// AddRoute method + /// public void AddRoute(HttpCwsRoute route) { _server.AddRoute(route); @@ -201,8 +207,9 @@ namespace PepperDash.Essentials.Core.Web } /// - /// Initializes the CWS class + /// Initialize method /// + /// public override void Initialize() { AddRoute(new HttpCwsRoute("apiPaths") { @@ -245,6 +252,9 @@ namespace PepperDash.Essentials.Core.Web /// http(s)://{ipaddress}/cws/{basePath} /// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath} /// + /// + /// GetPaths method + /// public void GetPaths() { Debug.LogMessage(LogEventLevel.Information, this, new string('-', 50)); diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs index d0610ede..49a7eb80 100644 --- a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs +++ b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs @@ -5,6 +5,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.Web { + /// + /// Represents a EssentialsWebApiFactory + /// public class EssentialsWebApiFactory : EssentialsDeviceFactory { public EssentialsWebApiFactory() @@ -12,6 +15,10 @@ namespace PepperDash.Essentials.Core.Web TypeNames = new List { "EssentialsWebApi" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Essentials Web API Server"); diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs index d5f5af36..b9411a35 100644 --- a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs +++ b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs @@ -9,6 +9,9 @@ namespace PepperDash.Essentials.Core.Web { public static class EssentialsWebApiHelpers { + /// + /// GetRequestBody method + /// public static string GetRequestBody(this HttpCwsRequest request) { var bytes = new byte[request.ContentLength]; @@ -18,6 +21,9 @@ namespace PepperDash.Essentials.Core.Web return Encoding.UTF8.GetString(bytes, 0, bytes.Length); } + /// + /// MapToAssemblyObject method + /// public static object MapToAssemblyObject(LoadedAssembly assembly) { return new @@ -27,6 +33,9 @@ namespace PepperDash.Essentials.Core.Web }; } + /// + /// MapToDeviceListObject method + /// public static object MapToDeviceListObject(IKeyed device) { return new @@ -38,6 +47,9 @@ namespace PepperDash.Essentials.Core.Web }; } + /// + /// MapJoinToObject method + /// public static object MapJoinToObject(string key, JoinMapBaseAdvanced join) { var kp = new KeyValuePair(key, join); @@ -45,6 +57,9 @@ namespace PepperDash.Essentials.Core.Web return MapJoinToObject(kp); } + /// + /// MapJoinToObject method + /// public static object MapJoinToObject(KeyValuePair join) { return new @@ -54,6 +69,9 @@ namespace PepperDash.Essentials.Core.Web }; } + /// + /// MapJoinDataCompleteToObject method + /// public static object MapJoinDataCompleteToObject(KeyValuePair joinData) { return new @@ -67,6 +85,9 @@ namespace PepperDash.Essentials.Core.Web }; } + /// + /// MapDeviceTypeToObject method + /// public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device) { var kp = new KeyValuePair(key, device); @@ -74,6 +95,9 @@ namespace PepperDash.Essentials.Core.Web return MapDeviceTypeToObject(kp); } + /// + /// MapDeviceTypeToObject method + /// public static object MapDeviceTypeToObject(KeyValuePair device) { return new diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs index 7af4c631..c20aa07a 100644 --- a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs @@ -2,9 +2,15 @@ namespace PepperDash.Essentials.Core.Web { + /// + /// Represents a EssentialsWebApiPropertiesConfig + /// public class EssentialsWebApiPropertiesConfig { [JsonProperty("basePath")] + /// + /// Gets or sets the BasePath + /// public string BasePath { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs index 0b7497d2..ac95525e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs @@ -8,6 +8,9 @@ using Newtonsoft.Json.Converters; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a AppDebugRequestHandler + /// public class AppDebugRequestHandler : WebApiBaseRequestHandler { /// @@ -77,10 +80,16 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers } } + /// + /// Represents a AppDebug + /// public class AppDebug { [JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the MinimumLevel + /// public LogEventLevel MinimumLevel { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs index 80c7bfbe..e7d0c69c 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs @@ -13,6 +13,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DebugSessionRequestHandler + /// public class DebugSessionRequestHandler : WebApiBaseRequestHandler { public DebugSessionRequestHandler() diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs index 3320de7e..c0fec253 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs @@ -3,6 +3,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DefaultRequestHandler + /// public class DefaultRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs index d14ffb83..51b261fe 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs @@ -7,6 +7,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DevJsonRequestHandler + /// public class DevJsonRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs index a83685fb..31bfd6f9 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DevListRequestHandler + /// public class DevListRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevMethodsRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevMethodsRequestHandler.cs index 263eb161..004ce5ed 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevMethodsRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevMethodsRequestHandler.cs @@ -6,6 +6,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DevMethodsRequestHandler + /// public class DevMethodsRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs index c00e47c2..2117619b 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DevPropsRequestHandler + /// public class DevPropsRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs index 0e682d6c..172b8c4d 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs @@ -3,6 +3,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DisableAllStreamDebugRequestHandler + /// public class DisableAllStreamDebugRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs index fdcad73c..5c17e342 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a DoNotLoadConfigOnNextBootRequestHandler + /// public class DoNotLoadConfigOnNextBootRequestHandler : WebApiBaseRequestHandler { /// @@ -76,9 +79,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers } } + /// + /// Represents a Data + /// public class Data { [JsonProperty("doNotLoadConfigOnNextBoot", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DoNotLoadConfigOnNextBoot + /// public bool DoNotLoadConfigOnNextBoot { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs index 5dd5495c..ca9eeb81 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetFeedbacksForDeviceRequestHandler + /// public class GetFeedbacksForDeviceRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs index f2362f4b..436215ca 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs @@ -6,6 +6,9 @@ using PepperDash.Essentials.Core.Bridges; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetJoinMapForBridgeKeyRequestHandler + /// public class GetJoinMapForBridgeKeyRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs index 6c669189..0cb81d38 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Essentials.Core.Bridges; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetJoinMapForDeviceKeyRequestHandler + /// public class GetJoinMapForDeviceKeyRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutesHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutesHandler.cs index 2ba9cb33..cc450e11 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutesHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutesHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetRoutesHandler + /// public class GetRoutesHandler:WebApiBaseRequestHandler { private HttpCwsRouteCollection routeCollection; @@ -41,12 +44,21 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers } } + /// + /// Represents a RoutesResponseObject + /// public class RoutesResponseObject { [JsonProperty("url")] + /// + /// Gets or sets the Url + /// public string Url { set; get; } [JsonProperty("routes")] + /// + /// Gets or sets the Routes + /// public HttpCwsRouteCollection Routes { get; set; } } } diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutingPortsHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutingPortsHandler.cs index 6e033f06..f11e6dd2 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutingPortsHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutingPortsHandler.cs @@ -7,6 +7,9 @@ using System.Text; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetRoutingPortsHandler + /// public class GetRoutingPortsHandler : WebApiBaseRequestHandler { public GetRoutingPortsHandler() : base(true) { } @@ -62,9 +65,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers internal class ReturnValue { [JsonProperty("inputPorts", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the InputPorts + /// public List InputPorts { get; set; } [JsonProperty("outputPorts", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the OutputPorts + /// public List OutputPorts { get; set; } } } diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTieLinesRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTieLinesRequestHandler.cs index fb1db4e7..bc6fb623 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTieLinesRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTieLinesRequestHandler.cs @@ -6,6 +6,9 @@ using System.Text; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetTieLinesRequestHandler + /// public class GetTieLinesRequestHandler : WebApiBaseRequestHandler { public GetTieLinesRequestHandler() : base(true) { } diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs index 637c533c..2cabeb5e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetTypesByFilterRequestHandler + /// public class GetTypesByFilterRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs index 564cb00d..6d011d23 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a GetTypesRequestHandler + /// public class GetTypesRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/LoadConfigRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/LoadConfigRequestHandler.cs index 61932f30..7706973e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/LoadConfigRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/LoadConfigRequestHandler.cs @@ -6,6 +6,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a LoadConfigRequestHandler + /// public class LoadConfigRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs index 3447a1eb..ace863ab 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a ReportVersionsRequestHandler + /// public class ReportVersionsRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/RestartProgramRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/RestartProgramRequestHandler.cs index 0bb568f6..9f853e61 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/RestartProgramRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/RestartProgramRequestHandler.cs @@ -6,6 +6,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a RestartProgramRequestHandler + /// public class RestartProgramRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs index fa20145c..72758b0e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs @@ -6,6 +6,9 @@ using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a SetDeviceStreamDebugRequestHandler + /// public class SetDeviceStreamDebugRequestHandler : WebApiBaseRequestHandler { /// @@ -195,12 +198,21 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers public class SetDeviceStreamDebugConfig { [JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } [JsonProperty("setting", NullValueHandling = NullValueHandling.Include)] + /// + /// Gets or sets the Setting + /// public string Setting { get; set; } [JsonProperty("timeout")] + /// + /// Gets or sets the Timeout + /// public int Timeout { get; set; } public SetDeviceStreamDebugConfig() diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs index 65af1d06..4964822e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs @@ -5,6 +5,9 @@ using PepperDash.Essentials.Core.Config; namespace PepperDash.Essentials.Core.Web.RequestHandlers { + /// + /// Represents a ShowConfigRequestHandler + /// public class ShowConfigRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs b/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs index 150b7818..23f46007 100644 --- a/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs +++ b/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs @@ -45,6 +45,9 @@ namespace PepperDash.Essentials.Devices.Common } SourceListItem _CurrentSourceInfo; + /// + /// Gets or sets the AnyAudioIn + /// public RoutingInputPort AnyAudioIn { get; private set; } public GenericAudioOut(string key, string name) @@ -65,11 +68,9 @@ namespace PepperDash.Essentials.Devices.Common } - /// - /// Allows a zone-device's audio control to be attached to the endpoint, for easy routing and - /// control switching. Will also set the zone name on attached devices, like SWAMP or other - /// hardware with names built in. - /// + /// + /// Represents a GenericAudioOutWithVolume + /// public class GenericAudioOutWithVolume : GenericAudioOut, IHasVolumeDevice { public string VolumeDeviceKey { get; private set; } @@ -109,6 +110,10 @@ namespace PepperDash.Essentials.Devices.Common TypeNames = new List() { "genericaudiooutwithvolume" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new GenericAudioOutWithVolumeFactory Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs index 56998d46..c0eff735 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs @@ -15,13 +15,15 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec public event EventHandler CallStatusChange; + /// + /// Gets or sets the CodecInfo + /// public AudioCodecInfo CodecInfo { get; protected set; } #region IUsageTracking Members /// - /// This object can be added by outside users of this class to provide usage tracking - /// for various services + /// Gets or sets the UsageTracker /// public UsageTracking UsageTracker { get; set; } @@ -45,6 +47,9 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec } // In most cases only a single call can be active + /// + /// Gets or sets the ActiveCalls + /// public List ActiveCalls { get; set; } public AudioCodecBase(string key, string name) diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs index b6fa079d..a1a2d64d 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs @@ -15,9 +15,9 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec { AudioCodecBase AudioCodec { get; } - ///// - ///// Make this more specific - ///// + /// + /// Make this more specific + /// //List ActiveCalls { get; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs index 502902b9..85c21474 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs @@ -12,6 +12,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.AudioCodec { + /// + /// Represents a MockAC + /// public class MockAC : AudioCodecBase { public MockAC(string key, string name, MockAcPropertiesConfig props) @@ -22,6 +25,10 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec CodecInfo.PhoneNumber = props.PhoneNumber; } + /// + /// Dial method + /// + /// public override void Dial(string number) { if (!IsInCall) @@ -47,6 +54,10 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec } } + /// + /// EndCall method + /// + /// public override void EndCall(CodecActiveCallItem call) { Debug.LogMessage(LogEventLevel.Debug, this, "EndCall"); @@ -54,6 +65,10 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, call); } + /// + /// EndAllCalls method + /// + /// public override void EndAllCalls() { Debug.LogMessage(LogEventLevel.Debug, this, "EndAllCalls"); @@ -65,12 +80,19 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec } } + /// + /// AcceptCall method + /// + /// public override void AcceptCall(CodecActiveCallItem call) { Debug.LogMessage(LogEventLevel.Debug, this, "AcceptCall"); SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Connecting, call); } + /// + /// RejectCall method + /// public override void RejectCall(CodecActiveCallItem call) { Debug.LogMessage(LogEventLevel.Debug, this, "RejectCall"); @@ -78,6 +100,10 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, call); } + /// + /// SendDtmf method + /// + /// public override void SendDtmf(string s) { Debug.LogMessage(LogEventLevel.Debug, this, "BEEP BOOP SendDTMF: {0}", s); @@ -87,6 +113,9 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec /// /// /// + /// + /// TestIncomingAudioCall method + /// public void TestIncomingAudioCall(string number) { Debug.LogMessage(LogEventLevel.Debug, this, "TestIncomingAudioCall from {0}", number); @@ -97,6 +126,9 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec } + /// + /// Represents a MockAudioCodecInfo + /// public class MockAudioCodecInfo : AudioCodecInfo { string _phoneNumber; @@ -114,6 +146,9 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec } } + /// + /// Represents a MockACFactory + /// public class MockACFactory : EssentialsDeviceFactory { public MockACFactory() @@ -121,6 +156,10 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec TypeNames = new List() { "mockac" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new MockAc Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs index c9d041eb..5ac31dcc 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAcPropertiesConfig.cs @@ -10,9 +10,15 @@ using Newtonsoft.Json; namespace PepperDash.Essentials.Devices.Common.AudioCodec { + /// + /// Represents a MockAcPropertiesConfig + /// public class MockAcPropertiesConfig { [JsonProperty("phoneNumber")] + /// + /// Gets or sets the PhoneNumber + /// public string PhoneNumber { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs index c008e969..0fb6f6ca 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs @@ -21,6 +21,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Cameras { + /// + /// Enumeration of eCameraCapabilities values + /// public enum eCameraCapabilities { None = 0, @@ -33,11 +36,17 @@ namespace PepperDash.Essentials.Devices.Common.Cameras public abstract class CameraBase : ReconfigurableDevice, IRoutingOutputs { [JsonProperty("controlMode", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the ControlMode + /// public eCameraControlMode ControlMode { get; protected set; } #region IRoutingOutputs Members [JsonIgnore] + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; protected set; } #endregion @@ -271,6 +280,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } + /// + /// Represents a CameraPreset + /// public class CameraPreset : PresetBase { public CameraPreset(int id, string description, bool isDefined, bool isDefinable) @@ -281,19 +293,37 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } + /// + /// Represents a CameraPropertiesConfig + /// public class CameraPropertiesConfig { + /// + /// Gets or sets the CommunicationMonitorProperties + /// public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } + /// + /// Gets or sets the Control + /// public ControlPropertiesConfig Control { get; set; } [JsonProperty("supportsAutoMode")] + /// + /// Gets or sets the SupportsAutoMode + /// public bool SupportsAutoMode { get; set; } [JsonProperty("supportsOffMode")] + /// + /// Gets or sets the SupportsOffMode + /// public bool SupportsOffMode { get; set; } [JsonProperty("presets")] + /// + /// Gets or sets the Presets + /// public List Presets { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs index 883d6ca4..cec2f58b 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs @@ -61,7 +61,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Aggregates far end cameras with near end cameras + /// Defines the contract for IHasCodecCameras /// public interface IHasCodecCameras : IHasCameras, IHasFarEndCameraControl { @@ -127,7 +127,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras public class CameraSelectedEventArgs : EventArgs { /// - /// The selected camera + /// Gets or sets the SelectedCamera /// public CameraBase SelectedCamera { get; private set; } @@ -159,7 +159,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Used to decorate a camera as a far end + /// Defines the contract for IAmFarEndCamera /// public interface IAmFarEndCamera { @@ -174,7 +174,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Aggregates the pan, tilt and zoom interfaces + /// Defines the contract for IHasCameraPtzControl /// public interface IHasCameraPtzControl : IHasCameraPanControl, IHasCameraTiltControl, IHasCameraZoomControl { @@ -206,7 +206,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Interface for camera tilt control + /// Defines the contract for IHasCameraTiltControl /// public interface IHasCameraTiltControl : IHasCameraControls { @@ -227,7 +227,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Interface for camera zoom control + /// Defines the contract for IHasCameraZoomControl /// public interface IHasCameraZoomControl : IHasCameraControls { @@ -248,7 +248,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Interface for camera focus control + /// Defines the contract for IHasCameraFocusControl /// public interface IHasCameraFocusControl : IHasCameraControls { diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs index 384d60a3..9a8bce8b 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs @@ -19,12 +19,21 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Cameras { + /// + /// Represents a CameraVisca + /// public class CameraVisca : CameraBase, IHasCameraPtzControl, ICommunicationMonitor, IHasCameraPresets, IHasPowerControlWithFeedback, IBridgeAdvanced, IHasCameraFocusControl, IHasAutoFocusMode { private readonly CameraViscaPropertiesConfig PropertiesConfig; + /// + /// Gets or sets the Communication + /// public IBasicCommunication Communication { get; private set; } + /// + /// Gets or sets the CommunicationMonitor + /// public StatusMonitorBase CommunicationMonitor { get; private set; } /// @@ -156,6 +165,10 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { Communication.Connect(); @@ -169,6 +182,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras return true; } + /// + /// LinkToApi method + /// public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { LinkCameraToApi(this, trilist, joinStart, joinMapKey, bridge); @@ -408,6 +424,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras InquiryResponseQueue.Enqueue(HandlePowerResponse); } + /// + /// PowerOn method + /// public void PowerOn() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x00, 0x02, 0xFF }); @@ -431,12 +450,18 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } } + /// + /// PowerOff method + /// public void PowerOff() { SendBytes(new byte[] {ID, 0x01, 0x04, 0x00, 0x03, 0xFF}); SendPowerQuery(); } + /// + /// PowerToggle method + /// public void PowerToggle() { if (PowerIsOnFeedback.BoolValue) @@ -445,30 +470,48 @@ namespace PepperDash.Essentials.Devices.Common.Cameras PowerOn(); } + /// + /// PanLeft method + /// public void PanLeft() { SendPanTiltCommand(new byte[] {0x01, 0x03}, false); // IsMoving = true; } + /// + /// PanRight method + /// public void PanRight() { SendPanTiltCommand(new byte[] { 0x02, 0x03 }, false); // IsMoving = true; } + /// + /// PanStop method + /// public void PanStop() { Stop(); } + /// + /// TiltDown method + /// public void TiltDown() { SendPanTiltCommand(new byte[] { 0x03, 0x02 }, false); // IsMoving = true; } + /// + /// TiltUp method + /// public void TiltUp() { SendPanTiltCommand(new byte[] { 0x03, 0x01 }, false); // IsMoving = true; } + /// + /// TiltStop method + /// public void TiltStop() { Stop(); @@ -480,21 +523,33 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } + /// + /// ZoomIn method + /// public void ZoomIn() { SendZoomCommand(ZoomInCmd); IsZooming = true; } + /// + /// ZoomOut method + /// public void ZoomOut() { SendZoomCommand(ZoomOutCmd); IsZooming = true; } + /// + /// ZoomStop method + /// public void ZoomStop() { Stop(); } + /// + /// Stop method + /// public void Stop() { if (IsZooming) @@ -509,15 +564,24 @@ namespace PepperDash.Essentials.Devices.Common.Cameras // IsMoving = false; } } + /// + /// PositionHome method + /// public void PositionHome() { SendBytes(new byte[] { ID, 0x01, 0x06, 0x02, PanSpeedFast, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }); SendBytes(new byte[] { ID, 0x01, 0x04, 0x47, 0x00, 0x00, 0x00, 0x00, 0xFF }); } + /// + /// RecallPreset method + /// public void RecallPreset(int presetNumber) { SendBytes(new byte[] {ID, 0x01, 0x04, 0x3F, 0x02, (byte)presetNumber, 0xFF} ); } + /// + /// SavePreset method + /// public void SavePreset(int presetNumber) { SendBytes(new byte[] { ID, 0x01, 0x04, 0x3F, 0x01, (byte)presetNumber, 0xFF }); @@ -536,13 +600,22 @@ namespace PepperDash.Essentials.Devices.Common.Cameras handler.Invoke(this, EventArgs.Empty); } + /// + /// Gets or sets the Presets + /// public List Presets { get; private set; } + /// + /// PresetSelect method + /// public void PresetSelect(int preset) { RecallPreset(preset); } + /// + /// PresetStore method + /// public void PresetStore(int preset, string description) { SavePreset(preset); @@ -553,21 +626,33 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraFocusControl Members + /// + /// FocusNear method + /// public void FocusNear() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x08, 0x03, 0xFF }); } + /// + /// FocusFar method + /// public void FocusFar() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x08, 0x02, 0xFF }); } + /// + /// FocusStop method + /// public void FocusStop() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x08, 0x00, 0xFF }); } + /// + /// TriggerAutoFocus method + /// public void TriggerAutoFocus() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x18, 0x01, 0xFF }); @@ -578,18 +663,27 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasAutoFocus Members + /// + /// SetFocusModeAuto method + /// public void SetFocusModeAuto() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x38, 0x02, 0xFF }); SendAutoFocusQuery(); } + /// + /// SetFocusModeManual method + /// public void SetFocusModeManual() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x38, 0x03, 0xFF }); SendAutoFocusQuery(); } + /// + /// ToggleFocusMode method + /// public void ToggleFocusMode() { SendBytes(new byte[] { ID, 0x01, 0x04, 0x38, 0x10, 0xFF }); @@ -625,9 +719,15 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraOff Members + /// + /// Gets or sets the CameraIsOffFeedback + /// public BoolFeedback CameraIsOffFeedback { get; private set; } + /// + /// CameraOff method + /// public void CameraOff() { PowerOff(); @@ -636,6 +736,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #endregion } + /// + /// Represents a CameraViscaFactory + /// public class CameraViscaFactory : EssentialsDeviceFactory { public CameraViscaFactory() @@ -643,6 +746,10 @@ namespace PepperDash.Essentials.Devices.Common.Cameras TypeNames = new List() { "cameravisca" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new CameraVisca Device"); @@ -654,12 +761,18 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } + /// + /// Represents a CameraViscaPropertiesConfig + /// public class CameraViscaPropertiesConfig : CameraPropertiesConfig { /// /// Control ID of the camera (1-7) /// [JsonProperty("id")] + /// + /// Gets or sets the Id + /// public uint Id { get; set; } /// diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/CodecActiveCallItem.cs b/src/PepperDash.Essentials.Devices.Common/Codec/CodecActiveCallItem.cs index a8b8d563..b0c91e4e 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/CodecActiveCallItem.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/CodecActiveCallItem.cs @@ -12,33 +12,60 @@ using Newtonsoft.Json.Converters; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Represents a CodecActiveCallItem + /// public class CodecActiveCallItem { [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty("number", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Number + /// public string Number { get; set; } [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the Type + /// public eCodecCallType Type { get; set; } [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the Status + /// public eCodecCallStatus Status { get; set; } [JsonProperty("direction", NullValueHandling = NullValueHandling.Ignore)] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the Direction + /// public eCodecCallDirection Direction { get; set; } [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Id + /// public string Id { get; set; } [JsonProperty("isOnHold", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the IsOnHold + /// public bool IsOnHold { get; set; } [JsonProperty("duration", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Duration + /// public TimeSpan Duration { get; set; } //public object CallMetaData { get; set; } @@ -61,10 +88,13 @@ namespace PepperDash.Essentials.Devices.Common.Codec } /// - /// + /// Represents a CodecCallStatusItemChangeEventArgs /// public class CodecCallStatusItemChangeEventArgs : EventArgs { + /// + /// Gets or sets the CallItem + /// public CodecActiveCallItem CallItem { get; private set; } public CodecCallStatusItemChangeEventArgs(CodecActiveCallItem item) diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/IHasCallHold.cs b/src/PepperDash.Essentials.Devices.Common/Codec/IHasCallHold.cs index 78211841..8fbe2b9b 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/IHasCallHold.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/IHasCallHold.cs @@ -6,6 +6,9 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Defines the contract for IHasCallHold + /// public interface IHasCallHold { /// diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/IHasExternalSourceSwitching.cs b/src/PepperDash.Essentials.Devices.Common/Codec/IHasExternalSourceSwitching.cs index 1ea6b09b..d22acbba 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/IHasExternalSourceSwitching.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/IHasExternalSourceSwitching.cs @@ -8,6 +8,9 @@ using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Defines the contract for IHasExternalSourceSwitching + /// public interface IHasExternalSourceSwitching { bool ExternalSourceListEnabled { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallDirection.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallDirection.cs index a5e118df..01eca3d1 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallDirection.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallDirection.cs @@ -7,11 +7,17 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Enumeration of eCodecCallDirection values + /// public enum eCodecCallDirection { Unknown = 0, Incoming, Outgoing } + /// + /// Represents a CodecCallDirection + /// public class CodecCallDirection { /// @@ -19,6 +25,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// /// /// + /// + /// ConvertToDirectionEnum method + /// public static eCodecCallDirection ConvertToDirectionEnum(string s) { switch (s.ToLower()) diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallStatus.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallStatus.cs index 610d928b..b2ab5d99 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallStatus.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallStatus.cs @@ -6,6 +6,9 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Enumeration of eCodecCallStatus values + /// public enum eCodecCallStatus { Unknown = 0, @@ -23,6 +26,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec } + /// + /// Represents a CodecCallStatus + /// public class CodecCallStatus { @@ -31,6 +37,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// /// /// + /// + /// ConvertToStatusEnum method + /// public static eCodecCallStatus ConvertToStatusEnum(string s) { switch (s) diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallType.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallType.cs index dbab015b..cf15140e 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallType.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/eCodecCallType.cs @@ -7,6 +7,9 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Enumeration of eCodecCallType values + /// public enum eCodecCallType { Unknown = 0, @@ -16,6 +19,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec ForwardAllCall } + /// + /// Represents a CodecCallType + /// public class CodecCallType { @@ -24,6 +30,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// /// /// + /// + /// ConvertToTypeEnum method + /// public static eCodecCallType ConvertToTypeEnum(string s) { switch (s) diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/eMeetingPrivacy.cs b/src/PepperDash.Essentials.Devices.Common/Codec/eMeetingPrivacy.cs index f163a864..29ac5247 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/eMeetingPrivacy.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/eMeetingPrivacy.cs @@ -6,6 +6,9 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Enumeration of eMeetingPrivacy values + /// public enum eMeetingPrivacy { Unknown = 0, @@ -13,6 +16,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec Private } + /// + /// Represents a CodecCallPrivacy + /// public class CodecCallPrivacy { /// @@ -20,6 +26,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// /// /// + /// + /// ConvertToDirectionEnum method + /// public static eMeetingPrivacy ConvertToDirectionEnum(string s) { switch (s.ToLower()) diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallFavorites.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallFavorites.cs index 50c1b2c9..ae5351c1 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallFavorites.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallFavorites.cs @@ -6,16 +6,22 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Defines the contract for IHasCallFavorites + /// public interface IHasCallFavorites { CodecCallFavorites CallFavorites { get; } } /// - /// Represents favorites entries for a codec device + /// Represents a CodecCallFavorites /// public class CodecCallFavorites { + /// + /// Gets or sets the Favorites + /// public List Favorites { get; set; } public CodecCallFavorites() diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallHistory.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallHistory.cs index 5291a393..cd7d7b96 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallHistory.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasCallHistory.cs @@ -10,6 +10,9 @@ using Newtonsoft.Json.Converters; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Defines the contract for IHasCallHistory + /// public interface IHasCallHistory { CodecCallHistory CallHistory { get; } @@ -17,6 +20,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec void RemoveCallHistoryEntry(CodecCallHistory.CallHistoryEntry entry); } + /// + /// Enumeration of eCodecOccurrenceType values + /// public enum eCodecOccurrenceType { Unknown = 0, @@ -26,12 +32,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec } /// - /// Represents the recent call history for a codec device + /// Represents a CodecCallHistory /// public class CodecCallHistory { public event EventHandler RecentCallsListHasChanged; + /// + /// Gets or sets the RecentCalls + /// public List RecentCalls { get; private set; } /// @@ -57,6 +66,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec } } + /// + /// RemoveEntry method + /// public void RemoveEntry(CallHistoryEntry entry) { RecentCalls.Remove(entry); @@ -64,12 +76,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec } /// - /// Generic call history entry, not device specific + /// Represents a CallHistoryEntry /// public class CallHistoryEntry : CodecActiveCallItem { [JsonConverter(typeof(IsoDateTimeConverter))] [JsonProperty("startTime")] + /// + /// Gets or sets the StartTime + /// public DateTime StartTime { get; set; } [JsonConverter(typeof(StringEnumConverter))] [JsonProperty("occurrenceType")] @@ -83,6 +98,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// /// /// + /// + /// ConvertCiscoCallHistoryToGeneric method + /// public void ConvertCiscoCallHistoryToGeneric(List entries) { var genericEntries = new List(); @@ -112,6 +130,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// Takes the Cisco occurence type and converts it to the matching enum /// /// + /// + /// ConvertToOccurenceTypeEnum method + /// public eCodecOccurrenceType ConvertToOccurenceTypeEnum(string s) { switch (s) diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs index f3c28243..e944b432 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs @@ -10,6 +10,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.Codec { + /// + /// Defines the contract for IHasContentSharing + /// public interface IHasContentSharing { BoolFeedback SharingContentIsOnFeedback { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs index 6a4e62fe..de82bcfb 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs @@ -40,18 +40,27 @@ namespace PepperDash.Essentials.Devices.Common.Codec BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; } } + /// + /// Defines the contract for IHasDirectoryHistoryStack + /// public interface IHasDirectoryHistoryStack : IHasDirectory { Stack DirectoryBrowseHistoryStack { get; } } - /// - /// - /// + /// + /// Represents a DirectoryEventArgs + /// public class DirectoryEventArgs : EventArgs { + /// + /// Gets or sets the Directory + /// public CodecDirectory Directory { get; set; } + /// + /// Gets or sets the DirectoryIsOnRoot + /// public bool DirectoryIsOnRoot { get; set; } } @@ -89,6 +98,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// Used to store the ID of the current folder for CurrentDirectoryResults /// [JsonProperty("resultsFolderId")] + /// + /// Gets or sets the ResultsFolderId + /// public string ResultsFolderId { get; set; } public CodecDirectory() @@ -100,6 +112,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// Adds folders to the directory /// /// + /// + /// AddFoldersToDirectory method + /// public void AddFoldersToDirectory(List folders) { if(folders != null) @@ -112,6 +127,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// Adds contacts to the directory /// /// + /// + /// AddContactsToDirectory method + /// public void AddContactsToDirectory(List contacts) { if(contacts != null) @@ -124,6 +142,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// Filters the CurrentDirectoryResults by the predicate /// /// + /// + /// FilterContacts method + /// public void FilterContacts(Func predicate) { CurrentDirectoryResults = CurrentDirectoryResults.Where(predicate).ToList(); @@ -156,7 +177,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec } /// - /// Used to decorate a contact to indicate it can be invided to a meeting + /// Defines the contract for IInvitableContact /// public interface IInvitableContact { @@ -175,11 +196,14 @@ namespace PepperDash.Essentials.Devices.Common.Codec } } - /// - /// Represents an item in the directory - /// + /// + /// Represents a DirectoryItem + /// public class DirectoryItem : ICloneable { + /// + /// Clone method + /// public object Clone() { return this.MemberwiseClone(); @@ -189,18 +213,27 @@ namespace PepperDash.Essentials.Devices.Common.Codec public string FolderId { get; set; } [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty("parentFolderId")] + /// + /// Gets or sets the ParentFolderId + /// public string ParentFolderId { get; set; } } - /// - /// Represents a folder type DirectoryItem - /// + /// + /// Represents a DirectoryFolder + /// public class DirectoryFolder : DirectoryItem { [JsonProperty("contacts")] + /// + /// Gets or sets the Contacts + /// public List Contacts { get; set; } @@ -210,12 +243,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec } } - /// - /// Represents a contact type DirectoryItem - /// + /// + /// Represents a DirectoryContact + /// public class DirectoryContact : DirectoryItem { [JsonProperty("contactId")] + /// + /// Gets or sets the ContactId + /// public string ContactId { get; set; } [JsonProperty("title")] @@ -230,12 +266,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec } } - /// - /// Represents a method of contact for a contact - /// + /// + /// Represents a ContactMethod + /// public class ContactMethod { [JsonProperty("contactMethodId")] + /// + /// Gets or sets the ContactMethodId + /// public string ContactMethodId { get; set; } [JsonProperty("number")] @@ -243,16 +282,22 @@ namespace PepperDash.Essentials.Devices.Common.Codec [JsonProperty("device")] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the Device + /// public eContactMethodDevice Device { get; set; } [JsonProperty("callType")] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the CallType + /// public eContactMethodCallType CallType { get; set; } } - /// - /// - /// + /// + /// Enumeration of eContactMethodDevice values + /// public enum eContactMethodDevice { Unknown = 0, @@ -262,9 +307,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec Video } - /// - /// - /// + /// + /// Enumeration of eContactMethodCallType values + /// public enum eContactMethodCallType { Unknown = 0, diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs index 602d65e3..240ac15f 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs @@ -14,6 +14,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Codec { [Flags] + /// + /// Enumeration of eMeetingEventChangeType values + /// public enum eMeetingEventChangeType { Unknown = 0, @@ -23,6 +26,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec MeetingEnd = 8 } + /// + /// Defines the contract for IHasScheduleAwareness + /// public interface IHasScheduleAwareness { CodecScheduleAwareness CodecSchedule { get; } @@ -30,6 +36,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec void GetSchedule(); } + /// + /// Represents a CodecScheduleAwareness + /// public class CodecScheduleAwareness { List _meetings; @@ -147,7 +156,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec } /// - /// Generic class to represent a meeting (Cisco or Polycom OBTP or Fusion) + /// Represents a Meeting /// public class Meeting { @@ -159,8 +168,14 @@ namespace PepperDash.Essentials.Devices.Common.Codec [JsonProperty("organizer")] public string Organizer { get; set; } [JsonProperty("title")] + /// + /// Gets or sets the Title + /// public string Title { get; set; } [JsonProperty("agenda")] + /// + /// Gets or sets the Agenda + /// public string Agenda { get; set; } [JsonProperty("meetingWarningMinutes")] @@ -185,8 +200,14 @@ namespace PepperDash.Essentials.Devices.Common.Codec } } [JsonProperty("startTime")] + /// + /// Gets or sets the StartTime + /// public DateTime StartTime { get; set; } [JsonProperty("endTime")] + /// + /// Gets or sets the EndTime + /// public DateTime EndTime { get; set; } [JsonProperty("duration")] public TimeSpan Duration @@ -197,6 +218,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec } } [JsonProperty("privacy")] + /// + /// Gets or sets the Privacy + /// public eMeetingPrivacy Privacy { get; set; } [JsonProperty("joinable")] public bool Joinable @@ -211,21 +235,36 @@ namespace PepperDash.Essentials.Devices.Common.Codec } [JsonProperty("dialable")] + /// + /// Gets or sets the Dialable + /// public bool Dialable { get; set; } //public string ConferenceNumberToDial { get; set; } [JsonProperty("conferencePassword")] + /// + /// Gets or sets the ConferencePassword + /// public string ConferencePassword { get; set; } [JsonProperty("isOneButtonToPushMeeting")] + /// + /// Gets or sets the IsOneButtonToPushMeeting + /// public bool IsOneButtonToPushMeeting { get; set; } [JsonProperty("calls")] + /// + /// Gets or sets the Calls + /// public List Calls { get; private set; } /// /// Tracks the change types that have already been notified for /// [JsonIgnore] + /// + /// Gets or sets the NotifiedChangeTypes + /// public eMeetingEventChangeType NotifiedChangeTypes { get; set; } [JsonIgnore] private readonly int _joinableCooldownSeconds; @@ -247,6 +286,10 @@ namespace PepperDash.Essentials.Devices.Common.Codec #region Overrides of Object + /// + /// ToString method + /// + /// public override string ToString() { return String.Format("{0}:{1}: {2}-{3}", Title, Agenda, StartTime, EndTime); @@ -255,17 +298,41 @@ namespace PepperDash.Essentials.Devices.Common.Codec #endregion } + /// + /// Represents a Call + /// public class Call { + /// + /// Gets or sets the Number + /// public string Number { get; set; } + /// + /// Gets or sets the Protocol + /// public string Protocol { get; set; } + /// + /// Gets or sets the CallRate + /// public string CallRate { get; set; } + /// + /// Gets or sets the CallType + /// public string CallType { get; set; } } + /// + /// Represents a MeetingEventArgs + /// public class MeetingEventArgs : EventArgs { + /// + /// Gets or sets the ChangeType + /// public eMeetingEventChangeType ChangeType { get; set; } + /// + /// Gets or sets the Meeting + /// public Meeting Meeting { get; set; } } diff --git a/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs b/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs index 078dc9e7..296eb91a 100644 --- a/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs @@ -47,6 +47,9 @@ namespace PepperDash.Essentials.Devices.Common.DSP public abstract class DspControlPoint :IKeyed { + /// + /// Gets or sets the Key + /// public string Key { get; } protected DspControlPoint(string key) => Key = key; @@ -54,7 +57,13 @@ namespace PepperDash.Essentials.Devices.Common.DSP public abstract class DspLevelControlPoint :DspControlPoint, IBasicVolumeWithFeedback { + /// + /// Gets or sets the MuteFeedback + /// public BoolFeedback MuteFeedback { get; } + /// + /// Gets or sets the VolumeLevelFeedback + /// public IntFeedback VolumeLevelFeedback { get; } protected DspLevelControlPoint(string key, Func muteFeedbackFunc, Func volumeLevelFeedbackFunc) : base(key) diff --git a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs index 0f1f973f..7656b277 100644 --- a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs @@ -9,6 +9,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common { + /// + /// Represents a DeviceFactory + /// public class DeviceFactory { diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs index d7e19d00..52fc5233 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs @@ -11,9 +11,18 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Displays { + /// + /// Represents a BasicIrDisplay + /// public class BasicIrDisplay : DisplayBase, IBasicVolumeControls, IBridgeAdvanced { + /// + /// Gets or sets the IrPort + /// public IrOutputPortController IrPort { get; private set; } + /// + /// Gets or sets the IrPulseTime + /// public ushort IrPulseTime { get; set; } protected Func PowerIsOnFeedbackFunc @@ -61,36 +70,57 @@ namespace PepperDash.Essentials.Devices.Common.Displays }); } + /// + /// Hdmi1 method + /// public void Hdmi1() { IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_1, IrPulseTime); } + /// + /// Hdmi2 method + /// public void Hdmi2() { IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_2, IrPulseTime); } + /// + /// Hdmi3 method + /// public void Hdmi3() { IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_3, IrPulseTime); } + /// + /// Hdmi4 method + /// public void Hdmi4() { IrPort.Pulse(IROutputStandardCommands.IROut_HDMI_4, IrPulseTime); } + /// + /// Component1 method + /// public void Component1() { IrPort.Pulse(IROutputStandardCommands.IROut_COMPONENT_1, IrPulseTime); } + /// + /// Video1 method + /// public void Video1() { IrPort.Pulse(IROutputStandardCommands.IROut_VIDEO_1, IrPulseTime); } + /// + /// Antenna method + /// public void Antenna() { IrPort.Pulse(IROutputStandardCommands.IROut_ANTENNA, IrPulseTime); @@ -98,18 +128,28 @@ namespace PepperDash.Essentials.Devices.Common.Displays #region IPower Members + /// + /// PowerOn method + /// + /// public override void PowerOn() { IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime); _PowerIsOn = true; } + /// + /// PowerOff method + /// public override void PowerOff() { _PowerIsOn = false; IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime); } + /// + /// PowerToggle method + /// public override void PowerToggle() { _PowerIsOn = false; @@ -120,16 +160,25 @@ namespace PepperDash.Essentials.Devices.Common.Displays #region IBasicVolumeControls Members + /// + /// VolumeUp method + /// public void VolumeUp(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_VOL_PLUS, pressRelease); } + /// + /// VolumeDown method + /// public void VolumeDown(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_VOL_MINUS, pressRelease); } + /// + /// MuteToggle method + /// public void MuteToggle() { IrPort.Pulse(IROutputStandardCommands.IROut_MUTE, 200); @@ -164,6 +213,10 @@ namespace PepperDash.Essentials.Devices.Common.Displays /// Typically called by the discovery routing algorithm. /// /// A delegate containing the input selector method to call + /// + /// ExecuteSwitch method + /// + /// public override void ExecuteSwitch(object inputSelector) { Debug.LogMessage(LogEventLevel.Verbose, this, "Switching to input '{0}'", (inputSelector as Action).ToString()); @@ -193,12 +246,18 @@ namespace PepperDash.Essentials.Devices.Common.Displays #endregion + /// + /// LinkToApi method + /// public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { LinkDisplayToApi(this, trilist, joinStart, joinMapKey, bridge); } } + /// + /// Represents a BasicIrDisplayFactory + /// public class BasicIrDisplayFactory : EssentialsDeviceFactory { public BasicIrDisplayFactory() @@ -206,6 +265,10 @@ namespace PepperDash.Essentials.Devices.Common.Displays TypeNames = new List() { "basicirdisplay" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new BasicIrDisplay Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs b/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs index 926fca04..786fc00d 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs @@ -52,9 +52,9 @@ namespace PepperDash.Essentials.Devices.Common.Displays /// public event SourceInfoChangeHandler CurrentSourceChange; - /// - /// Gets or sets the key of the current source information. - /// + /// + /// Gets or sets the CurrentSourceInfoKey + /// public string CurrentSourceInfoKey { get; set; } /// @@ -94,24 +94,24 @@ namespace PepperDash.Essentials.Devices.Common.Displays /// public BoolFeedback IsCoolingDownFeedback { get; protected set; } - /// - /// Gets feedback indicating whether the display is currently warming up after being powered on. - /// + /// + /// Gets or sets the IsWarmingUpFeedback + /// public BoolFeedback IsWarmingUpFeedback { get; private set; } - /// - /// Gets or sets the usage tracking instance for monitoring display usage statistics. - /// + /// + /// Gets or sets the UsageTracker + /// public UsageTracking UsageTracker { get; set; } - /// - /// Gets or sets the warmup time in milliseconds for the display to become ready after power on. - /// + /// + /// Gets or sets the WarmupTime + /// public uint WarmupTime { get; set; } - /// - /// Gets or sets the cooldown time in milliseconds for the display to fully power down. - /// + /// + /// Gets or sets the CooldownTime + /// public uint CooldownTime { get; set; } /// @@ -189,6 +189,7 @@ namespace PepperDash.Essentials.Devices.Common.Displays /// /// Gets the collection of feedback objects for this display device. /// + /// public virtual FeedbackCollection Feedbacks { get diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/InputInterfaces.cs b/src/PepperDash.Essentials.Devices.Common/Displays/InputInterfaces.cs index ce7113e1..abc2e7f1 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/InputInterfaces.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/InputInterfaces.cs @@ -6,12 +6,33 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Displays { + /// + /// Defines the contract for IInputHdmi1 + /// public interface IInputHdmi1 { void InputHdmi1(); } + /// + /// Defines the contract for IInputHdmi2 + /// public interface IInputHdmi2 { void InputHdmi2(); } + /// + /// Defines the contract for IInputHdmi3 + /// public interface IInputHdmi3 { void InputHdmi3(); } + /// + /// Defines the contract for IInputHdmi4 + /// public interface IInputHdmi4 { void InputHdmi4(); } + /// + /// Defines the contract for IInputDisplayPort1 + /// public interface IInputDisplayPort1 { void InputDisplayPort1(); } + /// + /// Defines the contract for IInputDisplayPort2 + /// public interface IInputDisplayPort2 { void InputDisplayPort2(); } + /// + /// Defines the contract for IInputVga1 + /// public interface IInputVga1 { void InputVga1(); } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs index f972c1e6..976dfdc3 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs @@ -12,8 +12,14 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Displays { + /// + /// Represents a MockDisplay + /// public class MockDisplay : TwoWayDisplayBase, IBasicVolumeWithFeedback, IBridgeAdvanced, IHasInputs, IRoutingSinkWithSwitchingWithInputPort, IHasPowerControlWithFeedback { + /// + /// Gets or sets the Inputs + /// public ISelectableItems Inputs { get; private set; } bool _PowerIsOn; @@ -92,6 +98,10 @@ namespace PepperDash.Essentials.Devices.Common.Displays CooldownTime = 10000; } + /// + /// PowerOn method + /// + /// public override void PowerOn() { if (!PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown) @@ -109,6 +119,10 @@ namespace PepperDash.Essentials.Devices.Common.Displays } } + /// + /// PowerOff method + /// + /// public override void PowerOff() { // If a display has unreliable-power off feedback, just override this and @@ -129,6 +143,10 @@ namespace PepperDash.Essentials.Devices.Common.Displays } } + /// + /// PowerToggle method + /// + /// public override void PowerToggle() { if (PowerIsOnFeedback.BoolValue && !IsWarmingUpFeedback.BoolValue) @@ -137,6 +155,10 @@ namespace PepperDash.Essentials.Devices.Common.Displays PowerOn(); } + /// + /// ExecuteSwitch method + /// + /// public override void ExecuteSwitch(object selector) { try @@ -174,6 +196,9 @@ namespace PepperDash.Essentials.Devices.Common.Displays } } + /// + /// SetInput method + /// public void SetInput(string selector) { ISelectableItem currentInput = null; @@ -202,26 +227,41 @@ namespace PepperDash.Essentials.Devices.Common.Displays #region IBasicVolumeWithFeedback Members + /// + /// Gets or sets the VolumeLevelFeedback + /// public IntFeedback VolumeLevelFeedback { get; private set; } + /// + /// SetVolume method + /// public void SetVolume(ushort level) { _FakeVolumeLevel = level; VolumeLevelFeedback.InvokeFireUpdate(); } + /// + /// MuteOn method + /// public void MuteOn() { _IsMuted = true; MuteFeedback.InvokeFireUpdate(); } + /// + /// MuteOff method + /// public void MuteOff() { _IsMuted = false; MuteFeedback.InvokeFireUpdate(); } + /// + /// Gets or sets the MuteFeedback + /// public BoolFeedback MuteFeedback { get; private set; } @@ -229,6 +269,9 @@ namespace PepperDash.Essentials.Devices.Common.Displays #region IBasicVolumeControls Members + /// + /// VolumeUp method + /// public void VolumeUp(bool pressRelease) { //while (pressRelease) @@ -243,6 +286,9 @@ namespace PepperDash.Essentials.Devices.Common.Displays //} } + /// + /// VolumeDown method + /// public void VolumeDown(bool pressRelease) { //while (pressRelease) @@ -257,6 +303,9 @@ namespace PepperDash.Essentials.Devices.Common.Displays //} } + /// + /// MuteToggle method + /// public void MuteToggle() { _IsMuted = !_IsMuted; @@ -265,12 +314,18 @@ namespace PepperDash.Essentials.Devices.Common.Displays #endregion + /// + /// LinkToApi method + /// public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { LinkDisplayToApi(this, trilist, joinStart, joinMapKey, bridge); } } + /// + /// Represents a MockDisplayFactory + /// public class MockDisplayFactory : EssentialsDeviceFactory { public MockDisplayFactory() @@ -278,6 +333,10 @@ namespace PepperDash.Essentials.Devices.Common.Displays TypeNames = new List() { "mockdisplay" , "mockdisplay2" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Mock Display Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs index 0380085f..5b2ee2e2 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs @@ -8,6 +8,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Devices.Common.Displays { + /// + /// Represents a MockDisplayInputs + /// public class MockDisplayInputs : ISelectableItems { private Dictionary _items; @@ -52,6 +55,9 @@ namespace PepperDash.Essentials.Devices.Common.Displays public event EventHandler CurrentItemChanged; } + /// + /// Represents a MockDisplayInput + /// public class MockDisplayInput : ISelectableItem { private MockDisplay _parent; @@ -75,8 +81,14 @@ namespace PepperDash.Essentials.Devices.Common.Displays } } + /// + /// Gets or sets the Name + /// public string Name { get; set; } + /// + /// Gets or sets the Key + /// public string Key { get; set; } public event EventHandler ItemUpdated; @@ -88,6 +100,9 @@ namespace PepperDash.Essentials.Devices.Common.Displays _parent = parent; } + /// + /// Select method + /// public void Select() { if (!_parent.PowerIsOnFeedback.BoolValue) _parent.PowerOn(); diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs b/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs index 1bb7f503..204fee42 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs @@ -41,10 +41,22 @@ namespace PepperDash.Essentials.Devices.Common.Shades } private bool _isInUpPosition { get; set; } + /// + /// Gets or sets the Type + /// public eScreenLiftControlType Type { get; private set; } + /// + /// Gets or sets the Mode + /// public eScreenLiftControlMode Mode { get; private set; } + /// + /// Gets or sets the DisplayDeviceKey + /// public string DisplayDeviceKey { get; private set; } + /// + /// Gets or sets the IsInUpPosition + /// public BoolFeedback IsInUpPosition { get; private set; } public event EventHandler PositionChanged; @@ -97,6 +109,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades } } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { //Create ISwitchedOutput objects based on props @@ -131,6 +147,9 @@ namespace PepperDash.Essentials.Devices.Common.Shades return base.CustomActivate(); } + /// + /// Raise method + /// public void Raise() { if (RaiseRelay == null && LatchedRelay == null) return; @@ -153,6 +172,9 @@ namespace PepperDash.Essentials.Devices.Common.Shades InUpPosition = true; } + /// + /// Lower method + /// public void Lower() { if (LowerRelay == null && LatchedRelay == null) return; @@ -216,32 +238,56 @@ namespace PepperDash.Essentials.Devices.Common.Shades } + /// + /// Represents a ScreenLiftControllerConfigProperties + /// public class ScreenLiftControllerConfigProperties { [JsonProperty("displayDeviceKey")] + /// + /// Gets or sets the DisplayDeviceKey + /// public string DisplayDeviceKey { get; set; } [JsonProperty("type")] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the Type + /// public eScreenLiftControlType Type { get; set; } [JsonProperty("mode")] [JsonConverter(typeof(StringEnumConverter))] + /// + /// Gets or sets the Mode + /// public eScreenLiftControlMode Mode { get; set; } [JsonProperty("relays")] public Dictionary Relays { get; set; } } + /// + /// Represents a ScreenLiftRelaysConfig + /// public class ScreenLiftRelaysConfig { [JsonProperty("deviceKey")] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; set; } [JsonProperty("pulseTimeInMs")] + /// + /// Gets or sets the PulseTimeInMs + /// public int PulseTimeInMs { get; set; } } + /// + /// Represents a ScreenLiftControllerFactory + /// public class ScreenLiftControllerFactory : EssentialsDeviceFactory { public ScreenLiftControllerFactory() @@ -249,6 +295,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades TypeNames = new List() { "screenliftcontroller" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device"); @@ -258,6 +308,9 @@ namespace PepperDash.Essentials.Devices.Common.Shades } } + /// + /// Enumeration of eScreenLiftControlMode values + /// public enum eScreenLiftControlMode { momentary, diff --git a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs index 618924cd..748b48bb 100644 --- a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs +++ b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs @@ -7,6 +7,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Devices.Common.Generic { + /// + /// Represents a GenericSink + /// public class GenericSink : EssentialsDevice, IRoutingSinkWithInputPort { public GenericSink(string key, string name) : base(key, name) @@ -18,11 +21,20 @@ namespace PepperDash.Essentials.Devices.Common.Generic InputPorts.Add(inputPort); } + /// + /// Gets or sets the InputPorts + /// public RoutingPortCollection InputPorts { get; private set; } + /// + /// Gets or sets the CurrentSourceInfoKey + /// public string CurrentSourceInfoKey { get; set; } private SourceListItem _currentSource; + /// + /// Gets or sets the CurrentSourceInfo + /// public SourceListItem CurrentSourceInfo { get => _currentSource; set { @@ -44,6 +56,9 @@ namespace PepperDash.Essentials.Devices.Common.Generic public event SourceInfoChangeHandler CurrentSourceChange; } + /// + /// Represents a GenericSinkFactory + /// public class GenericSinkFactory : EssentialsDeviceFactory { public GenericSinkFactory() @@ -51,6 +66,10 @@ namespace PepperDash.Essentials.Devices.Common.Generic TypeNames = new List() { "genericsink", "genericdestination" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Sink Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs index 3c6e57d2..6cf359e8 100644 --- a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs +++ b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs @@ -13,9 +13,15 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common { + /// + /// Represents a GenericSource + /// public class GenericSource : EssentialsDevice, IUiDisplayInfo, IRoutingSource, IUsageTracking { + /// + /// Gets or sets the DisplayUiType + /// public uint DisplayUiType { get { return DisplayUiConstants.TypeNoControls; } } public GenericSource(string key, string name) @@ -29,18 +35,30 @@ namespace PepperDash.Essentials.Devices.Common #region IRoutingOutputs Members + /// + /// Gets or sets the AnyOut + /// public RoutingOutputPort AnyOut { get; private set; } + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; private set; } #endregion #region IUsageTracking Members + /// + /// Gets or sets the UsageTracker + /// public UsageTracking UsageTracker { get; set; } #endregion } + /// + /// Represents a GenericSourceFactory + /// public class GenericSourceFactory : EssentialsDeviceFactory { public GenericSourceFactory() @@ -48,6 +66,10 @@ namespace PepperDash.Essentials.Devices.Common TypeNames = new List() { "genericsource" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Source Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs b/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs index 6e1dc506..d98d8804 100644 --- a/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs @@ -22,10 +22,19 @@ namespace PepperDash.Essentials.Devices.Common.Lighting public event EventHandler LightingSceneChange; + /// + /// Gets or sets the LightingScenes + /// public List LightingScenes { get; protected set; } + /// + /// Gets or sets the CurrentLightingScene + /// public LightingScene CurrentLightingScene { get; protected set; } + /// + /// Gets or sets the CurrentLightingSceneFeedback + /// public IntFeedback CurrentLightingSceneFeedback { get; protected set; } #endregion @@ -41,6 +50,9 @@ namespace PepperDash.Essentials.Devices.Common.Lighting public abstract void SelectScene(LightingScene scene); + /// + /// SimulateSceneSelect method + /// public void SimulateSceneSelect(string sceneName) { Debug.LogMessage(LogEventLevel.Debug, this, "Simulating selection of scene '{0}'", sceneName); diff --git a/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj b/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj index 49c05762..7be4372d 100644 --- a/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj +++ b/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj @@ -22,6 +22,7 @@ pdbonly + bin\$(Configuration)\Essentials Devices Common.xml diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs index 1af09f1c..6e5e3797 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs @@ -3,6 +3,9 @@ using PepperDash.Essentials.Room.Config; namespace PepperDash.Essentials.Devices.Common.Room { + /// + /// Defines the contract for IEssentialsHuddleSpaceRoom + /// public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IHasDefaultDisplay, IHasCurrentVolumeControls, IRoomOccupancy, IEmergency, IMicrophonePrivacy { diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs index b7f1a619..98d01956 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs @@ -6,6 +6,9 @@ using PepperDash.Essentials.Room.Config; namespace PepperDash.Essentials.Devices.Common.Room { + /// + /// Defines the contract for IEssentialsHuddleVtc1Room + /// public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback, IRoomOccupancy, IEmergency, IMicrophonePrivacy { diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs index e32be4c4..d536242e 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs @@ -7,6 +7,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Devices.Common.Room { + /// + /// Defines the contract for IEssentialsRoomPropertiesConfig + /// public interface IEssentialsRoomPropertiesConfig { EssentialsRoomPropertiesConfig PropertiesConfig { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs index 947be5d9..e651011a 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs @@ -8,6 +8,9 @@ using TwoWayDisplayBase = PepperDash.Essentials.Devices.Common.Displays.TwoWayDi namespace PepperDash.Essentials.Devices.Common.Room { + /// + /// Defines the contract for IEssentialsTechRoom + /// public interface IEssentialsTechRoom:IEssentialsRoom, ITvPresetsProvider,IBridgeAdvanced,IRunDirectRouteAction { EssentialsTechRoomConfig PropertiesConfig { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs b/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs index 32885aec..db21a03a 100644 --- a/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs @@ -19,18 +19,45 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common { [Description("Wrapper class for an IR Set Top Box")] + /// + /// Represents a IRSetTopBoxBase + /// public class IRSetTopBoxBase : EssentialsBridgeableDevice, ISetTopBoxControls, IRoutingSource, IRoutingOutputs, IUsageTracking, IHasPowerControl, ITvPresetsProvider { + /// + /// Gets or sets the IrPort + /// public IrOutputPortController IrPort { get; private set; } + /// + /// Gets or sets the DisplayUiType + /// public uint DisplayUiType { get { return DisplayUiConstants.TypeDirecTv; } } + /// + /// Gets or sets the IrPulseTime + /// public ushort IrPulseTime { get; set; } + /// + /// Gets or sets the HasPresets + /// public bool HasPresets { get; set; } + /// + /// Gets or sets the HasDvr + /// public bool HasDvr { get; set; } + /// + /// Gets or sets the HasDpad + /// public bool HasDpad { get; set; } + /// + /// Gets or sets the HasNumeric + /// public bool HasNumeric { get; set; } + /// + /// Gets or sets the TvPresets + /// public DevicePresetsModel TvPresets { get; private set; } public IRSetTopBoxBase(string key, string name, IrOutputPortController portCont, @@ -67,6 +94,9 @@ namespace PepperDash.Essentials.Devices.Common OutputPorts = new RoutingPortCollection { AnyVideoOut, AnyAudioOut }; } + /// + /// LoadPresets method + /// public void LoadPresets(string filePath) { TvPresets = new DevicePresetsModel(Key + "-presets", this, filePath); @@ -76,11 +106,17 @@ namespace PepperDash.Essentials.Devices.Common #region ISetTopBoxControls Members + /// + /// DvrList method + /// public void DvrList(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_DVR, pressRelease); } + /// + /// Replay method + /// public void Replay(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease); @@ -90,36 +126,57 @@ namespace PepperDash.Essentials.Devices.Common #region IDPad Members + /// + /// Up method + /// public void Up(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_UP_ARROW, pressRelease); } + /// + /// Down method + /// public void Down(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_DN_ARROW, pressRelease); } + /// + /// Left method + /// public void Left(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_LEFT_ARROW, pressRelease); } + /// + /// Right method + /// public void Right(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_RIGHT_ARROW, pressRelease); } + /// + /// Select method + /// public void Select(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease); } + /// + /// Menu method + /// public void Menu(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_MENU, pressRelease); } + /// + /// Exit method + /// public void Exit(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_EXIT, pressRelease); @@ -129,59 +186,89 @@ namespace PepperDash.Essentials.Devices.Common #region INumericKeypad Members + /// + /// Digit0 method + /// public void Digit0(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_0, pressRelease); } + /// + /// Digit1 method + /// public void Digit1(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_1, pressRelease); } + /// + /// Digit2 method + /// public void Digit2(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_2, pressRelease); } + /// + /// Digit3 method + /// public void Digit3(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_3, pressRelease); } + /// + /// Digit4 method + /// public void Digit4(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_4, pressRelease); } + /// + /// Digit5 method + /// public void Digit5(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_5, pressRelease); } + /// + /// Digit6 method + /// public void Digit6(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_6, pressRelease); } + /// + /// Digit7 method + /// public void Digit7(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_7, pressRelease); } + /// + /// Digit8 method + /// public void Digit8(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_8, pressRelease); } + /// + /// Digit9 method + /// public void Digit9(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_9, pressRelease); } - /// - /// Defaults to true - /// + /// + /// Gets or sets the HasKeypadAccessoryButton1 + /// public bool HasKeypadAccessoryButton1 { get; set; } /// @@ -200,9 +287,9 @@ namespace PepperDash.Essentials.Devices.Common IrPort.PressRelease(KeypadAccessoryButton1Command, pressRelease); } - /// - /// Defaults to true - /// + /// + /// Gets or sets the HasKeypadAccessoryButton2 + /// public bool HasKeypadAccessoryButton2 { get; set; } /// @@ -225,9 +312,9 @@ namespace PepperDash.Essentials.Devices.Common #region ISetTopBoxNumericKeypad Members - /// - /// Corresponds to "dash" IR command - /// + /// + /// Dash method + /// public void Dash(bool pressRelease) { IrPort.PressRelease("dash", pressRelease); @@ -250,21 +337,33 @@ namespace PepperDash.Essentials.Devices.Common IrPort.PressRelease(IROutputStandardCommands.IROut_CH_PLUS, pressRelease); } + /// + /// ChannelDown method + /// public void ChannelDown(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_CH_MINUS, pressRelease); } + /// + /// LastChannel method + /// public void LastChannel(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_LAST, pressRelease); } + /// + /// Guide method + /// public void Guide(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_GUIDE, pressRelease); } + /// + /// Info method + /// public void Info(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_INFO, pressRelease); @@ -274,21 +373,33 @@ namespace PepperDash.Essentials.Devices.Common #region IColorFunctions Members + /// + /// Red method + /// public void Red(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_RED, pressRelease); } + /// + /// Green method + /// public void Green(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_GREEN, pressRelease); } + /// + /// Yellow method + /// public void Yellow(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_YELLOW, pressRelease); } + /// + /// Blue method + /// public void Blue(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_BLUE, pressRelease); @@ -298,48 +409,81 @@ namespace PepperDash.Essentials.Devices.Common #region IRoutingOutputs Members + /// + /// Gets or sets the AnyVideoOut + /// public RoutingOutputPort AnyVideoOut { get; private set; } + /// + /// Gets or sets the AnyAudioOut + /// public RoutingOutputPort AnyAudioOut { get; private set; } + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; private set; } #endregion #region ITransport Members + /// + /// ChapMinus method + /// public void ChapMinus(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease); } + /// + /// ChapPlus method + /// public void ChapPlus(bool pressRelease) { } + /// + /// FFwd method + /// public void FFwd(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_FSCAN, pressRelease); } + /// + /// Pause method + /// public void Pause(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease); } + /// + /// Play method + /// public void Play(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_PLAY, pressRelease); } + /// + /// Record method + /// public void Record(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_RECORD, pressRelease); } + /// + /// Rewind method + /// public void Rewind(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease); } + /// + /// Stop method + /// public void Stop(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_STOP, pressRelease); @@ -349,22 +493,34 @@ namespace PepperDash.Essentials.Devices.Common #region IUsageTracking Members + /// + /// Gets or sets the UsageTracker + /// public UsageTracking UsageTracker { get; set; } #endregion #region IPower Members + /// + /// PowerOn method + /// public void PowerOn() { IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime); } + /// + /// PowerOff method + /// public void PowerOff() { IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime); } + /// + /// PowerToggle method + /// public void PowerToggle() { IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime); @@ -372,6 +528,10 @@ namespace PepperDash.Essentials.Devices.Common #endregion + /// + /// LinkToApi method + /// + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new SetTopBoxControllerJoinMap(joinStart); @@ -495,6 +655,9 @@ namespace PepperDash.Essentials.Devices.Common } } + /// + /// Represents a IRSetTopBoxBaseFactory + /// public class IRSetTopBoxBaseFactory : EssentialsDeviceFactory { public IRSetTopBoxBaseFactory() @@ -502,6 +665,10 @@ namespace PepperDash.Essentials.Devices.Common TypeNames = new List() { "settopbox" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new SetTopBox Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs index 8faac507..a2ec7e54 100644 --- a/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs @@ -8,14 +8,35 @@ using PepperDash.Core; namespace PepperDash.Essentials.Devices.Common { + /// + /// Represents a SetTopBoxPropertiesConfig + /// public class SetTopBoxPropertiesConfig : PepperDash.Essentials.Core.Config.SourceDevicePropertiesConfigBase { + /// + /// Gets or sets the HasPresets + /// public bool HasPresets { get; set; } + /// + /// Gets or sets the HasDvr + /// public bool HasDvr { get; set; } + /// + /// Gets or sets the HasDpad + /// public bool HasDpad { get; set; } + /// + /// Gets or sets the HasNumeric + /// public bool HasNumeric { get; set; } + /// + /// Gets or sets the IrPulseTime + /// public int IrPulseTime { get; set; } + /// + /// Gets or sets the Control + /// public ControlPropertiesConfig Control { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs b/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs index 085517b2..ad094703 100644 --- a/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs +++ b/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs @@ -22,6 +22,9 @@ namespace PepperDash.Essentials.Devices.Common.Shades int RelayPulseTime; + /// + /// Gets or sets the StopOrPresetButtonLabel + /// public string StopOrPresetButtonLabel { get; set; } public RelayControlledShade(string key, string name, RelayControlledShadeConfigProperties config) @@ -35,6 +38,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { //Create ISwitchedOutput objects based on props @@ -46,6 +53,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades return base.CustomActivate(); } + /// + /// Open method + /// + /// public override void Open() { Debug.LogMessage(LogEventLevel.Debug, this, "Opening Shade: '{0}'", this.Name); @@ -53,6 +64,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades PulseOutput(OpenRelay, RelayPulseTime); } + /// + /// Stop method + /// + /// public override void Stop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Shade: '{0}'", this.Name); @@ -60,6 +75,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades PulseOutput(StopOrPresetRelay, RelayPulseTime); } + /// + /// Close method + /// + /// public override void Close() { Debug.LogMessage(LogEventLevel.Debug, this, "Closing Shade: '{0}'", this.Name); @@ -95,20 +114,47 @@ namespace PepperDash.Essentials.Devices.Common.Shades } + /// + /// Represents a RelayControlledShadeConfigProperties + /// public class RelayControlledShadeConfigProperties { + /// + /// Gets or sets the RelayPulseTime + /// public int RelayPulseTime { get; set; } + /// + /// Gets or sets the Relays + /// public ShadeRelaysConfig Relays { get; set; } + /// + /// Gets or sets the StopOrPresetLabel + /// public string StopOrPresetLabel { get; set; } + /// + /// Represents a ShadeRelaysConfig + /// public class ShadeRelaysConfig { + /// + /// Gets or sets the Open + /// public IOPortConfig Open { get; set; } + /// + /// Gets or sets the StopOrPreset + /// public IOPortConfig StopOrPreset { get; set; } + /// + /// Gets or sets the Close + /// public IOPortConfig Close { get; set; } } } + /// + /// Represents a RelayControlledShadeFactory + /// public class RelayControlledShadeFactory : EssentialsDeviceFactory { public RelayControlledShadeFactory() @@ -116,6 +162,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades TypeNames = new List() { "relaycontrolledshade" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs b/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs index 43ce0abc..9d28fe98 100644 --- a/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs +++ b/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs @@ -24,6 +24,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades Shades = new List(); } + /// + /// CustomActivate method + /// + /// public override bool CustomActivate() { foreach (var shadeConfig in Config.Shades) @@ -44,17 +48,32 @@ namespace PepperDash.Essentials.Devices.Common.Shades } } + /// + /// Represents a ShadeControllerConfigProperties + /// public class ShadeControllerConfigProperties { + /// + /// Gets or sets the Shades + /// public List Shades { get; set; } + /// + /// Represents a ShadeConfig + /// public class ShadeConfig { + /// + /// Gets or sets the Key + /// public string Key { get; set; } } } + /// + /// Represents a ShadeControllerFactory + /// public class ShadeControllerFactory : EssentialsDeviceFactory { public ShadeControllerFactory() @@ -62,6 +81,10 @@ namespace PepperDash.Essentials.Devices.Common.Shades TypeNames = new List() { "shadecontroller" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new ShadeController Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs b/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs index 891f92b1..c96e6f01 100644 --- a/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs +++ b/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs @@ -11,15 +11,24 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.SoftCodec { + /// + /// Represents a BlueJeansPc + /// public class BlueJeansPc : InRoomPc, IRunRouteAction, IRoutingSink { + /// + /// Gets or sets the AnyVideoIn + /// public RoutingInputPort AnyVideoIn { get; private set; } public RoutingInputPort CurrentInputPort => AnyVideoIn; #region IRoutingInputs Members + /// + /// Gets or sets the InputPorts + /// public RoutingPortCollection InputPorts { get; private set; } #endregion @@ -35,11 +44,17 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec #region IRunRouteAction Members + /// + /// RunRouteAction method + /// public void RunRouteAction(string routeKey, string sourceListKey) { RunRouteAction(routeKey, sourceListKey, null); } + /// + /// RunRouteAction method + /// public void RunRouteAction(string routeKey, string sourceListKey, Action successCallback) { CrestronInvoke.BeginInvoke(o => @@ -128,6 +143,9 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec #region IHasCurrentSourceInfoChange Members + /// + /// Gets or sets the CurrentSourceInfoKey + /// public string CurrentSourceInfoKey { get; set; } /// @@ -164,6 +182,9 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec #endregion } + /// + /// Represents a BlueJeansPcFactory + /// public class BlueJeansPcFactory : EssentialsDeviceFactory { public BlueJeansPcFactory() @@ -171,6 +192,10 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec TypeNames = new List() { "bluejeanspc" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new BlueJeansPc Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs b/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs index 84847f35..f00fb9ce 100644 --- a/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs +++ b/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs @@ -8,10 +8,16 @@ using System.Linq; namespace PepperDash.Essentials.Devices.Common.SoftCodec { + /// + /// Represents a GenericSoftCodec + /// public class GenericSoftCodec : EssentialsDevice, IRoutingSource, IRoutingSinkWithSwitchingWithInputPort { private RoutingInputPort _currentInputPort; + /// + /// Gets or sets the CurrentInputPort + /// public RoutingInputPort CurrentInputPort { get => _currentInputPort; set @@ -54,9 +60,18 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec } } + /// + /// Gets or sets the InputPorts + /// public RoutingPortCollection InputPorts { get; private set; } + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; private set; } + /// + /// Gets or sets the CurrentSourceInfoKey + /// public string CurrentSourceInfoKey { get ; set; } public SourceListItem CurrentSourceInfo { @@ -85,6 +100,9 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec public event SourceInfoChangeHandler CurrentSourceChange; public event InputChangedEventHandler InputChanged; + /// + /// ExecuteSwitch method + /// public void ExecuteSwitch(object inputSelector) { var inputPort = InputPorts.FirstOrDefault(p => p.Selector == inputSelector); @@ -99,21 +117,39 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec } } + /// + /// Represents a GenericSoftCodecProperties + /// public class GenericSoftCodecProperties { [JsonProperty("hasCameraInputs")] + /// + /// Gets or sets the HasCameraInputs + /// public bool HasCameraInputs { get; set; } [JsonProperty("cameraInputCount")] + /// + /// Gets or sets the CameraInputCount + /// public int CameraInputCount { get; set; } [JsonProperty("contentInputCount")] + /// + /// Gets or sets the ContentInputCount + /// public int ContentInputCount { get; set; } [JsonProperty("contentOutputCount")] + /// + /// Gets or sets the OutputCount + /// public int OutputCount { get; set; } } + /// + /// Represents a GenericSoftCodecFactory + /// public class GenericSoftCodecFactory: EssentialsDeviceFactory { public GenericSoftCodecFactory() @@ -121,6 +157,10 @@ namespace PepperDash.Essentials.Devices.Common.SoftCodec TypeNames = new List { "genericsoftcodec" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Attempting to create new Generic SoftCodec Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs b/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs index 41ad7a43..48586bd2 100644 --- a/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs +++ b/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs @@ -7,19 +7,34 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Sources { + /// + /// Represents a InRoomPc + /// public class InRoomPc : EssentialsDevice, IHasFeedback, IRoutingSource, IRoutingOutputs, IAttachVideoStatus, IUiDisplayInfo, IUsageTracking { + /// + /// Gets or sets the DisplayUiType + /// public uint DisplayUiType { get { return DisplayUiConstants.TypeLaptop; } } + /// + /// Gets or sets the IconName + /// public string IconName { get; set; } + /// + /// Gets or sets the HasPowerOnFeedback + /// public BoolFeedback HasPowerOnFeedback { get; private set; } + /// + /// Gets or sets the AnyVideoOut + /// public RoutingOutputPort AnyVideoOut { get; private set; } #region IRoutingOutputs Members - /// - /// Options: hdmi - /// + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; private set; } #endregion @@ -54,11 +69,17 @@ namespace PepperDash.Essentials.Devices.Common.Sources #region IUsageTracking Members + /// + /// Gets or sets the UsageTracker + /// public UsageTracking UsageTracker { get; set; } #endregion } + /// + /// Represents a InRoomPcFactory + /// public class InRoomPcFactory : EssentialsDeviceFactory { public InRoomPcFactory() @@ -66,6 +87,10 @@ namespace PepperDash.Essentials.Devices.Common.Sources TypeNames = new List() { "inroompc" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new InRoomPc Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs b/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs index 38898209..d2da9475 100644 --- a/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs +++ b/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs @@ -7,19 +7,34 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Sources { + /// + /// Represents a Laptop + /// public class Laptop : EssentialsDevice, IHasFeedback, IRoutingSource, IRoutingOutputs, IAttachVideoStatus, IUiDisplayInfo, IUsageTracking { + /// + /// Gets or sets the DisplayUiType + /// public uint DisplayUiType { get { return DisplayUiConstants.TypeLaptop; } } + /// + /// Gets or sets the IconName + /// public string IconName { get; set; } + /// + /// Gets or sets the HasPowerOnFeedback + /// public BoolFeedback HasPowerOnFeedback { get; private set; } + /// + /// Gets or sets the AnyVideoOut + /// public RoutingOutputPort AnyVideoOut { get; private set; } #region IRoutingOutputs Members - /// - /// Options: hdmi - /// + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; private set; } #endregion @@ -58,11 +73,17 @@ namespace PepperDash.Essentials.Devices.Common.Sources #region IUsageTracking Members + /// + /// Gets or sets the UsageTracker + /// public UsageTracking UsageTracker { get; set; } #endregion } + /// + /// Represents a LaptopFactory + /// public class LaptopFactory : EssentialsDeviceFactory { public LaptopFactory() @@ -70,6 +91,10 @@ namespace PepperDash.Essentials.Devices.Common.Sources TypeNames = new List() { "laptop" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Laptop Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs b/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs index a00fb5a2..365a8271 100644 --- a/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs +++ b/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs @@ -18,11 +18,20 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common { [Description("Wrapper class for an IR-Controlled AppleTV")] + /// + /// Represents a AppleTV + /// public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingSource, IRoutingOutputs { + /// + /// Gets or sets the IrPort + /// public IrOutputPortController IrPort { get; private set; } public const string StandardDriverName = "Apple_AppleTV_4th_Gen_Essentials.ir"; + /// + /// Gets or sets the DisplayUiType + /// public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } } public AppleTV(string key, string name, IrOutputPortController portCont) @@ -40,6 +49,9 @@ namespace PepperDash.Essentials.Devices.Common PrintExpectedIrCommands(); } + /// + /// PrintExpectedIrCommands method + /// public void PrintExpectedIrCommands() { var cmds = typeof (AppleTvIrCommands).GetFields(BindingFlags.Public | BindingFlags.Static); @@ -52,36 +64,57 @@ namespace PepperDash.Essentials.Devices.Common #region IDPad Members + /// + /// Up method + /// public void Up(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.Up, pressRelease); } + /// + /// Down method + /// public void Down(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.Down, pressRelease); } + /// + /// Left method + /// public void Left(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.Left, pressRelease); } + /// + /// Right method + /// public void Right(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.Right, pressRelease); } + /// + /// Select method + /// public void Select(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.Enter, pressRelease); } + /// + /// Menu method + /// public void Menu(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.Menu, pressRelease); } + /// + /// Exit method + /// public void Exit(bool pressRelease) { @@ -91,11 +124,17 @@ namespace PepperDash.Essentials.Devices.Common #region ITransport Members + /// + /// Play method + /// public void Play(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease); } + /// + /// Pause method + /// public void Pause(bool pressRelease) { IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease); @@ -105,6 +144,9 @@ namespace PepperDash.Essentials.Devices.Common /// Not implemented /// /// + /// + /// Rewind method + /// public void Rewind(bool pressRelease) { } @@ -155,10 +197,16 @@ namespace PepperDash.Essentials.Devices.Common public RoutingOutputPort HdmiOut { get; private set; } public RoutingOutputPort AnyAudioOut { get; private set; } + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; private set; } #endregion + /// + /// LinkToApi method + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { var joinMap = new AppleTvJoinMap(joinStart); @@ -190,6 +238,9 @@ namespace PepperDash.Essentials.Devices.Common } } + /// + /// Represents a AppleTVFactory + /// public class AppleTVFactory : EssentialsDeviceFactory { public AppleTVFactory() @@ -197,6 +248,10 @@ namespace PepperDash.Essentials.Devices.Common TypeNames = new List() { "appletv" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new AppleTV Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs b/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs index 213e5835..a08872f5 100644 --- a/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs +++ b/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs @@ -14,12 +14,21 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common { [Description("Wrapper class for an IR-Controlled Roku")] + /// + /// Represents a Roku2 + /// public class Roku2 : EssentialsDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingSource, IRoutingOutputs { [Api] + /// + /// Gets or sets the IrPort + /// public IrOutputPortController IrPort { get; private set; } public const string StandardDriverName = "Roku XD_S.ir"; [Api] + /// + /// Gets or sets the DisplayUiType + /// public uint DisplayUiType { get { return DisplayUiConstants.TypeRoku; } } public Roku2(string key, string name, IrOutputPortController portCont) @@ -36,42 +45,63 @@ namespace PepperDash.Essentials.Devices.Common #region IDPad Members [Api] + /// + /// Up method + /// public void Up(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_UP_ARROW, pressRelease); } [Api] + /// + /// Down method + /// public void Down(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_DN_ARROW, pressRelease); } [Api] + /// + /// Left method + /// public void Left(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_LEFT_ARROW, pressRelease); } [Api] + /// + /// Right method + /// public void Right(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_RIGHT_ARROW, pressRelease); } [Api] + /// + /// Select method + /// public void Select(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease); } [Api] + /// + /// Menu method + /// public void Menu(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_MENU, pressRelease); } [Api] + /// + /// Exit method + /// public void Exit(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_EXIT, pressRelease); @@ -82,24 +112,36 @@ namespace PepperDash.Essentials.Devices.Common #region ITransport Members [Api] + /// + /// Play method + /// public void Play(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_PLAY, pressRelease); } [Api] + /// + /// Pause method + /// public void Pause(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_PAUSE, pressRelease); } [Api] + /// + /// Rewind method + /// public void Rewind(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease); } [Api] + /// + /// FFwd method + /// public void FFwd(bool pressRelease) { IrPort.PressRelease(IROutputStandardCommands.IROut_FSCAN, pressRelease); @@ -109,6 +151,9 @@ namespace PepperDash.Essentials.Devices.Common /// Not implemented /// /// + /// + /// ChapMinus method + /// public void ChapMinus(bool pressRelease) { } @@ -148,6 +193,9 @@ namespace PepperDash.Essentials.Devices.Common } + /// + /// Represents a Roku2Factory + /// public class Roku2Factory : EssentialsDeviceFactory { public Roku2Factory() @@ -155,6 +203,10 @@ namespace PepperDash.Essentials.Devices.Common TypeNames = new List() { "roku" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Roku Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs index 4fc07bd2..9a1f770c 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/CallHistoryDataClasses.cs @@ -6,91 +6,217 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Devices.Common.VideoCodec { + /// + /// Represents a CiscoCallHistory + /// public class CiscoCallHistory { + /// + /// Represents a CallbackNumber + /// public class CallbackNumber { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a DisplayName + /// public class DisplayName { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a LastOccurrenceStartTime + /// public class LastOccurrenceStartTime { + /// + /// Gets or sets the Value + /// public DateTime Value { get; set; } } + /// + /// Represents a LastOccurrenceDaysAgo + /// public class LastOccurrenceDaysAgo { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a LastOccurrenceHistoryId + /// public class LastOccurrenceHistoryId { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a OccurrenceType + /// public class OccurrenceType { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a IsAcknowledged + /// public class IsAcknowledged { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a OccurrenceCount + /// public class OccurrenceCount { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a Entry + /// public class Entry { + /// + /// Gets or sets the id + /// public string id { get; set; } + /// + /// Gets or sets the CallbackNumber + /// public CallbackNumber CallbackNumber { get; set; } + /// + /// Gets or sets the DisplayName + /// public DisplayName DisplayName { get; set; } + /// + /// Gets or sets the LastOccurrenceStartTime + /// public LastOccurrenceStartTime LastOccurrenceStartTime { get; set; } + /// + /// Gets or sets the LastOccurrenceDaysAgo + /// public LastOccurrenceDaysAgo LastOccurrenceDaysAgo { get; set; } + /// + /// Gets or sets the LastOccurrenceHistoryId + /// public LastOccurrenceHistoryId LastOccurrenceHistoryId { get; set; } + /// + /// Gets or sets the OccurrenceType + /// public OccurrenceType OccurrenceType { get; set; } + /// + /// Gets or sets the IsAcknowledged + /// public IsAcknowledged IsAcknowledged { get; set; } + /// + /// Gets or sets the OccurrenceCount + /// public OccurrenceCount OccurrenceCount { get; set; } } + /// + /// Represents a Offset + /// public class Offset { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a Limit + /// public class Limit { + /// + /// Gets or sets the Value + /// public string Value { get; set; } } + /// + /// Represents a ResultInfo + /// public class ResultInfo { + /// + /// Gets or sets the Offset + /// public Offset Offset { get; set; } + /// + /// Gets or sets the Limit + /// public Limit Limit { get; set; } } + /// + /// Represents a CallHistoryRecentsResult + /// public class CallHistoryRecentsResult { + /// + /// Gets or sets the status + /// public string status { get; set; } + /// + /// Gets or sets the Entry + /// public List Entry { get; set; } + /// + /// Gets or sets the ResultInfo + /// public ResultInfo ResultInfo { get; set; } } + /// + /// Represents a CommandResponse + /// public class CommandResponse { + /// + /// Gets or sets the CallHistoryRecentsResult + /// public CallHistoryRecentsResult CallHistoryRecentsResult { get; set; } } + /// + /// Represents a RootObject + /// public class RootObject { + /// + /// Gets or sets the CommandResponse + /// public CommandResponse CommandResponse { get; set; } } } diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/RoomPresets.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/RoomPresets.cs index a6531a40..dfccd74b 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/RoomPresets.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/RoomPresets.cs @@ -68,7 +68,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// Represents a room preset on a video codec. Typically stores camera position(s) and video routing. Can be recalled by Far End if enabled. + /// Represents a CodecRoomPreset /// public class CodecRoomPreset : PresetBase { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceMode.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceMode.cs index 1f96f5e1..ef960406 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceMode.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceMode.cs @@ -1,4 +1,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { + /// + /// Enumeration of eExternalSourceMode values + /// public enum eExternalSourceMode {Ready, NotReady, Hidden, Error} } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceType.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceType.cs index 66ebe390..a5cea36c 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceType.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/CiscoCodec/eExternalSourceType.cs @@ -1,4 +1,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { + /// + /// Enumeration of eExternalSourceType values + /// public enum eExternalSourceType {camera, desktop, document_camera, mediaplayer, PC, whiteboard, other} } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingInfo.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingInfo.cs index bde88b61..88ccfcac 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingInfo.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingInfo.cs @@ -21,12 +21,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces } /// - /// Represents the information about a meeting in progress - /// Currently used for Zoom meetings + /// Represents a MeetingInfo /// public class MeetingInfo { [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Id + /// public string Id { get; private set; } [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] public string Name { get; private set; } @@ -35,18 +37,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces [JsonProperty("password", NullValueHandling = NullValueHandling.Ignore)] public string Password { get; private set; } [JsonProperty("shareStatus", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the ShareStatus + /// public string ShareStatus { get; private set; } [JsonProperty("isHost", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the IsHost + /// public Boolean IsHost { get; private set; } [JsonProperty("isSharingMeeting", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the IsSharingMeeting + /// public Boolean IsSharingMeeting { get; private set; } [JsonProperty("waitingForHost", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the WaitingForHost + /// public Boolean WaitingForHost { get; private set; } [JsonProperty("isLocked", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the IsLocked + /// public Boolean IsLocked { get; private set; } [JsonProperty("isRecording", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the IsRecording + /// public Boolean IsRecording { get; private set; } [JsonProperty("canRecord", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CanRecord + /// public Boolean CanRecord { get; private set; } @@ -66,8 +89,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces } } + /// + /// Represents a MeetingInfoEventArgs + /// public class MeetingInfoEventArgs : EventArgs { + /// + /// Gets or sets the Info + /// public MeetingInfo Info { get; private set; } public MeetingInfoEventArgs(MeetingInfo info) diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs index 97fcb725..e7344818 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs @@ -7,6 +7,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces { + /// + /// Defines the contract for IHasMeetingLock + /// public interface IHasMeetingLock { BoolFeedback MeetingIsLockedFeedback { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs index b05362c3..9946cdd1 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs @@ -7,6 +7,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces { + /// + /// Defines the contract for IHasMeetingRecording + /// public interface IHasMeetingRecording { BoolFeedback MeetingIsRecordingFeedback { get; } @@ -16,6 +19,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces void ToggleRecording(); } + /// + /// Defines the contract for IHasMeetingRecordingWithPrompt + /// public interface IHasMeetingRecordingWithPrompt : IHasMeetingRecording { BoolFeedback RecordConsentPromptIsVisible { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs index 98c94bdc..0f89eb91 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs @@ -42,9 +42,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces void ToggleVideoForParticipant(int userId); } - /// - /// Describes the ability to mute and unmute a participant's audio in a meeting - /// + /// + /// Defines the contract for IHasParticipantAudioMute + /// public interface IHasParticipantAudioMute : IHasParticipantVideoMute { /// @@ -57,9 +57,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces void ToggleAudioForParticipant(int userId); } - /// - /// Describes the ability to pin and unpin a participant in a meeting - /// + /// + /// Defines the contract for IHasParticipantPinUnpin + /// public interface IHasParticipantPinUnpin : IHasParticipants { IntFeedback NumberOfScreensFeedback { get; } @@ -70,6 +70,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces void ToggleParticipantPinState(int userId, int screenIndex); } + /// + /// Represents a CodecParticipants + /// public class CodecParticipants { private List _currentParticipants; @@ -99,6 +102,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces _currentParticipants = new List(); } + /// + /// OnParticipantsChanged method + /// public void OnParticipantsChanged() { var handler = ParticipantsListHasChanged; @@ -109,12 +115,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces } } - /// - /// Represents a call participant - /// + /// + /// Represents a Participant + /// public class Participant { + /// + /// Gets or sets the UserId + /// public int UserId { get; set; } + /// + /// Gets or sets the IsHost + /// public bool IsHost { get; set; } public bool IsMyself { get; set; } public string Name { get; set; } @@ -122,8 +134,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces public bool CanUnmuteVideo { get; set; } public bool VideoMuteFb { get; set; } public bool AudioMuteFb { get; set; } + /// + /// Gets or sets the HandIsRaisedFb + /// public bool HandIsRaisedFb { get; set; } + /// + /// Gets or sets the IsPinnedFb + /// public bool IsPinnedFb { get; set; } + /// + /// Gets or sets the ScreenIndexIsPinnedToFb + /// public int ScreenIndexIsPinnedToFb { get; set; } public Participant() diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs index a620af1e..cb52efc2 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasPresentationOnlyMeeting.cs @@ -1,5 +1,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces { + /// + /// Defines the contract for IHasPresentationOnlyMeeting + /// public interface IHasPresentationOnlyMeeting { void StartSharingOnlyMeeting(); @@ -9,6 +12,9 @@ void StartNormalMeetingFromSharingOnlyMeeting(); } + /// + /// Enumeration of eSharingMeetingMode values + /// public enum eSharingMeetingMode { None, diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs index d0ba25fd..dbb6d0ef 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs @@ -3,6 +3,9 @@ using PepperDash.Essentials.Devices.Common.VideoCodec; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IHasSelfviewPosition + /// public interface IHasSelfviewPosition { StringFeedback SelfviewPipPositionFeedback { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs index 4103fa0e..45365ce1 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { + /// + /// Defines the contract for IHasSelfviewSize + /// public interface IHasSelfviewSize { StringFeedback SelfviewPipSizeFeedback { get; } diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs index cc9dcd3d..6b2ebe38 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs @@ -21,7 +21,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// Describes a device that has Half Waek Mode capability + /// Defines the contract for IHasHalfWakeMode /// public interface IHasHalfWakeMode : IHasStandbyMode { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs index d8494334..f7b8f9ad 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs @@ -15,9 +15,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec { VideoCodecBase VideoCodec { get; } - ///// - ///// Make this more specific - ///// + /// + /// Make this more specific + /// //List ActiveCalls { get; } /// diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IJoinCalls.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IJoinCalls.cs index b84db1e9..25a807a1 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IJoinCalls.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IJoinCalls.cs @@ -8,6 +8,9 @@ using PepperDash.Essentials.Devices.Common.Codec; namespace PepperDash.Essentials.Devices.Common.VideoCodec { + /// + /// Defines the contract for IJoinCalls + /// public interface IJoinCalls { void JoinCall(CodecActiveCallItem activeCall); diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockCodecDirectory.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockCodecDirectory.cs index 41b70661..9b9aa8d7 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockCodecDirectory.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockCodecDirectory.cs @@ -13,6 +13,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec { public static class MockVideoCodecDirectory { + /// + /// Enumeration of eFolderId values + /// public enum eFolderId { UnitedStates, diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs index 23023857..0387c416 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs @@ -20,15 +20,36 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.VideoCodec { + /// + /// Represents a MockVC + /// public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory, IHasScheduleAwareness, IHasCallFavorites, IHasDirectory, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets { + /// + /// Gets or sets the PropertiesConfig + /// public MockVcPropertiesConfig PropertiesConfig; + /// + /// Gets or sets the CodecOsdIn + /// public RoutingInputPort CodecOsdIn { get; private set; } + /// + /// Gets or sets the HdmiIn1 + /// public RoutingInputPort HdmiIn1 { get; private set; } + /// + /// Gets or sets the HdmiIn2 + /// public RoutingInputPort HdmiIn2 { get; private set; } + /// + /// Gets or sets the HdmiOut + /// public RoutingOutputPort HdmiOut { get; private set; } + /// + /// Gets or sets the CallFavorites + /// public CodecCallFavorites CallFavorites { get; private set; } /// @@ -137,8 +158,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// Dials, yo! + /// Dial method /// + /// public override void Dial(string number) { Debug.LogMessage(LogEventLevel.Debug, this, "Dial: {0}", number); @@ -155,6 +177,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec }, 2000); } + /// + /// Dial method + /// + /// public override void Dial(Meeting meeting) { Debug.LogMessage(LogEventLevel.Debug, this, "Dial Meeting: {0}", meeting.Id); @@ -174,8 +200,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// + /// EndCall method /// + /// public override void EndCall(CodecActiveCallItem call) { Debug.LogMessage(LogEventLevel.Debug, this, "EndCall"); @@ -185,8 +212,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// + /// EndAllCalls method /// + /// public override void EndAllCalls() { Debug.LogMessage(LogEventLevel.Debug, this, "EndAllCalls"); @@ -200,8 +228,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// For a call from the test methods below + /// AcceptCall method /// + /// public override void AcceptCall(CodecActiveCallItem call) { Debug.LogMessage(LogEventLevel.Debug, this, "AcceptCall"); @@ -211,8 +240,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// For a call from the test methods below + /// RejectCall method /// + /// public override void RejectCall(CodecActiveCallItem call) { Debug.LogMessage(LogEventLevel.Debug, this, "RejectCall"); @@ -225,6 +255,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// Makes horrible tones go out on the wire! /// /// + /// + /// SendDtmf method + /// public override void SendDtmf(string s) { Debug.LogMessage(LogEventLevel.Debug, this, "SendDTMF: {0}", s); @@ -253,11 +286,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec _StandbyIsOn = true; } + /// + /// StandbyDeactivate method + /// + /// public override void StandbyDeactivate() { _StandbyIsOn = false; } + /// + /// LinkToApi method + /// public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { throw new NotImplementedException(); @@ -267,6 +307,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// Called by routing to make it happen /// /// + /// + /// ExecuteSwitch method + /// + /// public override void ExecuteSwitch(object selector) { Debug.LogMessage(LogEventLevel.Debug, this, "ExecuteSwitch: {0}", selector); @@ -304,6 +348,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// /// /// + /// + /// SetVolume method + /// + /// public override void SetVolume(ushort level) { _VolumeLevel = level; @@ -314,6 +362,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// /// /// + /// + /// VolumeDown method + /// + /// public override void VolumeDown(bool pressRelease) { } @@ -339,8 +391,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// + /// PrivacyModeOff method /// + /// public override void PrivacyModeOff() { Debug.LogMessage(LogEventLevel.Debug, this, "PrivacyMuteOff"); @@ -351,8 +404,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// + /// PrivacyModeToggle method /// + /// public override void PrivacyModeToggle() { _PrivacyModeIsOn = !_PrivacyModeIsOn; @@ -367,6 +421,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// /// /// + /// + /// TestIncomingVideoCall method + /// public void TestIncomingVideoCall(string url) { Debug.LogMessage(LogEventLevel.Debug, this, "TestIncomingVideoCall from {0}", url); @@ -382,6 +439,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// /// /// + /// + /// TestIncomingAudioCall method + /// public void TestIncomingAudioCall(string url) { Debug.LogMessage(LogEventLevel.Debug, this, "TestIncomingAudioCall from {0}", url); @@ -393,7 +453,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// + /// TestFarEndHangup method /// public void TestFarEndHangup() { @@ -406,6 +466,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public CodecCallHistory CallHistory { get; private set; } + /// + /// RemoveCallHistoryEntry method + /// public void RemoveCallHistoryEntry(CodecCallHistory.CallHistoryEntry entry) { @@ -415,6 +478,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec #region IHasScheduleAwareness Members + /// + /// GetSchedule method + /// public void GetSchedule() { @@ -487,6 +553,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } } + /// + /// SearchDirectory method + /// public void SearchDirectory(string searchString) { var searchResults = new CodecDirectory(); @@ -507,6 +576,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec OnDirectoryResultReturned(searchResults); } + /// + /// GetDirectoryFolderContents method + /// public void GetDirectoryFolderContents(string folderId) { var folderDirectory = new CodecDirectory(); @@ -533,6 +605,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec OnDirectoryResultReturned(folderDirectory); } + /// + /// SetCurrentDirectoryToRoot method + /// public void SetCurrentDirectoryToRoot() { DirectoryBrowseHistory.Clear(); @@ -540,6 +615,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec OnDirectoryResultReturned(DirectoryRoot); } + /// + /// GetDirectoryParentFolderContents method + /// public void GetDirectoryParentFolderContents() { var currentDirectory = new CodecDirectory(); @@ -562,10 +640,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec OnDirectoryResultReturned(currentDirectory); } + /// + /// Gets or sets the CurrentDirectoryResultIsNotDirectoryRoot + /// public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; } + /// + /// Gets or sets the DirectoryBrowseHistory + /// public List DirectoryBrowseHistory { get; private set; } + /// + /// OnDirectoryResultReturned method + /// public void OnDirectoryResultReturned(CodecDirectory result) { CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate(); @@ -643,6 +730,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public event EventHandler CameraSelected; + /// + /// Gets or sets the Cameras + /// public List Cameras { get; private set; } private CameraBase _selectedCamera; @@ -670,8 +760,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } } + /// + /// Gets or sets the SelectedCameraFeedback + /// public StringFeedback SelectedCameraFeedback { get; private set; } + /// + /// SelectCamera method + /// public void SelectCamera(string key) { var camera = Cameras.FirstOrDefault(c => c.Key.ToLower().IndexOf(key.ToLower()) > -1); @@ -688,8 +784,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec #region IHasFarEndCameraControl Members + /// + /// Gets or sets the FarEndCamera + /// public CameraBase FarEndCamera { get; private set; } + /// + /// Gets or sets the ControllingFarEndCameraFeedback + /// public BoolFeedback ControllingFarEndCameraFeedback { get; private set; } #endregion @@ -698,18 +800,27 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec private bool _CameraAutoModeIsOn; + /// + /// CameraAutoModeOn method + /// public void CameraAutoModeOn() { _CameraAutoModeIsOn = true; CameraAutoModeIsOnFeedback.FireUpdate(); } + /// + /// CameraAutoModeOff method + /// public void CameraAutoModeOff() { _CameraAutoModeIsOn = false; CameraAutoModeIsOnFeedback.FireUpdate(); } + /// + /// CameraAutoModeToggle method + /// public void CameraAutoModeToggle() { if(_CameraAutoModeIsOn) @@ -721,6 +832,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } + /// + /// Gets or sets the CameraAutoModeIsOnFeedback + /// public BoolFeedback CameraAutoModeIsOnFeedback {get; private set;} #endregion @@ -729,10 +843,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public event EventHandler CodecRoomPresetsListHasChanged; + /// + /// Gets or sets the NearEndPresets + /// public List NearEndPresets { get; private set; } + /// + /// Gets or sets the FarEndRoomPresets + /// public List FarEndRoomPresets { get; private set; } + /// + /// CodecRoomPresetSelect method + /// public void CodecRoomPresetSelect(int preset) { if (SelectedCamera is IAmFarEndCamera) @@ -745,6 +868,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } } + /// + /// CodecRoomPresetStore method + /// public void CodecRoomPresetStore(int preset, string description) { var editPreset = NearEndPresets.FirstOrDefault(p => p.ID.Equals(preset)); @@ -767,6 +893,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec SetConfig(Config); } + /// + /// SelectFarEndPreset method + /// public void SelectFarEndPreset(int i) { Debug.LogMessage(LogEventLevel.Debug, this, "Selecting Far End Preset: {0}", i); @@ -786,7 +915,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } /// - /// Implementation for the mock VC + /// Represents a MockCodecInfo /// public class MockCodecInfo : VideoCodecInfo { @@ -801,38 +930,49 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec get { return "someE164alias"; } } + /// public override string H323Id { get { return "someH323Id"; } } + /// public override string IpAddress { get { return "xxx.xxx.xxx.xxx"; } } + /// public override string SipPhoneNumber { get { return "333-444-5555"; } } + /// public override string SipUri { get { return "mock@someurl.com"; } } + /// public override bool AutoAnswerEnabled { get { return _AutoAnswerEnabled; } } bool _AutoAnswerEnabled; + /// + /// SetAutoAnswer method + /// public void SetAutoAnswer(bool value) { _AutoAnswerEnabled = value; } } + /// + /// Represents a MockVCFactory + /// public class MockVCFactory : EssentialsDeviceFactory { public MockVCFactory() @@ -840,6 +980,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec TypeNames = new List() { "mockvc" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new MockVC Device"); diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs index 3b4d5ab9..8b39e457 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs @@ -11,6 +11,9 @@ using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Cameras { + /// + /// Represents a MockVCCamera + /// public class MockVCCamera : CameraBase, IHasCameraPtzControl, IHasCameraFocusControl, IBridgeAdvanced { protected VideoCodecBase ParentCodec { get; private set; } @@ -26,6 +29,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraPtzControl Members + /// + /// PositionHome method + /// public void PositionHome() { Debug.LogMessage(LogEventLevel.Debug, this, "Resetting to home position"); @@ -35,16 +41,25 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraPanControl Members + /// + /// PanLeft method + /// public void PanLeft() { Debug.LogMessage(LogEventLevel.Debug, this, "Panning Left"); } + /// + /// PanRight method + /// public void PanRight() { Debug.LogMessage(LogEventLevel.Debug, this, "Panning Right"); } + /// + /// PanStop method + /// public void PanStop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Pan"); @@ -54,16 +69,25 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraTiltControl Members + /// + /// TiltDown method + /// public void TiltDown() { Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Down"); } + /// + /// TiltUp method + /// public void TiltUp() { Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Up"); } + /// + /// TiltStop method + /// public void TiltStop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Tilt"); @@ -73,16 +97,25 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraZoomControl Members + /// + /// ZoomIn method + /// public void ZoomIn() { Debug.LogMessage(LogEventLevel.Debug, this, "Zooming In"); } + /// + /// ZoomOut method + /// public void ZoomOut() { Debug.LogMessage(LogEventLevel.Debug, this, "Zooming Out"); } + /// + /// ZoomStop method + /// public void ZoomStop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Zoom"); @@ -92,21 +125,33 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraFocusControl Members + /// + /// FocusNear method + /// public void FocusNear() { Debug.LogMessage(LogEventLevel.Debug, this, "Focusing Near"); } + /// + /// FocusFar method + /// public void FocusFar() { Debug.LogMessage(LogEventLevel.Debug, this, "Focusing Far"); } + /// + /// FocusStop method + /// public void FocusStop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Focus"); } + /// + /// TriggerAutoFocus method + /// public void TriggerAutoFocus() { Debug.LogMessage(LogEventLevel.Debug, this, "AutoFocus Triggered"); @@ -114,12 +159,18 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #endregion + /// + /// LinkToApi method + /// public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { LinkCameraToApi(this, trilist, joinStart, joinMapKey, bridge); } } + /// + /// Represents a MockFarEndVCCamera + /// public class MockFarEndVCCamera : CameraBase, IHasCameraPtzControl, IAmFarEndCamera, IBridgeAdvanced { protected VideoCodecBase ParentCodec { get; private set; } @@ -135,6 +186,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraPtzControl Members + /// + /// PositionHome method + /// public void PositionHome() { Debug.LogMessage(LogEventLevel.Debug, this, "Resetting to home position"); @@ -144,16 +198,25 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraPanControl Members + /// + /// PanLeft method + /// public void PanLeft() { Debug.LogMessage(LogEventLevel.Debug, this, "Panning Left"); } + /// + /// PanRight method + /// public void PanRight() { Debug.LogMessage(LogEventLevel.Debug, this, "Panning Right"); } + /// + /// PanStop method + /// public void PanStop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Pan"); @@ -163,16 +226,25 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraTiltControl Members + /// + /// TiltDown method + /// public void TiltDown() { Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Down"); } + /// + /// TiltUp method + /// public void TiltUp() { Debug.LogMessage(LogEventLevel.Debug, this, "Tilting Up"); } + /// + /// TiltStop method + /// public void TiltStop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Tilt"); @@ -182,16 +254,25 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #region IHasCameraZoomControl Members + /// + /// ZoomIn method + /// public void ZoomIn() { Debug.LogMessage(LogEventLevel.Debug, this, "Zooming In"); } + /// + /// ZoomOut method + /// public void ZoomOut() { Debug.LogMessage(LogEventLevel.Debug, this, "Zooming Out"); } + /// + /// ZoomStop method + /// public void ZoomStop() { Debug.LogMessage(LogEventLevel.Debug, this, "Stopping Zoom"); @@ -199,6 +280,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras #endregion + /// + /// LinkToApi method + /// public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { LinkCameraToApi(this, trilist, joinStart, joinMapKey, bridge); diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs index c1940c3a..c34053fc 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVcPropertiesConfig.cs @@ -13,12 +13,21 @@ using PepperDash.Essentials.Devices.Common.Codec; namespace PepperDash.Essentials.Devices.Common.VideoCodec { + /// + /// Represents a MockVcPropertiesConfig + /// public class MockVcPropertiesConfig { [JsonProperty("favorites")] + /// + /// Gets or sets the Favorites + /// public List Favorites { get; set; } [JsonProperty("presets")] + /// + /// Gets or sets the Presets + /// public List Presets { get; set; } public MockVcPropertiesConfig() diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs index 236c7ad9..8de3afa5 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs @@ -59,13 +59,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec ActiveCalls = new List(); } + /// + /// Gets or sets the Communication + /// public IBasicCommunication Communication { get; protected set; } - /// - /// An internal pseudo-source that is routable and connected to the osd input - /// + /// + /// Gets or sets the OsdSource + /// public DummyRoutingInputsDevice OsdSource { get; protected set; } + /// + /// Gets or sets the StandbyIsOnFeedback + /// public BoolFeedback StandbyIsOnFeedback { get; private set; } protected abstract Func PrivacyModeIsOnFeedbackFunc { get; } @@ -75,11 +81,23 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public List ActiveCalls { get; set; } + /// + /// Gets or sets the ShowSelfViewByDefault + /// public bool ShowSelfViewByDefault { get; protected set; } + /// + /// Gets or sets the SupportsCameraOff + /// public bool SupportsCameraOff { get; protected set; } + /// + /// Gets or sets the SupportsCameraAutoMode + /// public bool SupportsCameraAutoMode { get; protected set; } + /// + /// Gets or sets the IsReady + /// public bool IsReady { get; protected set; } public virtual List Feedbacks @@ -102,9 +120,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public abstract void PrivacyModeOn(); public abstract void PrivacyModeOff(); public abstract void PrivacyModeToggle(); + /// + /// Gets or sets the PrivacyModeIsOnFeedback + /// public BoolFeedback PrivacyModeIsOnFeedback { get; private set; } + /// + /// Gets or sets the MuteFeedback + /// public BoolFeedback MuteFeedback { get; private set; } public abstract void MuteOff(); @@ -113,6 +137,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public abstract void SetVolume(ushort level); + /// + /// Gets or sets the VolumeLevelFeedback + /// public IntFeedback VolumeLevelFeedback { get; private set; } public abstract void MuteToggle(); @@ -129,9 +156,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public abstract void StartSharing(); public abstract void StopSharing(); + /// + /// Gets or sets the AutoShareContentWhileInCall + /// public bool AutoShareContentWhileInCall { get; protected set; } + /// + /// Gets or sets the SharingSourceFeedback + /// public StringFeedback SharingSourceFeedback { get; private set; } + /// + /// Gets or sets the SharingContentIsOnFeedback + /// public BoolFeedback SharingContentIsOnFeedback { get; private set; } #endregion @@ -161,24 +197,33 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public abstract void AcceptCall(CodecActiveCallItem call); public abstract void RejectCall(CodecActiveCallItem call); public abstract void SendDtmf(string s); + /// + /// SendDtmf method + /// + /// public virtual void SendDtmf(string s, CodecActiveCallItem call) { } #endregion #region IRoutingInputsOutputs Members + /// + /// Gets or sets the InputPorts + /// public RoutingPortCollection InputPorts { get; private set; } + /// + /// Gets or sets the OutputPorts + /// public RoutingPortCollection OutputPorts { get; private set; } #endregion #region IUsageTracking Members - /// - /// This object can be added by outside users of this class to provide usage tracking - /// for various services - /// + /// + /// Gets or sets the UsageTracker + /// public UsageTracking UsageTracker { get; set; } #endregion @@ -192,6 +237,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public event EventHandler IsReadyChange; public abstract void Dial(Meeting meeting); + /// + /// Dial method + /// + /// public virtual void Dial(IInvitableContact contact) { } @@ -258,9 +307,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } // **** DEBUGGING THINGS **** - /// - /// - /// + /// + /// ListCalls method + /// + /// public virtual void ListCalls() { Debug.LogMessage(LogEventLevel.Debug, this, "Active Calls:"); @@ -879,6 +929,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set + /// + /// Gets or sets the MeetingsToDisplayFeedback + /// public IntFeedback MeetingsToDisplayFeedback { get; set; } private string UpdateMeetingsListXSig(List meetings) @@ -1874,9 +1927,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } - /// - /// Used to track the status of syncronizing the phonebook values when connecting to a codec or refreshing the phonebook info - /// + /// + /// Represents a CodecPhonebookSyncState + /// public class CodecPhonebookSyncState : IKeyed { private bool _InitialSyncComplete; @@ -1901,24 +1954,45 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } } + /// + /// Gets or sets the InitialPhonebookFoldersWasReceived + /// public bool InitialPhonebookFoldersWasReceived { get; private set; } + /// + /// Gets or sets the NumberOfContactsWasReceived + /// public bool NumberOfContactsWasReceived { get; private set; } + /// + /// Gets or sets the PhonebookRootEntriesWasRecieved + /// public bool PhonebookRootEntriesWasRecieved { get; private set; } + /// + /// Gets or sets the PhonebookHasFolders + /// public bool PhonebookHasFolders { get; private set; } + /// + /// Gets or sets the NumberOfContacts + /// public int NumberOfContacts { get; private set; } #region IKeyed Members + /// + /// Gets or sets the Key + /// public string Key { get; private set; } #endregion public event EventHandler InitialSyncCompleted; + /// + /// InitialPhonebookFoldersReceived method + /// public void InitialPhonebookFoldersReceived() { InitialPhonebookFoldersWasReceived = true; @@ -1926,6 +2000,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec CheckSyncStatus(); } + /// + /// PhonebookRootEntriesReceived method + /// public void PhonebookRootEntriesReceived() { PhonebookRootEntriesWasRecieved = true; @@ -1933,6 +2010,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec CheckSyncStatus(); } + /// + /// SetPhonebookHasFolders method + /// public void SetPhonebookHasFolders(bool value) { PhonebookHasFolders = value; @@ -1940,6 +2020,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec Debug.LogMessage(LogEventLevel.Debug, this, "Phonebook has folders: {0}", PhonebookHasFolders); } + /// + /// SetNumberOfContacts method + /// public void SetNumberOfContacts(int contacts) { NumberOfContacts = contacts; @@ -1950,6 +2033,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec CheckSyncStatus(); } + /// + /// CodecDisconnected method + /// public void CodecDisconnected() { InitialPhonebookFoldersWasReceived = false; @@ -1972,11 +2058,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } } /// - /// Represents a codec command that might need to have a friendly label applied for UI feedback purposes + /// Represents a CodecCommandWithLabel /// public class CodecCommandWithLabel { + /// + /// Gets or sets the Command + /// public string Command { get; private set; } + /// + /// Gets or sets the Label + /// public string Label { get; private set; } public CodecCommandWithLabel(string command, string label) diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs b/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs index e555f11f..ab60d3f7 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs @@ -3,23 +3,44 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.AppServer { + /// + /// Represents a SourceSelectMessageContent + /// public class SourceSelectMessageContent { [JsonProperty("sourceListItemKey")] + /// + /// Gets or sets the SourceListItemKey + /// public string SourceListItemKey { get; set; } [JsonProperty("sourceListKey")] + /// + /// Gets or sets the SourceListKey + /// public string SourceListKey { get; set; } } + /// + /// Represents a DirectRoute + /// public class DirectRoute { [JsonProperty("sourceKey")] + /// + /// Gets or sets the SourceKey + /// public string SourceKey { get; set; } [JsonProperty("destinationKey")] + /// + /// Gets or sets the DestinationKey + /// public string DestinationKey { get; set; } [JsonProperty("signalType")] + /// + /// Gets or sets the SignalType + /// public eRoutingSignalType SignalType { get; set; } } @@ -27,5 +48,8 @@ namespace PepperDash.Essentials.AppServer /// /// /// + /// + /// Delegate for PressAndHoldAction + /// public delegate void PressAndHoldAction(bool b); } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/DisplayBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/DisplayBaseMessenger.cs index cc09a637..349b8d58 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/DisplayBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/DisplayBaseMessenger.cs @@ -8,6 +8,9 @@ using DisplayBase = PepperDash.Essentials.Devices.Common.Displays.DisplayBase; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a DisplayBaseMessenger + /// public class DisplayBaseMessenger : MessengerBase { private readonly DisplayBase display; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs index 4ba89800..505fd214 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a IChannelMessenger + /// public class IChannelMessenger : MessengerBase { private readonly IChannel channelDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs index 86df2590..cef6111f 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a IColorMessenger + /// public class IColorMessenger : MessengerBase { private readonly IColor colorDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs index 4af07703..92c21a0b 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a IDPadMessenger + /// public class IDPadMessenger : MessengerBase { private readonly IDPad dpadDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs index 8e286979..f0ae426c 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a IDvrMessenger + /// public class IDvrMessenger : MessengerBase { private readonly IDvr dvrDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs index 39ed0e6f..864c20bf 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a IHasPowerMessenger + /// public class IHasPowerMessenger : MessengerBase { private readonly IHasPowerControl powerDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs index 69b5bc9d..d07331d2 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a INumericKeypadMessenger + /// public class INumericKeypadMessenger : MessengerBase { private readonly INumericKeypad keypadDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs index 0e7c227b..f87480bd 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a ISetTopBoxControlsMessenger + /// public class ISetTopBoxControlsMessenger : MessengerBase { private readonly ISetTopBoxControls stbDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs index 75f74418..0943fc0b 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Room.MobileControl { + /// + /// Represents a ITransportMessenger + /// public class ITransportMessenger : MessengerBase { private readonly ITransport transportDevice; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs index dd67a6fe..e2e16b3e 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs @@ -1,8 +1,8 @@ -using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using Newtonsoft.Json.Linq; using PepperDash.Essentials.Core; using PepperDash.Essentials.Devices.Common.Cameras; -using System; -using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { @@ -12,8 +12,8 @@ namespace PepperDash.Essentials.AppServer.Messengers public class CameraBaseMessenger : MessengerBase { /// - /// Device being bridged - /// + /// Gets or sets the Camera + /// public CameraBase Camera { get; set; } /// diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs index c588195e..6537b143 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs @@ -6,9 +6,9 @@ using System.Timers; namespace PepperDash.Essentials.AppServer.Messengers { - /// - /// Facilitates communication of device information by providing mechanisms for status updates and device - /// information reporting. + /// + /// Facilitates communication of device information by providing mechanisms for status updates and device + /// information reporting. /// /// The class integrates with an to manage device-specific information. It uses a debounce timer to limit the @@ -21,42 +21,42 @@ namespace PepperDash.Essentials.AppServer.Messengers private readonly Timer debounceTimer; - /// - /// Initializes a new instance of the class, which facilitates communication - /// of device information. - /// - /// The messenger uses a debounce timer to limit the frequency of certain operations. The - /// timer is initialized with a 1-second interval and is disabled by default. - /// A unique identifier for the messenger instance. - /// The path used for sending and receiving messages. + /// + /// Initializes a new instance of the class, which facilitates communication + /// of device information. + /// + /// The messenger uses a debounce timer to limit the frequency of certain operations. The + /// timer is initialized with a 1-second interval and is disabled by default. + /// A unique identifier for the messenger instance. + /// The path used for sending and receiving messages. /// An implementation of that provides device-specific information. public DeviceInfoMessenger(string key, string messagePath, IDeviceInfoProvider device) : base(key, messagePath, device as Device) { _deviceInfoProvider = device; - debounceTimer = new Timer(1000) - { - Enabled = false, - AutoReset = false + debounceTimer = new Timer(1000) + { + Enabled = false, + AutoReset = false }; debounceTimer.Elapsed += DebounceTimer_Elapsed; - } - - private void DebounceTimer_Elapsed(object sender, ElapsedEventArgs e) - { - PostStatusMessage(JToken.FromObject(new - { - deviceInfo = _deviceInfoProvider.DeviceInfo - })); - } - - /// - /// Registers actions and event handlers for device information updates and status reporting. - /// - /// This method sets up actions for handling device status updates and reporting full - /// device status. It also subscribes to the event to - /// trigger debounced updates when the device information changes. + } + + private void DebounceTimer_Elapsed(object sender, ElapsedEventArgs e) + { + PostStatusMessage(JToken.FromObject(new + { + deviceInfo = _deviceInfoProvider.DeviceInfo + })); + } + + /// + /// Registers actions and event handlers for device information updates and status reporting. + /// + /// This method sets up actions for handling device status updates and reporting full + /// device status. It also subscribes to the event to + /// trigger debounced updates when the device information changes. protected override void RegisterActions() { base.RegisterActions(); @@ -76,12 +76,15 @@ namespace PepperDash.Essentials.AppServer.Messengers } } - /// - /// Represents a message containing the state information of a device, including detailed device information. + /// + /// Represents a message containing the state information of a device, including detailed device information. /// /// This class is used to encapsulate the state of a device along with its associated /// information. It extends to provide additional details about the /// device. + /// + /// Represents a DeviceInfoStateMessage + /// public class DeviceInfoStateMessage : DeviceStateMessageBase { [JsonProperty("deviceInfo")] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs index 91b87a83..fb8ccef3 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs @@ -9,6 +9,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a DevicePresetsModelMessenger + /// public class DevicePresetsModelMessenger : MessengerBase { private readonly ITvPresetsProvider _presetsDevice; @@ -83,18 +86,33 @@ namespace PepperDash.Essentials.AppServer.Messengers #endregion } + /// + /// Represents a PresetChannelMessage + /// public class PresetChannelMessage { [JsonProperty("preset")] + /// + /// Gets or sets the Preset + /// public PresetChannel Preset; [JsonProperty("deviceKey")] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey; } + /// + /// Represents a PresetStateMessage + /// public class PresetStateMessage : DeviceStateMessageBase { [JsonProperty("favorites", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Favorites + /// public List Favorites { get; set; } = new List(); } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs index 22f837c3..b6c9b18e 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs @@ -7,6 +7,9 @@ using System; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a DeviceVolumeMessenger + /// public class DeviceVolumeMessenger : MessengerBase { private readonly IBasicVolumeWithFeedback _localDevice; @@ -142,12 +145,21 @@ namespace PepperDash.Essentials.AppServer.Messengers #endregion } + /// + /// Represents a VolumeStateMessage + /// public class VolumeStateMessage : DeviceStateMessageBase { [JsonProperty("volume", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Volume + /// public Volume Volume { get; set; } } + /// + /// Represents a Volume + /// public class Volume { [JsonProperty("level", NullValueHandling = NullValueHandling.Ignore)] @@ -160,9 +172,15 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? Muted { get; set; } [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Label + /// public string Label { get; set; } [JsonProperty("rawValue", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the RawValue + /// public string RawValue { get; set; } [JsonConverter(typeof(StringEnumConverter))] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs index 64624bfa..eb0611c7 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a GenericMessenger + /// public class GenericMessenger : MessengerBase { public GenericMessenger(string key, EssentialsDevice device, string messagePath) : base(key, messagePath, device) diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs index 5ab81832..9399aacb 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs @@ -6,6 +6,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a ICommunicationMonitorMessenger + /// public class ICommunicationMonitorMessenger : MessengerBase { private readonly ICommunicationMonitor _communicationMonitor; @@ -46,11 +49,14 @@ namespace PepperDash.Essentials.AppServer.Messengers } /// - /// Represents the state of the communication monitor + /// Represents a CommunicationMonitorState /// public class CommunicationMonitorState : DeviceStateMessageBase { [JsonProperty("commMonitor", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CommunicationMonitor + /// public CommunicationMonitorProps CommunicationMonitor { get; set; } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs index e40cd8eb..8096c4e9 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs @@ -5,6 +5,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IDspPresetsMessenger + /// public class IDspPresetsMessenger : MessengerBase { private readonly IDspPresets device; @@ -42,6 +45,9 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a IHasDspPresetsStateMessage + /// public class IHasDspPresetsStateMessage : DeviceStateMessageBase { [JsonProperty("presets")] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs index 1752b567..ab2ff259 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs @@ -8,10 +8,10 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { - /// - /// Provides messaging functionality for managing room combination scenarios and partition states in an instance. Enables external systems to interact with the room combiner via - /// predefined actions and status updates. + /// + /// Provides messaging functionality for managing room combination scenarios and partition states in an instance. Enables external systems to interact with the room combiner via + /// predefined actions and status updates. /// /// This class facilitates communication with an by /// exposing actions for toggling modes, managing partitions, and setting room combination scenarios. It also @@ -21,15 +21,15 @@ namespace PepperDash.Essentials.AppServer.Messengers { private readonly IEssentialsRoomCombiner _roomCombiner; - /// - /// Initializes a new instance of the class, which facilitates - /// messaging for an instance. - /// - /// This class is designed to enable communication and interaction with an through the specified messaging path. Ensure that the parameter is not null when creating an instance. - /// The unique key identifying this messenger instance. - /// The path used for messaging operations. + /// + /// Initializes a new instance of the class, which facilitates + /// messaging for an instance. + /// + /// This class is designed to enable communication and interaction with an through the specified messaging path. Ensure that the parameter is not null when creating an instance. + /// The unique key identifying this messenger instance. + /// The path used for messaging operations. /// The instance associated with this messenger. public IEssentialsRoomCombinerMessenger(string key, string messagePath, IEssentialsRoomCombiner roomCombiner) : base(key, messagePath, roomCombiner as IKeyName) @@ -37,8 +37,8 @@ namespace PepperDash.Essentials.AppServer.Messengers _roomCombiner = roomCombiner; } - /// - /// Registers actions and event handlers for managing room combination scenarios and partition states. + /// + /// Registers actions and event handlers for managing room combination scenarios and partition states. /// /// This method sets up various actions that can be triggered via specific endpoints, /// such as toggling modes, setting room combination scenarios, and managing partition states. It also @@ -152,54 +152,60 @@ namespace PepperDash.Essentials.AppServer.Messengers private class RoomCombinerRoom : IKeyName { [JsonProperty("key")] + /// + /// Gets or sets the Key + /// public string Key { get; set; } [JsonProperty("name")] + /// + /// Gets or sets the Name + /// public string Name { get; set; } } } - /// - /// Represents the state message for a room combiner system, providing information about the current configuration, - /// operational mode, and associated rooms, partitions, and scenarios. + /// + /// Represents the state message for a room combiner system, providing information about the current configuration, + /// operational mode, and associated rooms, partitions, and scenarios. /// /// This class is used to encapsulate the state of a room combiner system, including its current /// mode of operation, active room combination scenario, and the list of rooms and partitions involved. It is /// typically serialized and transmitted to communicate the state of the system. public class IEssentialsRoomCombinerStateMessage : DeviceStateMessageBase { - /// - /// Gets or sets a value indicating whether automatic mode is disabled. + /// + /// Gets or sets a value indicating whether automatic mode is disabled. /// [JsonProperty("disableAutoMode", NullValueHandling = NullValueHandling.Ignore)] public bool DisableAutoMode { get; set; } - /// - /// Gets or sets a value indicating whether the system is operating in automatic mode. + /// + /// Gets or sets a value indicating whether the system is operating in automatic mode. /// [JsonProperty("isInAutoMode", NullValueHandling = NullValueHandling.Ignore)] public bool IsInAutoMode { get; set; } - /// - /// Gets or sets the current room combination scenario. + /// + /// Gets or sets the current room combination scenario. /// [JsonProperty("currentScenario", NullValueHandling = NullValueHandling.Ignore)] public IRoomCombinationScenario CurrentScenario { get; set; } - /// - /// Gets or sets the collection of rooms associated with the entity. + /// + /// Gets or sets the collection of rooms associated with the entity. /// [JsonProperty("rooms", NullValueHandling = NullValueHandling.Ignore)] public List Rooms { get; set; } - /// - /// Gets or sets the collection of room combination scenarios. + /// + /// Gets or sets the collection of room combination scenarios. /// [JsonProperty("roomCombinationScenarios", NullValueHandling = NullValueHandling.Ignore)] public List RoomCombinationScenarios { get; set; } - /// - /// Gets or sets the collection of partition controllers. + /// + /// Gets or sets the collection of partition controllers. /// [JsonProperty("partitions", NullValueHandling = NullValueHandling.Ignore)] public List Partitions { get; set; } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs index 24f1f461..12a6bfec 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs @@ -5,6 +5,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IHasCurrentSourceInfoMessenger + /// public class IHasCurrentSourceInfoMessenger : MessengerBase { private readonly IHasCurrentSourceInfoChange sourceDevice; @@ -46,12 +49,21 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a CurrentSourceStateMessage + /// public class CurrentSourceStateMessage : DeviceStateMessageBase { [JsonProperty("currentSourceKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CurrentSourceKey + /// public string CurrentSourceKey { get; set; } [JsonProperty("currentSource")] + /// + /// Gets or sets the CurrentSource + /// public SourceListItem CurrentSource { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasInputsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasInputsMessenger.cs index 8eb693d5..bff3ca85 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasInputsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasInputsMessenger.cs @@ -7,6 +7,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IHasInputsMessenger + /// public class IHasInputsMessenger : MessengerBase { private readonly IHasInputs itemDevice; @@ -83,18 +86,30 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a IHasInputsStateMessage + /// public class IHasInputsStateMessage : DeviceStateMessageBase { [JsonProperty("inputs")] + /// + /// Gets or sets the Inputs + /// public Inputs Inputs { get; set; } } + /// + /// Represents a Inputs + /// public class Inputs { [JsonProperty("items")] public Dictionary Items { get; set; } [JsonProperty("currentItem")] + /// + /// Gets or sets the CurrentItem + /// public TKey CurrentItem { get; set; } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs index 7fb39c8c..66e97352 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs @@ -5,6 +5,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IHasPowerControlWithFeedbackMessenger + /// public class IHasPowerControlWithFeedbackMessenger : MessengerBase { private readonly IHasPowerControlWithFeedback _powerControl; @@ -15,6 +18,9 @@ namespace PepperDash.Essentials.AppServer.Messengers _powerControl = powerControl; } + /// + /// SendFullStatus method + /// public void SendFullStatus() { var messageObj = new PowerControlWithFeedbackStateMessage @@ -44,6 +50,9 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a PowerControlWithFeedbackStateMessage + /// public class PowerControlWithFeedbackStateMessage : DeviceStateMessageBase { [JsonProperty("powerState", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs index 80481470..6329a25c 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs @@ -7,8 +7,14 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IHasScheduleAwarenessMessenger + /// public class IHasScheduleAwarenessMessenger : MessengerBase { + /// + /// Gets or sets the ScheduleSource + /// public IHasScheduleAwareness ScheduleSource { get; private set; } public IHasScheduleAwarenessMessenger(string key, IHasScheduleAwareness scheduleSource, string messagePath) @@ -55,27 +61,51 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a FullScheduleMessage + /// public class FullScheduleMessage : DeviceStateMessageBase { [JsonProperty("meetings", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Meetings + /// public List Meetings { get; set; } [JsonProperty("meetingWarningMinutes", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the MeetingWarningMinutes + /// public int MeetingWarningMinutes { get; set; } } + /// + /// Represents a MeetingChangeMessage + /// public class MeetingChangeMessage { [JsonProperty("meetingChange", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the MeetingChange + /// public MeetingChange MeetingChange { get; set; } } + /// + /// Represents a MeetingChange + /// public class MeetingChange { [JsonProperty("changeType", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the ChangeType + /// public string ChangeType { get; set; } [JsonProperty("meeting", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Meeting + /// public Meeting Meeting { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs index c44ec9ae..4b274270 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs @@ -5,6 +5,9 @@ using System; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IHumiditySensorMessenger + /// public class IHumiditySensorMessenger : MessengerBase { private readonly IHumiditySensor device; @@ -35,9 +38,15 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a IHumiditySensorStateMessage + /// public class IHumiditySensorStateMessage : DeviceStateMessageBase { [JsonProperty("humidity")] + /// + /// Gets or sets the Humidity + /// public string Humidity { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs index 4fd3515a..946c0bfd 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs @@ -7,6 +7,9 @@ using System.Linq; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a ILevelControlsMessenger + /// public class ILevelControlsMessenger : MessengerBase { private ILevelControls levelControlsDevice; @@ -74,15 +77,24 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a LevelControlStateMessage + /// public class LevelControlStateMessage : DeviceStateMessageBase { [JsonProperty("levelControls")] public Dictionary Levels { get; set; } } + /// + /// Represents a LevelControlRequestMessage + /// public class LevelControlRequestMessage { [JsonProperty("key")] + /// + /// Gets or sets the Key + /// public string Key { get; set; } [JsonProperty("level", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IMatrixRoutingMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IMatrixRoutingMessenger.cs index 2a9669f1..c63bd0e4 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IMatrixRoutingMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IMatrixRoutingMessenger.cs @@ -82,6 +82,9 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a MatrixStateMessage + /// public class MatrixStateMessage : DeviceStateMessageBase { [JsonProperty("outputs")] @@ -91,6 +94,9 @@ namespace PepperDash.Essentials.AppServer.Messengers public Dictionary Inputs; } + /// + /// Represents a RoutingInput + /// public class RoutingInput { private IRoutingInputSlot _input; @@ -124,6 +130,9 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a RoutingOutput + /// public class RoutingOutput { private IRoutingOutputSlot _output; @@ -154,15 +163,27 @@ namespace PepperDash.Essentials.AppServer.Messengers public string Key => _output.Key; } + /// + /// Represents a MatrixRouteRequest + /// public class MatrixRouteRequest { [JsonProperty("outputKey")] + /// + /// Gets or sets the OutputKey + /// public string OutputKey { get; set; } [JsonProperty("inputKey")] + /// + /// Gets or sets the InputKey + /// public string InputKey { get; set; } [JsonProperty("routeType")] + /// + /// Gets or sets the RouteType + /// public eRoutingSignalType RouteType { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs index a66a8586..f0840b5f 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs @@ -7,6 +7,9 @@ using System; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IProjectorScreenLiftControlMessenger + /// public class IProjectorScreenLiftControlMessenger : MessengerBase { private readonly IProjectorScreenLiftControl device; @@ -63,16 +66,25 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a ScreenLiftStateMessage + /// public class ScreenLiftStateMessage : DeviceStateMessageBase { [JsonProperty("inUpPosition", NullValueHandling = NullValueHandling.Ignore)] public bool? InUpPosition { get; set; } [JsonProperty("displayDeviceKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DisplayDeviceKey + /// public string DisplayDeviceKey { get; set; } [JsonConverter(typeof(StringEnumConverter))] [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Type + /// public eScreenLiftControlType Type { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs index 8ca6668b..9bfb8b39 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs @@ -7,10 +7,13 @@ using System; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a RunRouteActionMessenger + /// public class RunRouteActionMessenger : MessengerBase { /// - /// Device being bridged + /// Gets or sets the RoutingDevice /// public IRunRouteAction RoutingDevice { get; private set; } @@ -76,9 +79,15 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a RoutingStateMessage + /// public class RoutingStateMessage : DeviceStateMessageBase { [JsonProperty("selectedSourceKey")] + /// + /// Gets or sets the SelectedSourceKey + /// public string SelectedSourceKey { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs index d7c4a59f..54f1e314 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs @@ -7,6 +7,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a ISelectableItemsMessenger + /// public class ISelectableItemsMessenger : MessengerBase { private readonly ISelectableItems itemDevice; @@ -83,12 +86,18 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a ISelectableItemsStateMessage + /// public class ISelectableItemsStateMessage : DeviceStateMessageBase { [JsonProperty("items")] public Dictionary Items { get; set; } [JsonProperty("currentItem")] + /// + /// Gets or sets the CurrentItem + /// public TKey CurrentItem { get; set; } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs index ca5fc3d3..600779f9 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs @@ -5,6 +5,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IShutdownPromptTimerMessenger + /// public class IShutdownPromptTimerMessenger : MessengerBase { private readonly IShutdownPromptTimer _room; @@ -79,15 +82,27 @@ namespace PepperDash.Essentials.AppServer.Messengers } + /// + /// Represents a IShutdownPromptTimerStateMessage + /// public class IShutdownPromptTimerStateMessage : DeviceStateMessageBase { [JsonProperty("secondsRemaining")] + /// + /// Gets or sets the SecondsRemaining + /// public int SecondsRemaining { get; set; } [JsonProperty("percentageRemaining")] + /// + /// Gets or sets the PercentageRemaining + /// public int PercentageRemaining { get; set; } [JsonProperty("shutdownPromptSeconds")] + /// + /// Gets or sets the ShutdownPromptSeconds + /// public int ShutdownPromptSeconds { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs index f49d189d..6efd182b 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs @@ -5,6 +5,9 @@ using System; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a ISwitchedOutputMessenger + /// public class ISwitchedOutputMessenger : MessengerBase { @@ -50,9 +53,15 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a ISwitchedOutputStateMessage + /// public class ISwitchedOutputStateMessage : DeviceStateMessageBase { [JsonProperty("isOn")] + /// + /// Gets or sets the IsOn + /// public bool IsOn { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs index 5b15d7ab..783bee7c 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs @@ -4,6 +4,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a ITechPasswordMessenger + /// public class ITechPasswordMessenger : MessengerBase { private readonly ITechPassword _room; @@ -64,12 +67,18 @@ namespace PepperDash.Essentials.AppServer.Messengers } + /// + /// Represents a ITechPasswordStateMessage + /// public class ITechPasswordStateMessage : DeviceStateMessageBase { [JsonProperty("techPasswordLength", NullValueHandling = NullValueHandling.Ignore)] public int? TechPasswordLength { get; set; } } + /// + /// Represents a ITechPasswordEventMessage + /// public class ITechPasswordEventMessage : DeviceEventMessageBase { [JsonProperty("isValid", NullValueHandling = NullValueHandling.Ignore)] @@ -79,9 +88,15 @@ namespace PepperDash.Essentials.AppServer.Messengers internal class SetTechPasswordContent { [JsonProperty("oldPassword")] + /// + /// Gets or sets the OldPassword + /// public string OldPassword { get; set; } [JsonProperty("newPassword")] + /// + /// Gets or sets the NewPassword + /// public string NewPassword { get; set; } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs index 6f7371c1..9f3b56eb 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs @@ -5,6 +5,9 @@ using System; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a ITemperatureSensorMessenger + /// public class ITemperatureSensorMessenger : MessengerBase { private readonly ITemperatureSensor device; @@ -50,12 +53,21 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a ITemperatureSensorStateMessage + /// public class ITemperatureSensorStateMessage : DeviceStateMessageBase { [JsonProperty("temperature")] + /// + /// Gets or sets the Temperature + /// public string Temperature { get; set; } [JsonProperty("temperatureInCelsius")] + /// + /// Gets or sets the TemperatureInCelsius + /// public bool TemperatureInCelsius { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs index 8ae91d36..9c0672fb 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs @@ -6,6 +6,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a ILightingScenesMessenger + /// public class ILightingScenesMessenger : MessengerBase { private ILightingScenes lightingScenesDevice; @@ -59,12 +62,21 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a LightingBaseStateMessage + /// public class LightingBaseStateMessage : DeviceStateMessageBase { [JsonProperty("scenes", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Scenes + /// public List Scenes { get; set; } [JsonProperty("currentLightingScene", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CurrentLightingScene + /// public LightingScene CurrentLightingScene { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs index c3a612bc..491ebb67 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs @@ -23,12 +23,15 @@ namespace PepperDash.Essentials.AppServer.Messengers public string DeviceKey => _device?.Key ?? ""; - /// - /// - /// + /// + /// Gets or sets the AppServerController + /// public IMobileControl AppServerController { get; private set; } + /// + /// Gets or sets the MessagePath + /// public string MessagePath { get; private set; } /// @@ -104,6 +107,9 @@ namespace PepperDash.Essentials.AppServer.Messengers _actions.Add(path, action); } + /// + /// GetActionPaths method + /// public List GetActionPaths() { return _actions.Keys.ToList(); @@ -243,6 +249,9 @@ namespace PepperDash.Essentials.AppServer.Messengers /// The device key /// [JsonProperty("key")] + /// + /// Gets or sets the Key + /// public string Key { get; set; } /// @@ -258,11 +267,14 @@ namespace PepperDash.Essentials.AppServer.Messengers public string MessageType => GetType().Name; [JsonProperty("messageBasePath")] + /// + /// Gets or sets the MessageBasePath + /// public string MessageBasePath { get; set; } } /// - /// Base class for state messages that includes the type of message and the implmented interfaces + /// Represents a DeviceStateMessageBase /// public class DeviceStateMessageBase : DeviceMessageBase { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs index 9ec2a4e4..46728dba 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs @@ -97,6 +97,9 @@ namespace PepperDash.Essentials.AppServer.Messengers return handler; } + /// + /// HandlePressAndHold method + /// public static void HandlePressAndHold(string deviceKey, JToken content, Action action) { var msg = content.ToObject>(); diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs index b8f5feff..f5c019d1 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs @@ -8,6 +8,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a RoomEventScheduleMessenger + /// public class RoomEventScheduleMessenger : MessengerBase { private readonly IRoomEventSchedule _room; @@ -68,9 +71,15 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a RoomEventScheduleStateMessage + /// public class RoomEventScheduleStateMessage : DeviceStateMessageBase { [JsonProperty("scheduleEvents")] + /// + /// Gets or sets the ScheduleEvents + /// public List ScheduleEvents { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLAtcMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLAtcMessenger.cs index 3222289a..f99390b6 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLAtcMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLAtcMessenger.cs @@ -8,10 +8,16 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { // ReSharper disable once InconsistentNaming + /// + /// Represents a SIMPLAtcMessenger + /// public class SIMPLAtcMessenger : MessengerBase { private readonly BasicTriList _eisc; + /// + /// Gets or sets the JoinMap + /// public SIMPLAtcJoinMap JoinMap { get; private set; } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLCameraMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLCameraMessenger.cs index bf4eb765..8443a9e0 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLCameraMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLCameraMessenger.cs @@ -10,6 +10,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { // ReSharper disable once InconsistentNaming + /// + /// Represents a SIMPLCameraMessenger + /// public class SIMPLCameraMessenger : MessengerBase { private readonly BasicTriList _eisc; @@ -80,6 +83,9 @@ namespace PepperDash.Essentials.AppServer.Messengers cameraAction(state.Value.Equals("true", StringComparison.InvariantCultureIgnoreCase)); } + /// + /// CustomUnregisterWithAppServer method + /// public void CustomUnregisterWithAppServer(IMobileControl appServerController) { appServerController.RemoveAction(MessagePath + "/fullStatus"); diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLDirectRouteMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLDirectRouteMessenger.cs index b0ddc47a..e4a5d2e7 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLDirectRouteMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLDirectRouteMessenger.cs @@ -6,10 +6,16 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a SimplDirectRouteMessenger + /// public class SimplDirectRouteMessenger : MessengerBase { private readonly BasicTriList _eisc; + /// + /// Gets or sets the JoinMap + /// public MobileControlSIMPLRunDirectRouteActionJoinMap JoinMap { get; private set; } public Dictionary DestinationList { get; set; } @@ -92,6 +98,9 @@ namespace PepperDash.Essentials.AppServer.Messengers )); } + /// + /// RegisterForDestinationPaths method + /// public void RegisterForDestinationPaths() { //handle routing feedback from SIMPL diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLRouteMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLRouteMessenger.cs index d6d59cc0..5995d437 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLRouteMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLRouteMessenger.cs @@ -7,12 +7,18 @@ using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a SIMPLRouteMessenger + /// public class SIMPLRouteMessenger : MessengerBase { private readonly BasicTriList _eisc; private readonly uint _joinStart; + /// + /// Represents a StringJoin + /// public class StringJoin { /// @@ -43,6 +49,9 @@ namespace PepperDash.Essentials.AppServer.Messengers }); } + /// + /// CustomUnregisterWithAppServer method + /// public void CustomUnregisterWithAppServer(IMobileControl appServerController) { appServerController.RemoveAction(MessagePath + "/fullStatus"); diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLVtcMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLVtcMessenger.cs index a9872285..6c5857e9 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLVtcMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SIMPLVtcMessenger.cs @@ -10,10 +10,16 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { // ReSharper disable once InconsistentNaming + /// + /// Represents a SIMPLVtcMessenger + /// public class SIMPLVtcMessenger : MessengerBase { private readonly BasicTriList _eisc; + /// + /// Gets or sets the JoinMap + /// public SIMPLVtcJoinMap JoinMap { get; private set; } private readonly CodecActiveCallItem _currentCallItem; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs index ff41670a..8a071409 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs @@ -5,6 +5,9 @@ using System; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a IShadesOpenCloseStopMessenger + /// public class IShadesOpenCloseStopMessenger : MessengerBase { private readonly IShadesOpenCloseStop device; @@ -86,9 +89,15 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a ShadeBaseStateMessage + /// public class ShadeBaseStateMessage : DeviceStateMessageBase { [JsonProperty("middleButtonLabel", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the MiddleButtonLabel + /// public string MiddleButtonLabel { get; set; } [JsonProperty("isOpen", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SimplMessengerPropertiesConfig.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SimplMessengerPropertiesConfig.cs index ce4db62d..dcde4562 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SimplMessengerPropertiesConfig.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SimplMessengerPropertiesConfig.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.AppServer.Messengers { /// - /// Properties to configure a SIMPL Messenger + /// Represents a SimplMessengerPropertiesConfig /// public class SimplMessengerPropertiesConfig : EiscApiPropertiesConfig.ApiDevicePropertiesConfig { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SystemMonitorMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SystemMonitorMessenger.cs index 2cb2ced0..0080153c 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SystemMonitorMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/SystemMonitorMessenger.cs @@ -8,6 +8,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a SystemMonitorMessenger + /// public class SystemMonitorMessenger : MessengerBase { private readonly SystemMonitorController systemMonitor; @@ -86,24 +89,45 @@ namespace PepperDash.Essentials.AppServer.Messengers } } + /// + /// Represents a SystemMonitorStateMessage + /// public class SystemMonitorStateMessage { [JsonProperty("timeZone", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the TimeZone + /// public int TimeZone { get; set; } [JsonProperty("timeZone", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the TimeZoneName + /// public string TimeZoneName { get; set; } [JsonProperty("timeZone", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the IoControllerVersion + /// public string IoControllerVersion { get; set; } [JsonProperty("timeZone", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the SnmpVersion + /// public string SnmpVersion { get; set; } [JsonProperty("timeZone", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the BacnetVersion + /// public string BacnetVersion { get; set; } [JsonProperty("timeZone", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the ControllerVersion + /// public string ControllerVersion { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs index f0600dd5..9bc4c12b 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs @@ -5,6 +5,9 @@ using PepperDash.Essentials.Devices.Common.Displays; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a TwoWayDisplayBaseMessenger + /// public class TwoWayDisplayBaseMessenger : MessengerBase { private readonly TwoWayDisplayBase _display; @@ -17,6 +20,9 @@ namespace PepperDash.Essentials.AppServer.Messengers #region Overrides of MessengerBase + /// + /// SendFullStatus method + /// public void SendFullStatus() { var messageObj = new TwoWayDisplayBaseStateMessage @@ -82,12 +88,18 @@ namespace PepperDash.Essentials.AppServer.Messengers #endregion } + /// + /// Represents a TwoWayDisplayBaseStateMessage + /// public class TwoWayDisplayBaseStateMessage : DeviceStateMessageBase { //[JsonProperty("powerState", NullValueHandling = NullValueHandling.Ignore)] //public bool? PowerState { get; set; } [JsonProperty("currentInput", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CurrentInput + /// public string CurrentInput { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs index 16cf642e..58300f55 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs @@ -923,7 +923,7 @@ namespace PepperDash.Essentials.AppServer.Messengers } /// - /// A class that represents the state data to be sent to the user app + /// Represents a VideoCodecBaseStateMessage /// public class VideoCodecBaseStateMessage : DeviceStateMessageBase { @@ -938,6 +938,9 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? CameraSelfViewIsOn { get; set; } [JsonProperty("cameras", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Cameras + /// public CameraStatus Cameras { get; set; } [JsonProperty("cameraSupportsAutoMode", NullValueHandling = NullValueHandling.Ignore)] @@ -947,12 +950,21 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? CameraSupportsOffMode { get; set; } [JsonProperty("currentDialString", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CurrentDialString + /// public string CurrentDialString { get; set; } [JsonProperty("currentDirectory", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CurrentDirectory + /// public CodecDirectory CurrentDirectory { get; set; } [JsonProperty("directorySelectedFolderName", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DirectorySelectedFolderName + /// public string DirectorySelectedFolderName { get; set; } [JsonProperty("hasCameras", NullValueHandling = NullValueHandling.Ignore)] @@ -974,6 +986,9 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? InitialPhonebookSyncComplete { get; set; } [JsonProperty("info", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Info + /// public VideoCodecInfo Info { get; set; } [JsonProperty("isInCall", NullValueHandling = NullValueHandling.Ignore)] @@ -986,9 +1001,15 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? IsZoomRoom { get; set; } [JsonProperty("meetingInfo", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the MeetingInfo + /// public MeetingInfo MeetingInfo { get; set; } [JsonProperty("presets", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Presets + /// public List Presets { get; set; } [JsonProperty("privacyModeIsOn", NullValueHandling = NullValueHandling.Ignore)] @@ -1004,6 +1025,9 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? SharingContentIsOn { get; set; } [JsonProperty("sharingSource", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the SharingSource + /// public string SharingSource { get; set; } [JsonProperty("showCamerasWhenNotInCall", NullValueHandling = NullValueHandling.Ignore)] @@ -1019,6 +1043,9 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? SupportsAdHocMeeting { get; set; } } + /// + /// Represents a CameraStatus + /// public class CameraStatus { [JsonProperty("cameraManualSupported", NullValueHandling = NullValueHandling.Ignore)] @@ -1031,30 +1058,54 @@ namespace PepperDash.Essentials.AppServer.Messengers public bool? CameraOffIsSupported { get; set; } [JsonProperty("cameraMode", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CameraMode + /// public string CameraMode { get; set; } [JsonProperty("cameraList", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Cameras + /// public List Cameras { get; set; } [JsonProperty("selectedCamera", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the SelectedCamera + /// public Camera SelectedCamera { get; set; } } + /// + /// Represents a Camera + /// public class Camera { [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Key + /// public string Key { get; set; } [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Name + /// public string Name { get; set; } [JsonProperty("isFarEnd", NullValueHandling = NullValueHandling.Ignore)] public bool? IsFarEnd { get; set; } [JsonProperty("capabilities", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Capabilities + /// public CameraCapabilities Capabilities { get; set; } } + /// + /// Represents a CameraCapabilities + /// public class CameraCapabilities { [JsonProperty("canPan", NullValueHandling = NullValueHandling.Ignore)] @@ -1071,22 +1122,40 @@ namespace PepperDash.Essentials.AppServer.Messengers } + /// + /// Represents a VideoCodecBaseEventMessage + /// public class VideoCodecBaseEventMessage : DeviceEventMessageBase { } + /// + /// Represents a PasswordPromptEventMessage + /// public class PasswordPromptEventMessage : VideoCodecBaseEventMessage { [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Message + /// public string Message { get; set; } [JsonProperty("lastAttemptWasIncorrect", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the LastAttemptWasIncorrect + /// public bool LastAttemptWasIncorrect { get; set; } [JsonProperty("loginAttemptFailed", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the LoginAttemptFailed + /// public bool LoginAttemptFailed { get; set; } [JsonProperty("loginAttemptCancelled", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the LoginAttemptCancelled + /// public bool LoginAttemptCancelled { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlMessage.cs b/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlMessage.cs index 6e92d9da..a7a072ba 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlMessage.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlMessage.cs @@ -4,15 +4,27 @@ using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a MobileControlMessage + /// public class MobileControlMessage : IMobileControlMessage { [JsonProperty("type")] + /// + /// Gets or sets the Type + /// public string Type { get; set; } [JsonProperty("clientId")] + /// + /// Gets or sets the ClientId + /// public string ClientId { get; set; } [JsonProperty("content")] + /// + /// Gets or sets the Content + /// public JToken Content { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlSimpleContent.cs b/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlSimpleContent.cs index 1d804758..71972fc3 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlSimpleContent.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/MobileControlSimpleContent.cs @@ -2,9 +2,15 @@ namespace PepperDash.Essentials.AppServer { + /// + /// Represents a MobileControlSimpleContent + /// public class MobileControlSimpleContent { [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Value + /// public T Value { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/PepperDash.Essentials.MobileControl.Messengers.csproj b/src/PepperDash.Essentials.MobileControl.Messengers/PepperDash.Essentials.MobileControl.Messengers.csproj index 8739c95b..d13d1a09 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/PepperDash.Essentials.MobileControl.Messengers.csproj +++ b/src/PepperDash.Essentials.MobileControl.Messengers/PepperDash.Essentials.MobileControl.Messengers.csproj @@ -22,6 +22,7 @@ pdbonly $(DefineConstants);SERIES4 + bin\$(Configuration)\mobile-control-messengers.xml diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs index fd6e8713..628a5322 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs @@ -4,6 +4,9 @@ namespace PepperDash.Essentials.AppServer { // ReSharper disable once InconsistentNaming + /// + /// Represents a MobileControlSIMPLRoomJoinMap + /// public class MobileControlSIMPLRoomJoinMap : JoinMapBaseAdvanced { [JoinName("QrCodeUrl")] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs index 10c516ee..0c1db58d 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.AppServer { + /// + /// Represents a MobileControlSIMPLRunDirectRouteActionJoinMap + /// public class MobileControlSIMPLRunDirectRouteActionJoinMap : JoinMapBaseAdvanced { [JoinName("AdvancedSharingModeFb")] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs index 0ec4de5a..beb1310d 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs @@ -3,6 +3,9 @@ namespace PepperDash.Essentials.AppServer { + /// + /// Represents a SIMPLAtcJoinMap + /// public class SIMPLAtcJoinMap : JoinMapBaseAdvanced { [JoinName("EndCall")] diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs index 69b32495..b53424bd 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs @@ -3,6 +3,9 @@ namespace PepperDash.Essentials.AppServer { + /// + /// Represents a SIMPLVtcJoinMap + /// public class SIMPLVtcJoinMap : JoinMapBaseAdvanced { [JoinName("EndCall")] diff --git a/src/PepperDash.Essentials.MobileControl/AuthorizationResponse.cs b/src/PepperDash.Essentials.MobileControl/AuthorizationResponse.cs index 4e4a4439..69684f47 100644 --- a/src/PepperDash.Essentials.MobileControl/AuthorizationResponse.cs +++ b/src/PepperDash.Essentials.MobileControl/AuthorizationResponse.cs @@ -2,18 +2,33 @@ namespace PepperDash.Essentials { + /// + /// Represents a AuthorizationResponse + /// public class AuthorizationResponse { [JsonProperty("authorized")] + /// + /// Gets or sets the Authorized + /// public bool Authorized { get; set; } [JsonProperty("reason", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Reason + /// public string Reason { get; set; } = null; } + /// + /// Represents a AuthorizationRequest + /// public class AuthorizationRequest { [JsonProperty("grantCode")] + /// + /// Gets or sets the GrantCode + /// public string GrantCode { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl/Interfaces.cs b/src/PepperDash.Essentials.MobileControl/Interfaces.cs index dc5552c6..2d191c89 100644 --- a/src/PepperDash.Essentials.MobileControl/Interfaces.cs +++ b/src/PepperDash.Essentials.MobileControl/Interfaces.cs @@ -3,9 +3,7 @@ namespace PepperDash.Essentials { /// - /// Represents a room whose configuration is derived from runtime data, - /// perhaps from another program, and that the data may not be fully - /// available at startup. + /// Defines the contract for IDelayedConfiguration /// public interface IDelayedConfiguration { diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlAction.cs b/src/PepperDash.Essentials.MobileControl/MobileControlAction.cs index 2f12f5bd..2e402dfb 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlAction.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlAction.cs @@ -4,8 +4,14 @@ using System; namespace PepperDash.Essentials { + /// + /// Represents a MobileControlAction + /// public class MobileControlAction : IMobileControlAction { + /// + /// Gets or sets the Messenger + /// public IMobileControlMessenger Messenger { get; private set; } public Action Action { get; private set; } diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlConfig.cs b/src/PepperDash.Essentials.MobileControl/MobileControlConfig.cs index af25f27a..80d90d1e 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlConfig.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlConfig.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace PepperDash.Essentials { /// - /// + /// Represents a MobileControlConfig /// public class MobileControlConfig { @@ -19,21 +19,39 @@ namespace PepperDash.Essentials public MobileControlDirectServerPropertiesConfig DirectServer { get; set; } [JsonProperty("applicationConfig")] + /// + /// Gets or sets the ApplicationConfig + /// public MobileControlApplicationConfig ApplicationConfig { get; set; } = null; [JsonProperty("enableApiServer")] + /// + /// Gets or sets the EnableApiServer + /// public bool EnableApiServer { get; set; } = true; } + /// + /// Represents a MobileControlDirectServerPropertiesConfig + /// public class MobileControlDirectServerPropertiesConfig { [JsonProperty("enableDirectServer")] + /// + /// Gets or sets the EnableDirectServer + /// public bool EnableDirectServer { get; set; } [JsonProperty("port")] + /// + /// Gets or sets the Port + /// public int Port { get; set; } [JsonProperty("logging")] + /// + /// Gets or sets the Logging + /// public MobileControlLoggingConfig Logging { get; set; } [JsonProperty("automaticallyForwardPortToCSLAN")] @@ -45,36 +63,60 @@ namespace PepperDash.Essentials } } + /// + /// Represents a MobileControlLoggingConfig + /// public class MobileControlLoggingConfig { [JsonProperty("enableRemoteLogging")] + /// + /// Gets or sets the EnableRemoteLogging + /// public bool EnableRemoteLogging { get; set; } [JsonProperty("host")] + /// + /// Gets or sets the Host + /// public string Host { get; set; } [JsonProperty("port")] + /// + /// Gets or sets the Port + /// public int Port { get; set; } } + /// + /// Represents a MobileControlRoomBridgePropertiesConfig + /// public class MobileControlRoomBridgePropertiesConfig { [JsonProperty("key")] + /// + /// Gets or sets the Key + /// public string Key { get; set; } [JsonProperty("roomKey")] + /// + /// Gets or sets the RoomKey + /// public string RoomKey { get; set; } } /// - /// + /// Represents a MobileControlSimplRoomBridgePropertiesConfig /// public class MobileControlSimplRoomBridgePropertiesConfig { [JsonProperty("eiscId")] + /// + /// Gets or sets the EiscId + /// public string EiscId { get; set; } } @@ -84,6 +126,9 @@ namespace PepperDash.Essentials public string ApiPath { get; set; } [JsonProperty("gatewayAppPath")] + /// + /// Gets or sets the GatewayAppPath + /// public string GatewayAppPath { get; set; } [JsonProperty("enableDev")] @@ -91,7 +136,7 @@ namespace PepperDash.Essentials [JsonProperty("logoPath")] /// - /// Client logo to be used in header and/or splash screen + /// Gets or sets the LogoPath /// public string LogoPath { get; set; } @@ -106,35 +151,68 @@ namespace PepperDash.Essentials public Dictionary Modes { get; set; } [JsonProperty("enableRemoteLogging")] + /// + /// Gets or sets the Logging + /// public bool Logging { get; set; } [JsonProperty("partnerMetadata", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the PartnerMetadata + /// public List PartnerMetadata { get; set; } } + /// + /// Represents a MobileControlPartnerMetadata + /// public class MobileControlPartnerMetadata { [JsonProperty("role")] + /// + /// Gets or sets the Role + /// public string Role { get; set; } [JsonProperty("description")] + /// + /// Gets or sets the Description + /// public string Description { get; set; } [JsonProperty("logoPath")] + /// + /// Gets or sets the LogoPath + /// public string LogoPath { get; set; } } + /// + /// Represents a McMode + /// public class McMode { [JsonProperty("listPageText")] + /// + /// Gets or sets the ListPageText + /// public string ListPageText { get; set; } [JsonProperty("loginHelpText")] + /// + /// Gets or sets the LoginHelpText + /// public string LoginHelpText { get; set; } [JsonProperty("passcodePageText")] + /// + /// Gets or sets the PasscodePageText + /// public string PasscodePageText { get; set; } } + /// + /// Enumeration of MCIconSet values + /// public enum MCIconSet { GOOGLE, diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs b/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs index 9fc8cc41..c4aa673b 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs @@ -10,6 +10,9 @@ using System.Linq; namespace PepperDash.Essentials { + /// + /// Represents a MobileControlDeviceFactory + /// public class MobileControlDeviceFactory : EssentialsDeviceFactory { public MobileControlDeviceFactory() @@ -17,6 +20,10 @@ namespace PepperDash.Essentials TypeNames = new List { "appserver", "mobilecontrol", "webserver" }; } + /// + /// BuildDevice method + /// + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { try diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs b/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs index 0ba33b6e..d27a8449 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; namespace PepperDash.Essentials { /// - /// Used to overlay additional config data from mobile control on + /// Represents a MobileControlEssentialsConfig /// public class MobileControlEssentialsConfig : EssentialsConfig { @@ -35,11 +35,14 @@ namespace PepperDash.Essentials } /// - /// Used to add any additional runtime information from mobile control to be send to the API + /// Represents a MobileControlRuntimeInfo /// public class MobileControlRuntimeInfo { [JsonProperty("pluginVersion")] + /// + /// Gets or sets the PluginVersion + /// public string PluginVersion { get; set; } [JsonProperty("essentialsVersion")] @@ -49,6 +52,9 @@ namespace PepperDash.Essentials public string PepperDashCoreVersion { get; set; } [JsonProperty("essentialsPlugins")] + /// + /// Gets or sets the EssentialsPlugins + /// public List EssentialsPlugins { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs index 58e4ed8a..7d4b0340 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs @@ -6,6 +6,9 @@ using System.Reflection; namespace PepperDash.Essentials { + /// + /// Represents a MobileControlFactory + /// public class MobileControlFactory { public MobileControlFactory() diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlSimplDeviceBridge.cs b/src/PepperDash.Essentials.MobileControl/MobileControlSimplDeviceBridge.cs index f1ebf628..eed41daa 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlSimplDeviceBridge.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlSimplDeviceBridge.cs @@ -6,7 +6,7 @@ using System; namespace PepperDash.Essentials.Room.MobileControl { /// - /// Represents a generic device connection through to and EISC for SIMPL01 + /// Represents a MobileControlSimplDeviceBridge /// public class MobileControlSimplDeviceBridge : Device, IChannel, INumericKeypad { @@ -24,31 +24,49 @@ namespace PepperDash.Essentials.Room.MobileControl #region IChannel Members + /// + /// ChannelUp method + /// public void ChannelUp(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// ChannelDown method + /// public void ChannelDown(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// LastChannel method + /// public void LastChannel(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Guide method + /// public void Guide(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Info method + /// public void Info(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Exit method + /// public void Exit(bool pressRelease) { _eisc.SetBool(1111, pressRelease); @@ -58,51 +76,81 @@ namespace PepperDash.Essentials.Room.MobileControl #region INumericKeypad Members + /// + /// Digit0 method + /// public void Digit0(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit1 method + /// public void Digit1(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit2 method + /// public void Digit2(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit3 method + /// public void Digit3(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit4 method + /// public void Digit4(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit5 method + /// public void Digit5(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit6 method + /// public void Digit6(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit7 method + /// public void Digit7(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit8 method + /// public void Digit8(bool pressRelease) { _eisc.SetBool(1111, pressRelease); } + /// + /// Digit9 method + /// public void Digit9(bool pressRelease) { _eisc.SetBool(1111, pressRelease); @@ -118,6 +166,9 @@ namespace PepperDash.Essentials.Room.MobileControl get { throw new NotImplementedException(); } } + /// + /// KeypadAccessoryButton1 method + /// public void KeypadAccessoryButton1(bool pressRelease) { throw new NotImplementedException(); @@ -133,6 +184,9 @@ namespace PepperDash.Essentials.Room.MobileControl get { throw new NotImplementedException(); } } + /// + /// KeypadAccessoryButton2 method + /// public void KeypadAccessoryButton2(bool pressRelease) { throw new NotImplementedException(); diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs index 9d2eaf96..fea28e01 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs @@ -40,6 +40,9 @@ using WebSocketSharp; namespace PepperDash.Essentials { + /// + /// Represents a MobileControlSystemController + /// public class MobileControlSystemController : EssentialsDevice, IMobileControl { private bool _initialized = false; @@ -70,6 +73,9 @@ namespace PepperDash.Essentials private bool _disableReconnect; private WebSocket _wsClient2; + /// + /// Gets or sets the ApiService + /// public MobileControlApiService ApiService { get; private set; } public List RoomBridges => _roomBridges; @@ -80,6 +86,9 @@ namespace PepperDash.Essentials private readonly CCriticalSection _wsCriticalSection = new CCriticalSection(); + /// + /// Gets or sets the SystemUrl + /// public string SystemUrl; //set only from SIMPL Bridge! public bool Connected => _wsClient2 != null && _wsClient2.IsAlive; @@ -117,6 +126,9 @@ namespace PepperDash.Essentials } } + /// + /// Gets or sets the ApiOnlineAndAuthorized + /// public BoolFeedback ApiOnlineAndAuthorized { get; private set; } /// @@ -1098,8 +1110,14 @@ namespace PepperDash.Essentials ); } + /// + /// Gets or sets the Config + /// public MobileControlConfig Config { get; private set; } + /// + /// Gets or sets the Host + /// public string Host { get; private set; } public string ClientAppUrl => Config.ClientAppUrl; @@ -1112,11 +1130,17 @@ namespace PepperDash.Essentials SendMessageObject(new MobileControlMessage { Type = "/system/roomCombinationChanged" }); } + /// + /// CheckForDeviceMessenger method + /// public bool CheckForDeviceMessenger(string key) { return _messengers.ContainsKey(key); } + /// + /// AddDeviceMessenger method + /// public void AddDeviceMessenger(IMobileControlMessenger messenger) { if (_messengers.ContainsKey(messenger.Key)) @@ -1190,6 +1214,10 @@ namespace PepperDash.Essentials messenger.RegisterWithAppServer(this); } + /// + /// Initialize method + /// + /// public override void Initialize() { foreach (var messenger in _messengers) @@ -1232,6 +1260,9 @@ namespace PepperDash.Essentials #region IMobileControl Members + /// + /// GetAppServer method + /// public static IMobileControl GetAppServer() { try @@ -1294,6 +1325,9 @@ namespace PepperDash.Essentials return true; } + /// + /// LinkSystemMonitorToAppServer method + /// public void LinkSystemMonitorToAppServer() { if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Appliance) @@ -1385,6 +1419,9 @@ namespace PepperDash.Essentials CleanUpWebsocketClient(); } + /// + /// PrintActionDictionaryPaths method + /// public void PrintActionDictionaryPaths(object o) { CrestronConsole.ConsoleCommandResponse("ActionDictionary Contents:\r\n"); @@ -1456,6 +1493,9 @@ namespace PepperDash.Essentials /// Removes an action from the dictionary /// /// + /// + /// RemoveAction method + /// public void RemoveAction(string key) { if (_actionDictionary.ContainsKey(key)) @@ -1469,6 +1509,9 @@ namespace PepperDash.Essentials return _roomBridges.FirstOrDefault((r) => r.RoomKey.Equals(key)); } + /// + /// GetRoomMessenger method + /// public IMobileControlRoomMessenger GetRoomMessenger(string key) { return _roomBridges.FirstOrDefault((r) => r.RoomKey.Equals(key)); @@ -1680,7 +1723,7 @@ Mobile Control Direct Server Infromation: } /// - /// Registers the room with the server + /// RegisterSystemToServer method /// public void RegisterSystemToServer() { @@ -1913,6 +1956,9 @@ Mobile Control Direct Server Infromation: SendMessageObject(msg); } + /// + /// GetConfigWithPluginVersion method + /// public MobileControlEssentialsConfig GetConfigWithPluginVersion() { // Populate the application name and version number @@ -1945,6 +1991,9 @@ Mobile Control Direct Server Infromation: return confObject; } + /// + /// SetClientUrl method + /// public void SetClientUrl(string path, string roomKey = null) { var message = new MobileControlMessage @@ -1960,6 +2009,9 @@ Mobile Control Direct Server Infromation: /// Sends any object type to server /// /// + /// + /// SendMessageObject method + /// public void SendMessageObject(IMobileControlMessage o) { @@ -1982,6 +2034,9 @@ Mobile Control Direct Server Infromation: } + /// + /// SendMessageObjectToDirectClient method + /// public void SendMessageObjectToDirectClient(object o) { if ( @@ -2180,6 +2235,9 @@ Mobile Control Direct Server Infromation: action(code.Value(), qrChecksum.Value()); } + /// + /// HandleClientMessage method + /// public void HandleClientMessage(string message) { _receiveQueue.Enqueue(new ProcessStringMessage(message, ParseStreamRx)); @@ -2343,6 +2401,9 @@ Mobile Control Direct Server Infromation: } } + /// + /// Represents a ClientSpecificUpdateRequest + /// public class ClientSpecificUpdateRequest { public ClientSpecificUpdateRequest(Action action) @@ -2350,9 +2411,15 @@ Mobile Control Direct Server Infromation: ResponseMethod = action; } + /// + /// Gets or sets the ResponseMethod + /// public Action ResponseMethod { get; private set; } } + /// + /// Represents a UserCodeChanged + /// public class UserCodeChanged { public Action UpdateUserCode { get; private set; } diff --git a/src/PepperDash.Essentials.MobileControl/PepperDash.Essentials.MobileControl.csproj b/src/PepperDash.Essentials.MobileControl/PepperDash.Essentials.MobileControl.csproj index 1e887728..235e0899 100644 --- a/src/PepperDash.Essentials.MobileControl/PepperDash.Essentials.MobileControl.csproj +++ b/src/PepperDash.Essentials.MobileControl/PepperDash.Essentials.MobileControl.csproj @@ -25,6 +25,7 @@ pdbonly TRACE;SERIES4 + bin\$(Configuration)\epi-essentials-mobile-control.xml diff --git a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs index c005ca17..ac1a851c 100644 --- a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs +++ b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs @@ -20,15 +20,33 @@ namespace PepperDash.Essentials.RoomBridges public event EventHandler AppUrlChanged; + /// + /// Gets or sets the Parent + /// public IMobileControl Parent { get; private set; } + /// + /// Gets or sets the AppUrl + /// public string AppUrl { get; private set; } + /// + /// Gets or sets the UserCode + /// public string UserCode { get; private set; } + /// + /// Gets or sets the QrCodeUrl + /// public string QrCodeUrl { get; protected set; } + /// + /// Gets or sets the QrCodeChecksum + /// public string QrCodeChecksum { get; protected set; } + /// + /// Gets or sets the McServerUrl + /// public string McServerUrl { get; private set; } public abstract string RoomName { get; } @@ -50,6 +68,9 @@ namespace PepperDash.Essentials.RoomBridges /// as adding actions to parent /// /// + /// + /// AddParent method + /// public virtual void AddParent(IMobileControl parent) { Parent = parent; @@ -62,6 +83,9 @@ namespace PepperDash.Essentials.RoomBridges /// fire method UserCodeChange. Override that to handle changes /// /// + /// + /// SetUserCode method + /// public void SetUserCode(string code) { var changed = UserCode != code; diff --git a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs index 9009c4cc..a3485aec 100644 --- a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs +++ b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs @@ -25,11 +25,20 @@ using ShadeBase = PepperDash.Essentials.Devices.Common.Shades.ShadeBase; namespace PepperDash.Essentials.RoomBridges { + /// + /// Represents a MobileControlEssentialsRoomBridge + /// public class MobileControlEssentialsRoomBridge : MobileControlBridgeBase { private List _touchPanelTokens = new List(); + /// + /// Gets or sets the Room + /// public IEssentialsRoom Room { get; private set; } + /// + /// Gets or sets the DefaultRoomKey + /// public string DefaultRoomKey { get; private set; } /// /// @@ -292,6 +301,10 @@ namespace PepperDash.Essentials.RoomBridges /// Override of base: calls base to add parent and then registers actions and events. /// /// + /// + /// AddParent method + /// + /// public override void AddParent(MobileControlSystemController parent) { base.AddParent(parent); @@ -780,9 +793,15 @@ namespace PepperDash.Essentials.RoomBridges } + /// + /// Represents a RoomStateMessage + /// public class RoomStateMessage : DeviceStateMessageBase { [JsonProperty("configuration", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Configuration + /// public RoomConfiguration Configuration { get; set; } [JsonProperty("activityMode", NullValueHandling = NullValueHandling.Ignore)] @@ -796,8 +815,14 @@ namespace PepperDash.Essentials.RoomBridges [JsonProperty("isCoolingDown", NullValueHandling = NullValueHandling.Ignore)] public bool? IsCoolingDown { get; set; } [JsonProperty("selectedSourceKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the SelectedSourceKey + /// public string SelectedSourceKey { get; set; } [JsonProperty("share", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Share + /// public ShareState Share { get; set; } [JsonProperty("volumes", NullValueHandling = NullValueHandling.Ignore)] @@ -807,9 +832,15 @@ namespace PepperDash.Essentials.RoomBridges public bool? IsInCall { get; set; } } + /// + /// Represents a ShareState + /// public class ShareState { [JsonProperty("currentShareText", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CurrentShareText + /// public string CurrentShareText { get; set; } [JsonProperty("enabled", NullValueHandling = NullValueHandling.Ignore)] public bool? Enabled { get; set; } @@ -818,7 +849,7 @@ namespace PepperDash.Essentials.RoomBridges } /// - /// Represents the capabilities of the room and the associated device info + /// Represents a RoomConfiguration /// public class RoomConfiguration { @@ -841,32 +872,62 @@ namespace PepperDash.Essentials.RoomBridges public bool? HasRoutingControls { get; set; } [JsonProperty("touchpanelKeys", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the TouchpanelKeys + /// public List TouchpanelKeys { get; set; } [JsonProperty("zoomRoomControllerKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the ZoomRoomControllerKey + /// public string ZoomRoomControllerKey { get; set; } [JsonProperty("ciscoNavigatorKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the CiscoNavigatorKey + /// public string CiscoNavigatorKey { get; set; } [JsonProperty("videoCodecKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the VideoCodecKey + /// public string VideoCodecKey { get; set; } [JsonProperty("audioCodecKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the AudioCodecKey + /// public string AudioCodecKey { get; set; } [JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the MatrixRoutingKey + /// public string MatrixRoutingKey { get; set; } [JsonProperty("endpointKeys", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the EndpointKeys + /// public List EndpointKeys { get; set; } [JsonProperty("accessoryDeviceKeys", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the AccessoryDeviceKeys + /// public List AccessoryDeviceKeys { get; set; } [JsonProperty("defaultDisplayKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DefaultDisplayKey + /// public string DefaultDisplayKey { get; set; } [JsonProperty("destinations", NullValueHandling = NullValueHandling.Ignore)] public Dictionary Destinations { get; set; } [JsonProperty("environmentalDevices", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the EnvironmentalDevices + /// public List EnvironmentalDevices { get; set; } [JsonProperty("sourceList", NullValueHandling = NullValueHandling.Ignore)] public Dictionary SourceList { get; set; } @@ -875,22 +936,37 @@ namespace PepperDash.Essentials.RoomBridges public Dictionary DestinationList { get; set; } [JsonProperty("audioControlPointList", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the AudioControlPointList + /// public AudioControlPointListItem AudioControlPointList { get; set; } [JsonProperty("cameraList", NullValueHandling = NullValueHandling.Ignore)] public Dictionary CameraList { get; set; } [JsonProperty("defaultPresentationSourceKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DefaultPresentationSourceKey + /// public string DefaultPresentationSourceKey { get; set; } [JsonProperty("helpMessage", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the HelpMessage + /// public string HelpMessage { get; set; } [JsonProperty("techPassword", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the TechPassword + /// public string TechPassword { get; set; } [JsonProperty("uiBehavior", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the UiBehavior + /// public EssentialsRoomUiBehaviorConfig UiBehavior { get; set; } [JsonProperty("supportsAdvancedSharing", NullValueHandling = NullValueHandling.Ignore)] @@ -899,6 +975,9 @@ namespace PepperDash.Essentials.RoomBridges public bool? UserCanChangeShareMode { get; set; } [JsonProperty("roomCombinerKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the RoomCombinerKey + /// public string RoomCombinerKey { get; set; } public RoomConfiguration() @@ -910,13 +989,22 @@ namespace PepperDash.Essentials.RoomBridges } } + /// + /// Represents a EnvironmentalDeviceConfiguration + /// public class EnvironmentalDeviceConfiguration { [JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DeviceKey + /// public string DeviceKey { get; private set; } [JsonConverter(typeof(StringEnumConverter))] [JsonProperty("deviceType", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the DeviceType + /// public eEnvironmentalDeviceTypes DeviceType { get; private set; } public EnvironmentalDeviceConfiguration(string key, eEnvironmentalDeviceTypes type) @@ -926,6 +1014,9 @@ namespace PepperDash.Essentials.RoomBridges } } + /// + /// Enumeration of eEnvironmentalDeviceTypes values + /// public enum eEnvironmentalDeviceTypes { None, @@ -935,25 +1026,52 @@ namespace PepperDash.Essentials.RoomBridges Relay, } + /// + /// Represents a ApiTouchPanelToken + /// public class ApiTouchPanelToken { [JsonProperty("touchPanels", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the TouchPanels + /// public List TouchPanels { get; set; } = new List(); [JsonProperty("userAppUrl", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the UserAppUrl + /// public string UserAppUrl { get; set; } = ""; } #if SERIES3 + /// + /// Represents a SourceSelectMessageContent + /// public class SourceSelectMessageContent { + /// + /// Gets or sets the SourceListItem + /// public string SourceListItem { get; set; } + /// + /// Gets or sets the SourceListKey + /// public string SourceListKey { get; set; } } + /// + /// Represents a DirectRoute + /// public class DirectRoute { + /// + /// Gets or sets the SourceKey + /// public string SourceKey { get; set; } + /// + /// Gets or sets the DestinationKey + /// public string DestinationKey { get; set; } } @@ -961,6 +1079,9 @@ namespace PepperDash.Essentials.RoomBridges /// /// /// + /// + /// Delegate for PressAndHoldAction + /// public delegate void PressAndHoldAction(bool b); #endif } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlSIMPLRoomBridge.cs b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlSIMPLRoomBridge.cs index ce1864b6..85f29983 100644 --- a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlSIMPLRoomBridge.cs +++ b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlSIMPLRoomBridge.cs @@ -21,6 +21,9 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Room.MobileControl { // ReSharper disable once InconsistentNaming + /// + /// Represents a MobileControlSIMPLRoomBridge + /// public class MobileControlSIMPLRoomBridge : MobileControlBridgeBase, IDelayedConfiguration { private const int SupportedDisplayCount = 10; @@ -30,18 +33,25 @@ namespace PepperDash.Essentials.Room.MobileControl /// public event EventHandler ConfigurationIsReady; + /// + /// Gets or sets the Eisc + /// public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; } + /// + /// Gets or sets the JoinMap + /// public MobileControlSIMPLRoomJoinMap JoinMap { get; private set; } public Dictionary DeviceMessengers { get; private set; } /// - /// + /// Gets or sets the ConfigIsLoaded /// public bool ConfigIsLoaded { get; private set; } + /// public override string RoomName { get @@ -51,6 +61,7 @@ namespace PepperDash.Essentials.Room.MobileControl } } + /// public override string RoomKey { get { return "room1"; } @@ -127,6 +138,9 @@ namespace PepperDash.Essentials.Room.MobileControl /// parent controller and link them up. /// /// + /// + /// CustomActivate method + /// public override bool CustomActivate() { Debug.Console(0, this, "Final activation. Setting up actions and feedbacks"); diff --git a/src/PepperDash.Essentials.MobileControl/RoomBridges/SourceDeviceMapDictionary.cs b/src/PepperDash.Essentials.MobileControl/RoomBridges/SourceDeviceMapDictionary.cs index 84a024a8..30a9065c 100644 --- a/src/PepperDash.Essentials.MobileControl/RoomBridges/SourceDeviceMapDictionary.cs +++ b/src/PepperDash.Essentials.MobileControl/RoomBridges/SourceDeviceMapDictionary.cs @@ -3,7 +3,7 @@ namespace PepperDash.Essentials.Room.MobileControl { /// - /// Contains all of the default joins that map to API funtions + /// Represents a SourceDeviceMapDictionary /// public class SourceDeviceMapDictionary : Dictionary { diff --git a/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs b/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs index 262c7e07..4a84f8f1 100644 --- a/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs +++ b/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.Services { + /// + /// Represents a MobileControlApiService + /// public class MobileControlApiService { private readonly HttpClient _client; diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs index 7dc4ae16..e5ba76cf 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs @@ -2,6 +2,9 @@ namespace PepperDash.Essentials.Touchpanel { + /// + /// Defines the contract for ITheme + /// public interface ITheme : IKeyed { string Theme { get; } diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs index 814b51c6..3beb92c5 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs @@ -3,6 +3,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Touchpanel { + /// + /// Defines the contract for ITswAppControl + /// public interface ITswAppControl : IKeyed { BoolFeedback AppOpenFeedback { get; } @@ -14,6 +17,9 @@ namespace PepperDash.Essentials.Touchpanel void OpenApp(); } + /// + /// Defines the contract for ITswZoomControl + /// public interface ITswZoomControl : IKeyed { BoolFeedback ZoomIncomingCallFeedback { get; } diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs index 19e04775..f9581c74 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs @@ -6,6 +6,9 @@ using PepperDash.Essentials.AppServer.Messengers; namespace PepperDash.Essentials.Touchpanel { + /// + /// Represents a ITswAppControlMessenger + /// public class ITswAppControlMessenger : MessengerBase { private readonly ITswAppControl _appControl; @@ -51,6 +54,9 @@ namespace PepperDash.Essentials.Touchpanel } } + /// + /// Represents a TswAppStateMessage + /// public class TswAppStateMessage : DeviceStateMessageBase { [JsonProperty("appOpen", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs index cbd4f6a2..48c7fb7f 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs @@ -7,6 +7,9 @@ using PepperDash.Essentials.AppServer.Messengers; namespace PepperDash.Essentials.Touchpanel { + /// + /// Represents a ITswZoomControlMessenger + /// public class ITswZoomControlMessenger : MessengerBase { private readonly ITswZoomControl _zoomControl; @@ -62,6 +65,9 @@ namespace PepperDash.Essentials.Touchpanel } } + /// + /// Represents a TswZoomStateMessage + /// public class TswZoomStateMessage : DeviceStateMessageBase { [JsonProperty("inCall", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs index 53f600ef..ab059244 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs @@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Touchpanel private string _appUrl; /// - /// Gets feedback for the current application URL. + /// Gets or sets the AppUrlFeedback /// public StringFeedback AppUrlFeedback { get; private set; } @@ -65,12 +65,12 @@ namespace PepperDash.Essentials.Touchpanel public BoolFeedback ZoomInCallFeedback => _zoomInCallFeedback; /// - /// Gets the collection of feedback objects for this touchpanel controller. + /// Gets or sets the Feedbacks /// public FeedbackCollection Feedbacks { get; private set; } /// - /// Gets the collection of Zoom-related feedback objects. + /// Gets or sets the ZoomFeedbacks /// public FeedbackCollection ZoomFeedbacks { get; private set; } @@ -95,7 +95,7 @@ namespace PepperDash.Essentials.Touchpanel public string Theme => localConfig.Theme; /// - /// Gets feedback for the current theme setting. + /// Gets or sets the ThemeFeedback /// public StringFeedback ThemeFeedback { get; private set; } @@ -188,6 +188,9 @@ namespace PepperDash.Essentials.Touchpanel /// Updates the theme setting for this touchpanel controller and persists the change to configuration. /// /// The new theme identifier to apply. + /// + /// UpdateTheme method + /// public void UpdateTheme(string theme) { localConfig.Theme = theme; @@ -325,6 +328,9 @@ namespace PepperDash.Essentials.Touchpanel /// registering messengers and linking to mobile control. /// /// True if activation was successful; otherwise, false. + /// + /// CustomActivate method + /// public override bool CustomActivate() { var appMessenger = new ITswAppControlMessenger($"appControlMessenger-{Key}", $"/device/{Key}", this); @@ -432,6 +438,9 @@ namespace PepperDash.Essentials.Touchpanel /// Sets the application URL and updates the corresponding feedback. /// /// The new application URL to set. + /// + /// SetAppUrl method + /// public void SetAppUrl(string url) { _appUrl = url; @@ -458,7 +467,7 @@ namespace PepperDash.Essentials.Touchpanel } /// - /// Hides the currently open application on the touchpanel. + /// HideOpenApp method /// public void HideOpenApp() { @@ -476,7 +485,7 @@ namespace PepperDash.Essentials.Touchpanel } /// - /// Opens an application on the touchpanel. Note: X60 panels do not support Zoom app opening. + /// OpenApp method /// public void OpenApp() { @@ -494,7 +503,7 @@ namespace PepperDash.Essentials.Touchpanel } /// - /// Closes the currently open application on the touchpanel. + /// CloseOpenApp method /// public void CloseOpenApp() { @@ -512,7 +521,7 @@ namespace PepperDash.Essentials.Touchpanel } /// - /// Ends the current Zoom call on the touchpanel. + /// EndZoomCall method /// public void EndZoomCall() { @@ -530,8 +539,7 @@ namespace PepperDash.Essentials.Touchpanel } /// - /// Updates the device information (MAC address and IP address) from the touchpanel - /// and raises the DeviceInfoChanged event. + /// UpdateDeviceInfo method /// public void UpdateDeviceInfo() { @@ -570,8 +578,7 @@ namespace PepperDash.Essentials.Touchpanel } /// - /// Factory class for creating MobileControlTouchpanelController instances from device configuration. - /// Supports various Crestron touchpanel models including TSW, TS, CrestronApp, XPanel, and DGE series. + /// Represents a MobileControlTouchpanelControllerFactory /// public class MobileControlTouchpanelControllerFactory : EssentialsPluginDeviceFactory { @@ -590,6 +597,9 @@ namespace PepperDash.Essentials.Touchpanel /// /// The device configuration containing the device properties and settings. /// A configured MobileControlTouchpanelController instance. + /// + /// BuildDevice method + /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { var comm = CommFactory.GetControlPropertiesConfig(dc); diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs index 87f6d9a9..c99abe31 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs @@ -3,18 +3,33 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Touchpanel { + /// + /// Represents a MobileControlTouchpanelProperties + /// public class MobileControlTouchpanelProperties : CrestronTouchpanelPropertiesConfig { [JsonProperty("useDirectServer")] + /// + /// Gets or sets the UseDirectServer + /// public bool UseDirectServer { get; set; } = false; [JsonProperty("zoomRoomController")] + /// + /// Gets or sets the ZoomRoomController + /// public bool ZoomRoomController { get; set; } = false; [JsonProperty("buttonToolbarTimeoutInS")] + /// + /// Gets or sets the ButtonToolbarTimoutInS + /// public ushort ButtonToolbarTimoutInS { get; set; } = 0; [JsonProperty("theme")] + /// + /// Gets or sets the Theme + /// public string Theme { get; set; } = "light"; } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs index ab48b60a..133cf0c8 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs @@ -6,6 +6,9 @@ using PepperDash.Essentials.AppServer.Messengers; namespace PepperDash.Essentials.Touchpanel { + /// + /// Represents a ThemeMessenger + /// public class ThemeMessenger : MessengerBase { private readonly ITheme _tpDevice; @@ -34,9 +37,15 @@ namespace PepperDash.Essentials.Touchpanel } } + /// + /// Represents a ThemeUpdateMessage + /// public class ThemeUpdateMessage : DeviceStateMessageBase { [JsonProperty("theme")] + /// + /// Gets or sets the Theme + /// public string Theme { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs b/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs index b9ca686b..38f7944f 100644 --- a/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs +++ b/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs @@ -12,6 +12,9 @@ using WebSocketSharp; namespace PepperDash.Essentials { + /// + /// Represents a TransmitMessage + /// public class TransmitMessage : IQueueMessage { private readonly WebSocket _ws; @@ -31,6 +34,9 @@ namespace PepperDash.Essentials #region Implementation of IQueueMessage + /// + /// Dispatch method + /// public void Dispatch() { try @@ -67,6 +73,9 @@ namespace PepperDash.Essentials + /// + /// Represents a MessageToClients + /// public class MessageToClients : IQueueMessage { private readonly MobileControlWebsocketServer _server; @@ -86,6 +95,9 @@ namespace PepperDash.Essentials #region Implementation of IQueueMessage + /// + /// Dispatch method + /// public void Dispatch() { try diff --git a/src/PepperDash.Essentials.MobileControl/UserCodeChangedContent.cs b/src/PepperDash.Essentials.MobileControl/UserCodeChangedContent.cs index 851f1b80..1dd3ff97 100644 --- a/src/PepperDash.Essentials.MobileControl/UserCodeChangedContent.cs +++ b/src/PepperDash.Essentials.MobileControl/UserCodeChangedContent.cs @@ -2,12 +2,21 @@ namespace PepperDash.Essentials { + /// + /// Represents a UserCodeChangedContent + /// public class UserCodeChangedContent { [JsonProperty("userCode")] + /// + /// Gets or sets the UserCode + /// public string UserCode { get; set; } [JsonProperty("qrChecksum", NullValueHandling = NullValueHandling.Include)] + /// + /// Gets or sets the QrChecksum + /// public string QrChecksum { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl/Volumes.cs b/src/PepperDash.Essentials.MobileControl/Volumes.cs index 6cd83cf4..1de5078e 100644 --- a/src/PepperDash.Essentials.MobileControl/Volumes.cs +++ b/src/PepperDash.Essentials.MobileControl/Volumes.cs @@ -3,9 +3,15 @@ using System.Collections.Generic; namespace PepperDash.Essentials { + /// + /// Represents a Volumes + /// public class Volumes { [JsonProperty("master", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Master + /// public Volume Master { get; set; } [JsonProperty("auxFaders", NullValueHandling = NullValueHandling.Ignore)] @@ -19,9 +25,15 @@ namespace PepperDash.Essentials } } + /// + /// Represents a Volume + /// public class Volume { [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Key + /// public string Key { get; set; } [JsonProperty("level", NullValueHandling = NullValueHandling.Ignore)] @@ -31,6 +43,9 @@ namespace PepperDash.Essentials public bool? Muted { get; set; } [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Label + /// public string Label { get; set; } [JsonProperty("hasMute", NullValueHandling = NullValueHandling.Ignore)] @@ -44,6 +59,9 @@ namespace PepperDash.Essentials [JsonProperty("muteIcon", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the MuteIcon + /// public string MuteIcon { get; set; } public Volume(string key, int level, bool muted, string label, bool hasMute, string muteIcon) diff --git a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/ActionPathsHandler.cs b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/ActionPathsHandler.cs index 2988241b..14fa3568 100644 --- a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/ActionPathsHandler.cs +++ b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/ActionPathsHandler.cs @@ -6,6 +6,9 @@ using System.Linq; namespace PepperDash.Essentials.WebApiHandlers { + /// + /// Represents a ActionPathsHandler + /// public class ActionPathsHandler : WebApiBaseRequestHandler { private readonly MobileControlSystemController mcController; @@ -26,6 +29,9 @@ namespace PepperDash.Essentials.WebApiHandlers } } + /// + /// Represents a ActionPathsResponse + /// public class ActionPathsResponse { [JsonIgnore] @@ -40,12 +46,21 @@ namespace PepperDash.Essentials.WebApiHandlers } } + /// + /// Represents a ActionPath + /// public class ActionPath { [JsonProperty("messengerKey")] + /// + /// Gets or sets the MessengerKey + /// public string MessengerKey { get; set; } [JsonProperty("path")] + /// + /// Gets or sets the Path + /// public string Path { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs index 4f2774f4..352c56e5 100644 --- a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs +++ b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs @@ -8,6 +8,9 @@ using System.Threading.Tasks; namespace PepperDash.Essentials.WebApiHandlers { + /// + /// Represents a MobileAuthRequestHandler + /// public class MobileAuthRequestHandler : WebApiBaseRequestAsyncHandler { private readonly MobileControlSystemController mcController; diff --git a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs index c8b97d0b..d123dbcd 100644 --- a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs +++ b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs @@ -10,6 +10,9 @@ using System.Linq; namespace PepperDash.Essentials.WebApiHandlers { + /// + /// Represents a MobileInfoHandler + /// public class MobileInfoHandler : WebApiBaseRequestHandler { private readonly MobileControlSystemController mcController; @@ -39,6 +42,9 @@ namespace PepperDash.Essentials.WebApiHandlers } } + /// + /// Represents a InformationResponse + /// public class InformationResponse { [JsonIgnore] @@ -58,6 +64,9 @@ namespace PepperDash.Essentials.WebApiHandlers } } + /// + /// Represents a MobileControlEdgeServer + /// public class MobileControlEdgeServer { [JsonIgnore] @@ -87,6 +96,9 @@ namespace PepperDash.Essentials.WebApiHandlers } } + /// + /// Represents a MobileControlDirectServer + /// public class MobileControlDirectServer { [JsonIgnore] @@ -113,6 +125,9 @@ namespace PepperDash.Essentials.WebApiHandlers } } + /// + /// Represents a MobileControlDirectClient + /// public class MobileControlDirectClient { [JsonIgnore] diff --git a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs index 73fdb104..6826092b 100644 --- a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs +++ b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs @@ -8,6 +8,9 @@ using Serilog.Events; namespace PepperDash.Essentials.WebApiHandlers { + /// + /// Represents a UiClientHandler + /// public class UiClientHandler : WebApiBaseRequestHandler { private readonly MobileControlWebsocketServer server; @@ -140,27 +143,51 @@ namespace PepperDash.Essentials.WebApiHandlers } } + /// + /// Represents a ClientRequest + /// public class ClientRequest { [JsonProperty("roomKey", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the RoomKey + /// public string RoomKey { get; set; } [JsonProperty("grantCode", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the GrantCode + /// public string GrantCode { get; set; } [JsonProperty("token", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Token + /// public string Token { get; set; } } + /// + /// Represents a ClientResponse + /// public class ClientResponse { [JsonProperty("error", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Error + /// public string Error { get; set; } [JsonProperty("token", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Token + /// public string Token { get; set; } [JsonProperty("path", NullValueHandling = NullValueHandling.Ignore)] + /// + /// Gets or sets the Path + /// public string Path { get; set; } } } diff --git a/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs b/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs index 2b0d5cbd..bc7ae141 100644 --- a/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs +++ b/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs @@ -1,1293 +1,1348 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.WebScripting; -using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Logging; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; -using PepperDash.Essentials.Core.Web; -using PepperDash.Essentials.RoomBridges; -using PepperDash.Essentials.WebApiHandlers; -using Serilog.Events; -using WebSocketSharp; -using WebSocketSharp.Net; -using WebSocketSharp.Server; - - -namespace PepperDash.Essentials.WebSocketServer -{ - public class MobileControlWebsocketServer : EssentialsDevice - { - private readonly string userAppPath = Global.FilePathPrefix + "mcUserApp" + Global.DirectorySeparator; - - private readonly string localConfigFolderName = "_local-config"; - - private readonly string appConfigFileName = "_config.local.json"; - private readonly string appConfigCsFileName = "_config.cs.json"; - - /// - /// Where the key is the join token and the value is the room key - /// - //private Dictionary _joinTokens; - - private HttpServer _server; - - public HttpServer Server => _server; - - public Dictionary UiClients { get; private set; } - - private readonly MobileControlSystemController _parent; - - private WebSocketServerSecretProvider _secretProvider; - - private ServerTokenSecrets _secret; - - private static readonly HttpClient LogClient = new HttpClient(); - - private string SecretProviderKey - { - get - { - return string.Format("{0}:{1}-tokens", Global.ControlSystem.ProgramNumber, Key); - } - } - - private string lanIpAddress => CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetLANAdapter)); - - private System.Net.IPAddress csIpAddress; - - private System.Net.IPAddress csSubnetMask; - - /// - /// The path for the WebSocket messaging - /// - private readonly string _wsPath = "/mc/api/ui/join/"; - - public string WsPath => _wsPath; - - /// - /// The path to the location of the files for the user app (single page Angular app) - /// - private readonly string _appPath = string.Format("{0}mcUserApp", Global.FilePathPrefix); - - /// - /// The base HREF that the user app uses - /// - private string _userAppBaseHref = "/mc/app"; - - /// - /// The port the server will run on - /// - public int Port { get; private set; } - - public string UserAppUrlPrefix - { - get - { - return string.Format("http://{0}:{1}{2}?token=", - CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0), - Port, - _userAppBaseHref); - - } - } - - public int ConnectedUiClientsCount - { - get - { - var count = 0; - - foreach (var client in UiClients) - { - if (client.Value.Client != null && client.Value.Client.Context.WebSocket.IsAlive) - { - count++; - } - } - - return count; - } - } - - public MobileControlWebsocketServer(string key, int customPort, MobileControlSystemController parent) - : base(key) - { - _parent = parent; - - // Set the default port to be 50000 plus the slot number of the program - Port = 50000 + (int)Global.ControlSystem.ProgramNumber; - - if (customPort != 0) - { - Port = customPort; - } - - if (parent.Config.DirectServer.AutomaticallyForwardPortToCSLAN == true) - { - try - { - Debug.LogMessage(LogEventLevel.Information, "Automatically forwarding port {0} to CS LAN", Port); - - var csAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetCSAdapter); - var csIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, csAdapterId); - - var result = CrestronEthernetHelper.AddPortForwarding((ushort)Port, (ushort)Port, csIp, CrestronEthernetHelper.ePortMapTransport.TCP); - - if (result != CrestronEthernetHelper.PortForwardingUserPatRetCodes.NoErr) - { - Debug.LogMessage(LogEventLevel.Error, "Error adding port forwarding: {0}", result); - } - } - catch (ArgumentException) - { - Debug.LogMessage(LogEventLevel.Information, "This processor does not have a CS LAN", this); - } - catch (Exception ex) - { - Debug.LogMessage(ex, "Error automatically forwarding port to CS LAN"); - } - } - - try - { - var csAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetCSAdapter); - var csSubnetMask = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, csAdapterId); - var csIpAddress = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, csAdapterId); - - this.csSubnetMask = System.Net.IPAddress.Parse(csSubnetMask); - this.csIpAddress = System.Net.IPAddress.Parse(csIpAddress); - } - catch (ArgumentException) - { - if (parent.Config.DirectServer.AutomaticallyForwardPortToCSLAN == false) - { - Debug.LogMessage(LogEventLevel.Information, "This processor does not have a CS LAN", this); - } - } - - - UiClients = new Dictionary(); - - //_joinTokens = new Dictionary(); - - if (Global.Platform == eDevicePlatform.Appliance) - { - AddConsoleCommands(); - } - - AddPreActivationAction(() => AddWebApiPaths()); - } - - private void AddWebApiPaths() - { - var apiServer = DeviceManager.AllDevices.OfType().FirstOrDefault(); - - if (apiServer == null) - { - this.LogInformation("No API Server available"); - return; - } - - var routes = new List - { - new HttpCwsRoute($"devices/{Key}/client") - { - Name = "ClientHandler", - RouteHandler = new UiClientHandler(this) - }, - }; - - apiServer.AddRoute(routes); - } - - private void AddConsoleCommands() - { - CrestronConsole.AddNewConsoleCommand(GenerateClientTokenFromConsole, "MobileAddUiClient", "Adds a client and generates a token. ? for more help", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(RemoveToken, "MobileRemoveUiClient", "Removes a client. ? for more help", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand((s) => PrintClientInfo(), "MobileGetClientInfo", "Displays the current client info", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(RemoveAllTokens, "MobileRemoveAllClients", "Removes all clients", ConsoleAccessLevelEnum.AccessOperator); - } - - - public override void Initialize() - { - try - { - base.Initialize(); - - _server = new HttpServer(Port, false); - - _server.OnGet += Server_OnGet; - - _server.OnOptions += Server_OnOptions; - - if (_parent.Config.DirectServer.Logging.EnableRemoteLogging) - { - _server.OnPost += Server_OnPost; - } - - CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironment_ProgramStatusEventHandler; - - _server.Start(); - - if (_server.IsListening) - { - Debug.LogMessage(LogEventLevel.Information, "Mobile Control WebSocket Server listening on port {port}", this, _server.Port); - } - - CrestronEnvironment.ProgramStatusEventHandler += OnProgramStop; - - RetrieveSecret(); - - CreateFolderStructure(); - - AddClientsForTouchpanels(); - } - catch (Exception ex) - { - Debug.LogMessage(ex, "Exception intializing websocket server", this); - } - } - - private void AddClientsForTouchpanels() - { - var touchpanels = DeviceManager.AllDevices - .OfType().Where(tp => tp.UseDirectServer); - - - var touchpanelsToAdd = new List(); - - if (_secret != null) - { - var newTouchpanels = touchpanels.Where(tp => !_secret.Tokens.Any(t => t.Value.TouchpanelKey != null && t.Value.TouchpanelKey.Equals(tp.Key, StringComparison.InvariantCultureIgnoreCase))); - - touchpanelsToAdd.AddRange(newTouchpanels); - } - else - { - touchpanelsToAdd.AddRange(touchpanels); - } - - foreach (var client in touchpanelsToAdd) - { - var bridge = _parent.GetRoomBridge(client.DefaultRoomKey); - - if (bridge == null) - { - this.LogWarning("Unable to find room with key: {defaultRoomKey}", client.DefaultRoomKey); - return; - } - - var (key, path) = GenerateClientToken(bridge, client.Key); - - if (key == null) - { - this.LogWarning("Unable to generate a client for {clientKey}", client.Key); - continue; - } - } - - var lanAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetLANAdapter); - - var processorIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, lanAdapterId); - - foreach (var touchpanel in touchpanels.Select(tp => - { - var token = _secret.Tokens.FirstOrDefault((t) => t.Value.TouchpanelKey.Equals(tp.Key, StringComparison.InvariantCultureIgnoreCase)); - - var messenger = _parent.GetRoomBridge(tp.DefaultRoomKey); - - return new { token.Key, Touchpanel = tp, Messenger = messenger }; - })) - { - if (touchpanel.Key == null) - { - this.LogWarning("Token for touchpanel {touchpanelKey} not found", touchpanel.Touchpanel.Key); - continue; - } - - if (touchpanel.Messenger == null) - { - this.LogWarning("Unable to find room messenger for {defaultRoomKey}", touchpanel.Touchpanel.DefaultRoomKey); - continue; - } - - string ip = processorIp; - if (touchpanel.Touchpanel is IMobileControlCrestronTouchpanelController crestronTouchpanel) - { - ip = crestronTouchpanel.ConnectedIps.Any(ipInfo => - { - if (System.Net.IPAddress.TryParse(ipInfo.DeviceIpAddress, out var parsedIp)) - { - return csIpAddress.IsInSameSubnet(parsedIp, csSubnetMask); - } - this.LogWarning("Invalid IP address: {deviceIpAddress}", ipInfo.DeviceIpAddress); - return false; - }) ? csIpAddress.ToString() : processorIp; - } - - var appUrl = $"http://{ip}:{_parent.Config.DirectServer.Port}/mc/app?token={touchpanel.Key}"; - - this.LogVerbose("Sending URL {appUrl}", appUrl); - - touchpanel.Messenger.UpdateAppUrl($"http://{ip}:{_parent.Config.DirectServer.Port}/mc/app?token={touchpanel.Key}"); - } - } - - private void OnProgramStop(eProgramStatusEventType programEventType) - { - switch (programEventType) - { - case eProgramStatusEventType.Stopping: - _server.Stop(); - break; - } - } - - private void CreateFolderStructure() - { - if (!Directory.Exists(userAppPath)) - { - Directory.CreateDirectory(userAppPath); - } - - if (!Directory.Exists($"{userAppPath}{localConfigFolderName}")) - { - Directory.CreateDirectory($"{userAppPath}{localConfigFolderName}"); - } - - using (var sw = new StreamWriter(File.Open($"{userAppPath}{localConfigFolderName}{Global.DirectorySeparator}{appConfigFileName}", FileMode.Create, FileAccess.ReadWrite))) - { - // Write the LAN application configuration file. Used when a request comes in for the application config from the LAN - var lanAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetLANAdapter); - - this.LogDebug("LAN Adapter ID: {lanAdapterId}", lanAdapterId); - - var processorIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, lanAdapterId); - - var config = GetApplicationConfig(processorIp); - - var contents = JsonConvert.SerializeObject(config, Formatting.Indented); - - sw.Write(contents); - } - - short csAdapterId; - try - { - csAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetCSAdapter); - } - catch (ArgumentException) - { - this.LogDebug("This processor does not have a CS LAN"); - return; - } - - if (csAdapterId == -1) - { - this.LogDebug("CS LAN Adapter not found"); - return; - } - - this.LogDebug("CS LAN Adapter ID: {csAdapterId}. Adding CS Config", csAdapterId); - - using (var sw = new StreamWriter(File.Open($"{userAppPath}{localConfigFolderName}{Global.DirectorySeparator}{appConfigCsFileName}", FileMode.Create, FileAccess.ReadWrite))) - { - // Write the CS application configuration file. Used when a request comes in for the application config from the CS - var processorIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, csAdapterId); - - var config = GetApplicationConfig(processorIp); - - var contents = JsonConvert.SerializeObject(config, Formatting.Indented); - - sw.Write(contents); - } - } - - private MobileControlApplicationConfig GetApplicationConfig(string processorIp) - { - try - { - var config = new MobileControlApplicationConfig - { - ApiPath = string.Format("http://{0}:{1}/mc/api", processorIp, _parent.Config.DirectServer.Port), - GatewayAppPath = "", - LogoPath = _parent.Config.ApplicationConfig?.LogoPath ?? "logo/logo.png", - EnableDev = _parent.Config.ApplicationConfig?.EnableDev ?? false, - IconSet = _parent.Config.ApplicationConfig?.IconSet ?? MCIconSet.GOOGLE, - LoginMode = _parent.Config.ApplicationConfig?.LoginMode ?? "room-list", - Modes = _parent.Config.ApplicationConfig?.Modes ?? new Dictionary - { - { - "room-list", - new McMode { - ListPageText = "Please select your room", - LoginHelpText = "Please select your room from the list, then enter the code shown on the display.", - PasscodePageText = "Please enter the code shown on this room's display" - } - } - }, - Logging = _parent.Config.ApplicationConfig?.Logging ?? false, - PartnerMetadata = _parent.Config.ApplicationConfig?.PartnerMetadata ?? new List() - }; - - return config; - } - catch (Exception ex) - { - this.LogError(ex, "Error getting application configuration"); - - return null; - } - } - - /// - /// Attempts to retrieve secrets previously stored in memory - /// - private void RetrieveSecret() - { - try - { - // Add secret provider - _secretProvider = new WebSocketServerSecretProvider(SecretProviderKey); - - // Check for existing secrets - var secret = _secretProvider.GetSecret(SecretProviderKey); - - if (secret != null) - { - Debug.LogMessage(LogEventLevel.Information, "Secret successfully retrieved", this); - - Debug.LogMessage(LogEventLevel.Debug, "Secret: {0}", this, secret.Value.ToString()); - - - // populate the local secrets object - _secret = JsonConvert.DeserializeObject(secret.Value.ToString()); - - if (_secret != null && _secret.Tokens != null) - { - // populate the _uiClient collection - foreach (var token in _secret.Tokens) - { - if (token.Value == null) - { - Debug.LogMessage(LogEventLevel.Warning, "Token value is null", this); - continue; - } - - Debug.LogMessage(LogEventLevel.Information, "Adding token: {0} for room: {1}", this, token.Key, token.Value.RoomKey); - - if (UiClients == null) - { - Debug.LogMessage(LogEventLevel.Warning, "UiClients is null", this); - UiClients = new Dictionary(); - } - - UiClients.Add(token.Key, new UiClientContext(token.Value)); - } - } - - if (UiClients.Count > 0) - { - Debug.LogMessage(LogEventLevel.Information, "Restored {uiClientCount} UiClients from secrets data", this, UiClients.Count); - - foreach (var client in UiClients) - { - var key = client.Key; - var path = _wsPath + key; - var roomKey = client.Value.Token.RoomKey; - - _server.AddWebSocketService(path, () => - { - var c = new UiClient(); - Debug.LogMessage(LogEventLevel.Debug, "Constructing UiClient with id: {key}", this, key); - - c.Controller = _parent; - c.RoomKey = roomKey; - UiClients[key].SetClient(c); - return c; - }); - - - //_server.WebSocketServices.AddService(path, (c) => - //{ - // Debug.Console(2, this, "Constructing UiClient with id: {0}", key); - // c.Controller = _parent; - // c.RoomKey = roomKey; - // UiClients[key].SetClient(c); - //}); - } - } - } - else - { - Debug.LogMessage(LogEventLevel.Warning, "No secret found"); - } - - Debug.LogMessage(LogEventLevel.Debug, "{uiClientCount} UiClients restored from secrets data", this, UiClients.Count); - } - catch (Exception ex) - { - Debug.LogMessage(ex, "Exception retrieving secret", this); - } - } - - /// - /// Stores secrets to memory to persist through reboot - /// - public void UpdateSecret() - { - try - { - if (_secret == null) - { - Debug.LogMessage(LogEventLevel.Error, "Secret is null", this); - - _secret = new ServerTokenSecrets(string.Empty); - } - - _secret.Tokens.Clear(); - - foreach (var uiClientContext in UiClients) - { - _secret.Tokens.Add(uiClientContext.Key, uiClientContext.Value.Token); - } - - var serializedSecret = JsonConvert.SerializeObject(_secret); - - _secretProvider.SetSecret(SecretProviderKey, serializedSecret); - } - catch (Exception ex) - { - Debug.LogMessage(ex, "Exception updating secret", this); - } - } - - /// - /// Generates a new token based on validating a room key and grant code passed in. If valid, returns a token and adds a service to the server for that token's path - /// - /// - private void GenerateClientTokenFromConsole(string s) - { - if (s == "?" || string.IsNullOrEmpty(s)) - { - CrestronConsole.ConsoleCommandResponse(@"[RoomKey] [GrantCode] Validates the room key against the grant code and returns a token for use in a UI client"); - return; - } - - var values = s.Split(' '); - - if (values.Length < 2) - { - CrestronConsole.ConsoleCommandResponse("Invalid number of arguments. Please provide a room key and a grant code"); - return; - } - - - var roomKey = values[0]; - var grantCode = values[1]; - - var bridge = _parent.GetRoomBridge(roomKey); - - if (bridge == null) - { - CrestronConsole.ConsoleCommandResponse(string.Format("Unable to find room with key: {0}", roomKey)); - return; - } - - var (token, path) = ValidateGrantCode(grantCode, bridge); - - if (token == null) - { - CrestronConsole.ConsoleCommandResponse("Grant Code is not valid"); - return; - } - - CrestronConsole.ConsoleCommandResponse($"Added new WebSocket UiClient service at path: {path}"); - CrestronConsole.ConsoleCommandResponse($"Token: {token}"); - } - - public (string, string) ValidateGrantCode(string grantCode, string roomKey) - { - var bridge = _parent.GetRoomBridge(roomKey); - - if (bridge == null) - { - this.LogWarning("Unable to find room with key: {roomKey}", roomKey); - return (null, null); - } - - return ValidateGrantCode(grantCode, bridge); - } - - public (string, string) ValidateGrantCode(string grantCode, MobileControlBridgeBase bridge) - { - // TODO: Authenticate grant code passed in - // For now, we just generate a random guid as the token and use it as the ClientId as well - var grantCodeIsValid = true; - - if (grantCodeIsValid) - { - if (_secret == null) - { - _secret = new ServerTokenSecrets(grantCode); - } - - return GenerateClientToken(bridge, ""); - } - else - { - return (null, null); - } - } - - public (string, string) GenerateClientToken(MobileControlBridgeBase bridge, string touchPanelKey = "") - { - var key = Guid.NewGuid().ToString(); - - var token = new JoinToken { Code = bridge.UserCode, RoomKey = bridge.RoomKey, Uuid = _parent.SystemUuid, TouchpanelKey = touchPanelKey }; - - UiClients.Add(key, new UiClientContext(token)); - - var path = _wsPath + key; - - _server.AddWebSocketService(path, () => - { - var c = new UiClient(); - Debug.LogMessage(LogEventLevel.Verbose, "Constructing UiClient with id: {0}", this, key); - c.Controller = _parent; - c.RoomKey = bridge.RoomKey; - UiClients[key].SetClient(c); - return c; - }); - - Debug.LogMessage(LogEventLevel.Information, "Added new WebSocket UiClient service at path: {path}", this, path); - Debug.LogMessage(LogEventLevel.Information, "Token: {@token}", this, token); - - Debug.LogMessage(LogEventLevel.Verbose, "{serviceCount} websocket services present", this, _server.WebSocketServices.Count); - - UpdateSecret(); - - return (key, path); - } - - /// - /// Removes all clients from the server - /// - private void RemoveAllTokens(string s) - { - if (s == "?" || string.IsNullOrEmpty(s)) - { - CrestronConsole.ConsoleCommandResponse(@"Removes all clients from the server. To execute add 'confirm' to command"); - return; - } - - if (s != "confirm") - { - CrestronConsole.ConsoleCommandResponse(@"To remove all clients, add 'confirm' to the command"); - return; - } - - foreach (var client in UiClients) - { - if (client.Value.Client != null && client.Value.Client.Context.WebSocket.IsAlive) - { - client.Value.Client.Context.WebSocket.Close(CloseStatusCode.Normal, "Server Shutting Down"); - } - - var path = _wsPath + client.Key; - if (_server.RemoveWebSocketService(path)) - { - CrestronConsole.ConsoleCommandResponse(string.Format("Client removed with token: {0}", client.Key)); - } - else - { - CrestronConsole.ConsoleCommandResponse(string.Format("Unable to remove client with token : {0}", client.Key)); - } - } - - UiClients.Clear(); - - UpdateSecret(); - } - - /// - /// Removes a client with the specified token value - /// - /// - private void RemoveToken(string s) - { - if (s == "?" || string.IsNullOrEmpty(s)) - { - CrestronConsole.ConsoleCommandResponse(@"[token] Removes the client with the specified token value"); - return; - } - - var key = s; - - if (UiClients.ContainsKey(key)) - { - var uiClientContext = UiClients[key]; - - if (uiClientContext.Client != null && uiClientContext.Client.Context.WebSocket.IsAlive) - { - uiClientContext.Client.Context.WebSocket.Close(CloseStatusCode.Normal, "Token removed from server"); - } - - var path = _wsPath + key; - if (_server.RemoveWebSocketService(path)) - { - UiClients.Remove(key); - - UpdateSecret(); - - CrestronConsole.ConsoleCommandResponse(string.Format("Client removed with token: {0}", key)); - } - else - { - CrestronConsole.ConsoleCommandResponse(string.Format("Unable to remove client with token : {0}", key)); - } - } - else - { - CrestronConsole.ConsoleCommandResponse(string.Format("Unable to find client with token: {0}", key)); - } - } - - /// - /// Prints out info about current client IDs - /// - private void PrintClientInfo() - { - CrestronConsole.ConsoleCommandResponse("Mobile Control UI Client Info:\r"); - - CrestronConsole.ConsoleCommandResponse(string.Format("{0} clients found:\r", UiClients.Count)); - - foreach (var client in UiClients) - { - CrestronConsole.ConsoleCommandResponse(string.Format("RoomKey: {0} Token: {1}\r", client.Value.Token.RoomKey, client.Key)); - } - } - - private void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType) - { - if (programEventType == eProgramStatusEventType.Stopping) - { - foreach (var client in UiClients.Values) - { - if (client.Client != null && client.Client.Context.WebSocket.IsAlive) - { - client.Client.Context.WebSocket.Close(CloseStatusCode.Normal, "Server Shutting Down"); - } - } - - StopServer(); - } - } - - /// - /// Handler for GET requests to server - /// - /// - /// - private void Server_OnGet(object sender, HttpRequestEventArgs e) - { - try - { - var req = e.Request; - var res = e.Response; - res.ContentEncoding = Encoding.UTF8; - - res.AddHeader("Access-Control-Allow-Origin", "*"); - - var path = req.RawUrl; - - this.LogVerbose("GET Request received at path: {path}", path); - - // Call for user app to join the room with a token - if (path.StartsWith("/mc/api/ui/joinroom")) - { - HandleJoinRequest(req, res); - } - // Call to get the server version - else if (path.StartsWith("/mc/api/version")) - { - HandleVersionRequest(res); - } - else if (path.StartsWith("/mc/app/logo")) - { - HandleImageRequest(req, res); - } - // Call to serve the user app - else if (path.StartsWith(_userAppBaseHref)) - { - HandleUserAppRequest(req, res, path); - } - else - { - // All other paths - res.StatusCode = 404; - res.Close(); - } - } - catch (Exception ex) - { - Debug.LogMessage(ex, "Caught an exception in the OnGet handler", this); - } - } - - private async void Server_OnPost(object sender, HttpRequestEventArgs e) - { - try - { - var req = e.Request; - var res = e.Response; - - res.AddHeader("Access-Control-Allow-Origin", "*"); - - var path = req.RawUrl; - var ip = req.RemoteEndPoint.Address.ToString(); - - this.LogVerbose("POST Request received at path: {path} from host {host}", path, ip); - - var body = new StreamReader(req.InputStream).ReadToEnd(); - - if (path.StartsWith("/mc/api/log")) - { - res.StatusCode = 200; - res.Close(); - - var logRequest = new HttpRequestMessage(HttpMethod.Post, $"http://{_parent.Config.DirectServer.Logging.Host}:{_parent.Config.DirectServer.Logging.Port}/logs") - { - Content = new StringContent(body, Encoding.UTF8, "application/json"), - }; - - logRequest.Headers.Add("x-pepperdash-host", ip); - - await LogClient.SendAsync(logRequest); - - this.LogVerbose("Log data sent to {host}:{port}", _parent.Config.DirectServer.Logging.Host, _parent.Config.DirectServer.Logging.Port); - } - else - { - res.StatusCode = 404; - res.Close(); - } - } - catch (Exception ex) - { - this.LogException(ex, "Caught an exception in the OnPost handler"); - } - } - - private void Server_OnOptions(object sender, HttpRequestEventArgs e) - { - try - { - var res = e.Response; - - res.AddHeader("Access-Control-Allow-Origin", "*"); - res.AddHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); - res.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With, remember-me"); - - res.StatusCode = 200; - res.Close(); - } - catch (Exception ex) - { - Debug.LogMessage(ex, "Caught an exception in the OnPost handler", this); - } - } - - /// - /// Handle the request to join the room with a token - /// - /// - /// - private void HandleJoinRequest(HttpListenerRequest req, HttpListenerResponse res) - { - var qp = req.QueryString; - var token = qp["token"]; - - this.LogVerbose("Join Room Request with token: {token}", token); - - - if (UiClients.TryGetValue(token, out UiClientContext clientContext)) - { - var bridge = _parent.GetRoomBridge(clientContext.Token.RoomKey); - - if (bridge != null) - { - res.StatusCode = 200; - res.ContentType = "application/json"; - - // Construct the response object - JoinResponse jRes = new JoinResponse - { - ClientId = token, - RoomKey = bridge.RoomKey, - SystemUuid = _parent.SystemUuid, - RoomUuid = _parent.SystemUuid, - Config = _parent.GetConfigWithPluginVersion(), - CodeExpires = new DateTime().AddYears(1), - UserCode = bridge.UserCode, - UserAppUrl = string.Format("http://{0}:{1}/mc/app", - CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0), - Port), - EnableDebug = false - }; - - // Serialize to JSON and convert to Byte[] - var json = JsonConvert.SerializeObject(jRes); - var body = Encoding.UTF8.GetBytes(json); - res.ContentLength64 = body.LongLength; - - // Send the response - res.Close(body, true); - } - else - { - var message = string.Format("Unable to find bridge with key: {0}", clientContext.Token.RoomKey); - res.StatusCode = 404; - res.ContentType = "application/json"; - this.LogVerbose("{message}", message); - var body = Encoding.UTF8.GetBytes(message); - res.ContentLength64 = body.LongLength; - res.Close(body, true); - - } - } - else - { - var message = "Token invalid or has expired"; - res.StatusCode = 401; - res.ContentType = "application/json"; - this.LogVerbose("{message}", message); - var body = Encoding.UTF8.GetBytes(message); - res.ContentLength64 = body.LongLength; - res.Close(body, true); - } - } - - /// - /// Handles a server version request - /// - /// - private void HandleVersionRequest(HttpListenerResponse res) - { - res.StatusCode = 200; - res.ContentType = "application/json"; - var version = new Version() { ServerVersion = _parent.GetConfigWithPluginVersion().RuntimeInfo.PluginVersion }; - var message = JsonConvert.SerializeObject(version); - this.LogVerbose("{message}", message); - - var body = Encoding.UTF8.GetBytes(message); - res.ContentLength64 = body.LongLength; - res.Close(body, true); - } - - /// - /// Handler to return images requested by the user app - /// - /// - /// - private void HandleImageRequest(HttpListenerRequest req, HttpListenerResponse res) - { - var path = req.RawUrl; - - Debug.LogMessage(LogEventLevel.Verbose, "Requesting Image: {0}", this, path); - - var imageBasePath = Global.DirectorySeparator + "html" + Global.DirectorySeparator + "logo" + Global.DirectorySeparator; - - var image = path.Split('/').Last(); - - var filePath = imageBasePath + image; - - Debug.LogMessage(LogEventLevel.Verbose, "Retrieving Image: {0}", this, filePath); - - if (File.Exists(filePath)) - { - if (filePath.EndsWith(".png")) - { - res.ContentType = "image/png"; - } - else if (filePath.EndsWith(".jpg")) - { - res.ContentType = "image/jpeg"; - } - else if (filePath.EndsWith(".gif")) - { - res.ContentType = "image/gif"; - } - else if (filePath.EndsWith(".svg")) - { - res.ContentType = "image/svg+xml"; - } - byte[] contents = File.ReadAllBytes(filePath); - res.ContentLength64 = contents.LongLength; - res.Close(contents, true); - } - else - { - res.StatusCode = (int)HttpStatusCode.NotFound; - res.Close(); - } - } - - /// - /// Handles requests to serve files for the Angular single page app - /// - /// - /// - /// - private void HandleUserAppRequest(HttpListenerRequest req, HttpListenerResponse res, string path) - { - this.LogVerbose("Requesting User app file"); - - string filePath = path.Split('?')[0]; - - // remove the token from the path if found - //string filePath = path.Replace(string.Format("?token={0}", token), ""); - - // if there's no file suffix strip any extra path data after the base href - if (filePath != _userAppBaseHref && !filePath.Contains(".") && (!filePath.EndsWith(_userAppBaseHref) || !filePath.EndsWith(_userAppBaseHref += "/"))) - { - var suffix = filePath.Substring(_userAppBaseHref.Length, filePath.Length - _userAppBaseHref.Length); - if (suffix != "/") - { - //Debug.Console(2, this, "Suffix: {0}", suffix); - filePath = filePath.Replace(suffix, ""); - } - } - - // swap the base href prefix for the file path prefix - filePath = filePath.Replace(_userAppBaseHref, _appPath); - - this.LogVerbose("filepath: {filePath}", filePath); - - - // append index.html if no specific file is specified - if (!filePath.Contains(".")) - { - if (filePath.EndsWith("/")) - { - filePath += "index.html"; - } - else - { - filePath += "/index.html"; - } - } - - // Set ContentType based on file type - if (filePath.EndsWith(".html")) - { - this.LogVerbose("Client requesting User App"); - - res.ContentType = "text/html"; - } - else - { - if (path.EndsWith(".js")) - { - res.ContentType = "application/javascript"; - } - else if (path.EndsWith(".css")) - { - res.ContentType = "text/css"; - } - else if (path.EndsWith(".json")) - { - res.ContentType = "application/json"; - } - } - - this.LogVerbose("Attempting to serve file: {filePath}", filePath); - - var remoteIp = req.RemoteEndPoint.Address; - - // Check if the request is coming from the CS LAN and if so, send the CS config instead of the LAN config - if (csSubnetMask != null && csIpAddress != null && remoteIp.IsInSameSubnet(csIpAddress, csSubnetMask) && filePath.Contains(appConfigFileName)) - { - filePath = filePath.Replace(appConfigFileName, appConfigCsFileName); - } - - byte[] contents; - if (File.Exists(filePath)) - { - this.LogVerbose("File found: {filePath}", filePath); - contents = File.ReadAllBytes(filePath); - } - else - { - this.LogVerbose("File not found: {filePath}", filePath); - res.StatusCode = (int)HttpStatusCode.NotFound; - res.Close(); - return; - } - - res.ContentLength64 = contents.LongLength; - res.Close(contents, true); - } - - public void StopServer() - { - this.LogVerbose("Stopping WebSocket Server"); - _server.Stop(CloseStatusCode.Normal, "Server Shutting Down"); - } - - /// - /// Sends a message to all connectd clients - /// - /// - public void SendMessageToAllClients(string message) - { - foreach (var clientContext in UiClients.Values) - { - if (clientContext.Client != null && clientContext.Client.Context.WebSocket.IsAlive) - { - clientContext.Client.Context.WebSocket.Send(message); - } - } - } - - /// - /// Sends a message to a specific client - /// - /// - /// - public void SendMessageToClient(object clientId, string message) - { - if (clientId == null) - { - return; - } - - if (UiClients.TryGetValue((string)clientId, out UiClientContext clientContext)) - { - if (clientContext.Client != null) - { - var socket = clientContext.Client.Context.WebSocket; - - if (socket.IsAlive) - { - socket.Send(message); - } - } - } - else - { - this.LogWarning("Unable to find client with ID: {clientId}", clientId); - } - } - } - - /// - /// Class to describe the server version info - /// - public class Version - { - [JsonProperty("serverVersion")] - public string ServerVersion { get; set; } - - [JsonProperty("serverIsRunningOnProcessorHardware")] - public bool ServerIsRunningOnProcessorHardware { get; private set; } - - public Version() - { - ServerIsRunningOnProcessorHardware = true; - } - } - - /// - /// Represents an instance of a UiClient and the associated Token - /// - public class UiClientContext - { - public UiClient Client { get; private set; } - public JoinToken Token { get; private set; } - - public UiClientContext(JoinToken token) - { - Token = token; - } - - public void SetClient(UiClient client) - { - Client = client; - } - - } - - /// - /// Represents the data structure for the grant code and UiClient tokens to be stored in the secrets manager - /// - public class ServerTokenSecrets - { - public string GrantCode { get; set; } - - public Dictionary Tokens { get; set; } - - public ServerTokenSecrets(string grantCode) - { - GrantCode = grantCode; - Tokens = new Dictionary(); - } - } - - /// - /// Represents a join token with the associated properties - /// - public class JoinToken - { - public string Code { get; set; } - - public string RoomKey { get; set; } - - public string Uuid { get; set; } - - public string TouchpanelKey { get; set; } = ""; - - public string Token { get; set; } = null; - } - - /// - /// Represents the structure of the join response - /// - public class JoinResponse - { - [JsonProperty("clientId")] - public string ClientId { get; set; } - - [JsonProperty("roomKey")] - public string RoomKey { get; set; } - - [JsonProperty("systemUUid")] - public string SystemUuid { get; set; } - - [JsonProperty("roomUUid")] - public string RoomUuid { get; set; } - - [JsonProperty("config")] - public object Config { get; set; } - - [JsonProperty("codeExpires")] - public DateTime CodeExpires { get; set; } - - [JsonProperty("userCode")] - public string UserCode { get; set; } - - [JsonProperty("userAppUrl")] - public string UserAppUrl { get; set; } - - [JsonProperty("enableDebug")] - public bool EnableDebug { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharp.WebScripting; +using Newtonsoft.Json; +using PepperDash.Core; +using PepperDash.Core.Logging; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Web; +using PepperDash.Essentials.RoomBridges; +using PepperDash.Essentials.WebApiHandlers; +using Serilog.Events; +using WebSocketSharp; +using WebSocketSharp.Net; +using WebSocketSharp.Server; + + +namespace PepperDash.Essentials.WebSocketServer +{ + /// + /// Represents a MobileControlWebsocketServer + /// + public class MobileControlWebsocketServer : EssentialsDevice + { + private readonly string userAppPath = Global.FilePathPrefix + "mcUserApp" + Global.DirectorySeparator; + + private readonly string localConfigFolderName = "_local-config"; + + private readonly string appConfigFileName = "_config.local.json"; + private readonly string appConfigCsFileName = "_config.cs.json"; + + /// + /// Where the key is the join token and the value is the room key + /// + //private Dictionary _joinTokens; + + private HttpServer _server; + + public HttpServer Server => _server; + + public Dictionary UiClients { get; private set; } + + private readonly MobileControlSystemController _parent; + + private WebSocketServerSecretProvider _secretProvider; + + private ServerTokenSecrets _secret; + + private static readonly HttpClient LogClient = new HttpClient(); + + private string SecretProviderKey + { + get + { + return string.Format("{0}:{1}-tokens", Global.ControlSystem.ProgramNumber, Key); + } + } + + private string lanIpAddress => CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetLANAdapter)); + + private System.Net.IPAddress csIpAddress; + + private System.Net.IPAddress csSubnetMask; + + /// + /// The path for the WebSocket messaging + /// + private readonly string _wsPath = "/mc/api/ui/join/"; + + public string WsPath => _wsPath; + + /// + /// The path to the location of the files for the user app (single page Angular app) + /// + private readonly string _appPath = string.Format("{0}mcUserApp", Global.FilePathPrefix); + + /// + /// The base HREF that the user app uses + /// + private string _userAppBaseHref = "/mc/app"; + + /// + /// Gets or sets the Port + /// + public int Port { get; private set; } + + public string UserAppUrlPrefix + { + get + { + return string.Format("http://{0}:{1}{2}?token=", + CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0), + Port, + _userAppBaseHref); + + } + } + + public int ConnectedUiClientsCount + { + get + { + var count = 0; + + foreach (var client in UiClients) + { + if (client.Value.Client != null && client.Value.Client.Context.WebSocket.IsAlive) + { + count++; + } + } + + return count; + } + } + + public MobileControlWebsocketServer(string key, int customPort, MobileControlSystemController parent) + : base(key) + { + _parent = parent; + + // Set the default port to be 50000 plus the slot number of the program + Port = 50000 + (int)Global.ControlSystem.ProgramNumber; + + if (customPort != 0) + { + Port = customPort; + } + + if (parent.Config.DirectServer.AutomaticallyForwardPortToCSLAN == true) + { + try + { + Debug.LogMessage(LogEventLevel.Information, "Automatically forwarding port {0} to CS LAN", Port); + + var csAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetCSAdapter); + var csIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, csAdapterId); + + var result = CrestronEthernetHelper.AddPortForwarding((ushort)Port, (ushort)Port, csIp, CrestronEthernetHelper.ePortMapTransport.TCP); + + if (result != CrestronEthernetHelper.PortForwardingUserPatRetCodes.NoErr) + { + Debug.LogMessage(LogEventLevel.Error, "Error adding port forwarding: {0}", result); + } + } + catch (ArgumentException) + { + Debug.LogMessage(LogEventLevel.Information, "This processor does not have a CS LAN", this); + } + catch (Exception ex) + { + Debug.LogMessage(ex, "Error automatically forwarding port to CS LAN"); + } + } + + try + { + var csAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetCSAdapter); + var csSubnetMask = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, csAdapterId); + var csIpAddress = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, csAdapterId); + + this.csSubnetMask = System.Net.IPAddress.Parse(csSubnetMask); + this.csIpAddress = System.Net.IPAddress.Parse(csIpAddress); + } + catch (ArgumentException) + { + if (parent.Config.DirectServer.AutomaticallyForwardPortToCSLAN == false) + { + Debug.LogMessage(LogEventLevel.Information, "This processor does not have a CS LAN", this); + } + } + + + UiClients = new Dictionary(); + + //_joinTokens = new Dictionary(); + + if (Global.Platform == eDevicePlatform.Appliance) + { + AddConsoleCommands(); + } + + AddPreActivationAction(() => AddWebApiPaths()); + } + + private void AddWebApiPaths() + { + var apiServer = DeviceManager.AllDevices.OfType().FirstOrDefault(); + + if (apiServer == null) + { + this.LogInformation("No API Server available"); + return; + } + + var routes = new List + { + new HttpCwsRoute($"devices/{Key}/client") + { + Name = "ClientHandler", + RouteHandler = new UiClientHandler(this) + }, + }; + + apiServer.AddRoute(routes); + } + + private void AddConsoleCommands() + { + CrestronConsole.AddNewConsoleCommand(GenerateClientTokenFromConsole, "MobileAddUiClient", "Adds a client and generates a token. ? for more help", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(RemoveToken, "MobileRemoveUiClient", "Removes a client. ? for more help", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand((s) => PrintClientInfo(), "MobileGetClientInfo", "Displays the current client info", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(RemoveAllTokens, "MobileRemoveAllClients", "Removes all clients", ConsoleAccessLevelEnum.AccessOperator); + } + + + /// + /// Initialize method + /// + /// + public override void Initialize() + { + try + { + base.Initialize(); + + _server = new HttpServer(Port, false); + + _server.OnGet += Server_OnGet; + + _server.OnOptions += Server_OnOptions; + + if (_parent.Config.DirectServer.Logging.EnableRemoteLogging) + { + _server.OnPost += Server_OnPost; + } + + CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironment_ProgramStatusEventHandler; + + _server.Start(); + + if (_server.IsListening) + { + Debug.LogMessage(LogEventLevel.Information, "Mobile Control WebSocket Server listening on port {port}", this, _server.Port); + } + + CrestronEnvironment.ProgramStatusEventHandler += OnProgramStop; + + RetrieveSecret(); + + CreateFolderStructure(); + + AddClientsForTouchpanels(); + } + catch (Exception ex) + { + Debug.LogMessage(ex, "Exception intializing websocket server", this); + } + } + + private void AddClientsForTouchpanels() + { + var touchpanels = DeviceManager.AllDevices + .OfType().Where(tp => tp.UseDirectServer); + + + var touchpanelsToAdd = new List(); + + if (_secret != null) + { + var newTouchpanels = touchpanels.Where(tp => !_secret.Tokens.Any(t => t.Value.TouchpanelKey != null && t.Value.TouchpanelKey.Equals(tp.Key, StringComparison.InvariantCultureIgnoreCase))); + + touchpanelsToAdd.AddRange(newTouchpanels); + } + else + { + touchpanelsToAdd.AddRange(touchpanels); + } + + foreach (var client in touchpanelsToAdd) + { + var bridge = _parent.GetRoomBridge(client.DefaultRoomKey); + + if (bridge == null) + { + this.LogWarning("Unable to find room with key: {defaultRoomKey}", client.DefaultRoomKey); + return; + } + + var (key, path) = GenerateClientToken(bridge, client.Key); + + if (key == null) + { + this.LogWarning("Unable to generate a client for {clientKey}", client.Key); + continue; + } + } + + var lanAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetLANAdapter); + + var processorIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, lanAdapterId); + + foreach (var touchpanel in touchpanels.Select(tp => + { + var token = _secret.Tokens.FirstOrDefault((t) => t.Value.TouchpanelKey.Equals(tp.Key, StringComparison.InvariantCultureIgnoreCase)); + + var messenger = _parent.GetRoomBridge(tp.DefaultRoomKey); + + return new { token.Key, Touchpanel = tp, Messenger = messenger }; + })) + { + if (touchpanel.Key == null) + { + this.LogWarning("Token for touchpanel {touchpanelKey} not found", touchpanel.Touchpanel.Key); + continue; + } + + if (touchpanel.Messenger == null) + { + this.LogWarning("Unable to find room messenger for {defaultRoomKey}", touchpanel.Touchpanel.DefaultRoomKey); + continue; + } + + string ip = processorIp; + if (touchpanel.Touchpanel is IMobileControlCrestronTouchpanelController crestronTouchpanel) + { + ip = crestronTouchpanel.ConnectedIps.Any(ipInfo => + { + if (System.Net.IPAddress.TryParse(ipInfo.DeviceIpAddress, out var parsedIp)) + { + return csIpAddress.IsInSameSubnet(parsedIp, csSubnetMask); + } + this.LogWarning("Invalid IP address: {deviceIpAddress}", ipInfo.DeviceIpAddress); + return false; + }) ? csIpAddress.ToString() : processorIp; + } + + var appUrl = $"http://{ip}:{_parent.Config.DirectServer.Port}/mc/app?token={touchpanel.Key}"; + + this.LogVerbose("Sending URL {appUrl}", appUrl); + + touchpanel.Messenger.UpdateAppUrl($"http://{ip}:{_parent.Config.DirectServer.Port}/mc/app?token={touchpanel.Key}"); + } + } + + private void OnProgramStop(eProgramStatusEventType programEventType) + { + switch (programEventType) + { + case eProgramStatusEventType.Stopping: + _server.Stop(); + break; + } + } + + private void CreateFolderStructure() + { + if (!Directory.Exists(userAppPath)) + { + Directory.CreateDirectory(userAppPath); + } + + if (!Directory.Exists($"{userAppPath}{localConfigFolderName}")) + { + Directory.CreateDirectory($"{userAppPath}{localConfigFolderName}"); + } + + using (var sw = new StreamWriter(File.Open($"{userAppPath}{localConfigFolderName}{Global.DirectorySeparator}{appConfigFileName}", FileMode.Create, FileAccess.ReadWrite))) + { + // Write the LAN application configuration file. Used when a request comes in for the application config from the LAN + var lanAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetLANAdapter); + + this.LogDebug("LAN Adapter ID: {lanAdapterId}", lanAdapterId); + + var processorIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, lanAdapterId); + + var config = GetApplicationConfig(processorIp); + + var contents = JsonConvert.SerializeObject(config, Formatting.Indented); + + sw.Write(contents); + } + + short csAdapterId; + try + { + csAdapterId = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetCSAdapter); + } + catch (ArgumentException) + { + this.LogDebug("This processor does not have a CS LAN"); + return; + } + + if (csAdapterId == -1) + { + this.LogDebug("CS LAN Adapter not found"); + return; + } + + this.LogDebug("CS LAN Adapter ID: {csAdapterId}. Adding CS Config", csAdapterId); + + using (var sw = new StreamWriter(File.Open($"{userAppPath}{localConfigFolderName}{Global.DirectorySeparator}{appConfigCsFileName}", FileMode.Create, FileAccess.ReadWrite))) + { + // Write the CS application configuration file. Used when a request comes in for the application config from the CS + var processorIp = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, csAdapterId); + + var config = GetApplicationConfig(processorIp); + + var contents = JsonConvert.SerializeObject(config, Formatting.Indented); + + sw.Write(contents); + } + } + + private MobileControlApplicationConfig GetApplicationConfig(string processorIp) + { + try + { + var config = new MobileControlApplicationConfig + { + ApiPath = string.Format("http://{0}:{1}/mc/api", processorIp, _parent.Config.DirectServer.Port), + GatewayAppPath = "", + LogoPath = _parent.Config.ApplicationConfig?.LogoPath ?? "logo/logo.png", + EnableDev = _parent.Config.ApplicationConfig?.EnableDev ?? false, + IconSet = _parent.Config.ApplicationConfig?.IconSet ?? MCIconSet.GOOGLE, + LoginMode = _parent.Config.ApplicationConfig?.LoginMode ?? "room-list", + Modes = _parent.Config.ApplicationConfig?.Modes ?? new Dictionary + { + { + "room-list", + new McMode { + ListPageText = "Please select your room", + LoginHelpText = "Please select your room from the list, then enter the code shown on the display.", + PasscodePageText = "Please enter the code shown on this room's display" + } + } + }, + Logging = _parent.Config.ApplicationConfig?.Logging ?? false, + PartnerMetadata = _parent.Config.ApplicationConfig?.PartnerMetadata ?? new List() + }; + + return config; + } + catch (Exception ex) + { + this.LogError(ex, "Error getting application configuration"); + + return null; + } + } + + /// + /// Attempts to retrieve secrets previously stored in memory + /// + private void RetrieveSecret() + { + try + { + // Add secret provider + _secretProvider = new WebSocketServerSecretProvider(SecretProviderKey); + + // Check for existing secrets + var secret = _secretProvider.GetSecret(SecretProviderKey); + + if (secret != null) + { + Debug.LogMessage(LogEventLevel.Information, "Secret successfully retrieved", this); + + Debug.LogMessage(LogEventLevel.Debug, "Secret: {0}", this, secret.Value.ToString()); + + + // populate the local secrets object + _secret = JsonConvert.DeserializeObject(secret.Value.ToString()); + + if (_secret != null && _secret.Tokens != null) + { + // populate the _uiClient collection + foreach (var token in _secret.Tokens) + { + if (token.Value == null) + { + Debug.LogMessage(LogEventLevel.Warning, "Token value is null", this); + continue; + } + + Debug.LogMessage(LogEventLevel.Information, "Adding token: {0} for room: {1}", this, token.Key, token.Value.RoomKey); + + if (UiClients == null) + { + Debug.LogMessage(LogEventLevel.Warning, "UiClients is null", this); + UiClients = new Dictionary(); + } + + UiClients.Add(token.Key, new UiClientContext(token.Value)); + } + } + + if (UiClients.Count > 0) + { + Debug.LogMessage(LogEventLevel.Information, "Restored {uiClientCount} UiClients from secrets data", this, UiClients.Count); + + foreach (var client in UiClients) + { + var key = client.Key; + var path = _wsPath + key; + var roomKey = client.Value.Token.RoomKey; + + _server.AddWebSocketService(path, () => + { + var c = new UiClient(); + Debug.LogMessage(LogEventLevel.Debug, "Constructing UiClient with id: {key}", this, key); + + c.Controller = _parent; + c.RoomKey = roomKey; + UiClients[key].SetClient(c); + return c; + }); + + + //_server.WebSocketServices.AddService(path, (c) => + //{ + // Debug.Console(2, this, "Constructing UiClient with id: {0}", key); + // c.Controller = _parent; + // c.RoomKey = roomKey; + // UiClients[key].SetClient(c); + //}); + } + } + } + else + { + Debug.LogMessage(LogEventLevel.Warning, "No secret found"); + } + + Debug.LogMessage(LogEventLevel.Debug, "{uiClientCount} UiClients restored from secrets data", this, UiClients.Count); + } + catch (Exception ex) + { + Debug.LogMessage(ex, "Exception retrieving secret", this); + } + } + + /// + /// UpdateSecret method + /// + public void UpdateSecret() + { + try + { + if (_secret == null) + { + Debug.LogMessage(LogEventLevel.Error, "Secret is null", this); + + _secret = new ServerTokenSecrets(string.Empty); + } + + _secret.Tokens.Clear(); + + foreach (var uiClientContext in UiClients) + { + _secret.Tokens.Add(uiClientContext.Key, uiClientContext.Value.Token); + } + + var serializedSecret = JsonConvert.SerializeObject(_secret); + + _secretProvider.SetSecret(SecretProviderKey, serializedSecret); + } + catch (Exception ex) + { + Debug.LogMessage(ex, "Exception updating secret", this); + } + } + + /// + /// Generates a new token based on validating a room key and grant code passed in. If valid, returns a token and adds a service to the server for that token's path + /// + /// + private void GenerateClientTokenFromConsole(string s) + { + if (s == "?" || string.IsNullOrEmpty(s)) + { + CrestronConsole.ConsoleCommandResponse(@"[RoomKey] [GrantCode] Validates the room key against the grant code and returns a token for use in a UI client"); + return; + } + + var values = s.Split(' '); + + if (values.Length < 2) + { + CrestronConsole.ConsoleCommandResponse("Invalid number of arguments. Please provide a room key and a grant code"); + return; + } + + + var roomKey = values[0]; + var grantCode = values[1]; + + var bridge = _parent.GetRoomBridge(roomKey); + + if (bridge == null) + { + CrestronConsole.ConsoleCommandResponse(string.Format("Unable to find room with key: {0}", roomKey)); + return; + } + + var (token, path) = ValidateGrantCode(grantCode, bridge); + + if (token == null) + { + CrestronConsole.ConsoleCommandResponse("Grant Code is not valid"); + return; + } + + CrestronConsole.ConsoleCommandResponse($"Added new WebSocket UiClient service at path: {path}"); + CrestronConsole.ConsoleCommandResponse($"Token: {token}"); + } + + public (string, string) ValidateGrantCode(string grantCode, string roomKey) + { + var bridge = _parent.GetRoomBridge(roomKey); + + if (bridge == null) + { + this.LogWarning("Unable to find room with key: {roomKey}", roomKey); + return (null, null); + } + + return ValidateGrantCode(grantCode, bridge); + } + + public (string, string) ValidateGrantCode(string grantCode, MobileControlBridgeBase bridge) + { + // TODO: Authenticate grant code passed in + // For now, we just generate a random guid as the token and use it as the ClientId as well + var grantCodeIsValid = true; + + if (grantCodeIsValid) + { + if (_secret == null) + { + _secret = new ServerTokenSecrets(grantCode); + } + + return GenerateClientToken(bridge, ""); + } + else + { + return (null, null); + } + } + + public (string, string) GenerateClientToken(MobileControlBridgeBase bridge, string touchPanelKey = "") + { + var key = Guid.NewGuid().ToString(); + + var token = new JoinToken { Code = bridge.UserCode, RoomKey = bridge.RoomKey, Uuid = _parent.SystemUuid, TouchpanelKey = touchPanelKey }; + + UiClients.Add(key, new UiClientContext(token)); + + var path = _wsPath + key; + + _server.AddWebSocketService(path, () => + { + var c = new UiClient(); + Debug.LogMessage(LogEventLevel.Verbose, "Constructing UiClient with id: {0}", this, key); + c.Controller = _parent; + c.RoomKey = bridge.RoomKey; + UiClients[key].SetClient(c); + return c; + }); + + Debug.LogMessage(LogEventLevel.Information, "Added new WebSocket UiClient service at path: {path}", this, path); + Debug.LogMessage(LogEventLevel.Information, "Token: {@token}", this, token); + + Debug.LogMessage(LogEventLevel.Verbose, "{serviceCount} websocket services present", this, _server.WebSocketServices.Count); + + UpdateSecret(); + + return (key, path); + } + + /// + /// Removes all clients from the server + /// + private void RemoveAllTokens(string s) + { + if (s == "?" || string.IsNullOrEmpty(s)) + { + CrestronConsole.ConsoleCommandResponse(@"Removes all clients from the server. To execute add 'confirm' to command"); + return; + } + + if (s != "confirm") + { + CrestronConsole.ConsoleCommandResponse(@"To remove all clients, add 'confirm' to the command"); + return; + } + + foreach (var client in UiClients) + { + if (client.Value.Client != null && client.Value.Client.Context.WebSocket.IsAlive) + { + client.Value.Client.Context.WebSocket.Close(CloseStatusCode.Normal, "Server Shutting Down"); + } + + var path = _wsPath + client.Key; + if (_server.RemoveWebSocketService(path)) + { + CrestronConsole.ConsoleCommandResponse(string.Format("Client removed with token: {0}", client.Key)); + } + else + { + CrestronConsole.ConsoleCommandResponse(string.Format("Unable to remove client with token : {0}", client.Key)); + } + } + + UiClients.Clear(); + + UpdateSecret(); + } + + /// + /// Removes a client with the specified token value + /// + /// + private void RemoveToken(string s) + { + if (s == "?" || string.IsNullOrEmpty(s)) + { + CrestronConsole.ConsoleCommandResponse(@"[token] Removes the client with the specified token value"); + return; + } + + var key = s; + + if (UiClients.ContainsKey(key)) + { + var uiClientContext = UiClients[key]; + + if (uiClientContext.Client != null && uiClientContext.Client.Context.WebSocket.IsAlive) + { + uiClientContext.Client.Context.WebSocket.Close(CloseStatusCode.Normal, "Token removed from server"); + } + + var path = _wsPath + key; + if (_server.RemoveWebSocketService(path)) + { + UiClients.Remove(key); + + UpdateSecret(); + + CrestronConsole.ConsoleCommandResponse(string.Format("Client removed with token: {0}", key)); + } + else + { + CrestronConsole.ConsoleCommandResponse(string.Format("Unable to remove client with token : {0}", key)); + } + } + else + { + CrestronConsole.ConsoleCommandResponse(string.Format("Unable to find client with token: {0}", key)); + } + } + + /// + /// Prints out info about current client IDs + /// + private void PrintClientInfo() + { + CrestronConsole.ConsoleCommandResponse("Mobile Control UI Client Info:\r"); + + CrestronConsole.ConsoleCommandResponse(string.Format("{0} clients found:\r", UiClients.Count)); + + foreach (var client in UiClients) + { + CrestronConsole.ConsoleCommandResponse(string.Format("RoomKey: {0} Token: {1}\r", client.Value.Token.RoomKey, client.Key)); + } + } + + private void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType) + { + if (programEventType == eProgramStatusEventType.Stopping) + { + foreach (var client in UiClients.Values) + { + if (client.Client != null && client.Client.Context.WebSocket.IsAlive) + { + client.Client.Context.WebSocket.Close(CloseStatusCode.Normal, "Server Shutting Down"); + } + } + + StopServer(); + } + } + + /// + /// Handler for GET requests to server + /// + /// + /// + private void Server_OnGet(object sender, HttpRequestEventArgs e) + { + try + { + var req = e.Request; + var res = e.Response; + res.ContentEncoding = Encoding.UTF8; + + res.AddHeader("Access-Control-Allow-Origin", "*"); + + var path = req.RawUrl; + + this.LogVerbose("GET Request received at path: {path}", path); + + // Call for user app to join the room with a token + if (path.StartsWith("/mc/api/ui/joinroom")) + { + HandleJoinRequest(req, res); + } + // Call to get the server version + else if (path.StartsWith("/mc/api/version")) + { + HandleVersionRequest(res); + } + else if (path.StartsWith("/mc/app/logo")) + { + HandleImageRequest(req, res); + } + // Call to serve the user app + else if (path.StartsWith(_userAppBaseHref)) + { + HandleUserAppRequest(req, res, path); + } + else + { + // All other paths + res.StatusCode = 404; + res.Close(); + } + } + catch (Exception ex) + { + Debug.LogMessage(ex, "Caught an exception in the OnGet handler", this); + } + } + + private async void Server_OnPost(object sender, HttpRequestEventArgs e) + { + try + { + var req = e.Request; + var res = e.Response; + + res.AddHeader("Access-Control-Allow-Origin", "*"); + + var path = req.RawUrl; + var ip = req.RemoteEndPoint.Address.ToString(); + + this.LogVerbose("POST Request received at path: {path} from host {host}", path, ip); + + var body = new StreamReader(req.InputStream).ReadToEnd(); + + if (path.StartsWith("/mc/api/log")) + { + res.StatusCode = 200; + res.Close(); + + var logRequest = new HttpRequestMessage(HttpMethod.Post, $"http://{_parent.Config.DirectServer.Logging.Host}:{_parent.Config.DirectServer.Logging.Port}/logs") + { + Content = new StringContent(body, Encoding.UTF8, "application/json"), + }; + + logRequest.Headers.Add("x-pepperdash-host", ip); + + await LogClient.SendAsync(logRequest); + + this.LogVerbose("Log data sent to {host}:{port}", _parent.Config.DirectServer.Logging.Host, _parent.Config.DirectServer.Logging.Port); + } + else + { + res.StatusCode = 404; + res.Close(); + } + } + catch (Exception ex) + { + this.LogException(ex, "Caught an exception in the OnPost handler"); + } + } + + private void Server_OnOptions(object sender, HttpRequestEventArgs e) + { + try + { + var res = e.Response; + + res.AddHeader("Access-Control-Allow-Origin", "*"); + res.AddHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); + res.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With, remember-me"); + + res.StatusCode = 200; + res.Close(); + } + catch (Exception ex) + { + Debug.LogMessage(ex, "Caught an exception in the OnPost handler", this); + } + } + + /// + /// Handle the request to join the room with a token + /// + /// + /// + private void HandleJoinRequest(HttpListenerRequest req, HttpListenerResponse res) + { + var qp = req.QueryString; + var token = qp["token"]; + + this.LogVerbose("Join Room Request with token: {token}", token); + + + if (UiClients.TryGetValue(token, out UiClientContext clientContext)) + { + var bridge = _parent.GetRoomBridge(clientContext.Token.RoomKey); + + if (bridge != null) + { + res.StatusCode = 200; + res.ContentType = "application/json"; + + // Construct the response object + JoinResponse jRes = new JoinResponse + { + ClientId = token, + RoomKey = bridge.RoomKey, + SystemUuid = _parent.SystemUuid, + RoomUuid = _parent.SystemUuid, + Config = _parent.GetConfigWithPluginVersion(), + CodeExpires = new DateTime().AddYears(1), + UserCode = bridge.UserCode, + UserAppUrl = string.Format("http://{0}:{1}/mc/app", + CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0), + Port), + EnableDebug = false + }; + + // Serialize to JSON and convert to Byte[] + var json = JsonConvert.SerializeObject(jRes); + var body = Encoding.UTF8.GetBytes(json); + res.ContentLength64 = body.LongLength; + + // Send the response + res.Close(body, true); + } + else + { + var message = string.Format("Unable to find bridge with key: {0}", clientContext.Token.RoomKey); + res.StatusCode = 404; + res.ContentType = "application/json"; + this.LogVerbose("{message}", message); + var body = Encoding.UTF8.GetBytes(message); + res.ContentLength64 = body.LongLength; + res.Close(body, true); + + } + } + else + { + var message = "Token invalid or has expired"; + res.StatusCode = 401; + res.ContentType = "application/json"; + this.LogVerbose("{message}", message); + var body = Encoding.UTF8.GetBytes(message); + res.ContentLength64 = body.LongLength; + res.Close(body, true); + } + } + + /// + /// Handles a server version request + /// + /// + private void HandleVersionRequest(HttpListenerResponse res) + { + res.StatusCode = 200; + res.ContentType = "application/json"; + var version = new Version() { ServerVersion = _parent.GetConfigWithPluginVersion().RuntimeInfo.PluginVersion }; + var message = JsonConvert.SerializeObject(version); + this.LogVerbose("{message}", message); + + var body = Encoding.UTF8.GetBytes(message); + res.ContentLength64 = body.LongLength; + res.Close(body, true); + } + + /// + /// Handler to return images requested by the user app + /// + /// + /// + private void HandleImageRequest(HttpListenerRequest req, HttpListenerResponse res) + { + var path = req.RawUrl; + + Debug.LogMessage(LogEventLevel.Verbose, "Requesting Image: {0}", this, path); + + var imageBasePath = Global.DirectorySeparator + "html" + Global.DirectorySeparator + "logo" + Global.DirectorySeparator; + + var image = path.Split('/').Last(); + + var filePath = imageBasePath + image; + + Debug.LogMessage(LogEventLevel.Verbose, "Retrieving Image: {0}", this, filePath); + + if (File.Exists(filePath)) + { + if (filePath.EndsWith(".png")) + { + res.ContentType = "image/png"; + } + else if (filePath.EndsWith(".jpg")) + { + res.ContentType = "image/jpeg"; + } + else if (filePath.EndsWith(".gif")) + { + res.ContentType = "image/gif"; + } + else if (filePath.EndsWith(".svg")) + { + res.ContentType = "image/svg+xml"; + } + byte[] contents = File.ReadAllBytes(filePath); + res.ContentLength64 = contents.LongLength; + res.Close(contents, true); + } + else + { + res.StatusCode = (int)HttpStatusCode.NotFound; + res.Close(); + } + } + + /// + /// Handles requests to serve files for the Angular single page app + /// + /// + /// + /// + private void HandleUserAppRequest(HttpListenerRequest req, HttpListenerResponse res, string path) + { + this.LogVerbose("Requesting User app file"); + + string filePath = path.Split('?')[0]; + + // remove the token from the path if found + //string filePath = path.Replace(string.Format("?token={0}", token), ""); + + // if there's no file suffix strip any extra path data after the base href + if (filePath != _userAppBaseHref && !filePath.Contains(".") && (!filePath.EndsWith(_userAppBaseHref) || !filePath.EndsWith(_userAppBaseHref += "/"))) + { + var suffix = filePath.Substring(_userAppBaseHref.Length, filePath.Length - _userAppBaseHref.Length); + if (suffix != "/") + { + //Debug.Console(2, this, "Suffix: {0}", suffix); + filePath = filePath.Replace(suffix, ""); + } + } + + // swap the base href prefix for the file path prefix + filePath = filePath.Replace(_userAppBaseHref, _appPath); + + this.LogVerbose("filepath: {filePath}", filePath); + + + // append index.html if no specific file is specified + if (!filePath.Contains(".")) + { + if (filePath.EndsWith("/")) + { + filePath += "index.html"; + } + else + { + filePath += "/index.html"; + } + } + + // Set ContentType based on file type + if (filePath.EndsWith(".html")) + { + this.LogVerbose("Client requesting User App"); + + res.ContentType = "text/html"; + } + else + { + if (path.EndsWith(".js")) + { + res.ContentType = "application/javascript"; + } + else if (path.EndsWith(".css")) + { + res.ContentType = "text/css"; + } + else if (path.EndsWith(".json")) + { + res.ContentType = "application/json"; + } + } + + this.LogVerbose("Attempting to serve file: {filePath}", filePath); + + var remoteIp = req.RemoteEndPoint.Address; + + // Check if the request is coming from the CS LAN and if so, send the CS config instead of the LAN config + if (csSubnetMask != null && csIpAddress != null && remoteIp.IsInSameSubnet(csIpAddress, csSubnetMask) && filePath.Contains(appConfigFileName)) + { + filePath = filePath.Replace(appConfigFileName, appConfigCsFileName); + } + + byte[] contents; + if (File.Exists(filePath)) + { + this.LogVerbose("File found: {filePath}", filePath); + contents = File.ReadAllBytes(filePath); + } + else + { + this.LogVerbose("File not found: {filePath}", filePath); + res.StatusCode = (int)HttpStatusCode.NotFound; + res.Close(); + return; + } + + res.ContentLength64 = contents.LongLength; + res.Close(contents, true); + } + + /// + /// StopServer method + /// + public void StopServer() + { + this.LogVerbose("Stopping WebSocket Server"); + _server.Stop(CloseStatusCode.Normal, "Server Shutting Down"); + } + + /// + /// Sends a message to all connectd clients + /// + /// + /// + /// SendMessageToAllClients method + /// + public void SendMessageToAllClients(string message) + { + foreach (var clientContext in UiClients.Values) + { + if (clientContext.Client != null && clientContext.Client.Context.WebSocket.IsAlive) + { + clientContext.Client.Context.WebSocket.Send(message); + } + } + } + + /// + /// Sends a message to a specific client + /// + /// + /// + /// + /// SendMessageToClient method + /// + public void SendMessageToClient(object clientId, string message) + { + if (clientId == null) + { + return; + } + + if (UiClients.TryGetValue((string)clientId, out UiClientContext clientContext)) + { + if (clientContext.Client != null) + { + var socket = clientContext.Client.Context.WebSocket; + + if (socket.IsAlive) + { + socket.Send(message); + } + } + } + else + { + this.LogWarning("Unable to find client with ID: {clientId}", clientId); + } + } + } + + /// + /// Represents a Version + /// + public class Version + { + [JsonProperty("serverVersion")] + public string ServerVersion { get; set; } + + [JsonProperty("serverIsRunningOnProcessorHardware")] + public bool ServerIsRunningOnProcessorHardware { get; private set; } + + public Version() + { + ServerIsRunningOnProcessorHardware = true; + } + } + + /// + /// Represents a UiClientContext + /// + public class UiClientContext + { + /// + /// Gets or sets the Client + /// + public UiClient Client { get; private set; } + /// + /// Gets or sets the Token + /// + public JoinToken Token { get; private set; } + + public UiClientContext(JoinToken token) + { + Token = token; + } + + /// + /// SetClient method + /// + public void SetClient(UiClient client) + { + Client = client; + } + + } + + /// + /// Represents a ServerTokenSecrets + /// + public class ServerTokenSecrets + { + /// + /// Gets or sets the GrantCode + /// + public string GrantCode { get; set; } + + public Dictionary Tokens { get; set; } + + public ServerTokenSecrets(string grantCode) + { + GrantCode = grantCode; + Tokens = new Dictionary(); + } + } + + /// + /// Represents a JoinToken + /// + public class JoinToken + { + /// + /// Gets or sets the Code + /// + public string Code { get; set; } + + public string RoomKey { get; set; } + + public string Uuid { get; set; } + + public string TouchpanelKey { get; set; } = ""; + + /// + /// Gets or sets the Token + /// + public string Token { get; set; } = null; + } + + /// + /// Represents a JoinResponse + /// + public class JoinResponse + { + [JsonProperty("clientId")] + /// + /// Gets or sets the ClientId + /// + public string ClientId { get; set; } + + [JsonProperty("roomKey")] + public string RoomKey { get; set; } + + [JsonProperty("systemUUid")] + public string SystemUuid { get; set; } + + [JsonProperty("roomUUid")] + /// + /// Gets or sets the RoomUuid + /// + public string RoomUuid { get; set; } + + [JsonProperty("config")] + /// + /// Gets or sets the Config + /// + public object Config { get; set; } + + [JsonProperty("codeExpires")] + /// + /// Gets or sets the CodeExpires + /// + public DateTime CodeExpires { get; set; } + + [JsonProperty("userCode")] + /// + /// Gets or sets the UserCode + /// + public string UserCode { get; set; } + + [JsonProperty("userAppUrl")] + /// + /// Gets or sets the UserAppUrl + /// + public string UserAppUrl { get; set; } + + [JsonProperty("enableDebug")] + /// + /// Gets or sets the EnableDebug + /// + public bool EnableDebug { get; set; } + } +} diff --git a/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs b/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs index 1b797767..cf125d29 100644 --- a/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs +++ b/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs @@ -12,12 +12,24 @@ namespace PepperDash.Essentials.WebSocketServer } } + /// + /// Represents a WebSocketServerSecret + /// public class WebSocketServerSecret : ISecret { + /// + /// Gets or sets the Provider + /// public ISecretProvider Provider { get; private set; } + /// + /// Gets or sets the Key + /// public string Key { get; private set; } + /// + /// Gets or sets the Value + /// public object Value { get; private set; } public WebSocketServerSecret(string key, object value, ISecretProvider provider) @@ -27,6 +39,9 @@ namespace PepperDash.Essentials.WebSocketServer Provider = provider; } + /// + /// DeserializeSecret method + /// public ServerTokenSecrets DeserializeSecret() { return JsonConvert.DeserializeObject(Value.ToString()); diff --git a/src/PepperDash.Essentials/ControlSystem.cs b/src/PepperDash.Essentials/ControlSystem.cs index 936255a3..56615017 100644 --- a/src/PepperDash.Essentials/ControlSystem.cs +++ b/src/PepperDash.Essentials/ControlSystem.cs @@ -18,6 +18,9 @@ using PepperDash.Essentials.Core.Routing; namespace PepperDash.Essentials { + /// + /// Main control system class that inherits from CrestronControlSystem and manages program lifecycle + /// public class ControlSystem : CrestronControlSystem, ILoadConfig { HttpLogoServer LogoServer; @@ -26,6 +29,9 @@ namespace PepperDash.Essentials private CEvent _initializeEvent; private const long StartupTime = 500; + /// + /// Initializes a new instance of the ControlSystem class + /// public ControlSystem() : base() { @@ -62,8 +68,9 @@ namespace PepperDash.Essentials } /// - /// Entry point for the program + /// InitializeSystem method /// + /// public override void InitializeSystem() { // If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate @@ -159,9 +166,7 @@ namespace PepperDash.Essentials } /// - /// Determines if the program is running on a processor (appliance) or server (VC-4). - /// - /// Sets Global.FilePathPrefix and Global.ApplicationDirectoryPathPrefix based on platform + /// DeterminePlatform method /// public void DeterminePlatform() { @@ -246,7 +251,7 @@ namespace PepperDash.Essentials } /// - /// Begins the process of loading resources including plugins and configuration data + /// GoWithLoad method /// public void GoWithLoad() { @@ -342,9 +347,9 @@ namespace PepperDash.Essentials return configExists; } - /// - /// - /// + /// + /// TearDown method + /// public void TearDown() { Debug.LogMessage(LogEventLevel.Information, "Tearing down existing system"); @@ -380,7 +385,7 @@ namespace PepperDash.Essentials } /// - /// Reads all devices from config and adds them to DeviceManager + /// LoadDevices method /// public void LoadDevices() { @@ -441,7 +446,7 @@ namespace PepperDash.Essentials /// - /// Helper method to load tie lines. This should run after devices have loaded + /// LoadTieLines method /// public void LoadTieLines() { @@ -467,7 +472,7 @@ namespace PepperDash.Essentials } /// - /// Reads all rooms from config and adds them to DeviceManager + /// LoadRooms method /// public void LoadRooms() { diff --git a/src/PepperDash.Essentials/Factory/DeviceFactory.cs b/src/PepperDash.Essentials/Factory/DeviceFactory.cs index 262130f1..7a2df7d1 100644 --- a/src/PepperDash.Essentials/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials/Factory/DeviceFactory.cs @@ -22,6 +22,9 @@ namespace PepperDash.Essentials public class DeviceFactory { + /// + /// Initializes a new instance of the DeviceFactory class and loads all device type factories + /// public DeviceFactory() { var assy = Assembly.GetExecutingAssembly(); diff --git a/src/PepperDash.Essentials/HttpLogoServer.cs b/src/PepperDash.Essentials/HttpLogoServer.cs index 1c7a4783..d5d133e6 100644 --- a/src/PepperDash.Essentials/HttpLogoServer.cs +++ b/src/PepperDash.Essentials/HttpLogoServer.cs @@ -9,28 +9,31 @@ using Serilog.Events; namespace PepperDash.Essentials { + /// + /// HTTP server for serving logo images and files + /// public class HttpLogoServer { /// - /// + /// The HTTP server instance /// readonly HttpServer _server; /// - /// + /// The directory containing files to serve /// readonly string _fileDirectory; /// - /// + /// Dictionary mapping file extensions to content types /// public static Dictionary ExtensionContentTypes; /// - /// + /// Initializes a new instance of the HttpLogoServer class /// - /// - /// + /// Port number for the HTTP server + /// Directory containing files to serve public HttpLogoServer(int port, string directory) { ExtensionContentTypes = new Dictionary @@ -57,8 +60,10 @@ namespace PepperDash.Essentials } /// - /// + /// Handles incoming HTTP requests and serves files from the configured directory /// + /// The HTTP server instance + /// HTTP request arguments void Server_OnHttpRequest(object sender, OnHttpRequestArgs args) { var path = args.Request.Path; @@ -102,8 +107,9 @@ namespace PepperDash.Essentials } /// - /// + /// Handles program status events and closes the server when the program is stopping /// + /// The program status event type void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType) { if (programEventType == eProgramStatusEventType.Stopping) @@ -111,10 +117,13 @@ namespace PepperDash.Essentials } /// - /// + /// Gets the content type for a file based on its extension + /// + /// The file extension + /// The corresponding content type string + /// + /// GetContentType method /// - /// - /// public static string GetContentType(string extension) { var type = ExtensionContentTypes.ContainsKey(extension) ? ExtensionContentTypes[extension] : "text/plain"; diff --git a/src/PepperDash.Essentials/PepperDash.Essentials.csproj b/src/PepperDash.Essentials/PepperDash.Essentials.csproj index 04ae0d86..1ddd8e54 100644 --- a/src/PepperDash.Essentials/PepperDash.Essentials.csproj +++ b/src/PepperDash.Essentials/PepperDash.Essentials.csproj @@ -20,8 +20,9 @@ full - - pdbonly + + pdbonly + bin\$(Configuration)\PepperDashEssentials.xml